SRL Archive - Archive

maglor - SRL Member Application Form


maglor

2007-05-26 10:31:34

<!– BEGIN TEMPLATE: formanswers –>
maglor - SRL Member Application Form
maglor

What is the meaning to life?
SCAR

Where you Referred to SRL? If yes, by whom?
no


Programming Knowledge
Visual Basic, HTML

Other Communitys
Runescapology, RSUnlocked

How Long have You Played Runescape
3 years

Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.

I'm learning to use SCAR, and I've become quite good at it (I think). I've been playing runescape for a long time now, and it was always me that needed everything, and I forgot about the others. Now my new mission is to help people, by making their Runescape-lives easier… That why I've written this script. Try it, it works smooth.

——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted

program PowerCutter;

{.include SRL\SRL.SCAR}
{.include SRL\SRL\Skill\Woodcutting.SCAR}
{
___ ___ _
| \/ | | |
| | __ _ __ _| | ___ _ __
| |\/| |/ _' |/ _' | | / _ \| '_ )
| | | | (_| | (_| | |_| (_) | |
|__| |__|\__,_|\__, |____\___/|_|
(____|
}
//////////////////////////////
// //
// MAGLOR's POWERCUTTER //
// //
// Can be modified for //
// personal use. Do not //
// distribute my script //
// and claiming it is //
// yours! //
// //
// Thank you //
// //
//////////////////////////////

Var

LoadNumber, MaxLogsPerLoad, : Integer;
TotalXP, CurrentXP, Axes, DropStartPlace : Integer;
Tol, TotalLogs, Cutting, FindTreeTries, StartXP : Integer;
EndXP, NoAxezzz : Integer;
TreeNameX : String;

Const

//////////////////////////////
// Setup //
//////////////////////////////

//--------------------------//
//--Loads before switching--//
//--------------------------//

Loads = 10;

//--------------------------//
//Time To Wait Between Trees//
//--------------------------//

WaitTime = 10; // In seconds

//--------------------------//
//---------Treecolor--------//
//--------------------------//

TreeColor1 = 1863784;
TreeColor2 = 2908240;
TreeColor3 = 798760;
TreeColor4 = 1464392;

//--------------------------//
//----------Players---------//
//--------------------------//

Procedure DeclarePlayers;
Begin
Status('Loading Players')

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

Players[0].Name := '' ; // Password
Players[0].Pass := '' ; //Username
Players[0].Nick := ''; // 2-4 letters of username
Players[0].String1 := ''; // Tree name.
Players[0].String2 := '0' ; // How many axes in inventory (Not more than 8)
Players[0].Active := True;

Players[1].Name := '' ; // Password
Players[1].Pass := '' ; //Username
Players[1].Nick := ''; // 2-4 letters of username
Players[1].String1 := ''; // Tree name. Tree, Oak, or Willow
Players[1].String2 := '0' ; // How many axes in inventory (Not more than 8)
Players[1].Active := True;

Players[2].Name := '' ; // Password
Players[2].Pass := '' ; //Username
Players[2].Nick := ''; // 2-4 letters of username
Players[2].String1 := ''; // Tree name. Tree, Oak, or Willow
Players[2].String2 := '0' ; // How many axes in inventory (Not more than 8)
Players[2].Active := True;

Players[3].Name := '' ; // Password
Players[3].Pass := '' ; //Username
Players[3].Nick := ''; // 2-4 letters of username
Players[3].String1 := ''; // Tree name. Tree, Oak, or Willow
Players[3].String2 := '0' ; // How many axes in inventory (Not more than 8)
Players[3].Active := True;

Players[4].Name := '' ; // Password
Players[4].Pass := '' ; //Username
Players[4].Nick := ''; // 2-4 letters of username
Players[4].String1 := ''; // Tree name. Tree, Oak, or Willow
Players[4].String2 := '0' ; // How many axes in inventory (Not more than 8)
Players[4].Active := True;

//////////////////////////////
// End Setup //
//////////////////////////////


NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
End;

Procedure SetUpVariables;
Begin
Case (LowerCase(Players[CurrentPlayer].String1)) of
'tree' : TreeNameX := 'Tree';
'oak' : TreeNameX := 'Oak';
'willow' : TreeNameX := 'Willow';
'maple' : TreeNameX := 'Maple';
'mahogany' : TreeNameX := 'Mahogany';
'yew' : TreeNameX := 'Yew';
'magic' : TreeNameX := 'Magic';
End;
Case (LowerCase(Players[CurrentPlayer].String2)) of
'0' : Axes := 0;
'1' : Axes := 1;
'2' : Axes := 2;
'3' : Axes := 3;
'4' : Axes := 4;
'5' : Axes := 5;
'6' : Axes := 6;
'7' : Axes := 7;
'8' : Axes := 8;
End;
TotalLogs := 0
TotalXP := 0
MaxLogsPerLoad := 28 - Axes
NoAxezzz := 0
End;

Procedure BoredToDeath;
Begin
x := 587
y := 228;
MMouse(x, y, 1, 1);
Wait(300+Random(200));
Mouse(x, y, 1, 1, False);
Wait(300+Random(200));
ChooseOption(x, y, 'Examine');
Wait(800+Random(200));
End;

Procedure DoNotBanMe;
Begin
Case Random(5) Of

0: Begin
HoverSkill('Woodcutting', false);
wait(2000+random(1000));
GameTab(4);
End;

1: Begin
GameTab(1 + Random(12));
wait(1000+random(1000));
GameTab(4);
End;

2: PickUpMouse;

3: MouseBox(MSX1,MMY1,MMX2,MMY2,3);

4: BoredToDeath;

End;

End;

Procedure LoginFirstPlayer;
Begin
Status('Switching Players')
WriteLn('');
WriteLn('Logging in player:');
LoginPLayer;
Gametab(5);
GameTab(4);
Makecompass('n');
HighestAngle;
GetAllLevels;
StartXP := GetXp('Woodcutting')
DropStartPlace := Axes + 1
LoadNumber := 1
CurrentXP := 0
NoAxezzz := 0;
SetChat('Hide', 1);
SetChat('Friends', 2);
SetChat('Off', 3);
End;



Procedure LoginNextPlayerFalse;
Begin
Status('Switching Players')
WriteLn('');
WriteLn('Logging in player:');
NextPlayer(False);
Gametab(5);
GameTab(4);
Makecompass('n');
HighestAngle;
GetAllLevels;
StartXP := GetXp('Woodcutting')
DropStartPlace := Axes + 1
LoadNumber := 1
CurrentXP := 0
NoAxezzz := 0;
SetChat('Hide', 1);
SetChat('Friends', 2);
SetChat('Off', 3);
End;

Procedure LoginNextPlayerTrue;
Begin
Status('Switching Players')
WriteLn('');
WriteLn('Logging in player:');
NextPlayer(True);
Gametab(5);
GameTab(4);
Makecompass('n');
HighestAngle;
GetAllLevels;
StartXP := GetXp('Woodcutting');
DropStartPlace := Axes + 1;
LoadNumber := 1;
CurrentXP := 0;
NoAxezzz := 0;
SetChat('Hide', 1);
SetChat('Friends', 2);
SetChat('Off', 3);
End;

Procedure PlayersLoc;

Var

I : Integer;

Begin
For I := 0 To HowManyPlayers - 1 Do
Begin
Players[I].Loc := 'Tree''s'
End;
End;

Procedure PlayerReport; // By Wizzup, but edited

Var
Active: String;
I:Integer;

Begin
For I := 0 to HowManyPlayers - 1 Do
Begin
If Players[i].Active=True Then Active := 'T' Else Active := 'F';
WriteLn( (IntToStr(I))+' : '+Players[I].nick+ ' = '+
Active+ +'; Loc = '+Players[I].Loc+'; Loads: '+IntToStr(Players[I].Integer2)
+'; WC lvl:'+IntToStr(Players[i].Level[20]));
End;
End;

Procedure ProgressReport;
Begin
Status('')
WriteLn('');
WriteLn('[ Maglor''s Powercutter Progress ]');
WriteLn('');
WriteLn('-- Has been running for '+TimeRunning);
WriteLn('-- Logs Cut: '+IntToStr(TotalLogs));
WriteLn('-- Total XP gained: '+IntToStr(TotalXP));
WriteLn('');
PlayerReport;
WriteLn('');
WriteLn('[ Current Player Report ]');
WriteLn('');
WriteLn('-- Current level: ' + IntToStr(Players[CurrentPlayer].Level[20]));
WriteLn('-- XP gained: '+IntToStr(Players[CurrentPlayer].Integer1));
WriteLn('');
End;

Function FindFastRandoms: Boolean; //By WT-Fakawi.
Var
i: Integer;
Begin
For i := 1 To 9 do
Begin
case I of
1: If FindDead Then
Result := True;
2: If FindMod Then
Result := True;
3: If FindMime Then
Result := True;
4: If FindMaze Then
Result := True;
5: If FindQuiz Then
Result := True;
6: If FindDemon Then
Result := True;
7: Begin
if NoGameTab then
Begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
End;
7: Begin
If InBlack then
Begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
End;
End;
8: RC;
9: If FindFight Then
Begin
RunAwayDirection('n');
Wait(10000+random(2000));
RunBack;
End;
End;
wait(1);
End;
End;

Procedure FindAllRandoms;
Begin
FindFastRandoms;
FindNormalRandoms;

End;

Procedure FindTreeX;
Var
iX, iY, AntiBan : Integer;
FullTreeName1, FullTreeName2 : String;
Begin
Status('Finding Tree');
iX := Random(515);
iY := Random(300);
MMouse (iX, iY, 0, 0);
Tol := 5
FullTreeName1 := 'down '+TreeNameX
FullTreeName2 := 'hop down '+TreeNameX
FindTreeTries := 0
Repeat
Status('Finding Tree''s')
FindAllRandoms;
If (FindColorSpiralTolerance(iX, iY, TreeColor1, msx1, msy1, msx2, msy2, Tol)) Or
(FindColorSpiralTolerance(iX, iY, TreeColor2, msx1, msy1, msx2, msy2, Tol)) Or
(FindColorSpiralTolerance(iX, iY, TreeColor3, msx1, msy1, msx2, msy2, Tol)) Or
(FindColorSpiralTolerance(iX, iY, TreeColor4, msx1, msy1, msx2, msy2, Tol)) Then

MMouse(iX, iY, 1, 1);
Wait(100+Random(200));
If (Not (IsUpText(FullTreeName1))) Or (Not (IsUpText(FullTreeName2))) Then
Begin
FindTreeTries := FindTreeTries + 1
Wait(100+Random(200));
iX := Random(515);
iY := Random(300);
MMouse(iX, iY, 1, 1);
End;
If (FindTreeTries = 2) Then
Begin
WriteLn('Couldn''t Find Tree... Increasing Tolerance');
Tol := Tol + 1;
iX := Random(515);
iY := Random(300);
MMouse(iX, iY, 1, 1);
End;
FindAllRandoms;


Until (IsUpText(FullTreeName1)) Or (IsUpText(FullTreeName2)) Or (Tol = 20)
Begin
If (Tol = 20) Then
Begin
WriteLn('Didn''t find tree... Switching players')
Players[CurrentPlayer].Loc := 'No Tree';
LoginNextPlayerFalse;
End;
If (IsUpText(FullTreeName1)) Or (IsUpText(FullTreeName2)) Then
Begin
WriteLn('Found Tree! Started Cutting')
Status('Cutting')
Mouse(iX, iY, 0, 0, true);
Wait (200+Random(100));
AntiBan := 0;
Cutting := 0;
Repeat
AntiBan := AntiBan + 1
Wait (1000+Random(200));
FindAllRandoms;
If (FindBlackChatMessage('ou do not have an ax') = True) Then
Begin
NoAxezzz := 1;
End;
If (AntiBan = (2+Random(5))) Then DoNotBanMe;
Cutting := Cutting + 1

Until (Cutting = WaitTime)
End;
End;
End;

Procedure SetupMacro;
Begin
Status('Setting up script')
ClearDebug;
WriteLn('Setting up SRL');
SetupSRL;
WriteLn('Setting Up Script');
DeclarePLayers;
PlayersLoc;
SetUpVariables;
End;

Begin
ActivateClient;
SetupMacro;
LoginFirstPlayer;
Repeat
Repeat
FindTreeX;
If (NoAxezzz = 1) Then
Begin
WriteLn('No more useable axes left, switching players')
LoginNextPlayerFalse;
End;
If InventoryFull = True Then
Begin
DropTo (DropStartPlace, 28);
GetAllLevels;
EndXP := GetXp('Woodcutting');
TotalLogs := TotalLogs + MaxLogsPerLoad;
TotalXP := TotalXP + (EndXP - StartXP);
Players[CurrentPlayer].Integer1 := Players[CurrentPlayer].Integer1 + (StartXP - EndXP);
GameTab(4);
ProgressReport;
LoadNumber := LoadNumber + 1;
Players[CurrentPlayer].Integer2 := Players[CurrentPlayer].Integer2 + 1
StartXP := GetXP('Woodcutting');
GameTab(4);
End;
Until (LoadNumber = Loads)
If (LoadNumber = Loads) Then
Begin
ProgressReport;
LoginNextPlayerTrue;
End;
Until (False);
End.

——————————————————
<!– END TEMPLATE: formanswers –>

JAD

2007-05-26 11:52:55

For these:


Procedure LoginNextPlayerFalse;
Begin
Status('Switching Players')
WriteLn('');
WriteLn('Logging in player:');
NextPlayer(False);
Gametab(5);
GameTab(4);
Makecompass('n');
HighestAngle;
GetAllLevels;
StartXP := GetXp('Woodcutting')
DropStartPlace := Axes + 1
LoadNumber := 1
CurrentXP := 0
NoAxezzz := 0;
SetChat('Hide', 1);
SetChat('Friends', 2);
SetChat('Off', 3);
End;

Procedure LoginNextPlayerTrue;
Begin
Status('Switching Players')
WriteLn('');
WriteLn('Logging in player:');
NextPlayer(True);
Gametab(5);
GameTab(4);
Makecompass('n');
HighestAngle;
GetAllLevels;
StartXP := GetXp('Woodcutting');
DropStartPlace := Axes + 1;
LoadNumber := 1;
CurrentXP := 0;
NoAxezzz := 0;
SetChat('Hide', 1);
SetChat('Friends', 2);
SetChat('Off', 3);
End;

You could have just done like:

procedure SwitchThePlayers(TorF: Boolean);
begin
NextPlayer(TorF);
//setup....
end;

So that could have saved some code. I'll finish looking over it later, and see if its ok. Holding my vote for now though.

maglor

2007-05-26 12:15:50

I don't really understand that… What does 'torF' mean?

Bobarkinator

2007-05-26 12:21:42

From: maglor
I don't really understand that… What does 'torF' mean?


It means True or False. JAD is saying you could have saved space by using a variable when you use the procedure.

Anyways, I like your script, it's got failsafes, good coding, the only thing I'm waiting for is YoHo's ok.

maglor

2007-05-26 12:25:06

Oh yeah I see, I could have made 1 procedure called "SetupNextPlayer"… But this my first script though, it's not really that good. But I hope I get accepted, I've put a lot of work in this script.

shaunthasheep

2007-05-26 12:28:08

yea pretty nice… almost great standards (u arn't supposed to capitalize bold words[begin, end, if, then, procedure, function, var, const, etc) but other then that its fine.
also waiting to see if its copied or not.

maglor

2007-05-26 12:44:29

From: The_Rs_Monkey
almost great standards (u arn't supposed to capitalize bold words[begin, end, if, then, procedure, function, var, const, etc)


Lol, I just love to do that. It looks a lot nicer than :)

GoF

2007-05-26 13:12:18

A nice script, ill wait to see if the script is copied before i vote.. And from "Scripting standards" at Kaitnieks.com (or whats left of it anyway)..

"Object Pascal language reserved words and key words shall always be completely lowercase. Never capitalize words that SCAR displays in bold. It's completely unnecessary and looks ugly!"

maglor

2007-05-26 13:17:57

From: GoF
"Object Pascal language reserved words and key words shall always be completely lowercase. Never capitalize words that SCAR displays in bold. It's completely unnecessary and looks ugly!"


I think writing them in lowercase is ugly. And lost of scripters do write them capitalized (Wizzup, …)

maglor

2007-05-26 15:56:44

What's wrong? Is this normal it takes so long before I get accepted?

JAD

2007-05-26 16:06:40

From: maglor
What's wrong? Is this normal it takes so long before I get accepted?


Oh yeah. It can take anywhere from 1 day to a month. Be patient :p If its a clear yes, then you'll get in soon.

And as for the bold word capitals thing, that really doesn't matter. Take a look at some of Wizzup?'s scripts and you'll find all his Var, Begin, End….ect.'s to be capitalized :p

I'll read it over and vote in a minute.

Wizzup?

2007-05-26 16:13:31

You've shown good potential, yes from me….

JAD

2007-05-26 16:19:16

eh.. what the heck. I'll give it a yes to :) Nice work.

maglor

2007-05-26 17:06:07

Woot! Wizzup and JAD I love you guys!

JAD

2007-05-26 17:11:14

Wait.. This script doesn't include Anti ban?? Do you know how anti ban works? Wish I didn't vote yes already because I'd like eto vote yes only if you learn anti ban and show it to me :p

You should check out my tut (links in sig) Learning the things to become a SRL member. Read the anti ban, and the standards section :p

maglor

2007-05-26 17:30:08

Huh, I thought I included it… I made it, maybe slipped out. I'll add it now

I had this

Procedure BoredToDeath;
Begin
x := 587
y := 228;
MMouse(x, y, 1, 1);
Wait(300+Random(200));
Mouse(x, y, 1, 1, False);
Wait(300+Random(200));
ChooseOption(x, y, 'Examine');
Wait(800+Random(200));
End;

Procedure DoNotBanMe;
Begin
Case Random(5) Of

0: Begin
HoverSkill('Woodcutting', false);
wait(2000+random(1000));
GameTab(4);
End;

1: Begin
GameTab(1 + Random(12));
wait(1000+random(1000));
GameTab(4);
End;

2: PickUpMouse;

3: MouseBox(MSX1,MMY1,MMX2,MMY2,3);

4: BoredToDeath;

End;

End;

maglor

2007-05-26 19:28:14

Added the slipped out "AntiBan" (Called "DoNotBanMe" in my script:)) procedure to the script.

Cool 3 votes say yes and 0 votes say no :)

neG

2007-05-26 19:48:06

Nice work man!
You will be a good addition to the community :)
Yes.

maglor

2007-05-26 19:51:32

Woot! I don't know what to say. This is the first time in my life people appreciate me. (Much people don't like me because of my clothing) It really gives a great feeling, thanks guys!!!

YoHoJo

2007-05-26 19:53:32

I like how you think.
This is good

If (Not (IsUpText(FullTreeName1))) Or (Not (IsUpText(FullTreeName2))) Then
Begin
FindTreeTries := FindTreeTries + 1
Wait(100+Random(200));
iX := Random(515);
iY := Random(300);
MMouse(iX, iY, 1, 1);
End;

I do that also im my scripts, good job.

maglor

2007-05-26 20:02:50

Ownage! Everyone think it's good! You really don't know how I'm feeling right now.

Boreas

2007-05-26 23:28:07

With Wizz, Yoho, and I, I don't see need to wait.

Congrats!