Lineage 2 Tower Forum

Full Version: use custom potion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(03-31-2014 21:32 PM)mark1975 Wrote: [ -> ]
(03-28-2014 20:17 PM)TheQQmaster Wrote: [ -> ]
(03-23-2014 23:11 PM)mark1975 Wrote: [ -> ]hello

i can use custom potion with tower ??

i have alot custom potion and i can use ; exist some metod ??

ty

CP

    LUA Programming
ShowToClient("POTS","Superior CP pots");
 
PN = "Superior CP Potion";
 
function GetItemAmountByName(name)
local invList = GetInventory();
	for item in invList.list do
 if (item.Name == name) then
 PNID = item.displayId;
 return item.ItemNum;
 end;
	end;
 
return 0;
end; 
 
 
repeat
I = GetMe();
	if(I:GetCpPercent() < 95) and (GetItemAmountByName(PN) > 0) then
 UseItem(PNID); -- Superior CP Potion
 Sleep(250);
	end;
	Sleep(200);
 
until false;




HP

    LUA Programming
ShowToClient("POTS","Superior HP pots");
 
--UseItem(35930); -- Healing Potion of Chaos
 
 
PN = "Healing Potion of Chaos";
 
function GetItemAmountByName(name)
local invList = GetInventory();
	for item in invList.list do
 if (item.Name == name) then
 PNID = item.displayId;
 return item.ItemNum;
 end;
	end;
 
return 0;
end; 
 
 
repeat
I = GetMe();
	if(I:GetHpPercent() < 100) and (GetItemAmountByName(PN) > 0) then
 UseItem(PNID); -- Superior CP Potion
 Sleep(250);
	end;
	Sleep(200);
 
until false;



ty

i will try to put my potion id and make working for me

there no ids, need just correct name Tongue one isfor hp, other for cp, just edit names, he will detect ids
This ppl ヅ
my potion are buf potion and they dont replace another buf or potion and ofc them keep several minute each have different reuse time

till now i dont have time to try make script i look at lua programind but i dont have enought time

ty for info
i try but not succed to make working

if someone can help me plz

ty
(04-08-2014 00:09 AM)mark1975 Wrote: [ -> ]my potion are buf potion and they dont replace another buf or potion and ofc them keep several minute each have different reuse time

till now i dont have time to try make script i look at lua programind but i dont have enought time

ty for info

add condition for buff checking ... GetMe:GotBuff(id)
(04-10-2014 22:28 PM)TheQQmaster Wrote: [ -> ]
(04-08-2014 00:09 AM)mark1975 Wrote: [ -> ]my potion are buf potion and they dont replace another buf or potion and ofc them keep several minute each have different reuse time

till now i dont have time to try make script i look at lua programind but i dont have enought time

ty for info

add condition for buff checking ... GetMe:GotBuff(id)

sorry but i think is to much for me

ty

i managed to do using id but only for 1 potion

now i need to do for all 3 potion in one script

ty for help if have some sugestion for me plz do

ty
(04-12-2014 23:22 PM)mark1975 Wrote: [ -> ]
(04-10-2014 22:28 PM)TheQQmaster Wrote: [ -> ]
(04-08-2014 00:09 AM)mark1975 Wrote: [ -> ]my potion are buf potion and they dont replace another buf or potion and ofc them keep several minute each have different reuse time

till now i dont have time to try make script i look at lua programind but i dont have enought time

ty for info

add condition for buff checking ... GetMe:GotBuff(id)

sorry but i think is to much for me

ty

i managed to do using id but only for 1 potion

now i need to do for all 3 potion in one script

ty for help if have some sugestion for me plz do

ty

shift + delete on l2 folder
(04-13-2014 10:59 AM)TheQQmaster Wrote: [ -> ]
(04-12-2014 23:22 PM)mark1975 Wrote: [ -> ]
(04-10-2014 22:28 PM)TheQQmaster Wrote: [ -> ]
(04-08-2014 00:09 AM)mark1975 Wrote: [ -> ]my potion are buf potion and they dont replace another buf or potion and ofc them keep several minute each have different reuse time

till now i dont have time to try make script i look at lua programind but i dont have enought time

ty for info

add condition for buff checking ... GetMe:GotBuff(id)

sorry but i think is to much for me

ty

i managed to do using id but only for 1 potion

now i need to do for all 3 potion in one script

ty for help if have some sugestion for me plz do

ty

shift + delete on l2 folder

why ?? to delete ???
not work...
This is exactly why tower is losing so much forum support users. No one likes to help tards or people unwilling to learn
Pages: 1 2 3
Reference URL's