欢迎来到Minecraft插件百科!
对百科编辑一脸懵逼?
帮助:快速入门
带您快速熟悉百科编辑!
因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289
查看“Magic/NPC”的源代码
<
Magic
←
Magic/NPC
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于这些用户组的用户执行:
用户
、
自动确认用户
、
巡查者
您可以查看和复制此页面的源代码。
魔法NPC可用于对玩家施法,可以让玩家藉此检查法术进阶情况、购买法杖、物品、技能等等 同样可以用于右键时触发命令,就和[[Magic/MagicMobs|魔法生物]]里的生物一样拥有触发器 == WorldGuard == 注意: 如果你想在WorldGuard的区域内使用NPC,需要在WorldGuard的config.yml中设置<code>mobs.block-plugin-spawning: false</code> == Citizens NPCs == 如果你刚好在使用If you are already using [[Magic/Citizens|公民]],你也可以将 "魔法" 或 "命令" 附到魔法NPC身上以实现类似的效果 如果你已经在使用Magic提供的Citizens NPCs,并且只想单纯地使用魔法NPC,仅需输入命令<code>/mnpc import</code>。在你检验完所有的NPC之后(后来NPC完全相同),关闭服务器并把Citizens插件删除 == 准备工作 == 使用命令 <code>/mnpc add Spell Shop</code> 以创建一个新的Spell Shop(法术商店) NPC。默认地,NPC是一个村民。你可以使用 <code>/mnpc type witch</code> 魔法生物可以被当作NPC样板使用,那么加装了LibsDisguises插件的话同样可以使用伪装,这样就可以做出一个假人NPC了 == 释放法术 == 你可以制作一个右键释放法术的NPC,仅需指令: <code>/mnpc cast spellshop</code>(译者注:由于Magic的商店一般都属于法术,而释放法术触发商店不失为一种选择) 同样可以给法术加参数,例如 <code>/mnpc cast blink cooldown 0 pdy 10</code>, 这样Blink法术在释放时会直接在空气中触发并且无需冷却 默认地,NPC会在被玩家点击时强制释放法术,这对于商店NPC来说很有用。但是如果你要做一个恢复玩家血量的NPC,可能就需要这样一些操作了: <pre class="">/mnpc cast heal /mnpc configure cast_source npc</pre> 译者注:首先给NPC绑定法术Heal【治疗】,之后设置此NPC施法源为NPC,因为部分治疗法术需要有一个发出点,如果不这样设置可能会导致治疗法术打在NPC自己身上 === Built-in Spells for NPC Use === The following spells are intended for NPC use: * '''upgrades''' - Provides a GUI for a player to check on their upgrade progress * '''spellshop''' - A wand-sensitive spell shop that can replace enchanting as a progression mechanism * '''magicitemshop''' - A shop to sell all of the magic items * '''engineershop''' - A shop to allow players to progress to Engineer * '''architectshop''' - A shop to allow players to progress to Architect * '''bookshop''' - A shop to give away spellbooks that describe available spells * '''broomshop''' - A shop to sell brooms * '''wandshop''' - A shop to sell a few example wands * '''tweakshop''' - A shop for wand "tweaks", which are free (inventory/chest mode, etc) * '''colorshop''' - A shop for selling custom wand colors and effects * '''mobshop''' - A shop with custom mob spawn eggs * '''withdrawals''' - An exchange shop for currency items * '''deposits''' - An exchange shop for currency items * '''ledgershop''' - A simple shop that sells the Ledger item * '''lootshop''' - A sell shop for mob loot * '''trinketshop''' - A shop with decorative player skulls * '''upgradeshop''' - A shop for selling wand upgrades (hotbar upgrades, anti-hunger) * '''fillwand''' - For rank-based servers, fills a player's wand with all of their spells * '''addspell''' - Can be used to give players a specific spell * '''enchantwand''' - Can be used as a replacement for the enchantment table * '''tpshop''' - Allow a random tp for $1 ==== NPC shop parameters ==== You can use /cast in-game with tab-completion to get an idea for available parameters. In particular, all of the shops support a common set of useful parameters: * '''confirm''' - Whether or not to show the confirmation screeen * '''path''' - A player must be on or past this enchanting path to use this shop * '''path_end''' - A player must have completed this enchanting path and be blocked on required spells * '''path_exact''' - A player must be on this exact path * '''auto_upgrade''' - Whether to advance the player to the next path once they meet the requirements * '''require_wand''' - Whether or not to require a wand, useful to prevent players from having spell and upgrade items === Examples === Some simple examples: <pre class=""># Set up an upgrades NPC /mnpc cast upgrades # Set up an NPC to give the player the blink spell in exchange for 30 dollars /mnpc cast addspell spell blink /mnpc costs 30 # Set up a spell shop /mnpc cast spellshop # Set up a random TP NPC /mnpc cast tpshop /mnpc configure helmet randomtp</pre> As with any spell, these spells can be customized or used as the basis for new spells via spells.yml. == Running Commands == An NPC can also be set to run a set of commands, such as <code>/mnpc configure commands time set day;weather clear</code> Command traits are similar to "magic" traits, but instead of a "spell" parameter they take a "command" parameter. === Command Trait Selectors === The following selectors can be used in a command: * '''@p''' The player's IGN * '''@pn''' The player's IGN (same as @p) * '''@pd''' The player's display name * '''@uuid''' The player's UUID * '''@world''' The world the player is in * '''@x''' The player's x coordinate * '''@y''' The player's y coordinate * '''@z''' The player's z coordinate === Examples === <pre class="">/mnpc configure command broadcast @p has clicked on an NPC at @world,@x,@y,@z</pre> === Player NPCs === Magic uses vanilla mobs for NPCs, as such it can not make players. However, if you have LibsDisguises you can make an NPC ''look'' like a player with the command <code>/mnpc player NathanWolf</code>
返回
Magic/NPC
。
导航菜单
个人工具
登录
命名空间
页面
讨论
大陆简体
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
编辑相关
百科公告
编辑帮助
互助客栈
贡献分数
测试沙盒
发布条目
插件分类
管理
安全
聊天
编程
经济
修正
娱乐
综合
信息
机械
角色
传送
网页
整地
创世
付费
其它
工具
链入页面
相关更改
特殊页面
页面信息
相关网站
MCMOD百科
Minecraft中文百科
Minecraft纪念论坛
Minecraft百度贴吧
红石中继站
虚无世界Wiki