9
3

WaterFlask.lua 1.1 KB

1234567891011121314151617181920212223242526272829
  1. --[[
  2. Script Name : ItemScripts/WaterFlask.lua
  3. Script Purpose : Water Flask
  4. Script Author : Scatman
  5. Script Date : 2009.10.05
  6. Script Notes :
  7. --]]
  8. local HIGH_ELF_MENTOR_QUEST_1 = 223
  9. function examined(Item, Player)
  10. conversation = CreateConversation()
  11. if HasQuest(Player, HIGH_ELF_MENTOR_QUEST_1) and not QuestStepIsComplete(Player, HIGH_ELF_MENTOR_QUEST_1, 2) then
  12. local fountain = GetSpawn(Player, 2360073)
  13. if fountain ~= nil and GetDistance(Player, fountain) < 10 then
  14. AddConversationOption(conversation, "Fill the flask.", "FillFlask")
  15. end
  16. end
  17. AddConversationOption(conversation, "Put the flask away.", "CloseItemConversation")
  18. StartDialogConversation(conversation, 2, Item, Player, "This is the flask of water that Vindain has asked you to fill with blessed water from the Fountain of Valor.")
  19. end
  20. function FillFlask(Item, Player)
  21. SetStepComplete(Player, HIGH_ELF_MENTOR_QUEST_1, 2)
  22. conversation = CreateConversation()
  23. AddConversationOption(conversation, "Put the flask away.", "CloseItemConversation")
  24. StartDialogConversation(conversation, 2, Item, Player, "You dip the flask into the fountain and fill it with some blessed water.")
  25. end