Lineage 2 Tower Forum

Full Version: Скрипт на Energy Stone
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Нужна помощь, подскажите где в Товере находится переменная отвечающая за максимальное количество потребления Energy Stone. Суть моей проблемы в том, что зарядка идет только до трех, скрипт прекрасно работает , но выше 3 заряд не поднимается.

Скрипт:
Code:
ShowToClient("MOMENTUM","ON");

MomentumStoneName = "Momentum Stone";
me = GetMe();


function GetMyMomentumLVL()
local me = GetMe();
if (me:GetClass() == 155) or (me:GetClass() == 152) then
return 15;
elseif (me:GetClass() == 157) or (me:GetClass() == 156) or (me:GetClass() == 154) or (me:GetClass() == 153) then
return 10;
end;
return 0;
end;

function GetItemAmountByName(name)
local invList = GetInventory();
for item in invList.list do
if (item.Name == name) then
MomentumStoneID = item.displayId;
return item.ItemNum;
end;
end;

return 0;
end;


repeat
if (me:GetClass() == 152) or (me:GetClass() == 153) or (me:GetClass() == 154) or (me:GetClass() == 155) or (me:GetClass() == 156) or (me:GetClass() == 157) then
MyMomentum = me:GetBuff(4271); -- Momentum
MyMomentumLVL = GetMyMomentumLVL();
if ((MyMomentum == nil) or (MyMomentum.skillLvl <MyMomentumLVL)) and (GetItemAmountByName(MomentumStoneName) > 1) then
UseItem(MomentumStoneID); -- Momentum Stone
Sleep(100)

end;
end;
Sleep(200)
until false;
Reference URL's