Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- crashUnit = nil
- crashGo = nil
- scaleGo = nil
- function Crash_OnGossip(Unit, event, player)
- Unit:GossipCreateMenu(100, player, 0)
- Unit:GossipMenuAddItem( 0, "Test chat msg", 1, 0)
- Unit:GossipMenuAddItem( 0, "Crash Part 1", 2, 0)
- Unit:GossipMenuAddItem( 0, "Crash Part 2", 3, 0)
- Unit:GossipMenuAddItem( 0, "Lock", 4, 0)
- Unit:GossipMenuAddItem( 0, "Unlock", 5, 0)
- Unit:GossipMenuAddItem( 0, "TestMail", 6, 0)
- Unit:GossipMenuAddItem( 0, "Spawn Go for scale", 7, 0)
- Unit:GossipMenuAddItem( 0, "Rescale Go", 8, 0)
- Unit:GossipMenuAddItem( 0, "GetTeam", 9, 0)
- Unit:GossipMenuAddItem( 0, "Unit:SendChatMessageToPlayer", 10, 0)
- Unit:GossipMenuAddItem( 0, "Player:SendChatMessageToPlayer", 11, 0)
- Unit:GossipMenuAddItem( 0, "Test Spawns", 12, 0)
- Unit:GossipSendMenu(player)
- end
- function Crash_OnSelect(Unit, event, player, id, intid, code, pMisc)
- if (intid == 1) then
- Unit:SendChatMessage(12, 0, "This is a chat msg. Lua script loaded and working.", 0)
- player:GossipComplete()
- end
- if (intid == 2) then
- Unit:SendChatMessage(12, 0, "Choose Crash Part 2 to crash arcemu. Hold tight!", 0)
- player:GossipComplete()
- crashUnit = Unit:SpawnCreature(1126, player:GetX(), player:GetY(), player:GetZ(), player:GetO(), 56, 1)-- despawn after 1 ms
- crashGo = Unit:SpawnGameObject(194569, player:GetX(), player:GetY(), player:GetZ(), player:GetO(), 1, 19)--despawn after 1 ms
- end
- if (intid == 3) then
- Unit:FullCastSpellOnTarget(57652, crashUnit) -- Crashing Wave spell
- Unit:FullCastSpellOnTarget(57652, crashGo) -- Crashing Wave spell
- Unit:SendChatMessage(12, 0, "Did you see this msg? Nice, no crash!", 0)
- player:GossipComplete()
- crashUnit = nil
- crashGo = nil
- end
- if (intid == 4) then
- Unit:SendChatMessage(12, 0, "Locking", 0)
- player:SetPlayerLock(1);
- player:GossipComplete()
- end
- if (intid == 5) then
- Unit:SendChatMessage(12, 0, "Unlocking", 0)
- player:SetPlayerLock(0);
- player:GossipComplete()
- end
- if (intid == 6) then
- Unit:SendChatMessage(12, 0, "Sending a mail", 0)
- SendMail(3, Unit:GetGUID(), player:GetGUID(), "Test Mail", "Testing mail system", 0, 0, 0, 1);
- player:GossipComplete()
- end
- if (intid == 7) then
- Unit:SendChatMessage(12, 0, "Spawning a GO", 0)
- scaleGo = Unit:SpawnGameObject(194569, player:GetX(), player:GetY(), player:GetZ(), player:GetO(), 0, 19)
- player:GossipComplete()
- end
- if (intid == 8) then
- if(scaleGo ~= nil) then
- Unit:SendChatMessage(12, 0, "Scaling the GO", 0)
- scaleGo:ChangeScale(2.0);
- player:GossipComplete()
- end
- end
- if (intid == 9) then
- Unit:SendChatMessage(12, 0, "Team: "..player:GetTeam(), 0)
- player:GossipComplete()
- end
- if (intid == 10) then
- Unit:SendChatMessageToPlayer(8, 0, "Unit sending a chat msg", player)
- player:GossipComplete()
- end
- if (intid == 11) then
- player:SendChatMessageToPlayer(7, 0, "Player sending a chat message", player)
- player:GossipComplete()
- end
- if (intid == 12) then
- player:SendChatMessageToPlayer(7, 0, "Spawning a GO and a Creature", player)
- Unit:SpawnGameObject(194569, player:GetX() + 1, player:GetY() + 1, player:GetZ() + 1, player:GetO(), 15000, 20, 1, 0)
- Unit:SpawnCreature(1126, player:GetX() - 1, player:GetY() - 1, player:GetZ(), player:GetO(), 56, 15000, 0, 0, 0, 1, 1)
- player:GossipComplete()
- end
- end
- RegisterUnitGossipEvent(1000, 1, Crash_OnGossip)
- RegisterUnitGossipEvent(1000, 2, Crash_OnSelect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement