9
3

qstunseenhandbarrel3.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --[[
  2. Script Name : SpawnScripts/Nektulos/qstunseenhandbarrel3.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.06.19 07:06:48
  5. Script Purpose :
  6. :
  7. --]]
  8. local ProveYourself = 5256
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange")
  11. end
  12. function InRange(NPC, Spawn)
  13. if GetQuestStep(Spawn, ProveYourself) == 2 then
  14. AddPrimaryEntityCommand(Spawn, NPC, "Leave the supplies", 3, "Leave the supplies", "", 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 == 'Leave the supplies' then
  21. if not QuestStepIsComplete(Spawn, ProveYourself, 2) then
  22. SetStepComplete(Spawn, ProveYourself, 2)
  23. zone = GetZone(Spawn)
  24. SpawnByLocationID(zone, 100435)
  25. SetAccessToEntityCommand(Spawn,NPC,"Leave the supplies", 0)
  26. SpawnSet(NPC, "show_command_icon", 0)
  27. SpawnSet(NPC, "display_hand_icon", 0)
  28. end
  29. end
  30. end
  31. function respawn(NPC)
  32. spawn(NPC)
  33. end