AGnollsDoll.lua 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --[[
  2. Script Name : ItemScripts/AGnollsDoll.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.17 07:05:00
  5. Script Purpose :
  6. :
  7. --]]
  8. local Quest = 5838
  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 gnolls and their dark magic must stop!","Offer")
  16. end
  17. AddConversationOption(conversation, "[Keep the little stuffed animal in your bag.]")
  18. AddConversationOption(conversation, "[Drop it. You've done enough gnoll hunting.]", "QuestFinish")
  19. StartDialogConversation(conversation, 2, Item, Player, "This doll is similar to one you've seen before. The dark magics it was used for still infuriate you!")
  20. end
  21. end
  22. function Dialog1(Item,Player)
  23. conversation = CreateConversation()
  24. if CanReceiveQuest(Player,Quest) then
  25. AddConversationOption(conversation, "[Look closely at the stuffed animal.]", "Dialog2")
  26. end
  27. AddConversationOption(conversation, "[Put the stuffed animal away.]", "CloseItemConversation")
  28. StartDialogConversation(conversation, 2, Item, Player, "This is a cute little stuffed animal.")
  29. end
  30. function Dialog2(Item,Player)
  31. conversation = CreateConversation()
  32. if CanReceiveQuest(Player,Quest) then
  33. AddConversationOption(conversation, "Antonica would be a safer place with fewer Darkpaw Mystics.", "Offer")
  34. end
  35. AddConversationOption(conversation, "[Put the stuffed animal away away.]", "CloseItemConversation")
  36. StartDialogConversation(conversation, 2, Item, Player, "This small stuffed animal looks to have been a human child's toy at one-time. The toy looks to have been used in some ritual magic as it has many bite marks and bone powder caking its surface.")
  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,1825) then
  47. RemoveItem(Player,1825,1)
  48. end
  49. end