9
3

ChugglesToolbox.lua 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. --[[
  2. Script Name : ItemScripts/ChugglesToolbox.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.06.29 09:06:59
  5. Script Purpose :
  6. :
  7. --]]
  8. local ChugglesToolbox = 483
  9. --
  10. function examined(Item, Player)
  11. if not HasQuest(Player, ChugglesToolbox) and not HasCompletedQuest(Player, ChugglesToolbox) then
  12. OfferQuest(nil, Player, ChugglesToolbox)
  13. end
  14. end
  15. local ChugglesToolbox = 483
  16. function examined(Item, Player)
  17. if CanReceiveQuest(Player,ChugglesToolbox) then
  18. Dialog1(Item,Player)
  19. else
  20. conversation = CreateConversation()
  21. AddConversationOption(conversation, "[Put the toolbox away.]", "CloseItemConversation")
  22. StartDialogConversation(conversation, 2, Item, Player, "This toolbox is similar to one you've found before. You can't fathom a need for it, but someone else might be able to use it.")
  23. end
  24. end
  25. function Dialog1(Item,Player)
  26. conversation = CreateConversation()
  27. if CanReceiveQuest(Player,ChugglesToolbox) then
  28. AddConversationOption(conversation, "[Inspect the toolbox.]", "Dialog2")
  29. end
  30. AddConversationOption(conversation, "[Put the toolbox away.]", "CloseItemConversation")
  31. StartDialogConversation(conversation, 2, Item, Player, "This box feels lighter than you expected.")
  32. end
  33. function Dialog2(Item,Player)
  34. conversation = CreateConversation()
  35. if CanReceiveQuest(Player,ChugglesToolbox) then
  36. AddConversationOption(conversation, "[Write the list in your journal.]", "Offer")
  37. end
  38. AddConversationOption(conversation, "[Put the toolbox away.]", "CloseItemConversation")
  39. StartDialogConversation(conversation, 2, Item, Player, "The words \"Chuggle of Temple Street\" are inscribed on a plate on top of the lid. The box is empty except for a handwritten note stuck to the inside of the box's top; the note lists the tools that once belonged in the box, and who among the denizens of Thieves' Way they were allocated to.")
  40. end
  41. function Offer(Item,Player)
  42. if CanReceiveQuest(Player,ChugglesToolbox) then
  43. OfferQuest(nil,Player,ChugglesToolbox)
  44. end
  45. CloseItemConversation(Item,Player)
  46. end
  47. function QuestFinish(Item,Player)
  48. CloseItemConversation(Item,Player)
  49. if HasItem(Player,5014) then
  50. RemoveItem(Player,5014,1)
  51. end
  52. end