9
3

FeriusMentus.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. --[[
  2. Script Name : SpawnScripts/PeatBog/FeriusMentus.lua
  3. Script Purpose : Ferius Mentus
  4. Script Author : Scatman
  5. Script Date : 2009.05.10
  6. Script Notes : Updated 1/8/2020 by Shatou
  7. --]]
  8. local QUEST_1 = 513
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, QUEST_1)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. AddTimer(NPC, 5000, "EmoteLoop")
  15. end
  16. function EmoteLoop(NPC)
  17. local emoteChoice = MakeRandomInt(1,3)
  18. if emoteChoice == 1 then
  19. -- frustrated
  20. PlayAnimation(NPC, 11628)
  21. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  22. elseif emoteChoice == 2 then
  23. -- sniff
  24. PlayAnimation(NPC, 12329)
  25. AddTimer(NPC, MakeRandomInt(8000,10000), "EmoteLoop")
  26. else
  27. -- tapfoot
  28. PlayAnimation(NPC, 13056)
  29. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  30. end
  31. end
  32. function hailed(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. conversation = CreateConversation()
  35. if HasCompletedQuest(Spawn, QUEST_1) then
  36. Say(NPC, "If I can perfect this, it may be amazingly useful.", Spawn)
  37. elseif HasQuest(Spawn, QUEST_1) then
  38. OnQuest1(NPC, Spawn, conversation)
  39. else
  40. YesYoureHere(NPC, Spawn, conversation)
  41. end
  42. end
  43. -------------------------------------------------------------------------------------------------------------------------
  44. -- QUEST 1
  45. -------------------------------------------------------------------------------------------------------------------------
  46. function YesYoureHere(NPC, Spawn, conversation)
  47. AddConversationOption(conversation, "Why are you so grumpy?", "SoGrumpy")
  48. AddConversationOption(conversation, "Fine, I'll leave.")
  49. StartConversation(conversation, NPC, Spawn, "Yes, yes, you're here, I'm here, why don't we talk eh? No thanks.")
  50. end
  51. function SoGrumpy(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. conversation = CreateConversation()
  54. AddConversationOption(conversation, "Why do you need frogs?", "WhyNeedFrogs")
  55. StartConversation(conversation, NPC, Spawn, "My research is coming to a stand still! I paid some young lad to go fetch me frogs and just took my money and left! Can you believe that? Now I have no frogs.")
  56. end
  57. function WhyNeedFrogs(NPC, Spawn)
  58. FaceTarget(NPC, Spawn)
  59. conversation = CreateConversation()
  60. AddConversationOption(conversation, "Well I could help you collect some frogs.", "ICanCollectFrogs")
  61. StartConversation(conversation, NPC, Spawn, "I already told you! I need them for research! The frogs here secrete a fluid that tastes HORRIBLE. It helps them avoid being eaten. With the influx if 'rehabilitated' ogres coming in, I'm trying to come up with an easy way to remind them not to eat the gnomes or halflings.")
  62. end
  63. function ICanCollectFrogs(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. AddConversationOption(conversation, "I can do this.", "OfferQuest1")
  67. StartConversation(conversation, NPC, Spawn, "You think so? I need some of the glands inside them. I don't expect you to be able to recognize it, so just bring me the whole body. Then of them, in fact.")
  68. end
  69. function OfferQuest1(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. OfferQuest(NPC, Spawn, QUEST_1)
  72. end
  73. function OnQuest1(NPC, Spawn, conversation)
  74. if GetQuestStep(Spawn, QUEST_1) == 2 then
  75. AddConversationOption(conversation, "Yes I did.", "GotFrogs")
  76. else
  77. AddConversationOption(conversation, "No, not yet.")
  78. end
  79. StartConversation(conversation, NPC, Spawn, "Did you get the frogs?")
  80. end
  81. function GotFrogs(NPC, Spawn)
  82. SetStepComplete(Spawn, QUEST_1, 2)
  83. FaceTarget(NPC, Spawn)
  84. conversation = CreateConversation()
  85. AddConversationOption(conversation, "You're welcome.")
  86. StartConversation(conversation, NPC, Spawn, "Ah, perfect! Thanks! So much nicer than the one that ran off earlier. Thank you.")
  87. end