function Initialize()
customSkillIDs1 = {}; -- AUGMENT IDS OF CUSTOM SKILL 1 SEPERATED WITH COMMA (EXAMPLE: customSkillIDs1 = {000,111,222};)
customSkillIDs2 = {}; -- AUGMENT IDS OF CUSTOM SKILL 2 SEPERATED WITH COMMA (EXAMPLE: customSkillIDs2 = {000,111,222};)
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
--[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]----[[]]--
npcName = "Pushkin";
AugButton = "Augmentation";
Gemstone_Count = 0;
Gemstone_Id = 0;
Lifestone_Id = 0;
Weapon_Id = 0;
Augments = {false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false};
augmentIDs1 = {14683,14861,15039,15217,15395,15573,15751,15929,16107,16285};
augmentIDs2 = {14609,14787,14965,15143,15321,15499,15677,15855,16033,16211};
augmentIDs3 = {14731,14732,14909,14910,15087,15088,15265,15443,15621,15799,15977,16155,16333};
augmentIDs4 = {14685,14686,14687,14688,14863,14864,14865,14866,15041,15042,15043,15044,15221,15399,15577,15755,15933,16111,16289};
augmentIDs5 = {14681,14859,15037,15215,15393,15571,15749,15927,16105,16283};
augmentIDs6 = {14604,14782,14960,15138,15316,15494,15672,15850,16028,16206};
augmentIDs7 = {14682,14860,15038,15216,15394,15572,15750,15928,16106,16284};
augmentIDs8 = {14606,14784,14962,15140,15318,15496,15674,15852,16030,16208};
augmentIDs9 = {15266,15444,15622,15800,15978,16156,16334};
augmentIDs10 = {15222,15400,15578,15756,15934,16112,16290};
augmentIDs11 = {14733,14911,15089,15267,15445,15623,15801,15979,16157,16335};
augmentIDs12 = {14588,14766,14944,15122,15300,15478,15656,15834,16012,16190};
augmentIDs13 = {14734,14912,15090,15268,15446,15624,15802,15980,16158,16336};
augmentIDs14 = {14692,14693,14695,14696,14870,15048,15226,15404,15582,15760,15938,16116,16294};
augmentIDs15 = {14593,14771,14949,15127,15305,15483,15661,15839,16017,16195};
augmentIDs16 = {14691,14869,15047,15225,15403,15581,15759,15937,16115,16293};
augmentIDs17 = {15219,15397,15575,15753,15931,16109,16287,15233,15411,15589,15767,15945,16123,16301,15229,15407,15585,15763,15941,16119,16297};
augmentIDs18 = {16341,16345,16349,16353,16357,16361,16365,16369,16373,16377};
augmentIDs19 = {14679,14857,15035,15213,15391,15569,15747,15925,16103,1628};
augmentIDs20 = {14594,14772,14950,15128,15306,15484,15662,15840,16018,16196};
augmentIDs21 = {14729,14730,14907,14908,15085,15086,15264,15442,15620,15798,15976,16154,16332};
augmentIDs22 = {14579,14757,14935,15113,15291,15469,15647,15825,16003,16181};
augmentIDs = {};
threadStarted = false;
end;
function OnCreate()
Initialize();
this:RegisterCommand("augment", CommandChatType.CHAT_CMD2, CommandAccessLevel.ACCESS_ME);
this:RegisterCommand("setaugb", CommandChatType.CHAT_CMD2, CommandAccessLevel.ACCESS_ME);
end;
function OnCommand_setaugb(vCommandChatType, vNick, vCommandParam)
if (vCommandParam:GetCount() == 1) then
AugButton = tostring(vCommandParam:GetParam(0):GetStr(true));
ShowToClient("iAugment","Button ID set to "..AugButton);
end;
end;
function OnCommand_augment(vCommandChatType, vNick, vCommandParam)
if (vCommandParam:GetCount() == 0) then
if (threadStarted) then
threadStarted = false;
ShowToClient("iAugment","Stopped by user!");
AugmentDialog();
else
AugmentDialog();
end;
elseif (vCommandParam:GetCount() == 1) then
if (vCommandParam:GetParam(0):GetStr(true) == "Augment") then
if (threadStarted == false) then
threadStarted = true;
this:StartThread("doChecks");
end;
else
DoAction(vCommandParam:GetParam(0):GetStr(true));
end;
elseif (vCommandParam:GetCount() == 2) then
if (vCommandParam:GetParam(0):GetStr(true) == "SetWeap") then
Weapon_Id = tonumber(vCommandParam:GetParam(1):GetStr(true));
AugmentDialog();
elseif (vCommandParam:GetParam(0):GetStr(true) == "SetLS") then
Lifestone_Id = tonumber(vCommandParam:GetParam(1):GetStr(true));
AugmentDialog();
elseif (vCommandParam:GetParam(0):GetStr(true) == "SetGem") then
Gemstone_Id = tonumber(vCommandParam:GetParam(1):GetStr(true));
AugmentDialog();
elseif (vCommandParam:GetParam(0):GetStr(true) == "SetAug") then
if (vCommandParam:GetParam(1):GetStr(true) == "PvPPAtkP") then
Switch(1);
elseif (vCommandParam:GetParam(1):GetStr(true) == "PvPPAtkA") then
Switch(2);
elseif (vCommandParam:GetParam(1):GetStr(true) == "FocusP") then
Switch(3);
elseif (vCommandParam:GetParam(1):GetStr(true) == "FocusA") then
Switch(4);
elseif (vCommandParam:GetParam(1):GetStr(true) == "MightP") then
Switch(5);
elseif (vCommandParam:GetParam(1):GetStr(true) == "MightA") then
Switch(6);
elseif (vCommandParam:GetParam(1):GetStr(true) == "ShieldP") then
Switch(7);
elseif (vCommandParam:GetParam(1):GetStr(true) == "ShieldA") then
Switch(8);
elseif (vCommandParam:GetParam(1):GetStr(true) == "ReflectP") then
Switch(9);
elseif (vCommandParam:GetParam(1):GetStr(true) == "ReflectA") then
Switch(10);
elseif (vCommandParam:GetParam(1):GetStr(true) == "GuidanceP") then
Switch(11);
elseif (vCommandParam:GetParam(1):GetStr(true) == "GuidanceA") then
Switch(12);
elseif (vCommandParam:GetParam(1):GetStr(true) == "WildMagicP") then
Switch(13);
elseif (vCommandParam:GetParam(1):GetStr(true) == "WildMagicA") then
Switch(14);
elseif (vCommandParam:GetParam(1):GetStr(true) == "Heal") then
Switch(15);
elseif (vCommandParam:GetParam(1):GetStr(true) == "Barrier") then
Switch(16);
elseif (vCommandParam:GetParam(1):GetStr(true) == "Refresh") then
Switch(17);
elseif (vCommandParam:GetParam(1):GetStr(true) == "STR") then
Switch(18);
elseif (vCommandParam:GetParam(1):GetStr(true) == "EmpowerP") then
Switch(19);
elseif (vCommandParam:GetParam(1):GetStr(true) == "EmpowerA") then
Switch(20);
elseif (vCommandParam:GetParam(1):GetStr(true) == "EvasionP") then
Switch(21);
elseif (vCommandParam:GetParam(1):GetStr(true) == "EvasionA") then
Switch(22);
elseif (vCommandParam:GetParam(1):GetStr(true) == "Custom1") then
Switch(23);
elseif (vCommandParam:GetParam(1):GetStr(true) == "Custom2") then
Switch(24);
end;
DoDialog("Set Augments");
end;
end;
end;
doChecks = coroutine.wrap( function()
repeat
joinAugments();
repeat
Weapon = GetInventory():FindByDisplayId(Weapon_Id);
Lifestone = GetInventory():FindByDisplayId(Lifestone_Id);
Gemstone = GetInventory():FindByDisplayId(Gemstone_Id);
if (augmentIDs[1] == nil) then
ShowToClient("iAugment","You didn't selected any augments!");
threadStarted = false;
AugmentDialog();
break;
elseif (Weapon_Id == 0) then
ShowToClient("iAugment","You didn't selected weapon!");
threadStarted = false;
AugmentDialog();
break;
elseif (Lifestone_Id == 0) then
ShowToClient("iAugment","You didn't selected lifestone!");
threadStarted = false;
AugmentDialog();
break;
elseif (Gemstone_Id == 0) then
ShowToClient("iAugment","You didn't selected gemstone!");
threadStarted = false;
AugmentDialog();
break;
elseif (Gemstone_Count == 0) then
ShowToClient("iAugment","You didn't selected gemstone count!");
threadStarted = false;
AugmentDialog();
break;
elseif (Weapon == nil) then
ShowToClient("iAugment","Couldn't retrieve weapon data!");
threadStarted = false;
AugmentDialog();
break;
elseif (Lifestone == nil) then
ShowToClient("iAugment","Out of lifestones!");
threadStarted = false;
AugmentDialog();
break;
elseif (Gemstone == nil) then
ShowToClient("iAugment","Out of gemstones!");
threadStarted = false;
AugmentDialog();
break;
elseif (Gemstone.ItemNum < Gemstone_Count) then
ShowToClient("iAugment","Gemstones not enough!");
threadStarted = false;
AugmentDialog();
break;
else
Command("/target "..npcName);
Sleep(500);
if (GetTarget() == nil) then
ShowToClient("iAugment","Go near "..npcName.."!");
threadStarted = false;
AugmentDialog();
break;
elseif (GetTarget():GetName() ~= npcName) then
ShowToClient("iAugment","Target "..npcName.."!");
threadStarted = false;
AugmentDialog();
break;
else
Talk();
if ((AugButton == nil) or (AugButton == "0")) then
local h = HtmlDialog();
for link in h.links do
if (string.find(link.link,"npc_%d+") ~= nil) then
local button = string.match(link.link,"_%d+_");
button = string.gsub(button,"_","");
AugButton = button;
break;
end;
end;
if ((AugButton == nil) or (AugButton == "0")) then
ShowToClient("iAugment","Couldn't retrieve button ID!");
AugButton = "0";
threadStarted = false;
AugmentDialog();
break;
end;
end;
if (threadStarted == false) then
break;
end;
SetDefaultTimeout(5000);
if (Weapon.RefineryOp2 == 0) then
GetAugmentManager():setItemId(Weapon.objectId);
GetAugmentManager():setLifeStoneId(Lifestone.objectId);
GetAugmentManager():setGemstoneId(Gemstone.objectId, Gemstone_Count);
GetAugmentManager():Augment();
Talk();
Click("npc_"..AugButton.."_Link default/augment.htm", "Augment");
Sleep(1000);
Click("npc_"..AugButton.."_Augment 1", "Augment");
sleepCount = 0;
while (GetAugmentManager():getAugmentResult() == Augment.AUGMENT_PENDING) do
if (threadStarted == false) then
break;
end;
sleepCount = sleepCount + 1;
Sleep(200);
if (sleepCount == 20) then
Talk();
Click("npc_"..AugButton.."_Link default/augment.htm", "Augment");
Sleep(1000);
Click("npc_"..AugButton.."_Augment 1", "Augment");
sleepCount = 0;
end;
end;
if (GetAugmentManager():getAugmentResult() == Augment.AUGMENT_FINISHED) then
Sleep(100);
Weapon = GetInventory():FindByDisplayId(Weapon_Id);
end;
if (SearchArray(Weapon.RefineryOp2,augmentIDs)) then
ShowToClient("iAugment", "You have achieved desired augment! ID: " .. Weapon.RefineryOp2);
break;
end;
else
if (SearchArray(Weapon.RefineryOp2,augmentIDs)) then
ShowToClient("iAugment", "You have achieved desired augment! ID: " .. Weapon.RefineryOp2);
break;
else
GetAugmentManager():setItemId(Weapon.objectId);
GetAugmentManager():AugmentCancel();
Sleep(500);
Talk();
Click("npc_"..AugButton.."_Link default/augment.htm", "Augmentation");
Sleep(1000);
Click("npc_"..AugButton.."_Augment 2", "Cancel Augment");
sleepCount = 0;
while (GetAugmentManager():getAugmentCancelResult() == Augment.AUGMENT_CANCEL_PENDING) do
if (threadStarted == false) then
break;
end;
sleepCount = sleepCount + 1;
Sleep(200);
if (sleepCount == 20) then
Talk();
Click("npc_"..AugButton.."_Link default/augment.htm", "Augment");
Sleep(1000);
Click("npc_"..AugButton.."_Augment 2", "Cancel Augment");
sleepCount = 0;
end;
end
if (GetAugmentManager():getAugmentCancelResult() == Augment.AUGMENT_FINISHED) then
Sleep(100);
end;
Weapon = GetInventory():FindByDisplayId(Weapon_Id);
end;
end;
SetDefaultTimeout(60000);
end;
end;
until (threadStarted == false);
threadStarted = false;
coroutine.yield();
until false;
end);
function DoAction(action)
if (action == "Set Weapon") then
DoDialog(action);
elseif (action == "Set Lifestone") then
DoDialog(action);
elseif (action == "Set Gemstone") then
DoDialog(action);
elseif (action == "Set Augments") then
DoDialog(action);
else
Gemstone_Count = tonumber(action);
AugmentDialog();
end;
end;
function DoDialog(action)
local html = THtmlGenerator("iAugment - L2Dodge");
html:AddHtml('<center><table border=0 cellpadding=0 cellspacing=0 width=292 height=358><tr><td valign="top" align="center"><table border=0 cellpadding=0 cellspacing=0><tr><td width=0 height=35></td></tr></table>');
local invList = GetInventory();
if (action == "Set Weapon") then
for item in invList.list do
if (item.ItemType == 0) then
html:AddHtml('<center><table>');
html:AddHtml('<tr><td width=210>');
html:AddButton(THtmlAction("/augment"):AddParam("SetWeap"):AddParam(item.displayId),THtmlButtonStyle.BUTTON_ACTION, item.Name,false,"","",210,25);
html:AddHtml('</td>');
html:AddHtml("<td align=right height=45 width=36><img src="..GetItemIcon(item.displayId).." height=32 width=32></td>");
html:AddHtml('</tr></table>');
end;
end;
elseif (action == "Set Lifestone") then
for item in invList.list do
if ((string.find(item.Name,"Life") ~= nil) or (string.find(item.Name,"life") ~= nil)) then
html:AddHtml('<center><table>');
html:AddHtml('<tr><td width=210>');
html:AddButton(THtmlAction("/augment"):AddParam("SetLS"):AddParam(item.displayId),THtmlButtonStyle.BUTTON_ACTION, item.Name,false,"","",210,25);
html:AddHtml('</td>');
html:AddHtml("<td align=right height=45 width=36><img src="..GetItemIcon(item.displayId).." height=32 width=32></td>");
html:AddHtml('</tr></table>');
end;
end;
elseif (action == "Set Gemstone") then
for item in invList.list do
if ((string.find(item.Name,"Gem") ~= nil) or (string.find(item.Name,"gem") ~= nil)) then
html:AddHtml('<center><table>');
html:AddHtml('<tr><td width=210>');
html:AddButton(THtmlAction("/augment"):AddParam("SetGem"):AddParam(item.displayId),THtmlButtonStyle.BUTTON_ACTION, item.Name,false,"","",210,25);
html:AddHtml('</td>');
html:AddHtml("<td align=right height=45 width=36><img src="..GetItemIcon(item.displayId).." height=32 width=32></td>");
html:AddHtml('</tr></table>');
end;
end;
elseif (action == "Set Augments") then
html:AddHtml('<center>');
html:AddHtml('<table>');
html:AddHtml('<tr><td>');
local Condition = false;
if (Augments[1]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("PvPPAtkP"),THtmlButtonStyle.BUTTON_EXTRA, "PvP P.Atk(P)",Condition,"","",90,25);
html:AddHtml('</td><td>');
Condition = false;
if (Augments[2]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("PvPPAtkA"),THtmlButtonStyle.BUTTON_EXTRA, "PvP P.Atk(A)",Condition,"","",90,25);
html:AddHtml('</td><td>');
html:AddHtml('</td></tr></table>');
html:AddHtml('<table>');
html:AddHtml('<tr><td>');
Condition = false;
if (Augments[3]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("FocusP"),THtmlButtonStyle.BUTTON_EXTRA, "Focus(P)",Condition,"","",90,25);
html:AddHtml('</td><td>');
Condition = false;
if (Augments[4]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("FocusA"),THtmlButtonStyle.BUTTON_EXTRA, "Focus(A)",Condition,"","",90,25);
html:AddHtml('</td><td>');
html:AddHtml('</td></tr></table>');
html:AddHtml('<table>');
html:AddHtml('<tr><td>');
Condition = false;
if (Augments[5]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("MightP"),THtmlButtonStyle.BUTTON_EXTRA, "Might(P)",Condition,"","",90,25);
html:AddHtml('</td><td>');
Condition = false;
if (Augments[6]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("MightA"),THtmlButtonStyle.BUTTON_EXTRA, "Might(A)",Condition,"","",90,25);
html:AddHtml('</td><td>');
html:AddHtml('</td></tr></table>');
html:AddHtml('<table>');
html:AddHtml('<tr><td>');
Condition = false;
if (Augments[7]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("ShieldP"),THtmlButtonStyle.BUTTON_EXTRA, "Shield(P)",Condition,"","",90,25);
html:AddHtml('</td><td>');
Condition = false;
if (Augments[8]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("ShieldA"),THtmlButtonStyle.BUTTON_EXTRA, "Shield(A)",Condition,"","",90,25);
html:AddHtml('</td><td>');
html:AddHtml('</td></tr></table>');
html:AddHtml('<table>');
html:AddHtml('<tr><td>');
Condition = false;
if (Augments[9]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("ReflectP"),THtmlButtonStyle.BUTTON_EXTRA, "Reflect(P)",Condition,"","",90,25);
html:AddHtml('</td><td>');
Condition = false;
if (Augments[10]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("ReflectA"),THtmlButtonStyle.BUTTON_EXTRA, "Reflect(A)",Condition,"","",90,25);
html:AddHtml('</td><td>');
html:AddHtml('</td></tr></table>');
html:AddHtml('<table>');
html:AddHtml('<tr><td>');
Condition = false;
if (Augments[21]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("EvasionP"),THtmlButtonStyle.BUTTON_EXTRA, "Evasion(P)",Condition,"","",90,25);
html:AddHtml('</td><td>');
Condition = false;
if (Augments[22]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("EvasionA"),THtmlButtonStyle.BUTTON_EXTRA, "Evasion(A)",Condition,"","",90,25);
html:AddHtml('</td><td>');
html:AddHtml('</td></tr></table>');
html:AddHtml('<table>');
html:AddHtml('<tr><td>');
Condition = false;
if (Augments[11]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("GuidanceP"),THtmlButtonStyle.BUTTON_EXTRA, "Guidance(P)",Condition,"","",90,25);
html:AddHtml('</td><td>');
Condition = false;
if (Augments[12]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("GuidanceA"),THtmlButtonStyle.BUTTON_EXTRA, "Guidance(A)",Condition,"","",90,25);
html:AddHtml('</td><td>');
html:AddHtml('</td></tr></table>');
html:AddHtml('<table>');
html:AddHtml('<tr><td>');
Condition = false;
if (Augments[19]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("EmpowerP"),THtmlButtonStyle.BUTTON_EXTRA, "Empower(P)",Condition,"","",90,25);
html:AddHtml('</td><td>');
Condition = false;
if (Augments[20]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("EmpowerA"),THtmlButtonStyle.BUTTON_EXTRA, "Empower(A)",Condition,"","",90,25);
html:AddHtml('</td><td>');
html:AddHtml('</td></tr></table>');
html:AddHtml('<table>');
html:AddHtml('<tr><td>');
Condition = false;
if (Augments[13]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("WildMagicP"),THtmlButtonStyle.BUTTON_EXTRA, "Wild Magic(P)",Condition,"","",90,25);
html:AddHtml('</td><td>');
Condition = false;
if (Augments[14]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("WildMagicA"),THtmlButtonStyle.BUTTON_EXTRA, "Wild Magic(A)",Condition,"","",90,25);
html:AddHtml('</td><td>');
html:AddHtml('</td></tr></table>');
html:AddHtml('<table>');
html:AddHtml('<tr><td>');
Condition = false;
if (Augments[15]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("Heal"),THtmlButtonStyle.BUTTON_EXTRA, "Heal(A)",Condition,"","",90,25);
html:AddHtml('</td><td>');
Condition = false;
if (Augments[16]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("Barrier"),THtmlButtonStyle.BUTTON_EXTRA, "Barrier(A)",Condition,"","",90,25);
html:AddHtml('</td><td>');
html:AddHtml('</td></tr></table>');
html:AddHtml('<table>');
html:AddHtml('<tr><td>');
Condition = false;
if (Augments[17]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("Refresh"),THtmlButtonStyle.BUTTON_EXTRA, "Refresh(A)",Condition,"","",90,25);
html:AddHtml('</td><td>');
Condition = false;
if (Augments[18]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("STR"),THtmlButtonStyle.BUTTON_EXTRA, "STR+1(P)",Condition,"","",90,25);
html:AddHtml('</td><td>');
html:AddHtml('</td></tr></table>');
html:AddHtml('<table>');
html:AddHtml('<tr><td>');
Condition = false;
if (Augments[23]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("Custom1"),THtmlButtonStyle.BUTTON_EXTRA, "Custom(1)",Condition,"","",90,25);
html:AddHtml('</td><td>');
Condition = false;
if (Augments[24]) then
Condition = true;
end;
html:AddButton(THtmlAction("/augment"):AddParam("SetAug"):AddParam("Custom2"),THtmlButtonStyle.BUTTON_EXTRA, "Custom(2)",Condition,"","",90,25);
html:AddHtml('</td><td>');
html:AddHtml('</td></tr></table>');
end;
html:AddHtml('</br >');
html:AddButton(THtmlAction("/augment"),THtmlButtonStyle.BUTTON_ACTION, "Go Back",false,"","",90,25);
html:AddHtml('</td></tr></table></center>');
HtmlBuild = html:GetString();
ShowHtmlStatus = true;
end;
function AugmentDialog()
local html = THtmlGenerator("iAugment - L2Dodge");
html:AddHtml('<center><table border=0 cellpadding=0 cellspacing=0 width=292 height=358><tr><td valign="top" align="center">');
html:AddHtml("<table bgcolor=303030 cellspacing=4 cellpadding=2 width=290>");
html:AddHtml('<tr><td>Weapon ID</td><td align=right>'..Weapon_Id..'</td></tr>');
html:AddHtml('<tr><td>Lifestone ID</td><td align=right>'..Lifestone_Id..'</td></tr>');
html:AddHtml('<tr><td>Gemstone ID</td><td align=right>'..Gemstone_Id..'</td></tr>');
html:AddHtml('<tr><td>Gemstone Count</td><td align=right>'..Gemstone_Count..'</td></tr>');
html:AddHtml("</table></br >");
html:AddHtml("<table cellspacing=4 cellpadding=2 width=290>");
html:AddHtml('<tr><td>');
html:AddButton(THtmlAction("/augment"):AddParam("Set Weapon"),THtmlButtonStyle.BUTTON_ACTION, "Set Weapon",false,"","",120,25);
html:AddHtml('</td><td>');
html:AddButton(THtmlAction("/augment"):AddParam("Set Lifestone"),THtmlButtonStyle.BUTTON_ACTION, "Set Lifestone",false,"","",120,25);
html:AddHtml('</td></tr>');
html:AddHtml("</table>");
html:AddButton(THtmlAction("/augment"):AddParam("Set Gemstone"),THtmlButtonStyle.BUTTON_ACTION, "Set Gemstone",false,"","",120,25);
html:AddHtml("<table cellspacing=4 cellpadding=2 width=290>");
html:AddHtml('<tr><td>Gemstone Count:</td><td>');
html:AddEdit("count",true,80,15);
html:AddHtml('</td><td>');
html:AddButton(THtmlAction("/augment"):AddParam("$count",true),THtmlButtonStyle.BUTTON_ACTION, "Set",false,"","",40,25);
html:AddHtml('</td></tr>');
html:AddHtml("</table></br ></br >");
html:AddButton(THtmlAction("/augment"):AddParam("Set Augments"),THtmlButtonStyle.BUTTON_ACTION, "Set Augments",false,"","",120,25);
html:AddHtml("</br >");
html:AddButton(THtmlAction("/augment"):AddParam("Augment"),THtmlButtonStyle.BUTTON_ACTION, "Augment!",false,"","",120,25);
html:AddHtml('Made by <font color="FF3399">PvPSuite</font></td></tr></table></center>');
HtmlBuild = html:GetString();
ShowHtmlStatus = true;
end;
function OnLTick500ms()
if (ShowHtmlStatus) then
ShowHtmlStatus = false;
ShowHtml(HtmlBuild);
end;
end;
function Switch(num)
if (Augments[num]) then
Augments[num] = false;
else
Augments[num] = true;
end;
end;
function getAugmentIDs(num)
if (num == 1) then
return augmentIDs1;
elseif (num == 2) then
return augmentIDs2;
elseif (num == 3) then
return augmentIDs3;
elseif (num == 4) then
return augmentIDs4;
elseif (num == 5) then
return augmentIDs5;
elseif (num == 6) then
return augmentIDs6;
elseif (num == 7) then
return augmentIDs7;
elseif (num == 8) then
return augmentIDs8;
elseif (num == 9) then
return augmentIDs9;
elseif (num == 10) then
return augmentIDs10;
elseif (num == 11) then
return augmentIDs11;
elseif (num == 12) then
return augmentIDs12;
elseif (num == 13) then
return augmentIDs13;
elseif (num == 14) then
return augmentIDs14;
elseif (num == 15) then
return augmentIDs15;
elseif (num == 16) then
return augmentIDs16;
elseif (num == 17) then
return augmentIDs17;
elseif (num == 18) then
return augmentIDs18;
elseif (num == 19) then
return augmentIDs19;
elseif (num == 20) then
return augmentIDs20;
elseif (num == 21) then
return augmentIDs21;
elseif (num == 22) then
return augmentIDs22;
elseif (num == 23) then
return customSkillIDs1;
elseif (num == 24) then
return customSkillIDs2;
else
return -1;
end;
end;
function join_tables(t1, t2)
for k,v in ipairs(t2) do
table.insert(t1, v);
end;
return t1;
end;
function SearchArray(check,array)
for x,a in pairs(array) do
if (check == a) then
return true;
end;
end;
end;
function joinAugments()
augmentIDs = {};
for x,a in pairs(Augments) do
if (Augments[x]) then
join_tables(augmentIDs,getAugmentIDs(x));
end;
end;
end;