Lineage 2 Tower Forum

Full Version: Autofarm Script repeat without condition problem.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys im new on script and stuff and i wanted to ask a little bit of help here cuz it seems im stuck with an autofarm script that is not working properly.

First, My script is about autofarming like if the characters dies go back to town rebuff and walk again to the farm spot.

the problem.
The problem is that even when the script is running ok after a while for some reason it starts again i mean it just skip the part where the char has to be dead to start so in mid of the farming the script makes the char walk to the city and rebuff again and back again to the farm spot.

What i want.
i want it to work like when the char is dead then do everything go town rebuff and go back to the spot BUT not before that. i'll leave the script here and i hope any of you guys can help me and thank you.
P.S sorry my bad english.

    LUA Programming
SCONFIG = L2TConfig.GetConfig();
SCONFIG_FILE = GetDir() .. '\\scripts\\farmeo.l2b';
L2TConfig.SaveConfig(SCONFIG_FILE);
moveDistance = 30;
 
repeat
if GetMe():IsAlikeDeath() == true then
SetPause(true);
Sleep(5000);
RequestRestartPoint(4)
WaitForTeleport();
Sleep(10000);
if GetMe():GotBuff(4329) == false then 
UseItem(9445); -- this a buff item
Click("sb_r_u_p#9445", "UNKNOWN LINK 4");
MoveTo(49495, -115683, -3813, moveDistance);
MoveTo(49598, -115767, -3812, moveDistance);
MoveTo(49854, -115945, -3792, moveDistance);
MoveTo(49955, -116037, -3786, moveDistance);
MoveTo(50036, -116111, -3781, moveDistance);
MoveTo(50053, -116127, -3780, moveDistance);
MoveTo(50219, -116284, -3787, moveDistance);
MoveTo(50506, -116554, -3838, moveDistance);
MoveTo(51426, -117421, -4304, moveDistance);
MoveTo(51464, -117554, -4332, moveDistance);
MoveTo(51544, -117930, -4359, moveDistance);
MoveTo(51522, -118292, -4332, moveDistance);
MoveTo(51440, -119064, -4187, moveDistance);
MoveTo(51296, -119787, -4151, moveDistance);
MoveTo(51143, -120022, -4144, moveDistance);
MoveTo(50820, -120539, -4252, moveDistance);
MoveTo(50664, -120820, -4305, moveDistance);
MoveTo(50405, -121339, -4198, moveDistance);
MoveTo(50209, -121743, -4119, moveDistance);
MoveTo(50179, -121990, -4185, moveDistance);
MoveTo(50123, -121972, -4167, moveDistance);
MoveTo(50001, -122093, -4143, moveDistance);
MoveTo(49842, -122162, -4097, moveDistance);
MoveTo(49767, -122367, -4086, moveDistance);
MoveTo(49702, -122547, -4066, moveDistance);
MoveTo(49993, -122974, -4086, moveDistance);
MoveTo(50279, -123030, -4086, moveDistance);
MoveTo(50520, -123102, -4073, moveDistance);
MoveTo(50752, -123206, -4042, moveDistance);
MoveTo(50975, -123380, -4014, moveDistance);
MoveTo(50990, -123397, -4004, moveDistance);
MoveTo(51106, -123508, -3994, moveDistance);
MoveTo(51241, -123568, -3998, moveDistance);
MoveTo(51471, -123689, -4012, moveDistance);
MoveTo(51542, -123759, -4014, moveDistance);
MoveTo(51581, -123790, -4018, moveDistance);
MoveTo(51653, -123854, -4028, moveDistance);
MoveTo(51824, -123993, -4050, moveDistance);
SetPause(false);
end;
end;
until false;
 
L2TConfig.LoadConfig(SCONFIG_FILE);

what clan are you playing in? XD
(05-24-2016 16:03 PM)UgliBiBagli Wrote: [ -> ]what clan are you playing in? XD

?
GotBuff was bugged so use other condition Tongue
Reference URL's