View Full Version : Two Scripting Questions
TheGuyWhoGotOn
08-01-2007, 01:39 AM
How do I setup players and the SRL Randoms report? Do I just put the procedure in after I get the players setup?
LordGregGreg
08-01-2007, 01:45 AM
Show me what you have so far, and i will help you fix it.
if you have nothing, read a tutorial. (yes, i KNOW there are tutorials on what you ask)
TheGuyWhoGotOn
08-02-2007, 04:54 PM
I know there are tutorials I have searched but there are so many things related to it I cannot find a specific tutorial.
Here:
program SimpleLogCutter;
{.include srl/srl.scar}
{.include srl/srl/extended/xautotalk.scar}
{.include srl/srl/extended/xantiban.scar}
const RSNick = 'uywh';
var yougetsome, xx, yy, yourinv: integer;
tc: array[1..10] of integer;
logs: array[1..5] of integer;
nofirstslot: string;
procedure setup;
begin
SetScreenName(RSNick);
end;
procedure setcb;
begin
yougetsome := BitmapFromString2(False, 'a812A178DAB5575B928' +
'4200CBC1238C3EB131CBDFF9176E26EB95031B1119D8F2E2A 86B1' +
'4393C41863AC33F45BFC177C5A08ED44E8C962677AE832595 CDC7' +
'C5CDCEDFE9D777FB7FADD678A6F5ABB79B77B7231D1A42F06 B712' +
'CEF462FF098485D6A1D0AE905FFF3EAFCFFE74B5B49EFC5C7 22E3' +
'16FA44D49D945FB879BBDB1F4E2EF3FD488EF9D520AEE0081 BD07' +
'B1E8AC46B0E4254DA285AFEFC25A359C6DAF5EF85E49AFBB5 493D' +
'88E6B2A29F80076EB85A830AEFB0076AB7657263E97591C81 13A8' +
'7F9C6D63E7A707C47BF0169C0FCB47917367A47ABC8D0FCF3 2E65' +
'9E748B34BC8A3134FE1BE499D8EC702A929D49093BD4006E1 9E52' +
'4E1D7010F20E8F54B4F02AA75A0EECEA0D1C6128F13CE9A76 A9F6' +
'DB4A8985F546DBCAA48765D11EEA3EE124F09574DB05F540D E729' +
'D4253CFBAE7537F13EE0379947742D46DE2B75CEAC62200CF 57C1' +
'F51EDF1AF917B554374547356EA9848CDD7EB06D4A3813A89 E751' +
'AFA73E87E2DF21F89974E8C8CE07E2F3C4043A3CC775CC232 3CC9' +
'F9EC43BA7667C76F8011E3');
tc[10]:= 9087930
tc[9]:= 2781296
tc[8]:= 3096632
tc[4]:= 1718328
tc[5]:= 199690
tc[2]:= 2908240
tc[1]:= 1724488
tc[7]:= 2252880
tc[6]:= 3295304
tc[3]:= 3823696
logs[1]:= 5411248
logs[2]:= 5345198
logs[3]:= 5542835
logs[4]:= 6129318
logs[5]:= 6063524
yourinv := BitmapFromString2(False, 'aD610478DAB5554B168' +
'33008BC1249259F65D2D6FB1FA9820B934749895A17F37CFC 0CCC' +
'4800C0C5021B2E7EC390DF848EDF43207C3CC94B0058D90B0 B612' +
'4C4140E0BA62397B3F66A3E71249205578EA7104890378CB8 123E' +
'913093C3B337ACEC5DA8427C7156C5C352972397B3B89A739 E2CE' +
'E116A2E985C8BC04F2DA5A6D2BE9F4451FF6496764E43E46D 7865' +
'0EB5BCB3EFA6BA5BFE81ED17A5E5C23C413CB2D3CEAEE84A4 6AA4' +
'A336BA03B95CF39628B5D774D65ADEB894E79AA5D643BF326 528D' +
'11153485C82F6ADE0E67196FBBD3EC1AE343FB789E6A05851 7B51' +
'7C9B859875FB46138BFA9A681298DD3B1666E605CE9F724E3 5A47' +
'62136A7FCAC43E31EC843F766AE162A88789898DBD77316EF F472' +
'C8C8F6F2885DF73BB7A769FDBEFA91FDA183335AB31C34ED8 F103' +
'536');
end;
procedure recievelogs;
var waited: integer;
begin
waited:= 0
repeat
wait(500 + random(500));
waited:= waited + 1;
until((findbitmapin(yougetsome, xx, yy, 18, 413, 128, 429))or(findbitmap(yourinv, xx, yy))or(waited = 20))
end;
procedure clicktree;
var click: boolean;
number: integer;
begin
number:= 1
repeat
click:= true
if click = true then
begin
if findmscolor(xx, yy, tc[number]) then
begin
mouse(xx, yy, 3, 3, true);
click:= false
end;
wait(10);
end;
number:= number + 1
until((click = false)or(number = 11))
end;
function findtree: boolean;
begin
if (findmscolor(xx, yy, tc[1]))or(findmscolor(xx, yy, tc[2]))or(findmscolor(xx, yy, tc[3]))or(findmscolor(xx, yy, tc[4]))or(findmscolor(xx, yy, tc[5]))or(findmscolor(xx, yy, tc[6]))or(findmscolor(xx, yy, tc[7]))or(findmscolor(xx, yy, tc[8]))or(findmscolor(xx, yy, tc[9]))or(findmscolor(xx, yy, tc[10])) then result:= true
end;
function lastlog: boolean;
begin
if (findcolorTolerance(xx, yy, logs[1], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[2], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[3], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[4], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[5], 694, 436, 710, 459, 75)) then result:= true
end;
function invcolourtol(colour, tolerance: integer): boolean;
var xx, yy: integer;
begin
result:= findcolortolerance(xx, yy, colour, 567, 211, 729, 454, tolerance)
end;
procedure clickinvcolourtol(colour, tolerance: integer; left, ran: boolean);
var xx, yy: integer;
begin
if findcolortolerance(xx, yy, colour, 567, 211, 729, 454, tolerance) then
begin
wait(100 + random(200));
if ran = false then mouse(xx, yy, 0, 0, left);
if ran = true then mouse(xx, yy, 3, 3, left);
end;
end;
procedure droplogs;
var number: integer;
begin
number:= 3
repeat
if invcolourtol(logs[1], 75) then
begin
if nofirstslot = 'yes' = false then
begin
clickinvcolourtol(logs[1], 75, false, true);
wait(350 + random(250));
chooseoption(xx, yy, 'rop ');
end;
end;
wait(900 + random(500));
if invcolourtol(logs[2], 75) then
begin
if nofirstslot = 'yes' = false then
begin
clickinvcolourtol(logs[2], 75, false, true);
wait(350 + random(250));
chooseoption(xx, yy, 'rop ');
end;
end;
if invcolourtol(logs[number], 75) then
begin
clickinvcolourtol(logs[number], 75, false, true);
wait(350 + random(250));
chooseoption(xx, yy, 'rop ');
end;
number:= number + 1
if number = 6 then number:= 3
wait(200 + random(200));
until(lastlog = false)
end;
function events: boolean;
var xx, yy: integer;
begin
result:= false
if findmmcolor(xx, yy, 255) then result:= true
if (findcolor(xx, yy, 255, 253, 150, 270, 163))or(findcolor(xx, yy, 65280, 253, 150, 270, 163)) then result:= true
end;
procedure mcbox(xx, yy, xx2, yy2: integer; lefft: boolean);
begin
xx:= xx + random(xx2 - xx)
yy:= yy + random(yy2 - yy)
mouse(xx, yy, 0, 0, true);
end;
begin
SetupSRL;
setcb;
setup;
readln('WARNING, this only works with regular trees and oak trees, please try to avoid others. Also this is a SIMPLE power chopper and it will NOT avoid randoms');
nofirstslot:= readln('Ignore more colours? ("yes" if the bot keeps dropping your axe(s))');
FindWindowBySize(766, 504)
activateclient;
mcbox(521, 5, 551, 432, true);
makecompass('N');
repeat
if getcurrenttab = 4 = false then gametab(4)
if findtree then
begin
wait(2500 + random(1000));
clicktree;
recievelogs;
end;
events;
if lastlog then droplogs
wait(1000 + random(1000));
if findfight then runto('n', true);
if FindTalk then SolveTalkingRandom(RSNick)
AntiBan;
until(false)
end.
Edit: Nothing needs to be fixed, I just need to know how to add the report and players.
n3ss3s
08-02-2007, 05:18 PM
How do I setup players and the SRL Randoms report? Do I just put the procedure in after I get the players setup?
To set up players, you only have to include
"{.include SRL/SRL/Misc/PlayerForm.scar}"
and then call "SetupPlayers;" in the start of your script or wher eva you want to set up players. SetupPlayers pops up a form, I recommend using instead of player array, because you dont always have to click between the " ' " but if you wanna use the player array, copy it from someones script (you dont have to credit for that :D).
LordGregGreg
08-02-2007, 05:49 PM
Well, some stuff does need to be fixed... but ill leave that up to you.
learn this.
program SimpleLogCutter;
{.include srl/srl.scar}
{.include srl/srl/extended/xautotalk.scar}
{.include srl/srl/extended/xantiban.scar}
const RSNick = 'uywh';
var yougetsome, xx, yy, yourinv: integer;
tc: array[1..10] of integer;
logs: array[1..5] of integer;
nofirstslot: string;
PROCEDURE DeclarePlayers;
BEGIN
HowManyPlayers := 5; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer := StartPlayer; // CurrentPlayer = Array Index
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'fhawgdas';
Players[0].Loc := 'Anywhere';
Players[0].Skill := '';
Players[0].Active := True;
Players[1].Name := 'Dont';
Players[1].Pass := 'waste';
Players[1].Nick := '';
Players[1].Loc := 'Anywhere';
Players[1].Skill := '';
Players[1].Active := True;
Players[2].Name := 'Time';
Players[2].Pass := 'or';
Players[2].Nick := '';
Players[2].Loc := 'Anywhere';
Players[2].Skill := '';
Players[2].Active := True;
Players[3].Name := 'Time';
Players[3].Pass := 'will';
Players[3].Nick := '';
Players[3].Loc := 'Anywhere';
Players[3].Skill := '';
Players[3].Active := True;
Players[4].Name := 'Waste';
Players[4].Pass := 'YOU!';
Players[4].Nick := '';
Players[4].Loc := 'Anywhere';
Players[4].Skill := '';
Players[4].Active := True;
writeln(IntToStr(HowManyPlayers) + ' Players');
END;
procedure setup;
begin
DeclarPlayers;
SetScreenName(RSNick);
end;
procedure setcb;
begin
yougetsome := BitmapFromString2(False, 'a812A178DAB5575B928' +
'4200CBC1238C3EB131CBDFF9176E26EB95031B1119D8F2E2A 86B1' +
'4393C41863AC33F45BFC177C5A08ED44E8C962677AE832595 CDC7' +
'C5CDCEDFE9D777FB7FADD678A6F5ABB79B77B7231D1A42F06 B712' +
'CEF462FF098485D6A1D0AE905FFF3EAFCFFE74B5B49EFC5C7 22E3' +
'16FA44D49D945FB879BBDB1F4E2EF3FD488EF9D520AEE0081 BD07' +
'B1E8AC46B0E4254DA285AFEFC25A359C6DAF5EF85E49AFBB5 493D' +
'88E6B2A29F80076EB85A830AEFB0076AB7657263E97591C81 13A8' +
'7F9C6D63E7A707C47BF0169C0FCB47917367A47ABC8D0FCF3 2E65' +
'9E748B34BC8A3134FE1BE499D8EC702A929D49093BD4006E1 9E52' +
'4E1D7010F20E8F54B4F02AA75A0EECEA0D1C6128F13CE9A76 A9F6' +
'DB4A8985F546DBCAA48765D11EEA3EE124F09574DB05F540D E729' +
'D4253CFBAE7537F13EE0379947742D46DE2B75CEAC62200CF 57C1' +
'F51EDF1AF917B554374547356EA9848CDD7EB06D4A3813A89 E751' +
'AFA73E87E2DF21F89974E8C8CE07E2F3C4043A3CC775CC232 3CC9' +
'F9EC43BA7667C76F8011E3');
tc[10]:= 9087930
tc[9]:= 2781296
tc[8]:= 3096632
tc[4]:= 1718328
tc[5]:= 199690
tc[2]:= 2908240
tc[1]:= 1724488
tc[7]:= 2252880
tc[6]:= 3295304
tc[3]:= 3823696
logs[1]:= 5411248
logs[2]:= 5345198
logs[3]:= 5542835
logs[4]:= 6129318
logs[5]:= 6063524
yourinv := BitmapFromString2(False, 'aD610478DAB5554B168' +
'33008BC1249259F65D2D6FB1FA9820B934749895A17F37CFC 0CCC' +
'4800C0C5021B2E7EC390DF848EDF43207C3CC94B0058D90B0 B612' +
'4C4140E0BA62397B3F66A3E71249205578EA7104890378CB8 123E' +
'913093C3B337ACEC5DA8427C7156C5C352972397B3B89A739 E2CE' +
'E116A2E985C8BC04F2DA5A6D2BE9F4451FF6496764E43E46D 7865' +
'0EB5BCB3EFA6BA5BFE81ED17A5E5C23C413CB2D3CEAEE84A4 6AA4' +
'A336BA03B95CF39628B5D774D65ADEB894E79AA5D643BF326 528D' +
'11153485C82F6ADE0E67196FBBD3EC1AE343FB789E6A05851 7B51' +
'7C9B859875FB46138BFA9A681298DD3B1666E605CE9F724E3 5A47' +
'62136A7FCAC43E31EC843F766AE162A88789898DBD77316EF F472' +
'C8C8F6F2885DF73BB7A769FDBEFA91FDA183335AB31C34ED8 F103' +
'536');
end;
procedure recievelogs;
var waited: integer;
begin
waited:= 0
repeat
wait(500 + random(500));
waited:= waited + 1;
until((findbitmapin(yougetsome, xx, yy, 18, 413, 128, 429))or(findbitmap(yourinv, xx, yy))or(waited = 20))
end;
procedure clicktree;
var click: boolean;
number: integer;
begin
number:= 1
repeat
click:= true
if click = true then
begin
if findmscolor(xx, yy, tc[number]) then
begin
mouse(xx, yy, 3, 3, true);
click:= false
end;
wait(10);
end;
number:= number + 1
until((click = false)or(number = 11))
end;
function findtree: boolean;
begin
if (findmscolor(xx, yy, tc[1]))or(findmscolor(xx, yy, tc[2]))or(findmscolor(xx, yy, tc[3]))or(findmscolor(xx, yy, tc[4]))or(findmscolor(xx, yy, tc[5]))or(findmscolor(xx, yy, tc[6]))or(findmscolor(xx, yy, tc[7]))or(findmscolor(xx, yy, tc[8]))or(findmscolor(xx, yy, tc[9]))or(findmscolor(xx, yy, tc[10])) then result:= true
end;
function lastlog: boolean;
begin
if (findcolorTolerance(xx, yy, logs[1], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[2], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[3], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[4], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[5], 694, 436, 710, 459, 75)) then result:= true
end;
function invcolourtol(colour, tolerance: integer): boolean;
var xx, yy: integer;
begin
result:= findcolortolerance(xx, yy, colour, 567, 211, 729, 454, tolerance)
end;
procedure clickinvcolourtol(colour, tolerance: integer; left, ran: boolean);
var xx, yy: integer;
begin
if findcolortolerance(xx, yy, colour, 567, 211, 729, 454, tolerance) then
begin
wait(100 + random(200));
if ran = false then mouse(xx, yy, 0, 0, left);
if ran = true then mouse(xx, yy, 3, 3, left);
end;
end;
procedure droplogs;
var number: integer;
begin
number:= 3
repeat
if invcolourtol(logs[1], 75) then
begin
if nofirstslot = 'yes' = false then
begin
clickinvcolourtol(logs[1], 75, false, true);
wait(350 + random(250));
chooseoption(xx, yy, 'rop ');
end;
end;
wait(900 + random(500));
if invcolourtol(logs[2], 75) then
begin
if nofirstslot = 'yes' = false then
begin
clickinvcolourtol(logs[2], 75, false, true);
wait(350 + random(250));
chooseoption(xx, yy, 'rop ');
end;
end;
if invcolourtol(logs[number], 75) then
begin
clickinvcolourtol(logs[number], 75, false, true);
wait(350 + random(250));
chooseoption(xx, yy, 'rop ');
end;
number:= number + 1
if number = 6 then number:= 3
wait(200 + random(200));
until(lastlog = false)
end;
function events: boolean;
var xx, yy: integer;
begin
result:= false
if findmmcolor(xx, yy, 255) then result:= true
if (findcolor(xx, yy, 255, 253, 150, 270, 163))or(findcolor(xx, yy, 65280, 253, 150, 270, 163)) then result:= true
end;
procedure mcbox(xx, yy, xx2, yy2: integer; lefft: boolean);
begin
xx:= xx + random(xx2 - xx)
yy:= yy + random(yy2 - yy)
mouse(xx, yy, 0, 0, true);
end;
begin
SetupSRL;
setcb;
setup;
readln('WARNING, this only works with regular trees and oak trees, please try to avoid others. Also this is a SIMPLE power chopper and it will NOT avoid randoms');
nofirstslot:= readln('Ignore more colours? ("yes" if the bot keeps dropping your axe(s))');
FindWindowBySize(766, 504);
activateclient;
LoginPlayer;
mcbox(521, 5, 551, 432, true);
makecompass('N');
repeat
if getcurrenttab = 4 = false then gametab(4)
if findtree then
begin
wait(2500 + random(1000));
clicktree;
recievelogs;
end;
events;
if lastlog then droplogs
wait(1000 + random(1000));
if findfight then runto('n', true);
if FindTalk then SolveTalkingRandom(RSNick)
AntiBan;
until(false)
end.
TheGuyWhoGotOn
08-02-2007, 07:13 PM
To set up players, you only have to include
"{.include SRL/SRL/Misc/PlayerForm.scar}"
and then call "SetupPlayers;" in the start of your script or wher eva you want to set up players. SetupPlayers pops up a form, I recommend using instead of player array, because you dont always have to click between the " ' " but if you wanna use the player array, copy it from someones script (you dont have to credit for that :D).
Ok, atm array looks easier but it's probably just because I don't know how to work this yet. How do I get the nick for procedures like "SetScreenName(RSNick);"? And how do I make it switch characters? Thanks for the help!
Also how do I do the random report? Do I just call SRLRandomsReport? Do I include that in my loop or when the script ends, if so I can easily do that :P.
LordGregGreg
08-02-2007, 07:15 PM
Ok, atm array looks easier but it's probably just because I don't know how to work this yet. How do I get the nick for procedures like "SetScreenName(RSNick);"? And how do I make it which characters, thanks for the help!
Also how do I do the random report? Do I just call SRLRandomsReport? Do I include that in my loop or when the script ends, if so I can easily do that :P.
You call Nexplayer(true) if everything went ok, and it is time for the next player
you call nextplayer(false) if somethine bad hapened and they are inactive.
read the srl maual, and read some tutorial to explain it better.
Boreas
08-02-2007, 07:46 PM
Nielsie's tut is very good.
TheGuyWhoGotOn
08-04-2007, 01:59 PM
Thanks, however that still doesn't answer my question, how do I use the nickname?
LordGregGreg
08-04-2007, 02:08 PM
there are other tutorial for that.. as well as the search button.
the nick name is used to create a bitmask of three or four letter of ur eplauyers name (that normally wouldnt be in regular conversations)
if your players name was FireAr0we you would choose "eAr0" as the nick name.
it is used by srl to detect some randoms.
TheGuyWhoGotOn
08-04-2007, 02:12 PM
there are other tutorial for that.. as well as the search button.
the nick name is used to create a bitmask of three or four letter of ur eplauyers name (that normally wouldnt be in regular conversations)
if your players name was FireAr0we you would choose "eAr0" as the nick name.
it is used by srl to detect some randoms.
*sigh* I know, I mean how would I obtain that? The user puts it in when they setup their players, I want to use it for "SetScreenName(RSNick);". How do I get the skill as well? And I forget what location is for XD.
LordGregGreg
08-04-2007, 02:18 PM
*sigh* I know, I mean how would I obtain that? The user puts it in when they setup their players, I want to use it for "SetScreenName(RSNick);". How do I get the skill as well? And I forget what location is for XD.
Well, im not familiar with this "setscreenName()" function...
but you can always get the nick name of the current player by
Players[CurrentPlayer].Nick
same method for the rest of stuff too.
SetScreenName(Players[CurrentPlayer].Nick);folow?
TheGuyWhoGotOn
08-04-2007, 02:29 PM
So that gets it from the form? Here I think I got it (Hey the box random solver doesn't work, I haven't tested the others but it doesn't even find the box! I have it on low detail 32 colours, and max brightness, I didn't include it in the script because of that, oh ya what is location for again?):
program SimpleLogCutter;
{.include srl/srl.scar}
{.include srl/srl/extended/xautotalk.scar}
{.include srl/srl/extended/xantiban.scar}
{.include SRL/SRL/Misc/PlayerForm.scar}
const RSNick = 'uywh';
var yougetsome, xx, yy, yourinv, users: integer;
tc: array[1..10] of integer;
logs: array[1..5] of integer;
nofirstslot: string;
procedure setup;
begin
SetupPlayers;
SetScreenName(Players[CurrentPlayer].Nick);
Users:= GetNumber;
end;
procedure setcb;
begin
yougetsome := BitmapFromString2(False, 'a812A178DAB5575B928' +
'4200CBC1238C3EB131CBDFF9176E26EB95031B1119D8F2E2A 86B1' +
'4393C41863AC33F45BFC177C5A08ED44E8C962677AE832595 CDC7' +
'C5CDCEDFE9D777FB7FADD678A6F5ABB79B77B7231D1A42F06 B712' +
'CEF462FF098485D6A1D0AE905FFF3EAFCFFE74B5B49EFC5C7 22E3' +
'16FA44D49D945FB879BBDB1F4E2EF3FD488EF9D520AEE0081 BD07' +
'B1E8AC46B0E4254DA285AFEFC25A359C6DAF5EF85E49AFBB5 493D' +
'88E6B2A29F80076EB85A830AEFB0076AB7657263E97591C81 13A8' +
'7F9C6D63E7A707C47BF0169C0FCB47917367A47ABC8D0FCF3 2E65' +
'9E748B34BC8A3134FE1BE499D8EC702A929D49093BD4006E1 9E52' +
'4E1D7010F20E8F54B4F02AA75A0EECEA0D1C6128F13CE9A76 A9F6' +
'DB4A8985F546DBCAA48765D11EEA3EE124F09574DB05F540D E729' +
'D4253CFBAE7537F13EE0379947742D46DE2B75CEAC62200CF 57C1' +
'F51EDF1AF917B554374547356EA9848CDD7EB06D4A3813A89 E751' +
'AFA73E87E2DF21F89974E8C8CE07E2F3C4043A3CC775CC232 3CC9' +
'F9EC43BA7667C76F8011E3');
tc[10]:= 9087930
tc[9]:= 2781296
tc[8]:= 3096632
tc[4]:= 1718328
tc[5]:= 199690
tc[2]:= 2908240
tc[1]:= 1724488
tc[7]:= 2252880
tc[6]:= 3295304
tc[3]:= 3823696
logs[1]:= 5411248
logs[2]:= 5345198
logs[3]:= 5542835
logs[4]:= 6129318
logs[5]:= 6063524
yourinv := BitmapFromString2(False, 'aD610478DAB5554B168' +
'33008BC1249259F65D2D6FB1FA9820B934749895A17F37CFC 0CCC' +
'4800C0C5021B2E7EC390DF848EDF43207C3CC94B0058D90B0 B612' +
'4C4140E0BA62397B3F66A3E71249205578EA7104890378CB8 123E' +
'913093C3B337ACEC5DA8427C7156C5C352972397B3B89A739 E2CE' +
'E116A2E985C8BC04F2DA5A6D2BE9F4451FF6496764E43E46D 7865' +
'0EB5BCB3EFA6BA5BFE81ED17A5E5C23C413CB2D3CEAEE84A4 6AA4' +
'A336BA03B95CF39628B5D774D65ADEB894E79AA5D643BF326 528D' +
'11153485C82F6ADE0E67196FBBD3EC1AE343FB789E6A05851 7B51' +
'7C9B859875FB46138BFA9A681298DD3B1666E605CE9F724E3 5A47' +
'62136A7FCAC43E31EC843F766AE162A88789898DBD77316EF F472' +
'C8C8F6F2885DF73BB7A769FDBEFA91FDA183335AB31C34ED8 F103' +
'536');
end;
procedure recievelogs;
var waited: integer;
begin
waited:= 0
repeat
wait(500 + random(500));
waited:= waited + 1;
until((findbitmapin(yougetsome, xx, yy, 18, 413, 128, 429))or(findbitmap(yourinv, xx, yy))or(waited = 20))
end;
procedure clicktree;
var click: boolean;
number: integer;
begin
number:= 1
repeat
click:= true
if click = true then
begin
if findmscolor(xx, yy, tc[number]) then
begin
mouse(xx, yy, 3, 3, true);
click:= false
end;
wait(10);
end;
number:= number + 1
until((click = false)or(number = 11))
end;
function findtree: boolean;
begin
if (findmscolor(xx, yy, tc[1]))or(findmscolor(xx, yy, tc[2]))or(findmscolor(xx, yy, tc[3]))or(findmscolor(xx, yy, tc[4]))or(findmscolor(xx, yy, tc[5]))or(findmscolor(xx, yy, tc[6]))or(findmscolor(xx, yy, tc[7]))or(findmscolor(xx, yy, tc[8]))or(findmscolor(xx, yy, tc[9]))or(findmscolor(xx, yy, tc[10])) then result:= true
end;
function lastlog: boolean;
begin
if (findcolorTolerance(xx, yy, logs[1], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[2], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[3], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[4], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[5], 694, 436, 710, 459, 75)) then result:= true
end;
function invcolourtol(colour, tolerance: integer): boolean;
var xx, yy: integer;
begin
result:= findcolortolerance(xx, yy, colour, 567, 211, 729, 454, tolerance)
end;
procedure clickinvcolourtol(colour, tolerance: integer; left, ran: boolean);
var xx, yy: integer;
begin
if findcolortolerance(xx, yy, colour, 567, 211, 729, 454, tolerance) then
begin
wait(100 + random(200));
if ran = false then mouse(xx, yy, 0, 0, left);
if ran = true then mouse(xx, yy, 3, 3, left);
end;
end;
procedure droplogs;
var number: integer;
begin
number:= 3
repeat
if invcolourtol(logs[1], 75) then
begin
if nofirstslot = 'yes' = false then
begin
clickinvcolourtol(logs[1], 75, false, true);
wait(350 + random(250));
chooseoption(xx, yy, 'rop ');
end;
end;
wait(900 + random(500));
if invcolourtol(logs[2], 75) then
begin
if nofirstslot = 'yes' = false then
begin
clickinvcolourtol(logs[2], 75, false, true);
wait(350 + random(250));
chooseoption(xx, yy, 'rop ');
end;
end;
if invcolourtol(logs[number], 75) then
begin
clickinvcolourtol(logs[number], 75, false, true);
wait(350 + random(250));
chooseoption(xx, yy, 'rop ');
end;
number:= number + 1
if number = 6 then number:= 3
wait(200 + random(200));
until(lastlog = false)
end;
function events: boolean;
var xx, yy: integer;
begin
result:= false
if findmmcolor(xx, yy, 255) then result:= true
if (findcolor(xx, yy, 255, 253, 150, 270, 163))or(findcolor(xx, yy, 65280, 253, 150, 270, 163)) then result:= true
end;
procedure mcbox(xx, yy, xx2, yy2: integer; lefft: boolean);
begin
xx:= xx + random(xx2 - xx)
yy:= yy + random(yy2 - yy)
mouse(xx, yy, 0, 0, true);
end;
procedure nextaccount;
begin
nextplayer(true);
users:= users - 1
setup;
wait(2000 + random(1000));
makecompass('N');
HighestAngle;
fixchat;
end;
procedure fixrandoms;
begin
DwarfItem;
FindForester;
SolveGenie(Players[CurrentPlayer].skill);
if FindDead then logout;
findmime;
findmaze;
findscaperune;
solvepinball;
findplant;
solvefrog;
solvefrogswamp;
LoadSandArray;
LoadSWBitMaps;
SetupSandWich;
SolveSandWich;
ReleaseSandWich;
if inblack then
begin
writeln('You are in a dark area, random? Logging out...');
logout;
end;
if nogametab then
begin
writeln('A gametab is missing! Random? Logging out...');
logout;
end;
findmod;
if inconvo then
begin
writeln('Couldn`t get random to shut up, logging out...');
logout;
end;
if findfight then
begin
writeln('You are under attack');
runto('n', true);
end;
end;
begin
SetupSRL;
setcb;
setup;
readln('WARNING, this only works with regular trees and oak trees, please try to avoid others. Also this is a SIMPLE power chopper and it will NOT avoid randoms');
nofirstslot:= readln('Ignore more colours? ("yes" if the bot keeps dropping your axe(s))');
FindWindowBySize(766, 504)
activateclient;
mcbox(521, 5, 551, 432, true);
makecompass('N');
HighestAngle;
fixchat;
repeat
if getcurrenttab = 4 = false then gametab(4)
if findtree then
begin
wait(2500 + random(1000));
clicktree;
recievelogs;
end;
events;
if lastlog then droplogs
wait(1000 + random(1000));
FindTalk;
AntiBan;
fixrandoms;
if WelcomeToRuneScape then Nextaccount;
until(users = -1)
srlrandomsreport;
end.
LordGregGreg
08-04-2007, 02:38 PM
yeah, cept it doesnt get it form the form,... the form puts it into a file , and then it is loaded up afterwards...(same thing, small meaningless technicality, nvm.. lol)
The box bitmap has changed. srl doesnt have the right one at the moment. So thats not ure fault.
TheGuyWhoGotOn
08-04-2007, 03:03 PM
yeah, cept it doesnt get it form the form,... the form puts it into a file , and then it is loaded up afterwards...(same thing, small meaningless technicality, nvm.. lol)
The box bitmap has changed. srl doesnt have the right one at the moment. So thats not ure fault.
Ok, then, I made a procedure "Fix randoms" however it is really buggy and slow, is there any example I can use for setting up randoms please? Like a tutorial? If you don't know I'll keep searching.
LordGregGreg
08-04-2007, 03:16 PM
Ok, then, I made a procedure "Fix randoms" however it is really buggy and slow, is there any example I can use for setting up randoms please? Like a tutorial? If you don't know I'll keep searching.
I particularly like JADs tutorial. You can find it in his signature, or the intermediate tuts.
it covers the ranadoms stuff. think it was called "what you need to know to become a member"
TheGuyWhoGotOn
08-04-2007, 03:52 PM
Thanks, it was just too easy to fix. I modified his code just a little, now I have this:
program SimpleLogCutter;
{.include srl/srl.scar}
{.include srl/srl/extended/xautotalk.scar}
{.include srl/srl/extended/xantiban.scar}
{.include SRL/SRL/Misc/PlayerForm.scar}
{.include SRL/SRL/Skill/Woodcutting.scar}
var yougetsome, xx, yy, yourinv, users, a: integer;
tc: array[1..10] of integer;
logs: array[1..5] of integer;
nofirstslot: string;
procedure setup;
begin
SetupPlayers;
Users:= GetNumber;
end;
procedure setcb;
begin
yougetsome := BitmapFromString2(False, 'a812A178DAB5575B928' +
'4200CBC1238C3EB131CBDFF9176E26EB95031B1119D8F2E2A 86B1' +
'4393C41863AC33F45BFC177C5A08ED44E8C962677AE832595 CDC7' +
'C5CDCEDFE9D777FB7FADD678A6F5ABB79B77B7231D1A42F06 B712' +
'CEF462FF098485D6A1D0AE905FFF3EAFCFFE74B5B49EFC5C7 22E3' +
'16FA44D49D945FB879BBDB1F4E2EF3FD488EF9D520AEE0081 BD07' +
'B1E8AC46B0E4254DA285AFEFC25A359C6DAF5EF85E49AFBB5 493D' +
'88E6B2A29F80076EB85A830AEFB0076AB7657263E97591C81 13A8' +
'7F9C6D63E7A707C47BF0169C0FCB47917367A47ABC8D0FCF3 2E65' +
'9E748B34BC8A3134FE1BE499D8EC702A929D49093BD4006E1 9E52' +
'4E1D7010F20E8F54B4F02AA75A0EECEA0D1C6128F13CE9A76 A9F6' +
'DB4A8985F546DBCAA48765D11EEA3EE124F09574DB05F540D E729' +
'D4253CFBAE7537F13EE0379947742D46DE2B75CEAC62200CF 57C1' +
'F51EDF1AF917B554374547356EA9848CDD7EB06D4A3813A89 E751' +
'AFA73E87E2DF21F89974E8C8CE07E2F3C4043A3CC775CC232 3CC9' +
'F9EC43BA7667C76F8011E3');
tc[10]:= 9087930
tc[9]:= 2781296
tc[8]:= 3096632
tc[4]:= 1718328
tc[5]:= 199690
tc[2]:= 2908240
tc[1]:= 1724488
tc[7]:= 2252880
tc[6]:= 3295304
tc[3]:= 3823696
logs[1]:= 5411248
logs[2]:= 5345198
logs[3]:= 5542835
logs[4]:= 6129318
logs[5]:= 6063524
yourinv := BitmapFromString2(False, 'aD610478DAB5554B168' +
'33008BC1249259F65D2D6FB1FA9820B934749895A17F37CFC 0CCC' +
'4800C0C5021B2E7EC390DF848EDF43207C3CC94B0058D90B0 B612' +
'4C4140E0BA62397B3F66A3E71249205578EA7104890378CB8 123E' +
'913093C3B337ACEC5DA8427C7156C5C352972397B3B89A739 E2CE' +
'E116A2E985C8BC04F2DA5A6D2BE9F4451FF6496764E43E46D 7865' +
'0EB5BCB3EFA6BA5BFE81ED17A5E5C23C413CB2D3CEAEE84A4 6AA4' +
'A336BA03B95CF39628B5D774D65ADEB894E79AA5D643BF326 528D' +
'11153485C82F6ADE0E67196FBBD3EC1AE343FB789E6A05851 7B51' +
'7C9B859875FB46138BFA9A681298DD3B1666E605CE9F724E3 5A47' +
'62136A7FCAC43E31EC843F766AE162A88789898DBD77316EF F472' +
'C8C8F6F2885DF73BB7A769FDBEFA91FDA183335AB31C34ED8 F103' +
'536');
end;
procedure recievelogs;
var waited: integer;
begin
waited:= 0
repeat
wait(500 + random(500));
waited:= waited + 1;
until((findbitmapin(yougetsome, xx, yy, 18, 413, 128, 429))or(findbitmap(yourinv, xx, yy))or(waited = 20))
end;
procedure clicktree;
var click: boolean;
number: integer;
begin
number:= 1
repeat
click:= true
if click = true then
begin
if findmscolor(xx, yy, tc[number]) then
begin
mouse(xx, yy, 3, 3, true);
click:= false
end;
wait(10);
end;
number:= number + 1
until((click = false)or(number = 11))
end;
function findtree: boolean;
begin
if (findmscolor(xx, yy, tc[1]))or(findmscolor(xx, yy, tc[2]))or(findmscolor(xx, yy, tc[3]))or(findmscolor(xx, yy, tc[4]))or(findmscolor(xx, yy, tc[5]))or(findmscolor(xx, yy, tc[6]))or(findmscolor(xx, yy, tc[7]))or(findmscolor(xx, yy, tc[8]))or(findmscolor(xx, yy, tc[9]))or(findmscolor(xx, yy, tc[10])) then result:= true
end;
function lastlog: boolean;
begin
if (findcolorTolerance(xx, yy, logs[1], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[2], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[3], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[4], 694, 436, 710, 459, 75))or(findcolorTolerance(xx, yy, logs[5], 694, 436, 710, 459, 75)) then result:= true
end;
function invcolourtol(colour, tolerance: integer): boolean;
var xx, yy: integer;
begin
result:= findcolortolerance(xx, yy, colour, 567, 211, 729, 454, tolerance)
end;
procedure clickinvcolourtol(colour, tolerance: integer; left, ran: boolean);
var xx, yy: integer;
begin
if findcolortolerance(xx, yy, colour, 567, 211, 729, 454, tolerance) then
begin
wait(100 + random(200));
if ran = false then mouse(xx, yy, 0, 0, left);
if ran = true then mouse(xx, yy, 3, 3, left);
end;
end;
procedure droplogs;
var number: integer;
begin
number:= 3
repeat
if invcolourtol(logs[1], 75) then
begin
if nofirstslot = 'yes' = false then
begin
clickinvcolourtol(logs[1], 75, false, true);
wait(350 + random(250));
chooseoption(xx, yy, 'rop ');
end;
end;
wait(900 + random(500));
if invcolourtol(logs[2], 75) then
begin
if nofirstslot = 'yes' = false then
begin
clickinvcolourtol(logs[2], 75, false, true);
wait(350 + random(250));
chooseoption(xx, yy, 'rop ');
end;
end;
if invcolourtol(logs[number], 75) then
begin
clickinvcolourtol(logs[number], 75, false, true);
wait(350 + random(250));
chooseoption(xx, yy, 'rop ');
end;
number:= number + 1
if number = 6 then number:= 3
wait(200 + random(200));
until(lastlog = false)
end;
function events: boolean;
var xx, yy: integer;
begin
result:= false
if findmmcolor(xx, yy, 255) then result:= true
if (findcolor(xx, yy, 255, 253, 150, 270, 163))or(findcolor(xx, yy, 65280, 253, 150, 270, 163)) then result:= true
end;
procedure mcbox(xx, yy, xx2, yy2: integer; lefft: boolean);
begin
xx:= xx + random(xx2 - xx)
yy:= yy + random(yy2 - yy)
mouse(xx, yy, 0, 0, true);
end;
procedure nextaccount;
begin
writeln('You were logged out, next user');
nextplayer(true);
users:= users - 1
setup;
wait(2000 + random(1000));
makecompass('N');
HighestAngle;
fixchat;
end;
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
begin
Result := True;
users:= users - 1
setup;
wait(2000 + random(1000));
makecompass('N');
HighestAngle;
fixchat;
end;
2: if FindMod then
Result := True;
3: if FindMime then
begin
Result := True;
users:= users - 1
setup;
wait(2000 + random(1000));
makecompass('N');
HighestAngle;
fixchat;
end;
4: if FindMaze then
begin
Result := True;
users:= users - 1
setup;
wait(2000 + random(1000));
makecompass('N');
HighestAngle;
fixchat;
end;
5: if FindQuiz then
begin
Result := True;
users:= users - 1
setup;
wait(2000 + random(1000));
makecompass('N');
HighestAngle;
fixchat;
end;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
writeln('A gametab is missing! Random? Logging out...');
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
writeln('You are in a dark area, random? Logging out...');
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;
procedure fixrandoms;
begin
findnormalrandoms;
findfastrandoms;
for a:= 1 to 10 do
begin
FindEnt(tc[a]);
wait(10 + random(10));
end;
if findfight then
begin
writeln('You are under attack');
runto('n', true);
end;
end;
begin
SetupSRL;
setcb;
setup;
readln('WARNING, this only works with regular trees and oak trees, please try to avoid others. Also this is a SIMPLE power chopper and it will NOT avoid randoms');
nofirstslot:= readln('Ignore more colours? ("yes" if the bot keeps dropping your axe(s))');
FindWindowBySize(766, 504)
activateclient;
mcbox(521, 5, 551, 432, true);
LoginPlayer;
wait(1500 + random(1500));
makecompass('N');
HighestAngle;
fixchat;
repeat
if getcurrenttab = 4 = false then gametab(4)
if findtree then
begin
wait(2500 + random(1000));
clicktree;
recievelogs;
end;
events;
if lastlog then droplogs
wait(1000 + random(1000));
AntiBan;
fixrandoms;
if WelcomeToRuneScape then Nextaccount;
until(users = -1)
srlrandomsreport;
end.
I really hope the anti-randoms work, if so...then I think my script will be done soon!
Edit: One final thing, how do I make it upload the random stats?
Edit2: I figured out the issue, if you tell it to find an ent, it always returns true if it finds the tree. I always had it setup right!!
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.