SRL Archive - RS3 Outdated / Broken Scripts

All in 1 Powerchopper! - Bazzbarrett


BazzBarrett

2008-09-30 13:46:30

BazzBarrett's All in 1 Powerchopper!

hey all =) my first script relesed as a mem ;) i used the first version of this to help me in my way to get members since then it has gone through rigarus testing and lots of bug fixes i think i pritty much have the script as flawless as its gonna get ;) hope you injoy it and please post proggy/use srl stats and please post all sugestions. This Is smart only because if u dont know how to use smart please search it u will be pleasntly suprised.

This script also has the ability to make u a picture as a proggy!

Current Version - 1.3
1.2 - first public release!
1.3 - Made normal trees ALOT faster and sorted the quest tree bug out ;) + Smart loding changed

This is how much overall testing ive put into this script 2 make sure it runs flawlesly

This also is wat the picture proggys look like..
(if u have any problems with it please just disable it on line 30.


///////////////////////////////////////////
// Bazzbarrett's Power Cutter! //
// //
// Please fill in The DeclarePlayers //
// //
// I sugest using this script in lummby //
// Forest neer the westist yew, but //
// Will work anywere there is your tree //
// type! //
// //
// Will Power Chop: //
// Oak, Willow and Tree //
// //
///////////////////////////////////////////

program New;
{.include SRL/SRL/Misc/smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/WoodCutting.scar}

var
Trys, InvItems, T, T2, GNC, Color, Xpg, Tl :Integer;
YourSrlID, YourSrlPass :String;
ToDeBug, UsePictureProggy : boolean;

procedure DeclarePlayers;
begin
YourSrlID := '0000';//your id as a string
YourSrlPass := 'password';//your pass as a string
UsePictureProggy := False;
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := 'ser';
Players[0].pin := '';
Players[0].Active := True;
Players[0].booleans[0] := True; //Is The ake in the first slot
Players[0].Strings[0] := 'Oak';// Oak, Willow or Tree! Remember to caps the First Letter! (TreeType)
Players[0].Integers[0] := 1000; //number of logs to cut
Players[0].Integers[1] := 0; //Leave blank
Players[0].Integers[2] := 0; // " "
Players[0].Integers[3] := 0; // " "

end;

///////////////////////////////////////////
// //
// Please do not edit anything below //
// This unless you know what your //
// Doing! If you use anything below //
// please crdit =) now just press play. //
// //
///////////////////////////////////////////

procedure Setup;
begin
SmartSetup('world'+inttostr(WorldNumber), true, true, false);
while not SmartActive do wait(100);
SetTargetDC(SmartGetDC);
SetupSRL;
ToDeBug := False;
T := GetSystemTime;
Marktime(T2);
SetAudioOff;
SetupWoodcutting;
DeclarePlayers;
LoginPlayer;
ScriptID := '1023';
SRLID := YourSRLID;//YOUR SRL ID
SRLPassword := YourSRLPass;//YOUR SRL Password
SrlRandomsReport;
end;

procedure Debug(str :string);
begin
if ToDebug then Writeln(str);
end;

Function FindAxe2:Boolean;
begin
if Players[currentplayer].booleans[0] then
begin
EquipAxe := False;
Result := True;
end else
begin
Result := FindAxe;
end;
end;

procedure PlayerSetup;
begin
Retaliate(False);
SetAngle(True);
Players[currentplayer].Integers[2] := GetSkillLevel('woodcutting');
Wait(1000+random(500));
MakeCompass('N');
GameTab(4);
if Not findaxe2 then
begin
Logout;
Players[currentplayer].Active := False;
end else
begin
if Not EquipAxe then
begin
if Not(Players[currentplayer].booleans[0])then
begin
ArrangeInv;
InvItems := InvCount;
end;
end;
end;
GameTab(4);
Case Players[currentplayer].Strings[0] of
'Oak': Color := 2777428;
'Willow': Color := 2240554;
'Tree': Color := 2911841;
end;
end;

procedure Proggy;
var
I :integer;
begin
ClearDebug;
Writeln('/-----------------------------------\');
Writeln('| BazzBarrett''s Power Chopper!');
Writeln('| ');
Writeln('| Total Time Running: ' + inttostr((Getsystemtime-T)/60000) + ' Minuets!');
writeln('| And ' + inttostr(((Getsystemtime-T)/1000)-(((Getsystemtime-T)/60000)*60)) + ' Secounds!');
for I := 0 to Length(Players) - 1 do
begin
Writeln('|');
Writeln('| ' + Players[I].Name + ':');
Writeln('| Started at lvl '+inttostr(Players[I].Integers[2])+' and ended at lvl '+inttostr(Players[I].Integers[3]));
Writeln('| So We Gained ' + inttostr(Players[I].Integers[3]-Players[I].Integers[2]) + ' Levels!');
Writeln('| We Cut ' + IntToStr(Players[I].Integers[1]) + ' Logs!');
Incex(Tl, Players[I].Integers[1]);
end;
Writeln('|');
Writeln('| Thats a Total of ' + inttostr(Tl) + ' Logs!');
Writeln('| At a rate of ' + inttostr((Tl/((GetSystemtime-T)/60000))*60) + ' Logs per hour!');
Writeln('|');
Writeln('\-----------------------------------/');
end;

Procedure PictureProggy;
var
BgBmp, SideBmp, Text : Integer;
begin
BgBmp := BitmapFromString(250, 150, 'beNrt0rEJADAMA0GPptEyeiBD' +
'pJAPrlMnPnMCQKmBampnc+0n0EbtqP2tE2igdtSudtQOage1g9pB7' +
'aB2UDuoHdSO2tWO2tWO2kHtoHZQO6gd1A5qB7WD2lG72lG7l1A7qB' +
'3UDmoHtYPaQe2gdlA7alc7age1g9pB7aB2UDuoHdQOage1o3a1o3Z' +
'QO6gd1A5qB7WD2kHtoHbUrnbUrnbUDmoHtYPaQe2gdlA7qB3UjtrV' +
'jtq9hNpB7aB2UDuoHdQOage1g9pRu9pRO6gd1A5qB7WD2kHtoHZQO' +
'6gdtasdtYPaQe2gdlA7qB3UDmoHtaN2taN2taN2UDuoHdQOage1g9' +
'pB7aB21K521O4l1A5qB7WD2kHtoHZQO6gd1I7a1Y7aQe2gdlA7qB3' +
'UDmoHtYPaQe2oXe2oHdQOage1g9pB7fCndqiidtQOrdTOztoBqHEB' +
'vItCog==');
SideBmp := BitmapFromString(64, 52, 'beNrtmmFLFFEUhu0H9AsiM' +
'EKkTFkxirJkDCUIhC3aFre1bVkoEZHCsFgyloyloohAiCAiiAj6lb' +
'3sK8MrxzNdG6mZy8LzabzsPkfPPfecOybJSPKfGDmWRZIUnTL6i+H' +
'S7GmwvHAG3L8xCR5WK2CjNgMKGkV5/Qc+tflx0Lw+ATpLU6DbugSe' +
'Ni+mqH9ldBQM/f+w1wJ4XD8Pdh5cBb3OlZTt9uUUxjL0t+Zrt6YB9' +
'xf3GnOA+XBzbgzwCdfQlj70pHl/dS6FTzSiob8136ydBVv1CbDdnA' +
'QfNq6Bd+vz4M1aAtRHc0OdudKiEan/2InjIFcVjcK/35kGP1+3UrL' +
'9PWeu97D+zNJcWRSFv5qTj48WgI3Cwp9yZTbqz1qh5kN/pdeaAjYK' +
'a8s1IdCf/QMr8FHVz/j8d9oVsLu5CMINFUbHHON+Z//wpHEBsK87g' +
'lmmjP6m77L+Ngobi92hWie1W6Aza6b2JyuLp0B19iQ4RBTl9R+s4a' +
'cpnnl+W8JOj8+5f7lSM2rfROnFUl7/wZP16jhgbdRP4LeziyC2iyP' +
'86/P0CXHzejytw95vYF8UUfizT/7Rvwe+9hrgU/cO0G+hOT9fc4ye' +
'eWy9E1BrrPXfO92i8H+/OgO4Q+n/+Xkd6PdyitnLNJlT7Dwebuv1e' +
'KwM3hkXnz/35q+3bfDt5V1g/XX/Mhavcw6ZXDxnRetw3P6snMyf76' +
'9WwJcXy4D+tA3ppW1dzXa25tqTaBWlPytDfP7dxjnA+kl/7mI9v7L' +
'9vShCnK050bnGnSuj8Of5xd6M+5f+u89uA0YXMsuETOvW2c41epfO' +
'jpp3lQfMlWX3d24L6cz84ZkVPktmO2f32Nn38O6NStn9A95TeLNk9' +
'hSpd1zaCYQYevzde5YS+A84YL1zl8v8YRVV/5CsyGMYt3/4jbrO8s' +
'yWw9r++3e4JfY3UdCZu7KgtvH5O5W20Lbx+XuVtvj/N1Uo/9+K+4f' +
'r');
//Title + Side
fastdrawtransparent(20, 75, SideBmp, BgBmp);
Text := CreateBitmapFromText('BBs Oak Power Chopper!', NPCChars, ClWhite);
settransparentcolor(Text, ClBlack);
fastdrawtransparent(45, 20, text, BgBmp);
//TimeWorked
Text := createBitmapFromText('Time Worked:', UpChars, Clblue);
settransparentcolor(Text, ClBlack);
fastdrawtransparent(82, 39, text, BgBmp);
Text := CreateBitmapFromText(Timerunning, UpChars, ClWhite);
settransparentcolor(Text, ClBlack);
fastdrawtransparent(16, 55, text, BgBmp);
//LogsCut
Text := CreateBitmapFromText('Total logs cut:', UpChars, ClBlue);
settransparentcolor(Text, ClBlack);
fastdrawtransparent(103, 71, text, BgBmp);
text := createBitmapFromText(IntToStr(Tl), UpChars, ClWhite);
settransparentcolor(Text, ClBlack);
fastdrawtransparent(103, 88, text, BgBmp);
//Total Xp
Text := CreateBitmapFromText('Total Xp:', UpChars, ClBlue);
settransparentcolor(Text, ClBlack);
fastdrawtransparent(103, 103, text, BgBmp);
text := createBitmapFromText(IntToStr(Xpg), UpChars, ClWhite);
settransparentcolor(Text, ClBlack);
fastdrawtransparent(103, 120, text, BgBmp);
//Display and Save
DisplayDebugImgWindow(250, 150);
SafeDrawBitmap(BgBmp, getdebugcanvas, 0, 0);
SaveBitmap(BgBmp, ScriptPath + 'BBsOakPowerChopper.bmp');
Writeln('Bitmap saved in ' + scriptpath + 'BBsOakPowerChopper.bmp');

freeBitmap(SideBmp);
freebitmap(BgBmp);
FreeBitmap(Text);
end;

Procedure MiniProggy;
begin
ClearDebug;
Writeln('/-----------------------------------\');
Writeln('| BazzBarrett''s Power Chopper!');
Writeln('|');
Writeln('| Time Running = ' + TimeRunning);
Writeln('| Current player = ' + Players[currentplayer].Name);
Writeln('| ' + inttostr(Players[currentplayer].Integers[1])+' Logs cut out of '+inttostr(Players[currentplayer].Integers[0]));
Writeln('| Current WcLvl = ' + inttostr(Players[currentplayer].Integers[3]));
Writeln('|');
Writeln('\-----------------------------------/');
end;

procedure SrlStats(NumCut:integer);
begin
if timefrommark(T2) < 300000 then
begin
incex(Gnc, numcut);
end else
begin
IncEx(numcut, GNC);
GNC := 0
MarkTime(T2);
Case Players[currentplayer].Strings[0] of
'Oak':
Begin
ReportVars[0] := numcut;
ReportVars[3] := NumCut*37;
Xpg := NumCut*37;
end;
'Willow':
begin
ReportVars[2] := numcut;
ReportVars[3] := NumCut*67;
Xpg := NumCut*67;
end;
'Tree':
begin
ReportVars[1] := numcut;
ReportVars[3] := NumCut*25;
Xpg := NumCut*25;
end;
end;
end;
SendSrlReport;
end;

procedure Scriptterminate;
begin
proggy;
if UsePictureProggy then PictureProggy;
end;

Function TPAFromColor(Var X, Y : Integer; Color, Tolerance :Integer; UpTextToCheck : String):Boolean;
var
CTS, II : Integer;
TPA : TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Color, MSX1, MSY1, MSX2, MSY2, Tolerance);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
For II := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[II], X, Y)
MMouse(X, Y, 2, 2);
Wait(50+Random(10));
If(IsUpText(UpTextToCheck))then
begin
Result := True;
GetMousePos(x, y);
Break;
end;
end;
end;

procedure Checks;
begin
if not loggedin then exit;
findnormalrandoms;
Disguise('['+inttostr(Players[currentplayer].Integers[1])+'/'+inttostr(Players[currentplayer].Integers[0])+'] Logs Cut!');
If FindFight then
begin
MakeCompass('N');
RunTo('S', True);
wait(20000+random(10000));
RunTo('N', True);
end;
if FindDead then
begin
Writeln('Dang! We died Going to Next player');
logout;
Players[currentplayer].Active := False;
end;
end;

procedure DropLogs;
var
I, II:integer;
begin
if not loggedin then exit;
Players[currentplayer].Integers[3] := GetSkillLevel('woodcutting');
if Not InvFull then Exit;
if findaxe2 then
begin
if EquipAxe then
begin
DropAll;
Checks;
IncEx(Players[currentplayer].Integers[1], 28);
SRLStats(28);
end else
begin
if Players[currentplayer].booleans[0] then
begin
for I := 2 to 28 do
begin
Dropitem(I);
Inc(Players[currentplayer].Integers[1]);
end;
SRLStats(27);
end else
begin
for I := (InvItems+1) to 28 do
begin
inc(II);
DropItem(I);
Inc(Players[currentplayer].Integers[1]);
end;
//Checks;
SRLStats(II);
II := 0;
end;
end;
end else
begin
Players[currentplayer].Active := False;
logout;
end;
end;

procedure ChopTrees;
var
T, x, y :integer;
begin
repeat
Checks;
if not loggedin then exit;
if TPAFromColor(x, y, Color, 15, Players[currentplayer].Strings[0]) then
begin
if not loggedin then Exit;
Trys := 0;
mouse(x, y, 3, 3, true);
Wait(1000+random(1000));
if FindEnt(x, y, true) then Exit;
Checks;
MarkTime(T);
debug(GetUpText);
repeat
wait(random(1000));
Checks;
FindEnt(x, y, true);
until( Not(IsUpTextMultiCustom([Players[currentplayer].Strings[0]])))or(TimeFromMark(T)>15000);
end else
begin
if trys > 5 then
begin
Logout;
Players[currentplayer].Active := False;
end;
Mouse(MMCX, MMCY, 30, 30, true);
inc(Trys);
wait(5000+random(5000));
writeln('Couldent Find Tree Randomly Walking');
Exit;
end;
MarkTime(T);
If Players[currentplayer].Strings[0] = 'Tree' then
begin
if isuptext('hop Tree') then
begin
mouse(595, 75, 2, 2, True);
FFlag(0);
end;
end else
begin
repeat
Wait(1000+random(2000));
until(IsUpTextMultiCustom([Players[currentplayer].Strings[0]]))or(TimeFromMark(T)>20000);
end;
until(InvFull);
end;

begin
Setup;
repeat
PlayerSetup;
Repeat
ChopTrees;
DropLogs;
MiniProggy;
Until(Players[currentplayer].Integers[1] > Players[currentplayer].Integers[0])or( not loggedin)
Nextplayer(Players[currentplayer].Active);
until(AllPlayersInactive);
end.

sirlaughsalot

2008-09-30 13:48:03

Do scar tags ;)
 
without the spaces :D looks cool though, best of luck :)

BazzBarrett

2008-09-30 13:50:47

From: sirlaughsalot
Do scar tags ;)
 
without the spaces :D looks cool though, best of luck :)


oh come on that was like 10 secounds i changed it straght after i posted and noticed it =\

whereyouat07

2008-09-30 20:24:07

dude wth , nice script but why is mine taking so long to run?

i fill in all the info and stuff and it says running… at the bottom and wont run?

Edit:nvm it runs (kinda) now and the smart runescape window comes up but it doesnt do anything???

BazzBarrett

2008-10-01 12:13:54

From: whereyouat07
dude wth , nice script but why is mine taking so long to run?

i fill in all the info and stuff and it says running… at the bottom and wont run?

Edit:nvm it runs (kinda) now and the smart runescape window comes up but it doesnt do anything???



after smarts compleatly loded and is on the rs loggin screen then click play make sure u have smart enabled aswell =)

simple skill

2008-10-01 13:58:15

ok nice script and it will be getting me very far hopefully but i see one mistake withe the proggie and i have a tip for all users aswell

This is straight from the debug box

| Started at lvl 5 and ended at lvl 0
| So We Gained -5 Levels!

i think youve just misplace a couple of words or something
*i ran the script again ad the results were correct so im not sure if this is a on of error or if it is something that could be looked into*

and a tip to all useres of this script
Dont play the script if your near to the bridge across to the wizzards tower in draynor (pic) as there is a tree there that is used ion a members quest and therefore cannot be chopped down, luckily i was close enough to stop the script but it could keep you there for hours


* = edit

BazzBarrett

2008-10-01 19:19:45

From: simple skill
ok nice script and it will be getting me very far hopefully but i see one mistake withe the proggie and i have a tip for all users aswell

This is straight from the debug box

| Started at lvl 5 and ended at lvl 0
| So We Gained -5 Levels!

i think youve just misplace a couple of words or something
*i ran the script again ad the results were correct so im not sure if this is a on of error or if it is something that could be looked into*

and a tip to all useres of this script
Dont play the script if your near to the bridge across to the wizzards tower in draynor (pic) as there is a tree there that is used ion a members quest and therefore cannot be chopped down, luckily i was close enough to stop the script but it could keep you there for hours


* = edit


that tree is a bitch i know =\ im going to edit it speculy for normal trees and as for the proggy that just means it hasent droped any logs befor it ends it check ur wc lvl every time it drops logs =)

EDIT: all fixed =) [exsept the wc lvl thing but that realy isent important]