spider_puffs.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. --[[
  2. Script Name : Quests/FrostfangSea/spider_puffs.lua
  3. Script Purpose : the quest "Spider Puffs"
  4. Script Author : theFoof
  5. Script Date : 2013.8.27
  6. Script Notes :
  7. Zone : Frostfang Sea
  8. Quest Giver : Ribbit Hopson
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestRewardCoin(Quest, math.random(1,99), math.random(52,99), 0, 0)
  14. AddQuestStep(Quest, 1, "I must collect dame's rockets for Ribbit's puffs.", 2, 100, "I must collect dame's rockets for Ribbit. I can find the dame's rockets in Ribbit's garden, outside of his house in New Halas.", 1976)
  15. AddQuestStepCompleteAction(Quest, 1, "CollectedRockets")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. conversation = CreateConversation()
  20. PlayFlavor(QuestGiver, "ribbit_hopson/halas/new_halas/ribbit_hopson/ribbit_hopson_007.mp3", "", "", 1643468307, 2055311986, Player)
  21. AddConversationOption(conversation, "I shall return to you once I have collected all of the ingredients you require.")
  22. StartConversation(conversation, QuestGiver, Player, "Wonderful! If you do not mind, could you pick some of my dame's rocket as well? It's just right outside my door in my little garden. The local spiders are called woolly silkspinners and they are in the cave leading to the Erollis Dock.")
  23. ShowDamesRockets(QuestGiver, Player)
  24. end
  25. function Deleted(Quest, QuestGiver, Player)
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. end
  29. function CollectedRockets(Quest, QuestGiver, Player)
  30. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected the dame's rockets for Ribbit.")
  31. AddQuestStepKill(Quest, 2, "I must kill woolly silkspinners for Ribbit's puffs.", 4, 100, "I must kill woolly silkspinners for Ribbit. The silkspinners are in the cave leading to the Erollis Dock.", 1878, 4700164)
  32. AddQuestStepCompleteAction(Quest, 2, "KilledSpiders")
  33. end
  34. function KilledSpiders(Quest, QuestGiver, Player)
  35. UpdateQuestTaskGroupDescription(Quest, 2, "I have killed and collected the woolly silkspinner meat for Ribbit.")
  36. AddQuestStepChat(Quest, 3, "I must speak with Ribbit Hopson at his New Halas home.", 1, "I must return the dame's rockets and spider meat to Ribbit Hopson. Ribbit is in his house near the entrance to New Halas.", 0, 4700151)
  37. AddQuestStepCompleteAction(Quest, 3, "TalkedRibbit")
  38. end
  39. function TalkedRibbit(Quest, QuestGiver, Player)
  40. UpdateQuestTaskGroupDescription(Quest, 3, "I have given the ingredients to Ribbit.")
  41. AddQuestStep(Quest, 4, "I must try some of Ribbit's spider puffs.", 1, 100, "Ribbit has taken the ingredients I collected and prepared his recipe for spider puffs.", 296)
  42. AddQuestStepCompleteAction(Quest, 4, "CompleteQuest")
  43. end
  44. function CompleteQuest(Quest, QuestGiver, Player)
  45. GiveQuestReward(Quest, Player)
  46. end
  47. function ShowDamesRockets(QuestGiver, Player)
  48. local zone = GetZone(QuestGiver)
  49. AddSpawnAccess(GetSpawnByLocationID(zone, 442806), Player)
  50. AddSpawnAccess(GetSpawnByLocationID(zone, 442807), Player)
  51. AddSpawnAccess(GetSpawnByLocationID(zone, 442808), Player)
  52. AddSpawnAccess(GetSpawnByLocationID(zone, 442809), Player)
  53. AddSpawnAccess(GetSpawnByLocationID(zone, 442810), Player)
  54. AddSpawnAccess(GetSpawnByLocationID(zone, 442811), Player)
  55. AddSpawnAccess(GetSpawnByLocationID(zone, 442812), Player)
  56. AddSpawnAccess(GetSpawnByLocationID(zone, 442813), Player)
  57. end
  58. function Reload(Quest, QuestGiver, Player, Step)
  59. if Step == 1 then
  60. CollectedRockets(Quest, QuestGiver, Player)
  61. elseif Step == 2 then
  62. KilledSpiders(Quest, QuestGiver, Player)
  63. elseif Step == 3 then
  64. TalkedRibbit(Quest, QuestGiver, Player)
  65. end
  66. end