--[[dmap4_Baoxiang_ID1 = 0 dmap4_Baoxiang_ID2 = 0 dmap4_Baoxiang_ID3 = 0 dmap4_Baoxiang_ID4 = 0 dmap4_Baoxiang_ID5 = 0 dmap4_Baoxiang_ID6 = 0 dmap4_Baoxiang_ID7 = 0 dmap4_Baoxiang_ID8 = 0 dmap4_Baoxiang_ID9 = 0 dmap4_Baoxiang_ID10 = 0 dmap4_Baoxiang_ID11 = 0 dmap4_Baoxiang_ID12 = 0 dmap4_Baoxiang_ID13 = 0 dmap4_Baoxiang_ID14 = 0 dmap4_Baoxiang_ID15 = 0 dmap4_Baoxiang_ID16 = 0 dmap4_Baoxiang_ID17 = 0 dmap4_Baoxiang_ID18 = 0 dmap4_Baoxiang_ID19 = 0 dmap4_Baoxiang_ID20 = 0 dmap4_Baoxiang_ID21 = 0 dmap4_Baoxiang_ID22 = 0 dmap4_Baoxiang_ID23 = 0 dmap4_Baoxiang_ID24 = 0 dmap4_Baoxiang_ID25 = 0 dmap4_Baoxiang_ID26 = 0 dmap4_Baoxiang_ID27 = 0 dmap4_Baoxiang_ID28 = 0 dmap4_Baoxiang_ID29 = 0 dmap4_Baoxiang_ID30 = 0 dmap4_Baoxiang_ID31 = 0 dmap4_Baoxiang_ID32 = 0 dmap4_Baoxiang_ID33 = 0 dmap4_Baoxiang_ID34 = 0 dmap4_Baoxiang_ID35 = 0 dmap4_Baoxiang_ID36 = 0 ]] --地图位数占用:1 function c1086117_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第一波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207330) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local g = math.random(100) if g <= 10 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,1) --记录第一只盗宝怪 end end aux.RegisterCreatureEvent(1086117, 13, "c1086117_OnDie") function c1086118_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第二波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207331) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 1 then local g = math.random(100) if g <= 30 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,1) --记录第一只盗宝怪 end end end aux.RegisterCreatureEvent(1086118, 13, "c1086118_OnDie") function c1086119_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第三波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207332) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 1 then local g = math.random(100) if g <= 60 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,1) --记录第一只盗宝怪 end end end aux.RegisterCreatureEvent(1086119, 13, "c1086119_OnDie") function c1086120_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第四波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207348) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 1 then local g = math.random(100) if g <= 90 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,1) --记录第一只盗宝怪 end end end aux.RegisterCreatureEvent(1086120, 13, "c1086120_OnDie") --[[function c1086121_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第一只特殊怪出现时的透明怪消失 --暂停兵线怪刷新 map.SetMonsterGenState(MapID, InstanceID, 3) end aux.RegisterCreatureEvent(1086121, 13, "c1086121_OnDie") ]] function c1086021_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) --第一只特殊怪死亡 map.MapCreateCreature(MapID, InstanceID, 1086146, 9919/50, 3456, 7437/50) --召唤第二只透明怪 map.MapCreateCreature(MapID, InstanceID, 1086147, 9919/50, 3456, 7437/50) --召唤第三只透明怪 --开启第一个宝库门,通告30s时间开箱子 map.OpenCloseDoor(MapID, InstanceID, 174, 1) local boxID = {1086159, 1086160, 1086161, 1086162, 1086163, 1086164} local x = {17600, 18600, 16600, 17600, 18600, 16600} local z = {11000, 11000, 11000, 12000, 12000, 12000} local a = math.random(1,6) local b = math.random(1,6) for i = 0, 5 do map.MapCreateCreature(MapID, InstanceID, boxID[b], x[a]/50, 4790, z[a]/50) --召唤宝箱1 --unit.SetFaceTo(MapID, InstanceID, boxID[a], (x[a]+ 110)/50, z[a]/50) --改变朝向 if a <= 5 then a = a+ 1 else a = 1 end if b <= 5 then b = b+ 1 else b = 1 end end local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207349) --“一号宝库已开启,现在有30秒前去挑选天神给予你们的奖励” msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086021, 4, "c1086021_OnDie") function c1086146_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第一只特殊怪死亡时的透明怪消失 --通告5s后重新刷怪 local MsgID = msg.BeginMsgEvent() --距离下一波怪物来袭还有5秒,请尽快做好准备 msg.AddMsgEvent(MsgID,101,207350) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086146, 13, "c1086146_OnDie") --[[function c1086147_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --重新刷怪的透明怪消失 --重新刷怪 map.SetMonsterGenState(MapID, InstanceID, 2) local MsgID1 = msg.BeginMsgEvent() --宝箱通知 msg.AddMsgEvent(MsgID1, 101, 207192) msg.DispatchMapMsgEvent(MsgID1, MapID, InstanceID) end aux.RegisterCreatureEvent(1086147, 13, "c1086147_OnDie") ]] function c1086122_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第五波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207333) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local g = math.random(100) if g <= 10 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207330) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,2) --记录第二只盗宝怪 end end aux.RegisterCreatureEvent(1086122, 13, "c1086122_OnDie") function c1086123_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第六波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207334) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 2 then local g = math.random(100) if g <= 30 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,2) --记录第二只盗宝怪 end end end aux.RegisterCreatureEvent(1086123, 13, "c1086123_OnDie") function c1086124_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第七波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207335) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 2 then local g = math.random(100) if g <= 60 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,2) --记录第二只盗宝怪 end end end aux.RegisterCreatureEvent(1086124, 13, "c1086124_OnDie") function c1086125_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第八波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207351) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 2 then local g = math.random(100) if g <= 90 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,2) --记录第二只盗宝怪 end end end aux.RegisterCreatureEvent(1086125, 13, "c1086125_OnDie") --[[function c1086126_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第二只特殊怪出现时的透明怪消失 --暂停兵线怪刷新 map.SetMonsterGenState(MapID, InstanceID, 3) end aux.RegisterCreatureEvent(1086126, 13, "c1086126_OnDie") ]] function c1086022_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) --第二只特殊怪死亡 map.MapCreateCreature(MapID, InstanceID, 1086148, 9919/50, 3456, 7437/50) --召唤第二只透明怪 map.MapCreateCreature(MapID, InstanceID, 1086149, 9919/50, 3456, 7437/50) --召唤第三只透明怪 --开启第2个宝库门,通告30s时间开箱子 map.OpenCloseDoor(MapID, InstanceID, 177, 1) local boxID = {1086165, 1086166, 1086167, 1086168, 1086169, 1086170} local x = {8300, 9300, 7300, 8300, 9300, 7300} local z = {11000, 11000, 11000, 12000, 12000, 12000} local a = math.random(1,6) local b = math.random(1,6) for i = 0, 5 do map.MapCreateCreature(MapID, InstanceID, boxID[b], x[a]/50, 4790, z[a]/50) --召唤宝箱1 --unit.SetFaceTo(MapID, InstanceID, boxID[a], (x[a]- 110)/50, z[a]/50) --改变朝向 if a <= 5 then a = a+ 1 else a = 1 end if b <= 5 then b = b+ 1 else b = 1 end end local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207352) --“二号宝库已开启,现在有30秒前去挑选天神给予你们的奖励” msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086022, 4, "c1086022_OnDie") function c1086148_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第二只特殊怪死亡时的透明怪消失 --通告5s后重新刷怪 local MsgID = msg.BeginMsgEvent() --距离下一波怪物来袭还有5秒,请尽快做好准备 msg.AddMsgEvent(MsgID,101,207350) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086148, 13, "c1086148_OnDie") --[[function c1086149_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --重新刷怪的透明怪消失 --重新刷怪 map.SetMonsterGenState(MapID, InstanceID, 2) end aux.RegisterCreatureEvent(1086149, 13, "c1086149_OnDie") ]] function c1086127_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第九波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207336) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local g = math.random(100) if g <= 10 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,3) --记录第三只盗宝怪 end end aux.RegisterCreatureEvent(1086127, 13, "c1086127_OnDie") function c1086128_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第十波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207337) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 3 then local g = math.random(100) if g <= 30 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,3) --记录第三只盗宝怪 end end end aux.RegisterCreatureEvent(1086128, 13, "c1086128_OnDie") function c1086129_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第十一波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207338) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 3 then local g = math.random(100) if g <= 60 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,3) --记录第三只盗宝怪 end end end aux.RegisterCreatureEvent(1086129, 13, "c1086129_OnDie") function c1086130_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第十二波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207353) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 3 then local g = math.random(100) if g <= 90 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,3) --记录第三只盗宝怪 end end end aux.RegisterCreatureEvent(1086130, 13, "c1086130_OnDie") --[[function c1086131_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第三只特殊怪出现时的透明怪消失 --暂停兵线怪刷新 map.SetMonsterGenState(MapID, InstanceID, 3) end aux.RegisterCreatureEvent(1086131, 13, "c1086131_OnDie") ]] function c1086023_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) --第三只特殊怪死亡 map.MapCreateCreature(MapID, InstanceID, 1086150, 9919/50, 3456, 7437/50) --召唤第二只透明怪 map.MapCreateCreature(MapID, InstanceID, 1086151, 9919/50, 3456, 7437/50) --召唤第三只透明怪 --开启第3个宝库门,通告30s时间开箱子 map.OpenCloseDoor(MapID, InstanceID, 175, 1) local boxID = {1086171, 1086172, 1086173, 1086174, 1086175, 1086176} local x = {21000, 22000, 20000, 21000, 22000, 20000} local z = {19900, 19900, 19900, 18900, 18900, 18900} local a = math.random(1,6) local b = math.random(1,6) for i = 0, 5 do map.MapCreateCreature(MapID, InstanceID, boxID[b], x[a]/50, 4790, z[a]/50) --召唤宝箱1 --unit.SetFaceTo(MapID, InstanceID, boxID[a], (x[a]+ 110)/50, z[a]/50) --改变朝向 if a <= 5 then a = a+ 1 else a = 1 end if b <= 5 then b = b+ 1 else b = 1 end end local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207354) --“三号宝库已开启,现在有30秒前去挑选天神给予你们的奖励” msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086023, 4, "c1086023_OnDie") function c1086150_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第三只特殊怪死亡时的透明怪消失 --通告5s后重新刷怪 local MsgID = msg.BeginMsgEvent() --距离下一波怪物来袭还有5秒,请尽快做好准备 msg.AddMsgEvent(MsgID,101,207350) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086150, 13, "c1086150_OnDie") --[[function c1086151_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --重新刷怪的透明怪消失 --重新刷怪 map.SetMonsterGenState(MapID, InstanceID, 2) end aux.RegisterCreatureEvent(1086151, 13, "c1086151_OnDie") ]] function c1086132_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第十三波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207339) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local g = math.random(100) if g <= 10 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,4) --记录第四只盗宝怪 end end aux.RegisterCreatureEvent(1086132, 13, "c1086132_OnDie") function c1086133_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第十四波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207340) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 4 then local g = math.random(100) if g <= 30 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,4) --记录第四只盗宝怪 end end end aux.RegisterCreatureEvent(1086133, 13, "c1086133_OnDie") function c1086134_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第十五波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207341) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 4 then local g = math.random(100) if g <= 60 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,4) --记录第四只盗宝怪 end end end aux.RegisterCreatureEvent(1086134, 13, "c1086134_OnDie") function c1086135_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第十六波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207355) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 4 then local g = math.random(100) if g <= 90 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,4) --记录第四只盗宝怪 end end end aux.RegisterCreatureEvent(1086135, 13, "c1086135_OnDie") --[[function c1086136_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第四只特殊怪出现时的透明怪消失 --暂停兵线怪刷新 map.SetMonsterGenState(MapID, InstanceID, 3) end aux.RegisterCreatureEvent(1086136, 13, "c1086136_OnDie") ]] function c1086024_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) --第四只特殊怪死亡 map.MapCreateCreature(MapID, InstanceID, 1086152, 9919/50, 3456, 7437/50) --召唤第二只透明怪 map.MapCreateCreature(MapID, InstanceID, 1086153, 9919/50, 3456, 7437/50) --召唤第三只透明怪 --开启第4个宝库门,通告30s时间开箱子 map.OpenCloseDoor(MapID, InstanceID, 178, 1) local boxID = {1086177, 1086178, 1086179, 1086180, 1086181, 1086182} local x = {5000, 6000, 4000, 5000, 6000, 4000} local z = {19900, 19900, 19900, 18900, 18900, 18900} local a = math.random(1,6) local b = math.random(1,6) for i = 0, 5 do map.MapCreateCreature(MapID, InstanceID, boxID[b], x[a]/50, 4790, z[a]/50) --召唤宝箱1 --unit.SetFaceTo(MapID, InstanceID, boxID[a], (x[a]- 110)/50, z[a]/50) --改变朝向 if a <= 5 then a = a+ 1 else a = 1 end if b <= 5 then b = b+ 1 else b = 1 end end local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207356) --“四号宝库已开启,现在有30秒前去挑选天神给予你们的奖励” msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086024, 4, "c1086024_OnDie") function c1086152_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第四只特殊怪死亡时透明怪消失 --通告5s后重新刷怪 local MsgID = msg.BeginMsgEvent() --距离下一波怪物来袭还有5秒,请尽快做好准备 msg.AddMsgEvent(MsgID,101,207350) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086152, 13, "c1086152_OnDie") --[[function c1086153_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --重新刷怪的透明怪消失 --重新刷怪 map.SetMonsterGenState(MapID, InstanceID, 2) end aux.RegisterCreatureEvent(1086153, 13, "c1086153_OnDie") ]] function c1086137_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第十七波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207342) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local g = math.random(100) if g <= 10 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,5) --记录第五只盗宝怪 end end aux.RegisterCreatureEvent(1086137, 13, "c1086137_OnDie") function c1086138_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第十八波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207343) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 5 then local g = math.random(100) if g <= 30 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,5) --记录第五只盗宝怪 end end end aux.RegisterCreatureEvent(1086138, 13, "c1086138_OnDie") function c1086139_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第十九波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207344) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 5 then local g = math.random(100) if g <= 60 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,5) --记录第五只盗宝怪 end end end aux.RegisterCreatureEvent(1086139, 13, "c1086139_OnDie") function c1086140_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第二十波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207357) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 5 then local g = math.random(100) if g <= 90 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,5) --记录第五只盗宝怪 end end end aux.RegisterCreatureEvent(1086140, 13, "c1086140_OnDie") --[[function c1086158_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第五只特殊怪出现时的透明怪消失 --暂停兵线怪刷新 map.SetMonsterGenState(MapID, InstanceID, 3) end aux.RegisterCreatureEvent(1086158, 13, "c1086158_OnDie") ]] function c1086025_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) --第五只特殊怪死亡 map.MapCreateCreature(MapID, InstanceID, 1086154, 9919/50, 3456, 7437/50) --召唤第二只透明怪 map.MapCreateCreature(MapID, InstanceID, 1086155, 9919/50, 3456, 7437/50) --召唤第三只透明怪 --开启第5个宝库门,通告30s时间开箱子 map.OpenCloseDoor(MapID, InstanceID, 176, 1) local boxID = {1086183, 1086184, 1086185, 1086186, 1086187, 1086188} local x = {22400, 23400, 21400, 22400, 23400, 21400} local z = {11000, 11000, 11000, 12000, 12000, 12000} local a = math.random(1,6) local b = math.random(1,6) for i = 0, 5 do map.MapCreateCreature(MapID, InstanceID, boxID[b], x[a]/50, 4790, z[a]/50) --召唤宝箱1 --unit.SetFaceTo(MapID, InstanceID, boxID[a], (x[a]+ 110)/50, z[a]/50) --改变朝向 if a <= 5 then a = a+ 1 else a = 1 end if b <= 5 then b = b+ 1 else b = 1 end end local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207358) --“五号宝库已开启,现在有30秒前去挑选天神给予你们的奖励” msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086025, 4, "c1086025_OnDie") function c1086154_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第五只特殊怪死亡时的透明怪消失 --通告5s后重新刷怪 local MsgID = msg.BeginMsgEvent() --距离下一波怪物来袭还有5秒,请尽快做好准备 msg.AddMsgEvent(MsgID,101,207350) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086154, 13, "c1086154_OnDie") --[[function c1086155_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --重新刷怪的透明怪消失 --重新刷怪 map.SetMonsterGenState(MapID, InstanceID, 2) end aux.RegisterCreatureEvent(1086155, 13, "c1086155_OnDie") ]] function c1086141_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第二十一波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207345) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local g = math.random(100) if g <= 10 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,6) --记录第六只盗宝怪 end end aux.RegisterCreatureEvent(1086141, 13, "c1086141_OnDie") function c1086142_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第二十二波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207346) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 6 then local g = math.random(100) if g <= 30 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,6) --记录第六只盗宝怪 end end end aux.RegisterCreatureEvent(1086142, 13, "c1086142_OnDie") function c1086143_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第二十三波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207359) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 6 then local g = math.random(100) if g <= 60 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,6) --记录第六只盗宝怪 end end end aux.RegisterCreatureEvent(1086143, 13, "c1086143_OnDie") --[[function c1086144_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第六只特殊怪出现时的透明怪消失 --暂停兵线怪刷新 map.SetMonsterGenState(MapID, InstanceID, 3) end aux.RegisterCreatureEvent(1086144, 13, "c1086144_OnDie") ]] function c1086026_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) --第六只特殊怪死亡 map.MapCreateCreature(MapID, InstanceID, 1086156, 9919/50, 3456, 7437/50) --召唤第二只透明怪 map.MapCreateCreature(MapID, InstanceID, 1086157, 9919/50, 3456, 7437/50) --召唤第三只透明怪 --开启第6个宝库门,通告30s时间开箱子 map.OpenCloseDoor(MapID, InstanceID, 179, 1) local boxID = {1086189, 1086190, 1086191, 1086192, 1086193, 1086194} local x = {3500, 4500, 2500, 3500, 4500, 2500} local z = {11000, 11000, 11000, 12000, 12000, 12000} local a = math.random(1,6) local b = math.random(1,6) for i = 0, 5 do map.MapCreateCreature(MapID, InstanceID, boxID[b], x[a]/50, 4790, z[a]/50) --召唤宝箱1 --unit.SetFaceTo(MapID, InstanceID, boxID[a], (x[a]- 110)/50, z[a]/50) --改变朝向 if a <= 5 then a = a+ 1 else a = 1 end if b <= 5 then b = b+ 1 else b = 1 end end local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207360) --“六号宝库已开启,现在有30秒前去挑选天神给予你们的奖励” msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086026, 4, "c1086026_OnDie") function c1086156_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第六只特殊怪死亡时的透明怪消失 --通告5s后重新刷怪 local MsgID = msg.BeginMsgEvent() --距离下一波怪物来袭还有5秒,请尽快做好准备 msg.AddMsgEvent(MsgID,101,207350) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086156, 13, "c1086156_OnDie") --[[function c1086157_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --重新刷怪的透明怪消失 --重新刷怪 map.SetMonsterGenState(MapID, InstanceID, 2) end aux.RegisterCreatureEvent(1086157, 13, "c1086157_OnDie") ]] function c1086145_OnDie(MapID, InstanceID, TargetID, TargetTypeID) --第二十四波透明怪死亡 local MsgID = msg.BeginMsgEvent() --波数通知 msg.AddMsgEvent(MsgID,101,207347) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if m ~= 6 then local g = math.random(100) if g <= 90 then local x = math.random(4050, 22600) local y = 4740 local z = math.random(14800, 16000) local guaiID = map.MapCreateCreature(MapID, InstanceID, 1086027, x/50, y, z/50) --召唤盗宝怪 unit.AddBuff(MapID,InstanceID,guaiID,2059201, guaiID) --金光闪闪 local MsgID = msg.BeginMsgEvent() --盗宝怪出现了 msg.AddMsgEvent(MsgID,101,207373) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) map.SetMapScriptData(MapID,InstanceID,1,1,6) --记录第六只盗宝怪 end end end aux.RegisterCreatureEvent(1086145, 13, "c1086145_OnDie") function c1086027_OnDisappear(MapID, InstanceID, TargetID, TargetTypeID) --盗宝怪消失 local MsgID = msg.BeginMsgEvent() --盗宝怪跑了 msg.AddMsgEvent(MsgID,101,207371) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086027, 13, "c1086027_OnDisappear") function c1086027_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) --盗宝怪死亡 local MsgID = msg.BeginMsgEvent() --盗宝怪被XXX击杀了 msg.AddMsgEvent(MsgID,101,207372) msg.AddMsgEvent(MsgID,2,RoleID) msg.DispatchMapMsgEvent(MsgID, MapID, InstanceID) end aux.RegisterCreatureEvent(1086027, 4, "c1086027_OnDie")