9
3

runedacorn.lua 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : ItemScripts/runedacorn.lua
  3. Script Purpose :
  4. Script Author : Dorbin
  5. Script Date : 05/17/2023
  6. Script Notes :
  7. --]]
  8. local Quest = 233
  9. function examined(Item, Player)
  10. if CanReceiveQuest(Player,Quest) then
  11. Dialog1(Item,Player)
  12. else
  13. conversation = CreateConversation()
  14. AddConversationOption(conversation, "[Keep the acorn.]")
  15. AddConversationOption(conversation, "[Toss the acorn to the ground.]", "QuestFinish")
  16. StartDialogConversation(conversation, 2, Item, Player, "This acorn is familiar to you. You helped cleanse some of the corruption from the Oakmyst Forest as the runes requested.")
  17. end
  18. end
  19. function Dialog1(Item,Player)
  20. conversation = CreateConversation()
  21. if CanReceiveQuest(Player,Quest) then
  22. AddConversationOption(conversation, "[Clean away the grime]", "Dialog2")
  23. end
  24. AddConversationOption(conversation, "[Put the acorn away.]", "CloseItemConversation")
  25. StartDialogConversation(conversation, 2, Item, Player, "This large acorn is covered in a foul grime.")
  26. end
  27. function Dialog2(Item,Player)
  28. conversation = CreateConversation()
  29. if CanReceiveQuest(Player,Quest) then
  30. AddConversationOption(conversation, "I must free the souls of corrupted dryads!", "Offer")
  31. end
  32. AddConversationOption(conversation, "[Put the acorn away.]", "CloseItemConversation")
  33. StartDialogConversation(conversation, 2, Item, Player, "Deep runes on the acorn's surface read: \n\n\"Wounds of chaos encircle me. Invisible mouths murmur my curse. I curl to seed, fleeing the festering soil. Child of Elddar, free my corrupted shell... cleanse this thicket of the corruption.\"")
  34. end
  35. function Offer(Item,Player)
  36. if CanReceiveQuest(Player,Quest) then
  37. OfferQuest(nil,Player,Quest)
  38. end
  39. CloseItemConversation(Item,Player)
  40. end
  41. function QuestFinish(Item,Player)
  42. CloseItemConversation(Item,Player)
  43. if HasItem(Player,1001093) then
  44. RemoveItem(Player,1001093,1)
  45. end
  46. end