wasp_what_i_can_do.lua 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.209
  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. -- Quest ID's
  13. QUEST_1 = 346 -- 175 --Wasp What I Can Do
  14. function Init(Quest)
  15. 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)
  16. AddQuestStep(Quest, 2, "I must destroy the wasp hive.", 1, 100, "I need to take care of the wasps near the Freeport Reserve.", 0)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1_WaspsDead")
  18. AddQuestStepCompleteAction(Quest, 2, "Step2_HiveDestro")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. if QuestGiver ~= nil then
  22. if GetDistance(Player, QuestGiver) < 30 then
  23. PlayFlavor(NPC, "voiceover/english/gu38/tutorial_revamp/clan_chief_malachi_sleetspear/fprt_hood06/malachi007.mp3", "", "", 3983810535, 3176793285, Spawn)
  24. AddConversationOption(conversation, "Ha! I thought this was going to be challenging! I’ll be right back!")
  25. 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.")
  26. end
  27. end
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. end
  31. function Deleted(Quest, QuestGiver, Player)
  32. end
  33. function Step1_WaspsDead(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I have killed several wasps.")
  35. if QuestIsComplete(Player, QUEST_1) then
  36. OneAndTwoComplete(Quest, QuestGiver, Player)
  37. end
  38. end
  39. function Step2_HiveDestro(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I have destroyed the wasp hive.")
  41. if QuestIsComplete(Player, QUEST_1) then
  42. OneAndTwoComplete(Quest, QuestGiver, Player)
  43. end
  44. end
  45. function OneAndTwoComplete(Quest,QuestGiver, Player)
  46. UpdateQuestTaskGroupDescription(Quest, 1, "I have proved that I am indeed strong enough to survive in the Scale Yard.")
  47. AddQuestStepChat(Quest, 3, "I should let malachi know I've delt with the wasps.", 1, "I've taken care of the wasps and need to talk to Malachi.", 0, 1390004)
  48. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  49. end
  50. function QuestComplete(Quest, QuestGiver, Player)
  51. 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.")
  52. GiveQuestReward(Quest, Player)
  53. end
  54. function Reload(Quest, QuestGiver, Player, Step)
  55. if Step == 1 then
  56. Step1_WaspDead(Quest, QuestGiver, Player)
  57. elseif Step == 2 then
  58. Step2_HiveDestro(Quest, QuestGiver, Player)
  59. elseif Step == 3 then
  60. Step3_OneAndTwoComplete(Quest, QuestGiver, Player)
  61. elseif Step == 4 then
  62. QuestComplete(Quest, QuestGiver, Player)
  63. end
  64. end