a_new_dress_now.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --[[
  2. Script Name : Quests/Antonica/a_new_dress_now.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.08.16 06:08:58
  5. Script Purpose :
  6. Zone : Antonica
  7. Quest Giver: Licha
  8. Preceded by:
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepObtainItem(Quest, 1, "I need to buy Licha a new dress.", 1, 100, "Licha wants a new, fancy dress from some merchant in Thundering Steppes.", 280, 130013)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. FaceTarget(QuestGiver, Player)
  17. local conversation = CreateConversation()
  18. AddConversationOption(conversation, "I will return shortly.")
  19. StartConversation(conversation, QuestGiver, Player, "And be quick about it!")
  20. end
  21. function Declined(Quest, QuestGiver, Player)
  22. -- Add dialog here for when the quest is declined
  23. end
  24. function Deleted(Quest, QuestGiver, Player)
  25. -- Remove any quest specific items here when the quest is deleted
  26. end
  27. function Step1Complete(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 1, "I bought Licha a new dress.")
  29. UpdateQuestTaskGroupDescription(Quest, 1, "I bought a new dress for Licha.")
  30. AddQuestStepChat(Quest, 2, "I should take this dress to Licha.", 1, "Now that I bought the dress, I should give it to Licha", 280, 121308)
  31. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  32. end
  33. function QuestComplete(Quest, QuestGiver, Player)
  34. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  35. UpdateQuestStepDescription(Quest, 2, "I gave Licha her new dress.")
  36. UpdateQuestTaskGroupDescription(Quest, 2, "I gave Licha her dress.")
  37. if HasItem(Player, 130013) then
  38. RemoveItem(Player, 130013)
  39. end
  40. UpdateQuestDescription(Quest, "I found Licha a new dress.")
  41. GiveQuestReward(Quest, Player)
  42. end
  43. function Reload(Quest, QuestGiver, Player, Step)
  44. if Step == 1 then
  45. Step1Complete(Quest, QuestGiver, Player)
  46. elseif Step == 2 then
  47. QuestComplete(Quest, QuestGiver, Player)
  48. end
  49. end