9
3

alargescroll.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --[[
  2. Script Name : SpawnScripts/Nektulos/alargescroll.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.06.20 08:06:00
  5. Script Purpose :
  6. :
  7. --]]
  8. local TrustMustBeEarnedPart1 = 5258
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange")
  11. end
  12. function InRange(NPC, Spawn)
  13. if GetQuestStep(Spawn, TrustMustBeEarnedPart1) == 1 then
  14. AddPrimaryEntityCommand(Spawn, NPC, "Take the attack plans", 3, "Take the attack plans", "", 100)
  15. SpawnSet(NPC, "show_command_icon", 1)
  16. SpawnSet(NPC, "display_hand_icon", 1)
  17. end
  18. end
  19. function casted_on(NPC, Spawn, SpellName)
  20. if SpellName == 'Take the attack plans' then
  21. SetStepComplete(Spawn, TrustMustBeEarnedPart1, 1)
  22. SetAccessToEntityCommand(Spawn,NPC,"Leave the supplies", 0)
  23. SpawnSet(NPC, "show_command_icon", 0)
  24. SpawnSet(NPC, "display_hand_icon", 0)
  25. end
  26. end
  27. function hailed(NPC, Spawn)
  28. FaceTarget(NPC, Spawn)
  29. end
  30. function respawn(NPC)
  31. spawn(NPC)
  32. end