вот как часть кода Argo выглядит
PHP код:
function argo_msg(msg,channel)
if(ARG_DEF == 1) then
print(msg);
else
SendChatMessage(msg,channel);
end
end
function argo_spell(id)
local sovpalo = 0;
local pattern = "DEL";
if(string.match(id, pattern)) then
id = string.gsub(id, pattern, "");
for i = 1,#ARG_SPELLS do
if (string.match(id,ARG_SPELLS[i][1])) then
sovpalo = 1;
table.remove(ARG_SPELLS, i);
print("|cff9370DBARGo:|r "..GetSpellLink(id).." |cffff4500"..id.."Удален|r ");
end
end
else
for i=1,#ARG_SPELLS do
local SPELL = id + 0;
if ((ARG_SPELLS[i][1] + 0) == SPELL) then
sovpalo = 1;
if(ARG_SPELLS[i][3] == 1) then
ARG_SPELLS[i][3] = 0;
print("|cff9370DBARGo:|r "..GetSpellLink(SPELL).." |cffff4500[off]|r");
else
ARG_SPELLS[i][3] = 1;
print("|cff9370DBARGo:|r "..GetSpellLink(SPELL).." |cff7cfc00[on]|r");
end
end
end