9
3

AWantedPoster.lua 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : ItemScripts/AWantedPoster.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.19 01:05:03
  5. Script Purpose :
  6. :
  7. --]]
  8. local Quest = 5835
  9. function examined(Item, Player)
  10. if not HasCompletedQuest(Player,Quest) then
  11. Dialog1(Item,Player)
  12. else
  13. conversation = CreateConversation()
  14. if CanReceiveQuest(Player,Quest) then
  15. AddConversationOption(conversation, "These mutated creatures do not belong here!", "Offer")
  16. end
  17. AddConversationOption(conversation, "[Keep the poster in your bags.]")
  18. AddConversationOption(conversation, "[Toss the poster. You've taken care of the gnolls.]", "QuestFinish")
  19. StartDialogConversation(conversation, 2, Item, Player, "This weathered poster is identical to one you worked with before. There must have been countless of them posted about.")
  20. end
  21. end
  22. function Dialog1(Item,Player)
  23. conversation = CreateConversation()
  24. if CanReceiveQuest(Player,Quest) then
  25. AddConversationOption(conversation, "[Unfurl the poster.]", "Dialog2")
  26. end
  27. AddConversationOption(conversation, "[Put the poster away.]", "CloseItemConversation")
  28. StartDialogConversation(conversation, 2, Item, Player, "Time has not been kind to this rolled-up poster. The edges are frayed and splottched from moisture.")
  29. end
  30. function Dialog2(Item,Player)
  31. conversation = CreateConversation()
  32. if CanReceiveQuest(Player,Quest) then
  33. AddConversationOption(conversation, "[Pursue the gnolls!]", "Offer")
  34. end
  35. AddConversationOption(conversation, "[Put the poster away.]", "CloseItemConversation")
  36. StartDialogConversation(conversation, 2, Item, Player, "This is obviously an old wanted poster with images of gnoll faces across the top. You can make out some of the words.\n\n\"WANTED!\"\n\n\"Darkpaw gnolls have pillaged Antonica farmlands and must be dealt with!\"\n\n Unfortunately any mention of a reward has worn away.")
  37. end
  38. function Offer(Item,Player)
  39. if CanReceiveQuest(Player,Quest) then
  40. OfferQuest(nil,Player,Quest)
  41. end
  42. CloseItemConversation(Item,Player)
  43. end
  44. function QuestFinish(Item,Player)
  45. CloseItemConversation(Item,Player)
  46. if HasItem(Player,3213) then
  47. RemoveItem(Player,3213,1)
  48. end
  49. end