I've been working on the following mod for use in Warsong. The functions themselves work fine if I use "/script". Also, if I paste this code into LuaSlinger the slash commands will work, but only if I load the script TWICE. Can anyone see what my mistake is?
Code:
function EBS_OnLoad()
SLASH_IncTun1 = "/inct";
SlashCmdList["IncTun"] = EBS_Incoming_Tunnel;
SLASH_IncRoof1 = "/incr";
SlashCmdList["IncRoof"] = EBS_Incoming_Roof;
SLASH_IncLed1 = "/incl";
SlashCmdList["IncLed"] = EBS_Incoming_Ledge;
SLASH_IncRamp1 = "/incp";
SlashCmdList["IncRamp"] = EBS_Incoming_Ramp;
end
function EBS_Incoming_Tunnel()
SendChatMessage("INCOMING TUNNEL", "RAID");
end
function EBS_Incoming_Roof()
SendChatMessage("INCOMING they are on our ROOF", "RAID");
end
function EBS_Incoming_Ledge()
SendChatMessage("INCOMING SECOND FLOOR/ Ledge above Flag Room", "RAID");
end
function EBS_Incoming_Ramp()
SendChatMessage("INCOMING coming up RAMP", "RAID");
end