rock01.lua 920 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : SpawnScripts/WailingCaves/rock01.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.18 06:05:25
  5. Script Purpose :
  6. :
  7. --]]
  8. local SeerStone = 5225
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 5, "InRange")
  11. end
  12. function InRange(NPC, Spawn)
  13. if GetQuestStep(Spawn, SeerStone) == 1 then
  14. AddPrimaryEntityCommand(Spawn, NPC, "Pick up a clump of stone", 2, "", "", 10000, "")
  15. SpawnSet(NPC, "display_hand_icon", 1)
  16. SpawnSet(NPC, "show_command_icon", 1)
  17. else
  18. SpawnSet(NPC, "display_hand_icon", 0)
  19. SpawnSet(NPC, "show_command_icon", 0)
  20. SetAccessToEntityCommand(Spawn, NPC, "Pick up a clump of stone", 0)
  21. end
  22. end
  23. function casted_on(NPC, Spawn, SpellName)
  24. if SpellName == 'Pick up a clump of stone' then
  25. SetStepComplete(Spawn, SeerStone, 1)
  26. end
  27. end
  28. function respawn(NPC)
  29. spawn(NPC)
  30. end