xaviar
2008-07-02 23:02:12
Edited My updated version of the script cleaned it up a little and added banking thanks to Sherminator giving me the link to a tut.
Ok right now im going to say i accept critisism gladly because ive only been reading how to do this for one day. This is my first script and i want to see how i could make it better feel free to leave any comments/suggestions. I will also rep you if you help me understand some harder things.
Ok right now im going to say i accept critisism gladly because ive only been reading how to do this for one day. This is my first script and i want to see how i could make it better feel free to leave any comments/suggestions. I will also rep you if you help me understand some harder things.
program WillownBank; //start with axe equiped
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/WoodCutting.scar}
var
x, y: integer;
Tries: integer;
const
WoodColor=1985364;// Currently on willows pick color of log in inv
Treecolor=1387816;// Currently on willows pick color of top of tree(not stump)
Axehead=6111295; //Unequip axe and take middle of heads color Currently on mith axehead.
YourPin=0000;//change to your bank pin leave if none
LoadsToDo=000;//How many loads to do per player?
procedure DeclarePlayers;
begin
SRLID:= '';
SRLPassword:= '';
HowManyPlayers := 5;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active:=True;
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active:=True;
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Active:=True;
Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Active:=True;
end;
procedure logcutting; //This cuts the logs
begin
if not(FindObjCustom (x, y, ['Wil', 'low'], [Treecolor], 10)) then //Tells it to logout if logs not found
Wait(100+random(100));
Tries := Tries + 1;
if(Tries = 25)then
Logout;
Exit;
MakeCompass('S');
repeat
if FindObjCustom(x, y, ['Wil', 'low'], [TreeColor], 10) then
begin
Mouse(x,y,0,0,false);
repeat
Wait(100 + (random(150)));
ChooseOption('hop')
until(InvFull)
end;
until(InvFull)
end;
function Banking: Boolean;
begin
if (InvFull) then
begin
MakeCompass('N')
Wait (300 + random(160));
OpenBankQuiet('db');
if (PinScreen) then
InPin(YourPin);
if(FindColorSpiral(x, y, WoodColor, 547, 206, 734, 464))then
begin
Mouse(x, y, 4, 3, false);
ChooseOption('All');
end;
CloseBank;
Wait(150 + random (278));
MakeCompass('S');
end;
end;
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Woodcutting', False);
3: RandomMovement;
4: BoredHuman;
5: AlmostLogout;
6: DoEmote(400 +Random(90));
end;
end;
procedure AntiRandom;
begin
LampSkill := 'Woodcutting';
FindNormalRandoms;
if FindFight then RunAway('N',True,1,5000);
end;
procedure Loop;
begin
SetupSRL;
LoginPlayer;
repeat
logcutting;
DropLogs;
AntiBan;
AntiRandom;
LoadsDone:=LoadsDone+1;
If(LoggedIn)and(LoadsDone=LoadsTodo) or Not(LoggedIn)then
LoadsDone:= 0;
Nextplayer(true);
WriteLn('Switching Players');
until (False)
end;
LoadsDone:=0;
begin
loop;
end.