questmournedstatuelightstone.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/questmournedstatuelightstone.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.30 11:05:17
  5. Script Purpose :
  6. :
  7. --]]
  8. local TheReturnOfTheLight = 485
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 5, "InRange")
  11. end
  12. function InRange(NPC, Spawn)
  13. if GetQuestStep(Spawn, TheReturnOfTheLight) == 2 then
  14. SpawnSet(NPC, "display_hand_icon", 1)
  15. SpawnSet(NPC, "show_command_icon", 1)
  16. end
  17. end
  18. function casted_on(NPC, Spawn, SpellName)
  19. if SpellName == 'Touch burned out lightstone to statue' then
  20. if GetQuestStep(Spawn, TheReturnOfTheLight) == 2 then
  21. SetStepComplete(Spawn, TheReturnOfTheLight, 2)
  22. end
  23. local con = CreateConversation()
  24. AddConversationOption(con, "[Put stone away]")
  25. StartDialogConversation(con, 1, NPC, Spawn, "Touching the lightstone to the statue causes the small orb to flicker with light and grow warm in your hand.")
  26. end
  27. end
  28. function respawn(NPC)
  29. spawn(NPC)
  30. end