9
3

FabricPatch.lua 1.1 KB

123456789101112131415161718192021222324252627282930
  1. --[[
  2. Script Name : ItemScripts/FabricPatch.lua
  3. Script Purpose : Offers and updates the language quest, "The Patchwork Tapestry"
  4. Script Author : Dorbin
  5. Script Date : 2022.05.28
  6. Script Notes :
  7. --]]
  8. local LANGUAGE_QUEST = 5566
  9. function examined(Item, Player)
  10. conversation = CreateConversation()
  11. if not HasQuest(Player, LANGUAGE_QUEST) or GetQuestStep(Player,LANGUAGE_QUEST)==1 then
  12. AddConversationOption(conversation, "Closely inspect the fabric patch.", "Study")
  13. end
  14. AddConversationOption(conversation, "Hold on to the fabric for use later.","CloseItemConversation")
  15. StartDialogConversation(conversation, 2, Item, Player, "This is a patch of fay fabric. There is print upon the fabric revealing letters in Norrathian and some other language before the script is lost in a rip in the fine fabric.")
  16. end
  17. function Study(Item,Player)
  18. CloseItemConversation(Item,Player)
  19. if not HasQuest(Player, LANGUAGE_QUEST) then
  20. OfferQuest(nil, Player, LANGUAGE_QUEST)
  21. else
  22. CloseItemConversation(Item,Player)
  23. RemoveItem(Player,7003,1) --fabric patch
  24. SummonItem(Player,13526)-- studied fabric patch
  25. end
  26. end