Lineage 2 Tower Forum

Full Version: How to use other items from inventory?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there a script to use buffs scrolls(event) every 29 minutes before they expire?
(01-22-2012 08:57 AM)mehipsta19 Wrote: [ -> ]Is there a script to use buffs scrolls(event) every 29 minutes before they expire?

same problem with me ! please help us
(01-24-2012 07:08 AM)satanou Wrote: [ -> ]http://forum.l2tower.eu/showthread.php?tid=2420

This will help

Just wanna ask if Sleep(1000*60*60); = 1 hour , what is the command for 29 minutes or 30 minutes only?im trying to follow the guide above but im really confuse and dont know the command for 29 minutes or 30 minutes only ,, sorry for bad english
i dont know much about coding lua scripts but i guess the command for 30 mins will be (1000*30*30) test it Smile
(01-24-2012 08:25 AM)satanou Wrote: [ -> ]i dont know much about coding lua scripts but i guess the command for 30 mins will be (1000*30*30) test it Smile

i thought its (1000*60*30) , anyway i will try it later when the magmeld server is up , sadly the server is down now ! i just hope (1000*30*30) or (1000*60*30) will work...anyway thanks bro
Yes you might be right (1000*60*30) sounds more likely
GOGO server up! :PPP
the scripts are counting mili-second
1000 mili-second = 1 second

so

30 min is 30*60 sec and is 30*60*1000 mili-sec, or 1800000 mili-sec

Code:
repeat
UseItem(ItemId);
Sleep(1800000);
until false;
I was looking for the same thing but i made it BETTEr, it's with autodetect the buff scroll uses the right scroll, so no need for 29 minutes.
    LUA Programming
repeat
	if(GetMe():GetBuffsCount()  < 4) then
		ShowToClient("Buffs:","DOWN time to use scrol");
		if (GetMe():GotBuff(9200) == false) then
UseItem(34006);
end;
		if (GetMe():GotBuff(9203) == false) then
UseItem(34007);
end;
		if (GetMe():GotBuff(9199) == false) then
UseItem(34008);
end;
		if (GetMe():GotBuff(9199) == false) then
UseItem(34009);
end;
		if (GetMe():GotBuff(9202) == false) then
UseItem(34010);
end;
		if (GetMe():GotBuff(9199) == false) then
UseItem(34011);
end;
	end;
until false;


(01-24-2012 13:44 PM)ursuhack2 Wrote: [ -> ]I was looking for the same thing but i made it BETTEr, it's with autodetect the buff scroll uses the right scroll, so no need for 29 minutes.
    LUA Programming
repeat
	if(GetMe():GetBuffsCount()  < 4) then
		ShowToClient("Buffs:","DOWN time to use scrol");
		if (GetMe():GotBuff(9200) == false) then
UseItem(34006);
end;
		if (GetMe():GotBuff(9203) == false) then
UseItem(34007);
end;
		if (GetMe():GotBuff(9199) == false) then
UseItem(34008);
end;
		if (GetMe():GotBuff(9199) == false) then
UseItem(34009);
end;
		if (GetMe():GotBuff(9202) == false) then
UseItem(34010);
end;
		if (GetMe():GotBuff(9199) == false) then
UseItem(34011);
end;
	end;
until false;

The only bad thing is it spamm's the chat, and i dunno what to do.
lol you included ShowToClient in repeat without any conditions so yeah it supposed to be spammed like hell.
add
Sleep(1000);
before until false; and everything should look great.
tho remember people wanted the other way(time based) because they dont want their chars look like bot that keep rebuffing everytime it loses buffs (if gm plays with ur buff bar)
Pages: 1 2
Reference URL's