123456789101112131415161718192021222324252627282930313233343536373839404142 |
- --[[
- Script Name : SpawnScripts/FallenGate/alarmglobe.lua
- Script Author : Premierio015
- Script Date : 2021.07.10 11:07:47
- Script Purpose :
- :
- --]]
- local ChargeOfTheLeatherfootBrigade_Frambert = 5310
- function spawn(NPC)
- SetPlayerProximityFunction(NPC, 10, "InRange", Spawn)
- end
- function InRange(NPC, Spawn)
- if GetQuestStep(Spawn, ChargeOfTheLeatherfootBrigade_Frambert) == 1 then
- SpawnSet(NPC, "show_command_icon", 1)
- SpawnSet(NPC, "display_hand_icon", 1)
- SetAccessToEntityCommand(Spawn,NPC,"Smash Globe", 1)
- elseif QuestStepIsComplete(Spawn, ChargeOfTheLeatherfootBrigade_Frambert, 1) then
- SpawnSet(NPC, "show_command_icon", 0)
- SpawnSet(NPC, "display_hand_icon", 0)
- SetAccessToEntityCommand(Spawn,NPC,"Smash Globe", 0)
- end
- end
- function casted_on(NPC, Spawn, SpellName)
- if SpellName == 'Smash Globe' then
- SendMessage(Spawn, "You try to smash the globe, but magic keeps it from breaking.")
- SetStepComplete(Spawn, ChargeOfTheLeatherfootBrigade_Frambert, 1)
- SpawnSet(NPC, "show_command_icon", 0)
- SpawnSet(NPC, "display_hand_icon", 0)
- SetAccessToEntityCommand(Spawn,NPC,"Smash Globe", 0)
- end
- end
- function respawn(NPC)
- spawn(NPC)
- end
|