eq2emu-content/SpawnScripts/Zek/VigoCerebus.lua
2025-04-05 14:26:33 +00:00

38 lines
No EOL
1.1 KiB
Lua
Executable file

--[[
Script Name : SpawnScripts/Zek/VigoCerebus.lua
Script Purpose : Open the gate to Deathfist Citadel upon death and close upon spawning
Script Author : Jabantiz
Script Date : 8/28/2016
Script Notes :
--]]
local GateLower = 1900304
local GateOpenedY = -38
require "SpawnScripts/Generic/NPCModule"
function spawn(NPC, Spawn)
NPCModule(NPC, Spawn)
Deathfist(NPC)
OrcArmorCommon(NPC)
local bridgeGate = GetSpawn(NPC, GateLower)
if bridgeGate ~= nil and GetY(bridgeGate) == GateOpenedY then
UseWidget(bridgeGate)
end
end
function respawn(NPC)
spawn(NPC)
end
function death(NPC, Spawn)
local bridgeGate = GetSpawn(NPC, GateLower)
if bridgeGate ~= nil and GetY(bridgeGate) ~= GateOpenedY then
UseWidget(bridgeGate)
local players = GetPlayersInZone(GetZone(NPC))
for index, player in pairs(players) do
SendPopUpMessage(player, "With the slaying of Vigo, the Deathfist Citadel gate is unlocked!", 255, 0, 0)
SendMessage(player, "With the slaying of Vigo, the Deathfist Citadel gate is unlocked!", "red")
end
end
end