9
3

questrelicboxmaareona.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/questrelicboxmaareona.lua
  3. Script Purpose : <purpose>
  4. Script Author : Jabantiz
  5. Script Date : 6/15/2018
  6. Script Notes : <special-instructions>
  7. --]]
  8. -- Quest ID's
  9. local HIDDEN_TREASURES = 320
  10. -- Item ID's
  11. local SMALL_METAL_BOX_AND_PAPER = 12950
  12. function spawn(NPC)
  13. SetRequiredQuest(NPC, HIDDEN_TREASURES, 1)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function casted_on(NPC, Spawn, Message)
  19. if Message == "Inspect Box" and HasQuest(Spawn, HIDDEN_TREASURES) and GetQuestStep(Spawn, HIDDEN_TREASURES) == 1 then
  20. local con = CreateConversation()
  21. AddConversationOption(con, "Open the box.", "OpenBox")
  22. StartDialogConversation(con, 1, NPC, Spawn, "This box does not appear to be very old. It would be impossible to pull through the grate, but you may be able to open it and take what is inside.")
  23. end
  24. end
  25. function OpenBox(NPC, Spawn)
  26. local con = CreateConversation()
  27. AddConversationOption(con, "Take the box and paper.", "TakeBox")
  28. StartDialogConversation(con, 1, NPC, Spawn, "Inside the box there is a smaller, metal box. There is also a piece of paper that is now soaking. It would be easy to pull both of these objects through the grate.")
  29. end
  30. function TakeBox(NPC, Spawn)
  31. SummonItem(Spawn, SMALL_METAL_BOX_AND_PAPER, 1)
  32. SetStepComplete(Spawn, HIDDEN_TREASURES, 1)
  33. local con = CreateConversation()
  34. AddConversationOption(con, "Leave the large box alone.", "CloseConversation")
  35. StartDialogConversation(con, 1, NPC, Spawn, "Nothing left in the larger box.")
  36. end