[TOC]
### 一、什么是NPC
在奇迹,除玩家外,其他所有有生命的物体都是NPC,包括商店NPC、一般的NPC和怪物NPC,还有一些特殊的NPC
### 二、NPC属性的定义
在文件:zMu902\IGCData\Monsters\IGC_MonsterList.xml
此文件对每个NPC的属性作了定义,如果你要修改某个怪物的血量、刷新时间等属性时,只要找到对应的怪物进行对应的修改就可以
~~~
<?xml version="1.0" encoding="utf-8"?>
<!--
// == NPC属性定义文件
// ============================================================
Index:编号
ExpType:未知,一般取0
Name:名字
Level:等级
HP:HP值,血量
MP:魔法值
DamageMin:最低攻
DamageMax:最高攻
Defense:防御
MagicDefense:魔防
AttackRate:攻击
BlockRate:防御率
MoveRange:移动范围
AttackType:攻击类型
AttackRange:攻距离
ViewRange:视野
MoveSpeed:移动速度
AttackSpeed:攻速度
RegenTime:重生时间(秒)
Attribute:类型 未知
ItemDropRate:物品爆率
MoneyDropRate:爆钱率
MaxItemLevel:暴出物的最大等级
MonsterSkill:技能
IceRes:抗冰冻
PoisonRes:抗毒性
LightRes抗雷
FireRes抗火性
PentagramMainAttrib:主属性类型
PentagramAttribPattern:次属性
PentagramDamageMin:属性最小攻击力
PentagramDamageMax:属性最大攻击力
PentagramAttackRate:属性攻击率
PentagramDefenseRate:属性防御率
PentagramDefense:属性防御
///////////////////////////////////////////////////////////////////////////////////////////////
-->
<MonsterList>
<Monster Index="0" ExpType="0" Name="牛怪" Level="6" HP="100" MP="0" DamageMin="16" DamageMax="20" Defense="6" MagicDefense="0" AttackRate="28" BlockRate="6" MoveRange="3" AttackType="0" AttackRange="1" ViewRange="5" MoveSpeed="400" AttackSpeed="1600" RegenTime="1" Attribute="2" ItemDropRate="130" MoneyDropRate="20" MaxItemLevel="6" MonsterSkill="0" IceRes="0" PoisonRes="0" LightRes="0" FireRes="0" PentagramMainAttrib="0" PentagramAttribPattern="0" PentagramDamageMin="0" PentagramDamageMax="0" PentagramAttackRate="0" PentagramDefenseRate="0" PentagramDefense="4" />
~~~
### 三、NPC在地图中位置的定义和修改
**1. 商店NPC**
控制商店NPC所处地图位置的文件是:zMuServer\IGCData\IGC_ShopList.xml
~~~
NPCIndex:NPC编号
MapNumber:地图编号
PosX:X轴坐标
PosY:Y轴坐标
Dir:NPC朝向
0:中心
1:西南
2:南方
3:东南
4:东方
5:东北
6:北方
7:西北
8:西部
-1:随机
VipType: Minimum VIP Level to use the shop
// ~ 0: Free and any VIP Type
// ~ 1: Player with Bronze, Silver, Gold, Platinum VIP can use the shop
// ~ 2: Silver, Gold, Platinum
// ~ 3: Gold, Platinum
// ~ 4: Platinum only
// Or other defined VIP Type according to IGC_VipSettings.xml
GMShop:是否是只有GM才能访问, 0/1
FileName:对应的商店物品定义文件,在IGCData\Shops\文件夹下
MossMerchant: defines a Moss Merchant Lottery Shop, only for NPC 492, should always be 1
BattleCore: Defines a shop located on Battle Core server, if so set to 1
-->
<ShopList>
<Shop NPCIndex="251" MapNumber="0" PosX="116" PosY="141" Dir="3" VipType="0" GMShop="0" FileName="NPC(251)_Hanzo_the_Blacksmith.xml" /> <!-- Lorencia -->
<Shop NPCIndex="251" MapNumber="34" PosX="145" PosY="14" Dir="1" VipType="0" GMShop="0" FileName="NPC(251)_Hanzo_the_Blacksmith.xml" /> <!-- CryWolf -->
~~~
**2. 怪物NPC和一般NPC**
~~~
普通线路怪物排位:zMuServer\IGCData\Monsters\IGC_MonsterSpawn.xml
事件怪物排位:vzMuServer\IGCData\Monsters\IGC_MonsterSpawn_Event.xml
攻城线路怪物排位:zMuServer\IGCData\Monsters\IGC_MonsterSpawnCS.xml
~~~
其定义的格式如下:
~~~
<!---
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ### MonsterSpawn::Map ###
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Number: 地图编号 Number of map to spawn the monster on, refer to IGC_MapList.xml
// Name: 地图名称 Name of a map, used for in-file description and logging purpose
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ### MonsterSpawn::Map::Spot ###
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Type: Type of spot:
// ~ 0: NPC/Traps
// ~ 1: Multiple Monsters Spawn
// ~ 2: Single Monster Spawn
// ~ 3: Multiple Elemental Monster Spawn
// ~ 4: Single Elemental Monster Spawn
// Description: Spot description, used for in-file description and logging purpose
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~ Spot attributes description
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Index: Index of monster or NPC to spawn, refer to IGC_MonsterList.xml ~ (Spot Type: 0-3)
// Distance: Distance to spawn the monsters/NPC from original location ~ (Spot Type: 0-3)
// StartX: StartX Coordinate of monster spawn ~ (Spot Type: 0-3)
// StartY: StartY Coordinate of monster spawn ~ (Spot Type: 1, 3)
// EndX: End X Coordinate of monster spawn ~ (Spot Type: 0-3)
// EndY: End Y Coordinate of monster spawn ~ (Spot Type: 1, 3)
// Dir: Direction the monster/NPC looks at after spawn ~ (Spot Type: 0-3)
// ~ 0: Central
// ~ 1: South-West
// ~ 2: South
// ~ 3: South-East
// ~ 4: East
// ~ 5: North-East
// ~ 6: North
// ~ 7: North-West
// ~ 8: West
// ~ -1: Random
// Count: Count of monsters to spawn ~ (Spot Type: 1, 3)
// Element: Element type to spawn the monster with ~ (Spot Type: 3)
// ~ 0: No Elemental attribute
// ~ 1: Fire
// ~ 2: Water
// ~ 3: Earth
// ~ 4: Wind
// ~ 5: Darkness
// ~ 6: Random
//
//~~ IMPORTANT EXCLUSIONS
-->
~~~
<MonsterSpawn>
<Map Number="0" Name="Lorencia">
<Spot Type="0" Description="NPC">
<Spawn Index="406" Distance="0" StartX="131" StartY="135" Dir="3" /> <!-- 弟子黛彬-->
<Spawn Index="226" Distance="0" StartX="122" StartY="110" Dir="3" /> <!-- -->
<Spawn Index="240" Distance="0" StartX="147" StartY="145" Dir="1" /> <!-- -->
<Spawn Index="240" Distance="0" StartX="146" StartY="110" Dir="3" /> <!-- -->
<Spawn Index="257" Distance="0" StartX="132" StartY="165" Dir="3" /> <!-- -->
<Spawn Index="257" Distance="0" StartX="132" StartY="90" Dir="3" /> <!-- -->
<Spawn Index="257" Distance="0" StartX="170" StartY="129" Dir="1" /> <!-- -->
<Spawn Index="249" Distance="10" StartX="131" StartY="88" Dir="1" /> <!-- -->
<Spawn Index="249" Distance="20" StartX="173" StartY="125" Dir="3" /> <!-- -->
<Spawn Index="249" Distance="20" StartX="94" StartY="130" Dir="7" /> <!-- -->
<Spawn Index="249" Distance="20" StartX="94" StartY="125" Dir="7" /> <!-- -->
<Spawn Index="249" Distance="30" StartX="131" StartY="148" Dir="1" /> <!-- -->
<Spawn Index="257" Distance="0" StartX="96" StartY="129" Dir="1" /> <!-- -->
<Spawn Index="375" Distance="0" StartX="132" StartY="161" Dir="3" /> <!-- -->
<Spawn Index="543" Distance="0" StartX="144" StartY="127" Dir="2" /> <!-- -->
<Spawn Index="547" Distance="0" StartX="139" StartY="138" Dir="3" /> <!-- -->
<Spawn Index="584" Distance="0" StartX="114" StartY="132" Dir="3" /> <!-- -->
<Spawn Index="579" Distance="0" StartX="130" StartY="126" Dir="3" /> <!-- -->
<Spawn Index="478" Distance="0" StartX="130" StartY="129" Dir="3" /> <!-- -->
</Spot>
<Spot Type="1" Description="Multi~Spawn">
<Spawn Index="3" Distance="30" StartX="180" StartY="90" EndX="226" EndY="244" Dir="-1" Count="45" /> <!-- -->
<Spawn Index="2" Distance="30" StartX="180" StartY="90" EndX="226" EndY="244" Dir="-1" Count="40" /> <!-- -->
<Spawn Index="2" Distance="30" StartX="135" StartY="20" EndX="240" EndY="88" Dir="-1" Count="20" /> <!-- -->
<Spawn Index="0" Distance="30" StartX="135" StartY="20" EndX="240" EndY="88" Dir="-1" Count="45" /> <!-- -->
<Spawn Index="6" Distance="30" StartX="95" StartY="168" EndX="175" EndY="244" Dir="-1" Count="20" /> <!-- -->
<Spawn Index="14" Distance="30" StartX="95" StartY="168" EndX="175" EndY="244" Dir="-1" Count="15" /> <!-- -->
<Spawn Index="1" Distance="30" StartX="8" StartY="11" EndX="94" EndY="244" Dir="-1" Count="45" /> <!-- -->
<Spawn Index="4" Distance="30" StartX="8" StartY="11" EndX="94" EndY="244" Dir="-1" Count="45" /> <!-- -->
<Spawn Index="7" Distance="30" StartX="8" StartY="11" EndX="60" EndY="80" Dir="-1" Count="15" /> <!-- -->
</Spot>
</Map>
~~~
- 本教程总纲
- 操作系统篇
- 操作系统的选择
- 虚拟机方式安装操作系统
- 数据库篇
- 数据库的选择
- 数据库的还原
- 数据库常用sql语句
- 开始架设篇
- 搭建后游戏的设置和修改
- IGCData下所有配置文件功能说明
- [D]Bots_机器人
- [D]CashShop_X商店
- [D]ChaosCards_宝箱配置
- [D]Custom_自定义配置
- [D]Events_事件控制
- [D]ItemBags_掉落设置(事件、boss等)
- [D]Items_物品装备
- [D]Langs_语言讯息
- [D]MapTerrains_地图地形
- [D]Monsters_怪物属性刷新
- [D]MuunSystem_宠物系统
- [D]PentagramSystem_元素卷轴系统
- [D]Plugins_插件
- [D]Scripts_脚本
- [D]Shops_NPC商店
- [D]Skills_技能
- [D]SocketSystem_镶嵌系统
- [D]Warps_移动
- CheckSum.dat
- IGC_AddMonsterStats_新增怪物属性.xml
- IGC_AntiHack_反黑客系统.ini
- IGC_AntiHack_VIEJO_旧版反黑客系统.ini
- IGC_AppointItemDrop_指定物品爆率.xml
- IGC_BattleCore_强者之战配置.ini
- IGC_BonusMapData_扩展地图配置.ini
- IGC_BotList_假人BUFF系统.xml
- IGC_BuffEffectManager_BUFF特效设置.xml
- IGC_CalcCharacter_角色数据配置.ini
- IGC_CashShop_X商店.ini
- IGC_ChaosBox_玛雅合成.ini
- IGC_ClassQuest_转职任务所需物品.xml
- IGC_Common_服务器配置.ini
- IGC_CommonServer.cfg
- IGC_Commands_游戏命令设置.ini
- IGC_DropManager_自定义物品掉落设置.xml
- IGC_EvolutionMonster.xml
- IGC_ExpSystem_经验系统配置.xml
- IGC_FormulaData.xml
- GC_GeneralDrop_一般物品掉落.xml
- IGC_GensSystem_家族系统.xml
- IGC_HarmonySystem_提炼系统.ini
- IGC_ItemOptionRate.txt
- IGC_ItemUpgradeJewel_物品升级宝石设置.xml
- IGC_ItemValue_物品价格.ini
- IGC_LangBase_基本语言信息.xml
- IGC_MapAttribute_地图属性.xml
- IGC_MapList_地图列表.xml
- IGC_MapNonPK_不能PK的地图.xml
- IGC_MapServerInfo_服务器线路对应地图设置.xml
- IGC_MarriageSystem_结婚系统.xml
- IGC_MasterSkillTree_大师技能树.xml
- IGC_MiniMap_Tab小地图.xml
- IGC_MiningSystem_潘多拉挖矿系统.xml
- IGC_MonsterGroupRegen_美社莎怪物刷新.xml
- IGC_MonsterItemDropRate_怪物掉落设置.xml
- IGC_MonsterKillCount_怪物击杀配置.xml
- IGC_MuHelper_内置助手设置.ini
- IGC_MuRummy_卡牌游戏活动.ini
- IGC_NewsSystem_新闻公告.xml
- IGC_OffTrade_离线交易.xml
- IGC_PartyBonus_角色赏金.xml
- IGC_PetSettings_宠物配置.ini
- IGC_PlayerInfo_角色升级配置.xml
- IGC_PlayerKillSystem_红名系统.xml
- IGC_PriceSettings_NPC商店价格.ini
- IGC_ProhibitedSymbols_过滤系统配置.xml
- IGC_ProhibitedWords_禁止输入的文字.xml
- IGC_PVPZone_PVP地图设置.xml
- IGC_ResetCommand_转生命令.ini
- IGC_RuudShop.xml
- IGC_SetItemDropManager.xml
- IGC_ShieldGageSystem.ini
- IGC_ShopList_商店NPC相关.xml
- IGC_StatSpecialize_各职业特殊能力设置.xml
- IGC_ZenDrop_金币掉落.xml
- NPC(包括怪物)的属性、刷新时间、出现地图位置等信息的定义与修改
- NPC商店物品的修改和NPC商店编号的查询
- 奇迹各地图编号、中文名称和英文名称对照表
- 角色信息:升级点数等信息的修改
- 地图移动等级的修改
- 触发器:新建人物送点和Mu币等的修改
- 其他问题集锦
- 其他维护
- PHP版网站对接奇迹Mu——实现自动注册等功能
- 奇迹Mu直接sql添加装备
