9
3

alarmglobe2.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. --[[
  2. Script Name : SpawnScripts/FallenGate/alarmglobe2.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.07.10 11:07:52
  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) == 2 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, 2) 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, 2)
  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