strongboxinsidecaltorsis.lua 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : SpawnScripts/Antonica/strongboxinsidecaltorsis.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.11 06:05:08
  5. Script Purpose :
  6. :
  7. --]]
  8. local Sayer = 5812
  9. function spawn(NPC)
  10. end
  11. function casted_on(NPC, Spawn, Message)
  12. if Message == "inspect" and not HasCompletedQuest(Quest,Sayer) then
  13. Dialog1(NPC, Spawn)
  14. else
  15. Dialog3(NPC,Spawn)
  16. end
  17. end
  18. function Dialog1(NPC, Spawn)
  19. conversation = CreateConversation()
  20. if GetQuestStep(Spawn,Sayer)==3 then
  21. AddConversationOption(conversation, "Use the strongbox key ", "Dialog2")
  22. end
  23. AddConversationOption(conversation, "Stop inspecting the strongbox")
  24. StartDialogConversation(conversation, 1, NPC, Spawn, "This is a locked strongbox. It does not look worn at all and seems to have some spell placed over it that binds it to the ground.")
  25. end
  26. function Dialog2(NPC, Spawn)
  27. conversation = CreateConversation()
  28. AddConversationOption(conversation, "Take the sewing kit.","Update")
  29. AddConversationOption(conversation, "Stop inspecting the strongbox")
  30. StartDialogConversation(conversation, 1, NPC, Spawn, "Inside the chest you find some coin, some scrolls written in a language unknown, and odd trinkets of no use. You also find a small ornate sewing kit with the name \"Nerissa Clothspinner\" engraved upon it.")
  31. end
  32. function Update(NPC, Spawn)
  33. SetStepComplete(Spawn, Sayer, 3)
  34. CloseConversation(NPC,Spawn)
  35. end
  36. function Dialog3(NPC, Spawn)
  37. conversation = CreateConversation()
  38. AddConversationOption(conversation, "Stop inspecting the strongbox")
  39. StartDialogConversation(conversation, 1, NPC, Spawn, "The spell that bound this lockbox here still holds firm. The remaining contents are still of no use to you.")
  40. end
  41. function respawn(NPC)
  42. spawn(NPC)
  43. end