--地图位置已使用:2 function NPC6040166_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) local m = map.GetMapScriptData(MapID,InstanceID,1,2) local w = map.GetWarWave(MapID, InstanceID) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207176) --训练师:你想现在开始进行训练吗?当前兵线怪第p1波。 msg.AddMsgEvent(MsgID, 9, w) msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) msg.AddMsgEvent(MsgID, 1, 207177) --我要开始 msg.AddMsgEvent(MsgID, 21, 5) msg.AddMsgEvent(MsgID, 1, 207178) --请把我送回营地 msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) --取消 msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 4 then if m == nil or m < w then if w== 1 or w == 2 or w == 3 or w == 4 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020003, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,4) elseif w == 5 or w == 6 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020006, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,6) elseif w == 7 or w == 8 or w == 9 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020009, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,9) elseif w == 10 or w == 11 or w == 12 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020010, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,12) elseif w == 13 or w == 14 or w == 15 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020013, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,15) elseif w == 16 or w == 17 or w == 18 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020016, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,18) elseif w == 19 or w == 20 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020019, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,20) elseif w == 21 or w == 22 or w == 23 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020022, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,23) elseif w == 24 or w == 25 or w == 26 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020025, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,26) elseif w == 27 or w == 28 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020028, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,28) elseif w == 29 or w == 30 or w == 31 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020031, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,31) elseif w == 32 or w == 33 or w == 34 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020032, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,34) elseif w == 35 or w == 36 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020033, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,36) elseif w == 37 or w == 38 or w == 39 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020038, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,39) elseif w == 40 or w == 41 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020040, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,41) elseif w == 42 or w == 43 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020042, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,43) elseif w == 44 or w == 45 or w == 46 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020044, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,46) elseif w == 47 or w == 48 or w == 49 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020045, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,49) elseif w == 50 or w == 51 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020048, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,51) elseif w == 52 or w == 53 or w == 54 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020051, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,54) elseif w == 55 or w == 56 or w == 57 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020054, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,57) elseif w == 58 or w == 59 or w == 60 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020058, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,60) elseif w == 61 or w == 62 or w == 63 or w == 64 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020063, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,64) elseif w == 65 or w == 66 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020067, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,66) elseif w == 67 or w == 68 or w == 69 or w == 70 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020072, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,70) elseif w == 71 or w == 72 or w == 73 or w == 74 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020073, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,74) elseif w == 75 or w == 76 or w == 77 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020075, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,77) elseif w == 78 or w == 79 or w == 80 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020077, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,80) elseif w == 81 or w == 82 or w == 83 then for i = 0, 29 do local deg = math.random(360) local disc = math.random(1,30) map.MapCreateCreature(MapID, InstanceID, 4020081, math.floor(7905/50+ math.sin(deg) * disc), 3213, math.floor(38064/50 + math.cos(deg) * disc)) --刷新第一波的怪 end map.SetMapScriptData(MapID,InstanceID,1,2,83) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207179) --训练师:你召唤的太频繁了,请稍作休息。 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) --取消 msg.DispatchRoleMsgEvent(RoleID, MsgID) end else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207179) --训练师:你召唤的太频繁了,请稍作休息。 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) --取消 msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 5 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 22520/50, 2728, 9862/50) end end aux.RegisterCreatureEvent(6040166, 7, "NPC6040166_OnTalk")