9
3

aQeynosianscout(rescued).lua 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/aQeynosianscout.lua
  3. Script Purpose : a Qeynosian scout
  4. Script Author : John Adams/Scatman
  5. Script Date : 2009.01.11
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local DoggoneIt = 165
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, DoggoneIt)
  11. Say(NPC, "Whew, thank you! I couldn't hold on much longer.")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. --Say(NPC, "Test")
  18. if HasCompletedQuest(Spawn, DoggoneIt) then
  19. Say(NPC, "I hate dogs!")
  20. else
  21. EvilMoraks(NPC, Spawn)
  22. end
  23. end
  24. function EvilMoraks(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. conversation = CreateConversation()
  27. if HasQuest(Spawn, DoggoneIt) then
  28. if GetQuestStep(Spawn, DoggoneIt) == 2 then
  29. AddConversationOption(conversation, "You look pretty shaken up.", "ShakenUp")
  30. elseif QuestStepIsComplete(Spawn, DoggoneIt, 3) and QuestStepIsComplete(Spawn, DoggoneIt, 4) and QuestStepIsComplete(Spawn, DoggoneIt, 5) and GetQuestStep(Spawn, DoggoneIt) == 6 then
  31. AddConversationOption(conversation, "You're not going to like this...there are multitudes of Moraks ahead.", "NotGoingToLike")
  32. elseif GetQuestStep(Spawn, DoggoneIt) >= 7 then
  33. AddConversationOption(conversation, "Um...about that gift you gave me...", "AboutThatGift")
  34. end
  35. else
  36. AddConversationOption(conversation, "I've gotten rid of them. Are there more?", "AreThereMore")
  37. end
  38. AddConversationOption(conversation, "Be brave!")
  39. StartConversation(conversation, NPC, Spawn, "Wh..where are they? Those nasty, evil Moraks?")
  40. end
  41. function AreThereMore(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. conversation = CreateConversation()
  44. AddConversationOption(conversation, "I'll get rid of them.", "OfferQuest1")
  45. AddConversationOption(conversation, "Good luck with that.")
  46. StartConversation(conversation, NPC, Spawn, "Get them away! Who knew that Moraks were hounds, I ask you? They've got to be eliminated! Dratted beasts!")
  47. end
  48. function OfferQuest1(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. OfferQuest(NPC, Spawn, DoggoneIt)
  51. end
  52. function ShakenUp(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. conversation = CreateConversation()
  55. AddConversationOption(conversation, "These little pups? They don't scare me.", "DontScareMe")
  56. StartConversation(conversation, NPC, Spawn, "Whew! When I was assigned to explore the village, I had no idea there would be these... these dogs! I'm deathly afraid of them. Got bitten very badly as a child you see. This is terrible! How can I finish my mission! Hmmm! You don't seem to be frightened of them.")
  57. end
  58. function DontScareMe(NPC, Spawn)
  59. SetStepComplete(Spawn, DoggoneIt, 2)
  60. FaceTarget(NPC, Spawn)
  61. conversation = CreateConversation()
  62. AddConversationOption(conversation, "Not a problem. Wait for me here.")
  63. StartConversation(conversation, NPC, Spawn, "I would be forever in your debt if you could perhaps take a quick peek around the village for me and clear out any of those wretched Moraks so that I can continue my misson please?")
  64. end
  65. function NotGoingToLike(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. conversation = CreateConversation()
  68. AddConversationOption(conversation, "The Moraks are even more plentiful around the villages. I cleared a path, but they'll soon be back.", "SoonBeBack")
  69. StartConversation(conversation, NPC, Spawn, "Oh, dear.")
  70. end
  71. function SoonBeBack(NPC, Spawn)
  72. SetStepComplete(Spawn, DoggoneIt, 6)
  73. FaceTarget(NPC, Spawn)
  74. conversation = CreateConversation()
  75. -- summon A Diplomatic Gift if the player does not have one
  76. if not HasItem(Spawn, 1565) then
  77. SummonItem(Spawn, 1565)
  78. end
  79. AddConversationOption(conversation, "I'll take care of it, no worries.")
  80. StartConversation(conversation, NPC, Spawn, "I do owe you for this friend. I'm primarily a scout but also a diplomat-in-training. I'm supposed to open lines of communication with the Sapswill soothsayer, who supposedly knows a great deal about what's ailing our Colony. Can you take him this gift? As an act of diplomat-in-training?")
  81. end
  82. function AboutThatGift(NPC, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. conversation = CreateConversation()
  85. -- summon A Diplomatic Gift if the player does not have one
  86. if not HasItem(Spawn, 1565) then
  87. SummonItem(Spawn, 1565)
  88. end
  89. AddConversationOption(conversation, "I'm sorry. I'll be more careful.")
  90. StartConversation(conversation, NPC, Spawn, "Oooh! You lost it, didn't you? Good thing I'm a diplomat-in-training! I have a bunch of these at hand. Here, take this one. Please try not to lose it!")
  91. end