Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -[[
- Custom Arena Fighting
- Teleports to a set area and spawns a custom mob to fight.
- ]]
- -- Variables
- local NPC_ID = NPC_ID_HERE
- -- On Triggers
- function ArenaFightingGossipOnTalk(Unit, Event, player)
- Unit:GossipCreateMenu(100, player, 0)
- Unit:GossipMenuAddItem(0, "I want to fight "NPC_NAME"! (Level 80)", 1, 0)
- Unit:GossipMenuAddItem(0, "I'd like to fight "NPC_NAME"! (Level 85)", 2, 0)
- Unit:GossipMenuAddItem(0, "I'd like to attempt "NPC_NAME"! (Level 90)", 3, 0)
- Unit:GossipMenuAddItem(0, "Please can I try "NPC_NAME"! (Level 95)", 4, 0)
- Unit:GossipMenuAddItem(0, "Mabey next time.", 500, 0)
- Unit:GossipSendMenu(player)
- end
- function ArenaFightingGossipOnSelect(Unit, Event, player, id, intid, code, pMisc)
- if (intid == 1) then
- player:SendBroadcastMessage("Your being teleported to the ring, get ready to fight!")
- player:Teleport(ZoneID, X, Y, Z)
- Unit:SpawnCreature(NPC_ID, X, Y, Z, O, Faction, Duration)
- player:GossipComplete()
- end
- end
- if (intid == 2) then
- player:SendBroadcastMessage("Your being teleported to the ring, get ready to fight!")
- player:Teleport(ZoneID, X, Y, Z)
- Unit:SpawnCreature(NPC_ID, X, Y, Z, O, Faction, Duration)
- player:GossipComplete()
- end
- end
- if (intid == 3) then
- player:SendBroadcastMessage("Your being teleported to the ring, get ready to fight!")
- player:Teleport(ZoneID, X, Y, Z)
- Unit:SpawnCreature(NPC_ID, X, Y, Z, O, Faction, Duration)
- player:GossipComplete()
- end
- end
- if (intid == 4) then
- Unit:GossipCreateMenu(100, player, 0)
- Unit:GossipMenuAddItem(0, "Mabey next time.", 500, 0)
- Unit:GossipSendMenu(player)
- end
- end
- RegisterUnitGossipEvent(NPC_ID, 1, "ArenaFightingGossipOnTalk")
- RegisterUnitGossipEvent(NPC_ID, 2, "ArenaFightingGossipOnSelect")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement