Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- npcid =
- questid =
- function On_Gossip(pUnit, event, player)
- pUnit:SendChatMessage(11, 0, "Would you like to spar?") -- NPC challenges you!
- pUnit:GossipCreateMenu(100, player, 0)
- pUnit:GossipMenuAddItem(0,"Sure, BRING IT!",1,0) -- OH HELL NAW
- pUnit:GossipMenuAddItem(0,"OH, By the Light! Never!",2,0) -- fuck off, npc.
- pUnit:GossipSendMenu(player)
- end
- function FIGHTMODE (pUnit, event, player, id, intid, code)
- if (intid == 1) then
- player:StartQuest(questid)
- pUnit:SetFaction(16) --OHSHI YOU DUNNIT NOW
- pUnit:SendChatMessage(11,0,"CONSIDER IT BROUGHT!") -- ITS ON!
- end
- if (intid == 2) then
- player:GossipComplete() --coward's way out
- end
- end
- function zzRespawn (pUnit, event, player)
- for k, v in pairs(Unit:GetPlayersInRange()) do
- if (v:GetDistance() <= 40) then -- players in 40 yards complete the quest
- player:MarkQuestObjectiveAsComplete(questid, 0)
- pUnit:Despawn(500, 500) -- 500 delay for despawn, 500 for respawn
- end
- end
- end
- RegisterUnitGossipEvent(npcid, 1, "On_Gossip")
- RegisterUnitGossipEvent(npcid, 2, "FIGHTMODE")
- RegisterUnitEvent(npcid, 4, "zzRespawn")
Advertisement
Add Comment
Please, Sign In to add comment