Lineage 2 Tower Forum

Full Version: [Request]Mana Pot Script-InfiniteL2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The server I play on Infinitel2 only allows you to use mana potions while out of combat.

So if anyone could find it in their hearts to make a script that uses mana potions out of combat, id love you. Smile
just find a normal mp potions script and in this line "if ..(normal script part).." add
    LUA Programming
and (GetMe():IsInCombat == false)

maybe this?

    LUA Programming
zmien1 = true;
MP = 50.0;
MPID = 0;
MPPotName = 'Mana Potion';
sleeptime = 9000;
invList = GetInventory();
 
 
for item in invList.list do
  if item.Name == MPPotName then
     MPID = item.displayId;
end;
end;
ShowToClient("MP pot", "Chemi mp aimate, chemi mp!");
 
repeat
if GetMe():GetMpPercent() < MP
and (GetMe():IsInCombat == false)then
UseItem(MPID);
Sleep(sleeptime);
end;
until zmien1 == false
ShowToClient("MP pot", "morcha kino");

You should add MPID (mp potion ID from your server) or change "UseItem(MPID);" in "UseItem(MPPotName);"

NOTE: MP = 50.0, so it will use mp only when you have 50% mp or less, if you want use potions before, set it like 70.0 etc..
Reference URL's