9
3

SapswillVillageDancer.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : SapswillVillageDancer.lua
  3. Script Purpose : Spawn script for a dancing Sapswill.
  4. Script Author : Scatman
  5. Script Date : 2009.01.11
  6. Script Notes :
  7. --]]
  8. local ADiplomaticMission = 166
  9. function spawn(NPC)
  10. SpawnSet(NPC, "visual_state", 11298)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. if HasCompletedQuest(Spawn, ADiplomaticMission) or HasQuest(Spawn, ADiplomaticMission) then
  17. QuestTalk(NPC, Spawn)
  18. else
  19. NormalTalk(NPC, Spawn)
  20. end
  21. end
  22. function NormalTalk(NPC, Spawn)
  23. FaceTarget(NPC, Spawn)
  24. choice = math.random(1, 3)
  25. if choice == 1 then
  26. Say(NPC, "Danger? Only danger I see is crackin' my nog on this rock!")
  27. else
  28. Say(NPC, "Invasion? Ahh my dance! I call it the Stout Shuffle though.")
  29. end
  30. end
  31. function QuestTalk(NPC, Spawn)
  32. if HasQuest(Spawn, ADiplomaticMission) and not QuestStepIsComplete(Spawn, ADiplomaticMission, 4) then
  33. SetStepComplete(Spawn, ADiplomaticMission, 4)
  34. end
  35. FaceTarget(NPC, Spawn)
  36. choice = math.random(1, 3)
  37. if choice == 1 then
  38. Say(NPC, "Special welcomes, diplomat!")
  39. else
  40. Say(NPC, "Dancing is good for diplomats too!")
  41. end
  42. end