SRL Archive - First Scripts

Super Power Chopper (First)


Supertrent1

2012-01-28 15:10:05

Hello, this is my first EVER script. I made this over the pat few days using YoHo's scripting tutorial. it's very rough and doesn't use smart (yet). I would appreciate any help and or constuctive critiscism you have avaliable. Please test and tell me how it works!

Program SuperPowerChopper;

{.include/SRL/SRL.simba}
{.include SRL/SRL/Misc/SMART.simba}
{.include SRL\SRL.simba}
{.Include SRL\SRL\Misc\Debug.simba}

const
SmartWorld = 15; // Which World/Server do you want to use?
SmartMembers = True; // Is it a Members World?
SmartSigned = True; // Signed/UnSigned Client?
SmartSuperDetail = False; // Use Super Detail?
Version = '1.0';
NumbOfPlayers = 1;
StartPlayer = 0;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Username
Players[0].Pass := ''; //Password
Players[0].Nick := ''; //4 character Nickname for you character
Players[0].Active := True;
Players[0].Pin := ''; //Pin, leave blank if none
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Procedure Antiban; //Antiban, Credits to YoHo
Begin
Case Random(192) Of
0: HoverSkill('Woodcutting', False); //skill
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

function TreeColor: Integer; //Credits To ACA
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 3030597, MMX1, MMY1, MMX2, MMY2, 29);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color');
ColorToleranceSpeed(tmpCTS);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 9.78) and (H <= 12.20) and (S >= 19.28) and (S <= 20.77) and (L >= 16.65) and (L <= 28.45) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 2.53) and (X <= 7.51) and (Y >= 2.60) and (Y <= 7.94) and (Z >= 1.86) and (Z <= 5.16) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;

ColorToleranceSpeed(tmpCTS);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
Function ChopDown:Boolean; //The Main Function, the chopping of the trees
Var
x, y , PlusOne, TreeCounter: Integer;

Begin;
PlusOne:= InvCount + 1
x:= MSCX;
y:= MSCY;
If FindObjTPA(x, y, TreeColor, 3, 1, 15, 80, 600, ['Chop']) Then
Begin
StatsGuise('Horay, We found a tree');
Case Random(2) Of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
Wait(100+Random(100));
WaitOption('Chop', 500);
End;

end;

Flag;

MarkTime(TreeCounter);

Repeat;
FindNormalRandoms;
StatsGuise('Antiban, Please wait!');
Antiban;
wait(1000);
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 3500)


End;

End;
Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;

Begin

LogDTM := DTMFromString('mwQAAAHic42RgYHBmYmBwBGIfIA4EYicgNgZiEyA2B2IvIH4KVHcbiB8D8Ssgfg/Ebxgg4neB+CYQe5rJA0kmDOxmKAqmbXSlGAiB/0DMSASGAwDH/w0r');
LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
StatsGuise('Dropping All Your Logs!');
For I:=0 To 27 Do
Begin
FindNormalRandoms;
SlotBox:=InvBox(LogPattern[I]);
If FindDtm(LogDTM, x, y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
MouseItem(LogPattern[I], MOUSE_RIGHT);
ChooseOption('Drop');
End;
End;

FreeDTM(LogDTM);


End;





Begin
DeclarePlayers;
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
SetupSRL;
If not (LoggedIn) then
LoginPlayer;
TreeColor;

repeat
ChopDown;
if InvFull Then
DropLogs;
Until (false);

end.

Area is was made to powerchop in:

I hope I don't hurt your guy's eye too bad :D
Anyways, enjoy! (I think this is a decent FIRST script)
I will get better
:spot:
~Trent~

Credits:
Thank you to YoHo for his PMS and Tuts. They are what made this script happen!

Edit: Updated!

Mat

2012-01-28 16:16:49

Its nice to see loads of new members making loads of scripts :)
Mat

Supertrent1

2012-01-28 18:42:41

From: Mat
Its nice to see loads of new members making loads of scripts :)
Mat


I know, it's great to see all of us. Maybe we will all get good and make osme epic scripts together :)

Supertrent1

2012-01-29 02:02:34

Updates:
Included SMART, Fixed colors, a few other little tweaks.

trials6112

2012-01-29 03:57:35

Congrats on your script i will run a proggy for you on one of my disposables :)

Supertrent1

2012-01-29 17:32:41

From: trials6112
Congrats on your script i will run a proggy for you on one of my disposables :)


Thanks, tell me what you think!

Helper

2012-01-30 12:18:42

testing it on my skiller i post proggy later.

holysin

2012-01-30 15:22:36

haha im doing the smae thing with smart though :P except mines in draynor lol

Inception

2012-02-02 00:30:51

One thing I saw at first glance: {.include SRL\SRL.simba} was used twice.

[XoL]

2012-02-02 00:36:50

Get rid of the download button, just upload it to SRL.
I like the the fact you gave credit to ACA :)

Supertrent1

2012-02-03 17:40:45

From: R4nd0m
Get rid of the download button, just upload it to SRL.
I like the the fact you gave credit to ACA :)


Doing this right now