qstunseenhandbarrel1.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : SpawnScripts/Nektulos/qstunseenhandbarrel1.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) == 3 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, 3) then
  22. zone = GetZone(Spawn)
  23. SpawnByLocationID(zone, 100433)
  24. SetStepComplete(Spawn, ProveYourself, 3)
  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