9
3

aSapswillvillager133771750.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/aSapswillvillager133771750.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, 2)
  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. elseif choice ==2 then
  40. Say(NPC, "Hee hee. You talkin' crazy, have a stout!")
  41. else
  42. Say(NPC, "Dancing is good for diplomats too!")
  43. end
  44. end