wasp_what_i_can_do.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : Quests/ScaleYard/wasp_what_i_can_do.lua
  3. Script Purpose : Quest, "Wasp What I Can Do"
  4. Script Author : Xanibunib
  5. Script Date : 4.4.2009 (updated by torsten 1.8.2022)
  6. Zone : Scale Yard
  7. Quest Giver: Clan Chief Malachi Sleetspear
  8. Quest ID# : 175
  9. Preceded by: none
  10. Followed by: Sound Off!
  11. --]]
  12. local WASP = 346
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "I need to kill several wasps.", 4, 100, "I need to take care of the wasps near the Freeport Reserve.", 611, 1390035)
  15. AddQuestStepSpell(Quest, 2, "I must destroy the wasp hive.", 1, 100, "I need to take care of the wasps near the Freeport Reserve.", 0, 5029)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1_WaspsDead")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2_HiveDestro")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. if QuestGiver ~= nil then
  21. if GetDistance(Player, QuestGiver) < 30 then
  22. PlayFlavor(NPC, "voiceover/english/gu38/tutorial_revamp/clan_chief_malachi_sleetspear/fprt_hood06/malachi007.mp3", "", "", 3983810535, 3176793285, Spawn)
  23. AddConversationOption(conversation, "Ha! I thought this was going to be challenging! I’ll be right back!")
  24. StartConversation(conversation, NPC, Spawn, "Go over there and get rid of that flying vermin and dispose of their hive. You’ll make fast friends clearing up this mess and establish the fact that yer handy in a tussle.")
  25. end
  26. end
  27. end
  28. function Declined(Quest, QuestGiver, Player)
  29. end
  30. function Step1_WaspsDead(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 1, "I have killed several wasps.")
  32. CheckProgress(Quest, QuestGiver, Player)
  33. end
  34. function Step2_HiveDestro(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I have destroyed the wasp hive.")
  36. CheckProgress(Quest, QuestGiver, Player)
  37. end
  38. function CheckProgress(Quest, QuestGiver, Player)
  39. if QuestStepIsComplete(Player, WASP, 1) and QuestStepIsComplete(Player, WASP, 2) then
  40. UpdateQuestTaskGroupDescription(Quest, 1, "I have proved that I am indeed strong enough to survive in the Scale Yard.")
  41. AddQuestStepChat(Quest, 3, "I should let Malachi know I've dealt with the wasps.", 1, "I've taken care of the wasps and need to talk to Malachi.", 0, 1390077)
  42. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  43. end
  44. end
  45. function QuestComplete(Quest, QuestGiver, Player)
  46. UpdateQuestDescription(Quest, "I have destroyed the wasps and their hive at Malachi's request. Though they may not openly showit, I'm sure the residents of the Scale Yard appreciate my efforts.")
  47. GiveQuestReward(Quest, Player)
  48. end
  49. function Reload(Quest, QuestGiver, Player, Step)
  50. if Step == 1 then
  51. Step1_WaspDead(Quest, QuestGiver, Player)
  52. elseif Step == 2 then
  53. Step2_HiveDestro(Quest, QuestGiver, Player)
  54. elseif Step == 3 then
  55. QuestComplete(Quest, QuestGiver, Player)
  56. end
  57. end