PDA

View Full Version : PowerCutter



JuKKa
11-14-2006, 01:38 PM
i just made a power cutter it works very well.

but i got a problem.. it doesent CHANGE players .. if someone with good knowledge of SRL could take a look and tell me whats wrong?


program AutoChopper;
var cutted,gained,c:integer;
var cst,srt,tih,tim,tis,awt,sst,wet,wst:integer;//for progress report
{.Include SRL/SRL.Scar}
const
tree1 = 4551315; //tree colour
tree2 = 2252880; //tree colour different
tree3 = 1785904; //Tree colour different more :O
loads = 1;//how many loads per player 2-3 max
procedure progressreport;
begin
cst := getsystemTime;
srt := (cst - sst) / 1000;
tih := srt / 3600;
tim := (srt / 60) - tih * 60;
tis := srt - tim * 60 - tih * 3600;
awt := wet - wst
writeln('')
writeln('')
writeln('')
writeln('')
writeln('')
writeln('*=======================================* ')
Writeln('*=Worked: ' + inttostr(tih) + ' Hour''s ' + inttostr(tim) + ' Min''s ' + inttostr(tis) + ' Sec''s =====*');
writeln('*=Cutted: ' +inttostr(cutted) + ' Tree''s =====================*')
writeln('*=Gained: ' +inttostr(gained) + ' experience =================*')
writeln('*=======================================* ')
end;
Procedure Declareplayers;
begin
NumberOfPlayers(2)
//--------------------Player 1--------
Players[0].Name := '';//Your Username
Players[0].Pass := '';//Your Password
Players[0].Nick := '';//3 or 4 letters from your Username
Players[0].Loc := 'Goldshire';//DONT TOUCH
Players[0].Skill := 'prayer';//The skill for when you get a lamp
Players[0].Active := true;//Will You Be Using This Player?

//--------------------Player 2--------
Players[1].Name := '';//Your Username
Players[1].Pass := '';//Your Password
Players[1].Nick := '';//3 or 4 letters from your Username
Players[1].Loc := 'Goldshire';//DONT TOUCH
Players[1].Skill := 'prayer';//The skill for when you get a lamp
Players[1].Active := true;//Will You Be Using This Player?
end;
Procedure RunAway;
Begin
RunAwayDirection('N');
Wait(10000+Random(2000));
RunBack;
End;
Procedure Randoms;
Begin
FindNormalRandoms;
wait(200+random(100))
If(FindFight)then
RunAway;
End;
procedure cuttree;
begin
repeat
If(FindColorSpiralTolerance(x, y, tree1, MSX1, MSY1, MSX2, MSY2, 5))or
(FindColorSpiralTolerance(x, y, tree2, MSX1, MSY1, MSX2, MSY2, 7))or
(FindColorSpiralTolerance(x, y, tree3, MSX1, MSY1, MSX2, MSY2, 10))then
Begin
MMouse(x, y, 0, 0);
Status('Cutting Trees...')
Wait(100+Random(50));
If IsUpText('Chop') or IsUpText('down') and IsUpText('ree') then
Mouse(x, y, 0, 0, False);
Wait(100+Random(50));
ChooseOption(x, y, 'Chop down');
Flag;
end;
randoms;
HoverEvery(9 + Random(5), 'woodcutting');
until(invfull)
dropall;
cutted:= cutted + 28;
gained:= gained + 700;
c:= c + 1;
end;

begin
setupsrl;
//Tih := 0;
sst := GetSystemTime; // Ottaa Tietokoneen Ajan
Declareplayers;
activateclient;
repeat
setrun(true)
cuttree;
progressreport;
If (LoggedIn) and (c=loads)then
Begin
status('Changing Player...')
NextPlayer(True);
End;
Until(False);
End.


*=======================================*
*=Worked: 0 Hour's 18 Min's 38 Sec's ===============*
*=Cutted: 112 Tree's ==========================*
*=Gained: 2800 experience ======================*
*=======================================*

theres a progress report if anyone is intrested..
it has anti randoms.. but not a random for if the axe flies away

thekubis
11-14-2006, 04:58 PM
Yah i think that you should give Soupy Bastrd a call he is good a that stuff

Infantry001
11-14-2006, 09:10 PM
In your DeclarePlayers, make sure to put in all this:


HowManyPlayers := 2;
CurrentPlayer:=0;
NumberOfPlayers(HowManyPlayers);

JuKKa
11-14-2006, 09:14 PM
ok, ill post here if it changes players now

-thanks

ok it changes players BUT.. -->

when it first changes.. example Noob1 is playing
and he loggs out and changes to ownage2, and when ownage2 has cutted and dropped and when it SHOULD change to Noob1 again.. it doesent do it ...?? so im guessing that if i should use:
nextplayer(true);
OR
RandomNextPlayer(true);