9
3

SapswillVillageSitting.lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. Modified by : premierio015
  7. Modified Date : 2020.04.29
  8. Script Notes :
  9. Modified Notes : Changed speed from 4 to 7, so now running look a like Live version.
  10. --]]
  11. local ADiplomaticMission = 166
  12. function spawn(NPC)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. if HasCompletedQuest(Spawn, ADiplomaticMission) or HasQuest(Spawn, ADiplomaticMission) then
  19. QuestTalk(NPC, Spawn)
  20. else
  21. NormalTalk(NPC, Spawn)
  22. end
  23. end
  24. function NormalTalk(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. choice = math.random(1, 4)
  27. if choice == 1 then
  28. Say(NPC, "If not for twins, we not make it.")
  29. elseif choice == 2 then
  30. Say(NPC, "A friend to gobbies! Grexx was right!")
  31. elseif choice == 3 then
  32. Say(NPC, "Grexx was right, hopes has come!")
  33. else
  34. Say(NPC, "Days are grim, but Grexx has hopes.")
  35. end
  36. end
  37. function QuestTalk(NPC, Spawn)
  38. if HasQuest(Spawn, ADiplomaticMission) and not QuestStepIsComplete(Spawn, ADiplomaticMission, 3) then
  39. SetStepComplete(Spawn, ADiplomaticMission, 3)
  40. end
  41. FaceTarget(NPC, Spawn)
  42. choice = math.random(1, 3)
  43. if choice == 1 then
  44. Say(NPC, "Hail? But soothsayer says no hail in forecast!")
  45. else
  46. Say(NPC, "Happy days ahead now, diplomatic friend!")
  47. end
  48. end