RibbitHopson.lua 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/RibbitHopson.lua
  3. Script Purpose : Ribbit Hopson
  4. Script Author : theFoof
  5. Script Date : 2013.08.27
  6. Script Notes :
  7. --]]
  8. local SpiderPuffs = 87
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, SpiderPuffs)
  11. SetPlayerProximityFunction(NPC, 10, "InRange")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. PlayFlavor(NPC, "", "Come on in, the door's open!", "beckon", 1689589577, 4560189, Spawn)
  18. end
  19. function hailed(NPC, Spawn)
  20. FaceTarget(NPC, Spawn)
  21. conversation = CreateConversation()
  22. if not HasCompletedQuest(Spawn, SpiderPuffs) and not HasQuest(Spawn, SpiderPuffs) then
  23. PlayFlavor(NPC, "ribbit_hopson/halas/new_halas/ribbit_hopson/ribbit_hopson_001.mp3", "", "", 2788145631, 3173619593, Spawn)
  24. AddConversationOption(conversation, "Hello, Ribbit. I am " .. GetName(Spawn) .. ".", "Quest1Chat_1")
  25. StartConversation(conversation, NPC, Spawn, "Hello! I haven't seen you around before. I am Ribbit Hopson, an immigrant from Qeynos.")
  26. elseif GetQuestStep(Spawn, SpiderPuffs) == 1 or GetQuestStep(Spawn, SpiderPuffs) == 2 then
  27. AddConversationOption(conversation, "Where can I find the dame's rocket and wooly silkspinners?", "Quest1Chat_5")
  28. StartConversation(conversation, NPC, Spawn, "Have you collected the ingredients I asked for?")
  29. elseif GetQuestStep(Spawn, SpiderPuffs) == 3 then
  30. AddConversationOption(conversation, "I have the dame's rockets and the woolly silkspinner meat.", "Quest1Chat_6")
  31. StartConversation(conversation, NPC, Spawn, "Have you collected the ingredients I asked for?")
  32. elseif GetQuestStep(Spawn, SpiderPuffs) == 4 then
  33. PlayFlavor(NPC, "", "Go ahead, try one!", "beckon", 0, 0, Spawn)
  34. elseif HasCompletedQuest(Spawn, SpiderPuffs) then
  35. PlayFlavor(NPC, "", "Thanks for your help. The spider puffs are pretty good, huh?", "thanks", 0, 0, Spawn)
  36. end
  37. end
  38. function Quest1Chat_1(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. conversation = CreateConversation()
  41. PlayFlavor(NPC, "ribbit_hopson/halas/new_halas/ribbit_hopson/ribbit_hopson_003.mp3", "", "", 3519293872, 2814938385, Spawn)
  42. AddConversationOption(conversation, "Is there anything with which I can help you?", "Quest1Chat_2")
  43. StartConversation(conversation, NPC, Spawn, "It is nice to meet you. I am busy preparing for the New Halas City Festival! Many people will come from all over Norrath to New Halas during the festival, so it is important that we put our best flipper forward.")
  44. end
  45. function Quest1Chat_2(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. conversation = CreateConversation()
  48. PlayFlavor(NPC, "ribbit_hopson/halas/new_halas/ribbit_hopson/ribbit_hopson_004.mp3", "", "", 776305400, 980133477, Spawn)
  49. AddConversationOption(conversation, "So?", "Quest1Chat_3")
  50. StartConversation(conversation, NPC, Spawn, "I am going to make my family's secret recipe for spider puffs for the festival, but I do not know how it will taste with the spiders native to New Halas. I've been growing the dame's rocket seedlings that I brought with me to New Halas, and they are just now ripening.")
  51. end
  52. function Quest1Chat_3(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. conversation = CreateConversation()
  55. PlayFlavor(NPC, "ribbit_hopson/halas/new_halas/ribbit_hopson/ribbit_hopson_005.mp3", "", "", 1928136735, 1280650233, Spawn)
  56. AddConversationOption(conversation, "I could do that!", "Quest1Chat_4")
  57. StartConversation(conversation, NPC, Spawn, "Well, I'm no fighter and usually I'd pay someone to collect spider meat for me.")
  58. end
  59. function Quest1Chat_4(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. conversation = CreateConversation()
  62. PlayFlavor(NPC, "ribbit_hopson/halas/new_halas/ribbit_hopson/ribbit_hopson_006.mp3", "", "", 2761139077, 596680396, Spawn)
  63. AddConversationOption(conversation, "That would be fine.", "OfferSpiderPuffs")
  64. AddConversationOption(conversation, "I'm not mucking about some cave for some disgusting puffs. No thank you.")
  65. StartConversation(conversation, NPC, Spawn, "I warn you, I do not have much money left over. As it turns out, pilgrimages are much more expensive than you would suppose! But I could give you some of the baked spider puffs, they are most delicious.")
  66. end
  67. function Quest1Chat_5(NPC, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. conversation = CreateConversation()
  70. AddConversationOption(conversation, "Thank you, Ribbit. I shall return with the ingredients.")
  71. StartConversation(conversation, NPC, Spawn, "The dame's rocket is right outside my door and the woolly silkspinners are in the cave leading to the Erollis Dock.")
  72. end
  73. function Quest1Chat_6(NPC, Spawn)
  74. FaceTarget(NPC, Spawn)
  75. conversation = CreateConversation()
  76. AddConversationOption(conversation, "I can rest a bit.", "Quest1Chat_7")
  77. StartConversation(conversation, NPC, Spawn, "Splendid! If you will rest for a moment, I can have the spider puff batter whipped up and baked in no time!")
  78. end
  79. function Quest1Chat_7(NPC, Spawn)
  80. AddSpawnAccess(GetSpawn(NPC, 4701841), Spawn)
  81. SetStepComplete(Spawn, SpiderPuffs, 3)
  82. FaceTarget(NPC, Spawn)
  83. conversation = CreateConversation()
  84. AddConversationOption(conversation, "Thank you, Ribbit!")
  85. StartConversation(conversation, "There, finished! Please take some puffs for yourself.")
  86. end
  87. function OfferSpiderPuffs(NPC, Spawn)
  88. OfferQuest(NPC, Spawn, SpiderPuffs)
  89. end