Quantcast
lotrointerface.com
Search Downloads


Go Back   Egarthur's Portal

LUA TRIGGER CODE FOR FIREWORKS LAUNCHING
local pos_or_neg, color;
--Turbine.Shell.WriteLine("full message is "..args.Message);
_, _, pos_or_neg, color = args.Message:find("Let's dazzle the crowd with a firework that is([%a%p]*) (%a+)%!");
if (pos_or_neg ~= nil) then
args.captures[2] = color;
if (pos_or_neg == "") then
args.captures[1] = "is";
return true;
elseif (pos_or_neg == "n't") then
args.captures[1] = "is not";
return true;
else
return false;
end
end
_, _, pos_or_neg, color = args.Message:find("How about (%a+ %a+) ([%a%s]+)%? Launch it now!");
if (pos_or_neg ~= nil) then
args.captures[2] = color;
if ((pos_or_neg == "a bright") and (color:find(" one$"))) then
args.captures[1] = "is";
args.captures[2] = string.gsub(args.captures[2], " one$", "");
return true;
elseif (pos_or_neg == "something besides") then
args.captures[1] = "is not";
return true;
else
return false;
end
end
_, _, pos_or_neg, color, extra = args.Message:find("This is not the time for(.*) (%a+) fireworks(.*)%'");
if (pos_or_neg ~= nil) then
args.captures[2] = color;
if ((pos_or_neg == " resting, launch your") and (extra:find("^%!$"))) then
args.captures[1] = "is";
return true;
elseif ((pos_or_neg == "") and (extra:find("but any other colour will do%!$"))) then
args.captures[1] = "is not";
return true;
else
return false;
end
end

local middle_part;
_, _, middle_part = args.Message:find("Quickly, launch a (.*) high into the sky%!");
if (middle_part ~= nil) then
_, _, color = middle_part:find("(%a+) firework");
if (color ~= nil) then
args.captures[1] = "is";
args.captures[2] = color;
return true;
else
_, _, color = middle_part:find("firework that's not (%a+)");
if (color == nil) then
return false;
end
args.captures[1] = "is not";
args.captures[2] = color;
return true;
end
end
_, _, color, extra = args.Message:find("Send up a([%a%s]+) firework([,;] this [%a%s]+%!)");
if (color == nil) then
return false;
end
if (color:find("^nything except a ") and (extra == "; this will be unexpected!")) then
args.captures[1] = "is not";
args.captures[2] = color:gsub("^nything except a ", "");
return true;
elseif (extra == ", this is the perfect time for one!") then
args.captures[1] = "is";
args.captures[2] = color;
return true;
end
return false;
 
Menu
» Home



Content

Stats
Files: 2
Downloads: 3,805
Favorites: 5

New & Updated
» GenOut


LOTROInterface


All times are GMT -5. The time now is 01:20 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui