9
3

alarmglobe.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : SpawnScripts/FallenGate/alarmglobe.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.07.10 11:07:47
  5. Script Purpose :
  6. :
  7. --]]
  8. local ChargeOfTheLeatherfootBrigade_Frambert = 5310
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", Spawn)
  11. end
  12. function InRange(NPC, Spawn)
  13. if GetQuestStep(Spawn, ChargeOfTheLeatherfootBrigade_Frambert) == 1 then
  14. SpawnSet(NPC, "show_command_icon", 1)
  15. SpawnSet(NPC, "display_hand_icon", 1)
  16. SetAccessToEntityCommand(Spawn,NPC,"Smash Globe", 1)
  17. elseif QuestStepIsComplete(Spawn, ChargeOfTheLeatherfootBrigade_Frambert, 1) then
  18. SpawnSet(NPC, "show_command_icon", 0)
  19. SpawnSet(NPC, "display_hand_icon", 0)
  20. SetAccessToEntityCommand(Spawn,NPC,"Smash Globe", 0)
  21. end
  22. end
  23. function casted_on(NPC, Spawn, SpellName)
  24. if SpellName == 'Smash Globe' then
  25. SendMessage(Spawn, "You try to smash the globe, but magic keeps it from breaking.")
  26. SetStepComplete(Spawn, ChargeOfTheLeatherfootBrigade_Frambert, 1)
  27. SpawnSet(NPC, "show_command_icon", 0)
  28. SpawnSet(NPC, "display_hand_icon", 0)
  29. SetAccessToEntityCommand(Spawn,NPC,"Smash Globe", 0)
  30. end
  31. end
  32. function respawn(NPC)
  33. spawn(NPC)
  34. end