--mapscriptdata: --0:记录龙帝所施放BUFF颜色 --1: --需求1,释放技能(5100601)时,同等几率给自己加状态并喊话 function s5100601_Cast(MapID, InstanceID, skillid, TargetID) local TypeID = cre.GetCreatureTypeID(MapID,InstanceID, TargetID) longdi = TargetID if TypeID == 1535701 then local temp = math.random(1,100) if temp<=25 then unit.AddBuff(MapID, InstanceID, TargetID, 9460201, TargetID) map.SetMapScriptData(MapID,InstanceID,1,0,9460201) cre.MonsterSay(MapID, InstanceID, TargetID, 50082) --绿瘴环绕,八阵图起,你们的死期到了。。。 zisemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535725,649,13300,252) heisemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535726,612,13300,292) lvsemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535727,649,13300,332) hongsemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535728,612,13300,372) map.MapCreateCreature(MapID,InstanceID,1535729,638,13300,322) local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 13, 0) msg.AddMsgEvent(MsgID, 1, 13806) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) elseif temp<=50 then unit.AddBuff(MapID, InstanceID, TargetID, 9460301, TargetID) map.SetMapScriptData(MapID,InstanceID,1,0,9460301) cre.MonsterSay(MapID, InstanceID, RoleID, 50083) --黑雾萦绕,八阵图起,你们的死期到了。。。 zisemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535725,612,13300,292) heisemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535726,649,13300,332) lvsemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535727,612,13300,372) hongsemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535728,649,13300,252) map.MapCreateCreature(MapID,InstanceID,1535729,638,13300,322) local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 13, 0) msg.AddMsgEvent(MsgID, 1, 13807) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) elseif temp<=75 then unit.AddBuff(MapID, InstanceID, TargetID, 9460401, TargetID) map.SetMapScriptData(MapID,InstanceID,1,0,9460401) cre.MonsterSay(MapID, InstanceID, TargetID,50084) --紫气缭绕,八阵图起,你们的死期到了。。。 zisemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535725,649,13300,332) heisemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535726,612,13300,372) lvsemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535727,649,13300,252) hongsemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535728,612,13300,292) map.MapCreateCreature(MapID,InstanceID,1535729,638,13300,322) local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 13, 0) msg.AddMsgEvent(MsgID, 1, 13808) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) else unit.AddBuff(MapID, InstanceID, TargetID, 9460501, TargetID) map.SetMapScriptData(MapID,InstanceID,1,0,9460501) cre.MonsterSay(MapID, InstanceID, TargetID, 50085) --红光反照,八阵图起,你们的死期到了。。。 zisemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535725,612,13300,372) heisemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535726,649,13300,252) lvsemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535727,612,13300,292) hongsemuzhuang = map.MapCreateCreature(MapID,InstanceID,1535728,649,13300,332) map.MapCreateCreature(MapID,InstanceID,1535729,638,13300,322) local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 13, 0) msg.AddMsgEvent(MsgID, 1, 13809) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end end end aux.RegisterSkillEvent(5100601, 1, "s5100601_Cast") --需求2,使用技能(5100101)时,召唤1个分身(1535710) function s5100101_Cast(MapID, InstanceID, SkillID, TargetID) local x, y ,z = unit.GetPosition(MapID, InstanceID, TargetID) map.MapCreateCreature(MapID, InstanceID,1535710, x, y, z) cangkuguanliyuan = TargetID end aux.RegisterSkillEvent(5100101, 1, "s5100101_Cast") --需求3,使用技能(5100201)时,召唤3个分身(1535710) function s5100201_Cast(MapID, InstanceID, SkillID, TargetID) local x, y ,z = unit.GetPosition(MapID, InstanceID, TargetID) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) cangkuguanliyuan = TargetID end aux.RegisterSkillEvent(5100201, 1, "s5100201_Cast") --需求4,使用技能(5100301)时,召唤5个分身(1535710) function s5100301_Cast(MapID, InstanceID, SkillID, TargetID) local x, y ,z = unit.GetPosition(MapID, InstanceID, TargetID) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) cangkuguanliyuan = TargetID end aux.RegisterSkillEvent(5100301, 1, "s5100301_Cast") --需求5,使用技能(5100401)时,召唤7个分身(1535710) function s5100401_Cast(MapID, InstanceID, SkillID, TargetID) local x, y ,z = unit.GetPosition(MapID, InstanceID, TargetID) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) map.MapCreateCreature(MapID, InstanceID, 1535710, x, y, z) cangkuguanliyuan = TargetID end aux.RegisterSkillEvent(5100401, 1, "s5100401_Cast") --需求6,使用技能(5100001)时,怪物(1535706)喊话 function s5100001_Cast(MapID, InstanceID, skillid, RoleID) local TypeID = cre.GetCreatureTypeID(MapID,InstanceID, RoleID) if TypeID == 1535706 then cre.MonsterSay(MapID, InstanceID, RoleID, 50086) --啧啧,我有天罡附体,你们打我只怕是自寻死路。。。 end end aux.RegisterSkillEvent(5100001, 1, "s5100001_Cast") --需求7,使用技能(5101801)时,在玩家脚下刷陷阱(同等概率四种陷阱,ID4910063,4910064,4910065,4910066) function s5101801_Cast(MapID, InstanceID, skillid, RoleID) local TypeID = cre.GetCreatureTypeID(MapID,InstanceID, RoleID) if TypeID == 1535702 then --判断是否是公主 local allrole = map.GetMapAllRoleID(MapID, InstanceID) for v,t in pairs(allrole) do local k = math.random(1,100) local x,y,z = unit.GetPosition(MapID,InstanceID,t) if k<=25 then map.MapCreateCreature(MapID, InstanceID, 4910063, x,y,z) --刷出陷阱1 elseif k<=50 then map.MapCreateCreature(MapID, InstanceID, 4910064, x,y,z) --刷出陷阱2 elseif k<=75 then map.MapCreateCreature(MapID, InstanceID, 4910065, x,y,z) --刷出陷阱3 else map.MapCreateCreature(MapID, InstanceID, 4910066, x,y,z) --刷出陷阱4 end end end end aux.RegisterSkillEvent(5101801, 1, "s5101801_Cast") --需求8,对话NPC龙帝刷出龙帝(1535701),并可添加神之庇佑(9460801)BUFF function n4910059_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) local TeamID = role.IsRoleHaveTeam(MapID, InstanceID, RoleID) local Role = {} Role[1], Role[2], Role[3], Role[4], Role[5], Role[6] = role.GetRoleTeamMemID(TeamID) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 13801) -- 龙帝:尔等竟敢擅闯我帝都宝地?若不是我当年被黑莲之灵封印,尔等休想活命!!! msg.AddMsgEvent(MsgID, 21, 4) -- 选项一 msg.AddMsgEvent(MsgID, 1, 13802) --解封龙帝 msg.AddMsgEvent(MsgID, 24, TargetID) msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息 elseif TalkIndex == 4 then if TeamID ~= nil and TeamID ~= 4294967295 then for i = 1,6 do if Role[i] and Role[i]~= 4294967295 then unit.AddBuff(MapID, InstanceID, Role[i], 9460801, Role[i]) --给整个小队加buff end end else unit.AddBuff(MapID, InstanceID, RoleID, 9460801, RoleID) --单人加buff end local x,y,z = unit.GetPosition(MapID,InstanceID,TargetID) map.MapDeleteCreature(MapID, InstanceID, TargetID) longdi = map.MapCreateCreature(MapID, InstanceID, 1535701, x, y, z) end end aux.RegisterCreatureEvent(4910059, 7, "n4910059_OnTalk") --需求9,对话NPC古代帝都传送人(4910057),进入副本古代帝都 function GuDaiDiDu_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) --对话古代帝都传送人 --[[if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 13813) --相传,上古神灵龙帝私自下凡与人间一女子相恋并生下一女,取名“公主”。尔后,在人间掘地数丈大兴劳力,兴建了自己的城堡——帝都。天帝闻讯,大怒,用黑莲之灵将龙帝封印在帝都之内,王座之间。(换段落)流传至今已有千余年,至于真假,无从考证。各路英雄为求一解,纷至沓来。。。 msg.AddMsgEvent(MsgID, 21, 4) -- 选项一 msg.AddMsgEvent(MsgID, 1,22) --进入古代帝都 msg.AddMsgEvent(MsgID, 24, TargetID) msg.DispatchRoleMsgEvent(RoleID, MsgID) end]] local rolelevel = role.GetRoleLevel(MapID, InstanceID, RoleID) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 13803) --相传,上古神灵龙帝私自下凡与人间一女子相恋并生下一女,取名“公主”。尔后,在人间掘地数丈大兴劳力,兴建了自己的城堡——帝都。天帝闻讯,大怒,用黑莲之灵将龙帝封印在帝都之内,王座之间。(换段落)流传至今已有千余年,至于真假,无从考证。各路英雄为求一解,纷至沓来。。。 msg.AddMsgEvent(MsgID, 21, 4) -- 选项一 msg.AddMsgEvent(MsgID, 1,13804) --进入古代帝都 msg.AddMsgEvent(MsgID, 24, TargetID) msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif rolelevel > 109 and TalkIndex == 4 then --判断玩家是否可以进入副本 if role.IsRoleHaveBuff(MapID,InstanceID,RoleID,99996) then unit.CancelBuff(MapID,InstanceID,RoleID,9999601) end role.RoleGotoNewMap(MapID,InstanceID,RoleID,3067631311,311,211,47) elseif rolelevel < 110 and TalkIndex == 4 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 13812) --您等级不足115级,不能进入该副本 msg.AddMsgEvent(MsgID, 21, 5) --取消按钮 msg.AddMsgEvent(MsgID, 1, 22) --取消 msg.AddMsgEvent(MsgID, 24, TargetID) msg.DispatchRoleMsgEvent(RoleID, MsgID) end end aux.RegisterCreatureEvent(4910057, 7, "GuDaiDiDu_OnTalk") --需求10,使用钥匙(ID6010875,6010876,6010877),在规定区域内分别能打开宝物库,佣人寝室,欢乐宴会厅房门 function I6010875_OnUse(MapID,InstanceID,TypeID,RoleID) map.OpenCloseDoor(MapID, InstanceID, 510, 1) --在规定范围内打开宝物库房门 end function I6010876_OnUse(MapID,InstanceID,TypeID,RoleID) map.OpenCloseDoor(MapID, InstanceID, 511, 1) --在规定范围内打开佣人寝室房门 end function I6010877_OnUse(MapID,InstanceID,TypeID,RoleID) map.OpenCloseDoor(MapID, InstanceID, 512, 1) --在规定范围内打开欢乐宴会厅房门 end aux.RegisterItemEvent(6010875, 1, "I6010875_OnUse") aux.RegisterItemEvent(6010876, 1, "I6010876_OnUse") aux.RegisterItemEvent(6010877, 1, "I6010877_OnUse") --不在规定范围内无法打开 function I6010875_CanUse(MapID,InstanceID,TypeID,RoleID) local x,y,z=unit.GetPosition(MapID,InstanceID,RoleID) local bRet, bIgnore = 43, false if x >202 or z >850 or x <179 or z <814 then return bRet, bIgnore else bRet = 0 end return bRet,bIgnore end --不在规定范围内无法打开宝物库房门 function I6010876_CanUse(MapID,InstanceID,TypeID,RoleID) local x,y,z=unit.GetPosition(MapID,InstanceID,RoleID) local bRet, bIgnore = 43, false if x >349 or z >850 or x <311 or z <812 then return bRet, bIgnore else bRet = 0 end return bRet,bIgnore end --不在规定范围内无法打开宝佣人寝室房门 function I6010877_CanUse(MapID,InstanceID,TypeID,RoleID) local x,y,z=unit.GetPosition(MapID,InstanceID,RoleID) local bRet, bIgnore = 43, false if x >263 or z >645 or x <230 or z <622 then return bRet, bIgnore else bRet = 0 end return bRet,bIgnore end --不在规定范围内无法打开欢乐宴会厅房门 aux.RegisterItemEvent(6010875, 0, "I6010875_CanUse") aux.RegisterItemEvent(6010876, 0, "I6010876_CanUse") aux.RegisterItemEvent(6010877, 0, "I6010877_CanUse") --需求11,点击NPC(4910058),提示:仓库管理员的弱点在于其分身。。。 function n4910058_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 13805) --帝都之内,无人不知,无事不晓,仓库管理员的弱点在于其分身 msg.AddMsgEvent(MsgID, 24, TargetID) msg.DispatchRoleMsgEvent(RoleID, MsgID) end end aux.RegisterCreatureEvent(4910058, 7, "n4910058_OnTalk") --需求12,怪物前厅守卫(1535708)死亡后,随机在仓库和下等人休息室刷新仓库管理员(1535709) function c1535708_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) local m= math.random(100) if m >= 50 then cangkuguanliyuan = map.MapCreateCreature(MapID, InstanceID, 1535709,112,10357,114) --在仓库刷新仓库管理员 else cangkuguanliyuan = map.MapCreateCreature(MapID, InstanceID, 1535709,432,10427,469) --在下等人休息室刷新仓库管理员 end end aux.RegisterCreatureEvent(1535708, 4, "c1535708_OnDie") --需求13,怪物仓库管理员(1535709)死后,大门1(ID1fd)开启 function c1535709_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) map.OpenCloseDoor(MapID, InstanceID, 509, 1) --大门1开启 end aux.RegisterCreatureEvent(1535709,4,"c1535709_OnDie") --需求14,怪物宝物看守长(1535703)或佣人督察长(1535704)或宴会总管(1535705)死后,大门5(ID201)开启 function c1535703_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) map.OpenCloseDoor(MapID, InstanceID, 513, 1) --大门5开启 end aux.RegisterCreatureEvent(1535703,4,"c1535703_OnDie") function c1535704_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) map.OpenCloseDoor(MapID, InstanceID, 513, 1) --大门5开启 end aux.RegisterCreatureEvent(1535704,4,"c1535704_OnDie") function c1535705_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) map.OpenCloseDoor(MapID, InstanceID, 513, 1) --大门5开启 end aux.RegisterCreatureEvent(1535705,4,"c1535705_OnDie") --需求15,仓库管理员分身(1535710)死后,真身仓库管理员(1535709)也会死亡 function c1535710_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) unit.AddBuff(MapID, InstanceID, cangkuguanliyuan, 9462901, cangkuguanliyuan) end aux.RegisterCreatureEvent(1535710,4,"c1535710_OnDie") --需求16,四个颜色的木桩(ID1535725紫,1535726黑,1535727绿,1535728红),有一个死亡后,其余会消失;若打对颜色的木桩,boss加buff(9460701),若打错颜色木桩boss加buff(9460601) --buffID(9460201绿,9460301黑,9460401紫,9460501红) function c1535725_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) local BUFFcolor = map.GetMapScriptData(MapID,InstanceID,1,0) if TargetTypeID == 1535725 and BUFFcolor == 9460401 then unit.AddBuff(MapID, InstanceID, longdi, 9460601, longdi) cre.MonsterSay(MapID, InstanceID, longdi, 50087) --竟然被你们识破了 local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 13, 0) msg.AddMsgEvent(MsgID, 1, 13811) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) if heisemuzhuang ~= 0 or heisemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,heisemuzhuang) end if lvsemuzhuang ~= 0 or lvsemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,lvsemuzhuang) end if hongsemuzhuang ~= 0 or hongsemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,hongsemuzhuang) end elseif TargetTypeID == 1535725 and BUFFcolor ~= 9460401 then unit.AddBuff(MapID, InstanceID, longdi, 9460701, longdi) cre.MonsterSay(MapID, InstanceID, longdi, 50088) --哈哈,你们中计了 local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 13, 0) msg.AddMsgEvent(MsgID, 1, 13810) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end if TargetTypeID == 1535726 and BUFFcolor == 9460301 then unit.AddBuff(MapID, InstanceID, longdi, 9460601, longdi) cre.MonsterSay(MapID, InstanceID, longdi, 50087) --竟然被你们是破了 local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 13, 0) msg.AddMsgEvent(MsgID, 1, 13811) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) if zisemuzhuang ~= 0 or zisemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,zisemuzhuang) end if lvsemuzhuang ~= 0 or lvsemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,lvsemuzhuang) end if hongsemuzhuang ~= 0 or hongsemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,hongsemuzhuang) end elseif TargetTypeID == 1535726 and BUFFcolor ~= 9460301 then unit.AddBuff(MapID, InstanceID, longdi, 9460701, longdi) cre.MonsterSay(MapID, InstanceID, longdi, 50088) --哈哈,你们中计了 local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 13, 0) msg.AddMsgEvent(MsgID, 1, 13810) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end if TargetTypeID == 1535727 and BUFFcolor == 9460201 then unit.AddBuff(MapID, InstanceID, longdi, 9460601, longdi) cre.MonsterSay(MapID, InstanceID, longdi, 50087) --竟然被你们是破了 local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 13, 0) msg.AddMsgEvent(MsgID, 1, 13811) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) if zisemuzhuang ~= 0 or zisemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,zisemuzhuang) end if heisemuzhuang ~= 0 or heisemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,heisemuzhuang) end if hongsemuzhuang ~= 0 or hongsemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,hongsemuzhuang) end elseif TargetTypeID == 1535727 and BUFFcolor ~= 9460301 then unit.AddBuff(MapID, InstanceID, longdi, 9460701, longdi) cre.MonsterSay(MapID, InstanceID, longdi, 50088) --哈哈,你们中计了 local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 13, 0) msg.AddMsgEvent(MsgID, 1, 13810) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end if TargetTypeID == 1535728 and BUFFcolor == 9460501 then unit.AddBuff(MapID, InstanceID, longdi, 9460601, longdi) cre.MonsterSay(MapID, InstanceID, longdi, 50087) --竟然被你们是破了 local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 13, 0) msg.AddMsgEvent(MsgID, 1, 13811) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) if zisemuzhuang ~= 0 or zisemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,zisemuzhuang) end if heisemuzhuang ~= 0 or heisemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,heisemuzhuang) end if lvsemuzhuang ~= 0 or lvsemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,lvsemuzhuang) end elseif TargetTypeID == 1535728 and BUFFcolor ~= 9460301 then unit.AddBuff(MapID, InstanceID, longdi, 9460701, longdi) cre.MonsterSay(MapID, InstanceID,longdi, 50088) --哈哈,你们中计了 local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 13, 0) msg.AddMsgEvent(MsgID, 1, 13810) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end end function C1535729_OnDie(MapID, InstanceID, TargetID, TargetTypeAI) if zisemuzhuang ~= 0 or zisemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,zisemuzhuang) end if heisemuzhuang ~= 0 or heisemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,heisemuzhuang) end if lvsemuzhuang ~= 0 or lvsemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,lvsemuzhuang) end if hongsemuzhuang ~= 0 or hongsemuzhuang ~= nil then map.MapDeleteCreature(MapID,InstanceID,hongsemuzhuang) end end aux.RegisterCreatureEvent(1535729, 13, "C1535729_OnDie") aux.RegisterCreatureEvent(1535725,4,"c1535725_OnDie") aux.RegisterCreatureEvent(1535726,4,"c1535725_OnDie") aux.RegisterCreatureEvent(1535727,4,"c1535725_OnDie") aux.RegisterCreatureEvent(1535728,4,"c1535725_OnDie") --需求16,龙帝(1535701)死后,大门6开启 function c1535701_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) map.OpenCloseDoor(MapID, InstanceID,354, 1) --大门6开启 end function m54_EnterMap(MapID,InstanceID,RoleID) local IsHave = role.IsRoleHaveBuff(MapID, InstanceID,RoleID,99996) if IsHave == true then unit.CancelBuff(MapID, InstanceID,RoleID,9999601) end end aux.RegisterMapEvent("m54", 2, "m54_EnterMap") aux.RegisterCreatureEvent(1535701,4,"c1535701_OnDie")