questmournedstatuelightstone.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. SetRequiredQuest(NPC,TheReturnOfTheLight,3,0,0,1)
  11. SetRequiredQuest(NPC,TheReturnOfTheLight,2,0,0,1)
  12. --SetPlayerProximityFunction(NPC, 5, "InRange")
  13. end
  14. function InRange(NPC, Spawn)
  15. if GetQuestStep(Spawn, TheReturnOfTheLight) == 2 then
  16. SpawnSet(NPC, "display_hand_icon", 1)
  17. SpawnSet(NPC, "show_command_icon", 1)
  18. end
  19. end
  20. function casted_on(NPC, Spawn, SpellName)
  21. if SpellName == 'Touch burned out lightstone to statue' then
  22. if GetQuestStep(Spawn, TheReturnOfTheLight) == 2 then
  23. SetStepComplete(Spawn, TheReturnOfTheLight, 2)
  24. local con = CreateConversation()
  25. AddConversationOption(con, "[Put stone away]")
  26. 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.")
  27. end
  28. end
  29. end
  30. function respawn(NPC)
  31. spawn(NPC)
  32. end