9
3

aQeynosianscout(rescued).lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. math.randomseed(os.time())
  18. voice = math.random (1,3)
  19. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..voice.."_1026.mp3", "", "", 0, 0, Spawn)
  20. if HasCompletedQuest(Spawn, DoggoneIt) then
  21. Say(NPC, "I hate dogs!")
  22. else
  23. EvilMoraks(NPC, Spawn)
  24. end
  25. end
  26. function EvilMoraks(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. conversation = CreateConversation()
  29. if HasQuest(Spawn, DoggoneIt) then
  30. if GetQuestStep(Spawn, DoggoneIt) == 2 then
  31. AddConversationOption(conversation, "You look pretty shaken up.", "ShakenUp")
  32. elseif QuestStepIsComplete(Spawn, DoggoneIt, 3) and QuestStepIsComplete(Spawn, DoggoneIt, 4) and QuestStepIsComplete(Spawn, DoggoneIt, 5) and GetQuestStep(Spawn, DoggoneIt) == 6 then
  33. AddConversationOption(conversation, "You're not going to like this...there are multitudes of Moraks ahead.", "NotGoingToLike")
  34. elseif GetQuestStep(Spawn, DoggoneIt) >= 7 then
  35. AddConversationOption(conversation, "Um...about that gift you gave me...", "AboutThatGift")
  36. end
  37. else
  38. AddConversationOption(conversation, "I've gotten rid of them. Are there more?", "AreThereMore")
  39. end
  40. PlayAnimation(NPC, 11256)
  41. AddConversationOption(conversation, "Be brave!")
  42. StartConversation(conversation, NPC, Spawn, "Wh..where are they? Those nasty, evil Moraks?")
  43. end
  44. function AreThereMore(NPC, Spawn)
  45. FaceTarget(NPC, Spawn)
  46. conversation = CreateConversation()
  47. PlayAnimation(NPC, 11796)
  48. AddConversationOption(conversation, "I'll get rid of them.", "OfferQuest1")
  49. AddConversationOption(conversation, "Good luck with that.")
  50. StartConversation(conversation, NPC, Spawn, "Get them away! Who knew that Moraks were hounds, I ask you? They've got to be eliminated! Dratted beasts!")
  51. end
  52. function OfferQuest1(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. OfferQuest(NPC, Spawn, DoggoneIt)
  55. end
  56. function ShakenUp(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. conversation = CreateConversation()
  59. PlayAnimation(NPC, 12236)
  60. AddConversationOption(conversation, "These little pups? They don't scare me.", "DontScareMe")
  61. 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.")
  62. end
  63. function DontScareMe(NPC, Spawn)
  64. SetStepComplete(Spawn, DoggoneIt, 2)
  65. FaceTarget(NPC, Spawn)
  66. conversation = CreateConversation()
  67. PlayAnimation(NPC, 10844)
  68. AddConversationOption(conversation, "Not a problem. Wait for me here.")
  69. 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?")
  70. end
  71. function NotGoingToLike(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. conversation = CreateConversation()
  74. PlayAnimation(NPC, 12246)
  75. AddConversationOption(conversation, "The Moraks are even more plentiful around the villages. I cleared a path, but they'll soon be back.", "SoonBeBack")
  76. StartConversation(conversation, NPC, Spawn, "Oh, dear.")
  77. end
  78. function SoonBeBack(NPC, Spawn)
  79. SetStepComplete(Spawn, DoggoneIt, 6)
  80. FaceTarget(NPC, Spawn)
  81. conversation = CreateConversation()
  82. -- summon A Diplomatic Gift if the player does not have one
  83. if not HasItem(Spawn, 1565) then
  84. SummonItem(Spawn, 1565)
  85. end
  86. PlayAnimation(NPC, 13061)
  87. AddConversationOption(conversation, "I'll take care of it, no worries.")
  88. 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?")
  89. end
  90. function AboutThatGift(NPC, Spawn)
  91. FaceTarget(NPC, Spawn)
  92. conversation = CreateConversation()
  93. -- summon A Diplomatic Gift if the player does not have one
  94. if not HasItem(Spawn, 1565) then
  95. SummonItem(Spawn, 1565)
  96. end
  97. AddConversationOption(conversation, "I'm sorry. I'll be more careful.")
  98. 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!")
  99. end