9
3

SapswillVillageSitting.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --[[
  2. Script Name : SapswillVillageSitting.lua
  3. Script Purpose : Spawn script for a sitting Sapswill.
  4. Script Author : Scatman
  5. Script Date : 2009.01.11
  6. Script Notes :
  7. --]]
  8. local ADiplomaticMission = 166
  9. function spawn(NPC)
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. if HasCompletedQuest(Spawn, ADiplomaticMission) or HasQuest(Spawn, ADiplomaticMission) then
  16. QuestTalk(NPC, Spawn)
  17. else
  18. NormalTalk(NPC, Spawn)
  19. end
  20. end
  21. function NormalTalk(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. choice = math.random(1, 4)
  24. if choice == 1 then
  25. Say(NPC, "If not for twins, we not make it.")
  26. elseif choice == 2 then
  27. Say(NPC, "A friend to gobbies! Grexx was right!")
  28. elseif choice == 3 then
  29. Say(NPC, "Grexx was right, hopes has come!")
  30. else
  31. Say(NPC, "Days are grim, but Grexx has hopes.")
  32. end
  33. end
  34. function QuestTalk(NPC, Spawn)
  35. if HasQuest(Spawn, ADiplomaticMission) and not QuestStepIsComplete(Spawn, ADiplomaticMission, 3) then
  36. SetStepComplete(Spawn, ADiplomaticMission, 3)
  37. end
  38. FaceTarget(NPC, Spawn)
  39. choice = math.random(1, 3)
  40. if choice == 1 then
  41. Say(NPC, "Hail? But soothsayer says no hail in forecast!")
  42. else
  43. Say(NPC, "Happy days ahead now, diplomatic friend!")
  44. end
  45. end