SRL Archive - Archive

omgh4x0rz - SRL Member Application Form


omgh4x0rz

2007-02-23 17:20:42

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

What is the meaning to life?


Where you Referred to SRL? If yes, by whom?
no
found it on a link

Programming Knowledge
a little C++, planning to take a Java course next term

Other Communitys
http://forum.scar-scripts.com/index.php?/index.php

How Long have You Played Runescape
four years

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

Hi, I started trying to learn to script last year right before Kaitnieks forums went down. I mean a real noob, barely knew how to movemouse. When the forum went down, I thought cheating was dead :D (as I said, I was a noob. I'm glad to see I was wrong) so I quit for a long time, because I was getting frustrated trying to teach myself. After a little while, I did another search and found http://forum.scar-scripts.com/index.php?/index.php. There was a link to the SRL forums, and thats how I came here. I've been getting better ever since with y'alls help and super-include!

Thanks,


P.S. I would appreciate any advice/comments you have for my script, regardless of whether you accept my application. Thanks!

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


{=========================================================================]
[ Power Chopper ]
[ ]
[ by: omgh4x0rz ]
[ ]
[ ]
[ DESCRIPTION : Chops any tree, anywhere ]
[ includes anti-ban responder, ]
[ antirandoms, multiplayer. ]
[ ]
[ ]
[ ]
[ ]
[=========================================================================]
[ Instructions. ]
[=========================================================================]
[ 1. USE Runescape with Low Detail, Very Bright. ]
[ 2. Setup your players in line 189. ]
[ 2. Move your player near a group of the tree type you wish to chop ]
[ 3. Put axe in FIRST inventory slot ]
[ 4. Press the green play button. ]
[ 5. Fill out the form ]
[ 6. Press the big square button! ]
[=========================================================================}


/////////////////////////////////////////////////////////////////////////
//---------------------------------------------------------------------//
//No Messing with Stuff Below Here Unless You know what you're doing!!!//
//---------------------------------------------------------------------//
/////////////////////////////////////////////////////////////////////////
program PowerChopper;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Woodcutting.scar}

var
frmDesign : TForm;
Label1 : TLabel;
Label2 : TLabel;
Label3 : TLabel;
Button1 : TButton;
ComboBox1 : TComboBox;
ComboBox2 : TComboBox;
Edit1 : TEdit;
treetype,RunDir:string;
PlayerTime,ChatChars,RunTime:integer;


////////////////////////////////////////////////////////////
//Form stuff
///////////////////////////////////////////////////////////
procedure buttonclick(sender: TObject);
begin
frmDesign.ModalResult:= mrOk;
end;

procedure initform;
begin
frmDesign := CreateForm;
frmDesign.Left := 273;
frmDesign.Top := 114;
frmDesign.Width := 349;
frmDesign.Height := 317;
frmDesign.Caption := 'omgh4x0rz Power Chopper';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := false;
frmDesign.PixelsPerInch := 96;
Label1 := TLabel.Create(frmDesign);
label1.Parent := frmDesign;
Label1.Left := 33;
Label1.Top := 33;
Label1.Width := 54;
Label1.Height := 13;
Label1.Caption := 'Chop What';
Label2 := TLabel.Create(frmDesign);
Label2.Parent := frmDesign;
Label2.Left := 33;
Label2.Top := 64;
Label2.Width := 49;
Label2.Height := 13;
Label2.Caption := 'Run Away';
Label3 := TLabel.Create(frmDesign);
Label3.Parent := frmDesign;
Label3.Left := 33;
Label3.Top := 99;
Label3.Width := 29;
Label3.Height := 13;
Label3.Caption := 'Time per Player(min)';
Button1 := TButton.Create(frmDesign);
Button1.OnClick:= @buttonclick;
Button1.Parent := frmDesign;
Button1.Left := 97;
Button1.Top := 174;
Button1.Width := 106;
Button1.Height := 47;
Button1.Caption := 'Chop!';
Button1.TabOrder := 0;
ComboBox1 := TComboBox.Create(frmDesign);
ComboBox1.Parent := frmDesign;
ComboBox1.Left := 115;
ComboBox1.Top := 30;
ComboBox1.Width := 145;
ComboBox1.Height := 21;
ComboBox1.ItemHeight := 13;
ComboBox1.TabOrder := 9;
ComboBox1.Text := 'Tree';
ComboBox1.Items.Add('Tree');
ComboBox1.Items.Add('Dead');
ComboBox1.Items.Add('Oak');
ComboBox1.Items.Add('Willow');
ComboBox1.Items.Add('Maple');
ComboBox1.Items.Add('Yew');
ComboBox2 := TComboBox.Create(frmDesign);
ComboBox2.Parent := frmDesign;
ComboBox2.Left := 115;
ComboBox2.Top := 65;
ComboBox2.Width := 145;
ComboBox2.Height := 21;
ComboBox2.ItemHeight := 13;
ComboBox2.TabOrder := 10;
ComboBox2.Text := 'North';
ComboBox2.Items.Add('North');
ComboBox2.Items.Add('East');
ComboBox2.Items.Add('South');
ComboBox2.Items.Add('West');
Edit1 := TEdit.Create(frmDesign);
Edit1.Parent := frmDesign;
Edit1.Left := 135;
Edit1.Top := 103;
Edit1.Width := 121;
Edit1.Height := 21;
Edit1.TabOrder := 11;
Edit1.Text := '12';
end;


procedure safeinitform;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;

//----------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////
//Script Setup:
/////////////////////////////////////////////////////////////////////////
procedure DeclarePlayers;
begin
HowManyPlayers := 6;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers); // set arraylength

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Loc :='Forest';
Players[0].Active:=True;

Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Loc :='Forest';
Players[1].Active:=True;

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Loc :='Forest';
Players[2].Active:=True;

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Loc :='Forest';
Players[3].Active:=True;

Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Loc :='Forest';
Players[4].Active:=True;

Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='';
Players[5].Loc :='Forest';
Players[5].Active:=True;
end;


procedure SetupResponder;
Var
Laughing,NoTrade,NoMacro,Greeting,RLvl,Bye,Emote,Boring:Boolean;
begin
Laughing:=True;
NoTrade:=True;
NoMacro:=True;
Greeting:=True;
RLvl:=True;
Bye:=True;
Emote:=True;
Boring:=True;
end;

Procedure MySetup;
begin
DisguiseScar('Windows Media Player');
LoadChars('');
ChatChars:= LoadChars2(AppPath + 'CharsChat2\');
ClearDebug;
DeclarePlayers;
writeln('===================================================');
writeln('===Thank you for choosing omgh4x0rz power cutter===');
writeln('===================================================');
TreeType:=ComboBox1.text;
case ComboBox2.text of
'North': RunDir:='N';
'East': RunDir:='E';
'South': RunDir:='S';
'West': RunDir:='W';
end;
writeln('You will run '+ComboBox2.text);
RunTime:=(StrToInt(Edit1.Text))*60000;
case TreeType of
'Tree' : writeln('You have chosen to cut Regular Trees');
'Oak' : writeln('You have chosen to cut Oak Trees');
'Willow': writeln('You have chosen to cut Willow Trees');
'Maple' : writeln('You have chosen to cut Maple Trees');
'Yew' : writeln('You have chosen to cut Yew Trees');
end;
writeln('==================================================');
end;

procedure PlayerSetup;
begin
FindAxeHeadColor;
SetRun(true);
SetupResponder;
end;



//-----------------------------------------------
/////////////////////////////////////////////////
//Auto Responding
/////////////////////////////////////////////////


Function GetChatMessage(Text: String): Boolean; // Taken from Charms willow chopper
Var
TX, TY: Integer;
Chat: String;
Begin

If(IsTextInAreaEx(40, 415, 130, 415, TX, TY, ':', 0, SmallChars, False, True, 0, 0, 0))then
Begin
Chat:= Lowercase(Trim(GetTextAtEx(TX + 8, 415, 0, SmallChars, False, False, 0, 1, 16711680, 40, False, TR_AllChars)));

If(Pos(Text, Chat) <> 0)then
Begin
Result:= True;
End

End

End;

procedure RandomTalk; //Says Random phrases to seem active
begin
case random(19) of
0: typesend('wc lvls');
1: typesend('so boooring');
2: typesend('mmm, tasty tree bark');
3: typesend('yay almost next lvl');
4: typesend('hi');
5: typesend('grr');
6: typesend('omg');
7: typesend('so slow');
8: typesend('la dee da');
9: typesend('da dee dum');
10:typesend('u like this?');
11:typesend('Be nice to noobs');
12:typesend('i luv noobies');
13:typesend('-Burp-');
14:typesend('do a emote');
15:typesend('i hate pures');
16:typesend('rofl');
17:typesend('lol');
18:typesend('i hate stupid random events');
19:typesend('good ole '+treetype+' trees');
end;
writeln('Random Talking');
end;


procedure Respond;//responds to certain phrases.
var
Skill: array [0..11] of String;
Salutation: array [0..8] of String;
Laugh: array [0..6] of String;
a,Lvl:integer;
Statement:string;
Laughing,NoTrade,NoMacro,Greeting,RLvl,Bye,Emote,Boring:Boolean;

begin
skill[0] := 'attack';
skill[1] := 'defence';
skill[2] := 'strength';
skill[3] := 'hitpoints';
skill[4] := 'range';
skill[5] := 'magic';
skill[6] :='woodcutting';
skill[7] := 'mining';
skill[8] := 'fishing';
skill[9] := 'smithing';
skill[10] := 'crafting';
skill[11] := 'cooking';

Salutation[0] := 'hello';
Salutation[1] := 'hey';
Salutation[2] := 'hi';
Salutation[3] := 'sup';
Salutation[4] := 'whats up';
Salutation[5] := 'hola';
Salutation[6] := 'bonjour';
Salutation[7] := 'yo';
Salutation[8] := Players[CurrentPlayer].Nick;

Laugh[0] := 'lol';
Laugh[1] := 'rofl';
Laugh[2] := 'roflmao';
Laugh[3] := 'lmao';
Laugh[4] := 'haha';
Laugh[5] := 'hehe';
Laugh[6] := 'lmfao';


for a:=0 to 8 Do
if (GetChatMessage(Salutation[a])) then
begin
Statement:=Salutation[a];
if (Greeting=True) then
begin
Greeting:=False;
writeln('responding to greeting '+Statement);
case random(19) of
0: typesend('hey');
1: typesend('sup');
2: typesend('yo');
3: typesend('ey');
4: typesend('hi');
5: typesend('heeelllo');
6: typesend('hello');
6 : typesend('allo allo');
7 : typesend('wat up');
8 : typesend('y0o');
9 : typesend('=P');
10 : typesend('what is up');
11 : typesend('heya');
12 : typesend('howdy');
13 : typesend('bonjour');
14 : typesend('yo yo yo');
15 : typesend('wassuup!');
16 : typesend('im busy');
17 : typesend('cant talk');
18 : typesend('hola');
end;
end;
end;
if (GetChatMessage(Statement)=false) then
begin
Greeting:=True;
end;

if (GetChatMessage('macro')) or //Responds to accusations of macroing
(GetChatMessage('auto'))then
begin
if (NoMacro=True) then
begin
writeln('responding to macroing');
case random(19) of
0: typesend('what');
1: typesend('no way');
2: typesend('am not');
3: typesend('why you think that');
4: typesend('maybe');
5: typesend('me?');
6: typesend('macroing is for nubs');
7: typesend('i eat autoers for breakfast');
8: typesend('thats ridiculous');
9: typesend('nah');
10: typesend('pff');
11: typesend('I hate macroers');
12: typesend('Im macroing!');
13: typesend('Of course!');
14: typesend('You betcha!');
15: typesend('yups...');
16: typesend('duh...:)');
17: typesend('wtf macros');
18: typesend('i hate autoing bitches');
end;
NoMacro:=False;
end;
end else
NoMacro:=True;

if (GetChatMessage('bye')) or //says goodbye
(GetChatMessage('cya'))then
begin
if (Bye=True) then
begin
writeln('saying goodbye');
case random(9) of
0: typesend('bye');
1: typesend('cya');
2: typesend('later');
3: typesend('aurevoir');
4: typesend('ltr');
5: typesend('see you ltr');
6: typesend('see you later');
7: typesend('peace');
8: typesend('peace dude');
end;
Bye:=False;
end;
end else
Bye:=True;

if (GetChatMessage('do')) and //does an emote
(GetChatMessage('emote'))then
begin
if (Emote=True) then
begin
writeln('Doing an emote');
DoEmote(random(22));
end;
Emote:=False;
end else
Emote:=True;

if (GetChatMessage('boring')) or
(GetChatMessage('booring'))or
(GetChatMessage('boooring')) then
begin
if (Boring=True) then
begin
case random(5) of
0: typesend('yea');
1: typesend('yup');
2: typesend('fo sho');
3: typesend('yea, i hate this');
4: typesend('yea it blows');
end;
end;
Boring:=False;
end else
Boring:=True;

if (FindTrade) then //Tells people trying to trade to go away
begin
if (NoTrade=True) then
begin
writeln('responding to a trade');
case random(11) of
0: typesend('what');
1: typesend('nty');
2: typesend('no');
3: typesend('go away');
4: typesend('wat you want nub');
5: typesend('Im busy');
6: typesend('I dont want to trade');
7: typesend('no trades');
8: typesend('cant trade now');
9: typesend('busy');
10: typesend('wats up');
11: typesend('im not trading');
end;
NoTrade:=False;
end;
end else
NoTrade:=True;

for a:=0 to 6 Do
if (GetChatMessage(Laugh[a])) then
begin
Statement:=Laugh[a];
if (Laughing=True) then
begin
Greeting:=False;
writeln('Responding to '+Statement);
case random(14) of
0: typesend('lol');
1: typesend('hehe');
2: typesend('haha');
3: typesend('ha ');
4: typesend('lmao');
5: typesend('hee hee');
6: typesend('lololol');
6 : typesend('lolz');
7 : typesend('rofl');
8 : typesend('=P');
9 : typesend('lmfao');
10: typesend('pff');
11: typesend('lolz0r');
12: typesend('woot!');
13: typesend('wrahahr');
14: typesend('mwahah');
end;
end;
end;
if (GetChatMessage(Statement)=false) then
begin
Laughing:=True;
end;

For a:=0 to 11 Do
if (GetChatMessage(skill[a])) or
(GetChatMessage('wc')) then //responds to basic skill lvl questions
begin
if (GetChatMessage('level')) or
(GetChatMessage('lvl')) then
begin
if (Rlvl=true) then
begin
RLvl:=False;
Lvl:=GetSkillLevel(skill[a]);
typesend(IntToStr(Lvl));
writeln('Answering '+skill[a]+' lvl question.')
end;
end;
end else
RLvl:=True;
end;

//-----------------------------------------------
/////////////////////////////////////////////////
//Other Procedures and Anti-Randoms
/////////////////////////////////////////////////


procedure ClickHuman(x, y : Integer; left : Boolean);
Begin
holdmouse(x, y, left);
wait(random(20) + 15);
releasemouse(x, y, left);
End;

Procedure MyWait(Seconds:Integer);
var
T:Integer;
begin
for T:=1 to (Seconds Div (2)) do
begin
Respond;
CheckHpFirst:= True;
if (FindFight=true) then
begin
RunAwayDirection(RunDir);
Wait(10000);
RunBack;
end;
FindNormalRandoms;
wait(200+random(50));
end;
end;



procedure GetPlayerLoc;
var
Color: array [0..6] of Integer;
f,a:integer;
begin
a:=0;
Color[0]:=2450784;
Color[1]:=3500128;
Color[2]:=3026992;
Color[3]:=3759461;
Color[4]:=866352;
Color[5]:=2774650;
Color[6]:=2174003;

repeat
for f:=0 to 6 Do
begin
if (FindColor(x,y,Color[f],1,1,515,341)) then
begin
MMouse(x,y,10,10);
if (IsUpTextMulti('Chop','hop','down')) then
begin
Players[CurrentPlayer].Loc:='Forest';
break;
end;
end;
end;
a:=a+1;
until (a=4) or (Players[CurrentPlayer].Loc='Forest')
end;

procedure PlayerLogin;
begin
if (not(LoggedIn)) then
begin
LoginPlayer;
end;
PlayerSetup;
MarkTime(PlayerTime);
GetPlayerLoc;
end;

procedure Randoms;
begin
FindHead;
FindEnt(3303512);
Respond;
if (FindFight=true) then
begin
repeat
RunAwayDirection(RunDir);
until (FindFight=false)
FTWait(10+random(5));
RunBack;
end;
FindNormalRandoms;
Respond;
end;

procedure DropItemType(Item:String);//Drops all of the specified items. Modified from SRL DropAllLogs
var
rx, ry, m, n: Integer;
begin
Status('Dropping Logs');
GameTab(4)
begin
for M := 1 to 2 do
begin
for n := 1 to 4 do
begin
rx := 544 + (n * 42)
ry := 192 + (m * 36)
MMouse(rx, ry, 0, 0)
Wait(100 + Random(100));
if (IsUpText(Item)) then
begin
GetMousePos(x, y)
Mouse(x, y, 10, 10, False);
Wait(100 + Random(50));
if (FindText(x,y,'Drop',UpChars, MIX1, MIY1, MIX2, MIY2)) then
begin
Wait(150 + Random(210));
ClickText('Drop',MIX1, MIY1, MIX2, MIY2);
end;
end;
end;
end;
end;
end;
//-----------------------------------------------
/////////////////////////////////////////////////
//Tree finding and chopping
/////////////////////////////////////////////////

function FindTree:Boolean; //finds designated tree
var
Color: array [0..6] of Integer;
f,a:integer;
begin
Color[0]:=2450784;
Color[1]:=3500128;
Color[2]:=3026992;
Color[3]:=3759461;
Color[4]:=866352;
Color[5]:=2774650;
Color[6]:=2174003;
if (Players[CurrentPlayer].Loc='Forest') then
begin
a:=0;
repeat
for f:=0 to 6 Do
begin
FTWait(1);
if (FindColor(x,y,Color[f],1,1,515,341)) then
begin
MMouse(x,y,10,10);
FTWait(1);
Respond;
if (IsUpTextMulti('Chop','hop','down')) then
begin
if (not(FindEnt(3303512))) then
begin
GetMousePos(x,y);
ClickHuman(x,y,False);
MyWait(1);
if (FindText(x, y,treetype, UpChars, 0, 0, 514, 336)) then
begin
Result:=True;
break;
end else
Result:=False;
end;
end;
end;
end;
a:=a+1;
until (a=4) or (Result=True)
end else
begin
NextPlayer(False);
PlayerSetup;
writeln('Switching characters. Your player was not in a forest');
end;
end;

procedure ChopTree; //If a tree is found and it is not an ent. It chops.
begin
if (FindTree=True) then
begin
FTWait(1);
respond;
case random(2) of
0: ClickText('Chop',0, 0, 514, 336);
1: ClickText('down',0, 0, 514, 336);
2: ClickText(treetype,0, 0, 514, 336);
end;
Flag;
FindHead;
end;
end;


Procedure FillBags;// chops designated tree until InvFull. Then drops all logs.
var
i:integer;
begin
repeat
i:=random(20);
RotateEvery(2+random(2));
RandomRClickEvery(3+random(1));
LeaveScreenEvery(1+random(1));
HoverEvery(7+random(2),'woodcutting');
ChopTree;
MyWait(5);
while (GetChatMessage('you get some')) do
begin
Randoms;
MyWait(3);
end;
if (InvFull) then
DropItemType('Logs');
if (i=0) then
RandomTalk;
until (TimeFromMark(PlayerTime)>RunTime)
GetPlayerLoc;
if (Players[CurrentPlayer].Loc='Forest') then
begin
NextPlayer(True);
PlayerLogin;
end else
begin
NextPlayer(False);
PlayerLogin;
end;
end;

//-----------------------------------------------
/////////////////////////////////////////////////
//Main Loop
/////////////////////////////////////////////////
begin
setupSRL;
safeinitform;
SafeShowFormModal;
MySetup;
activateclient;
wait(2000+random(1000));
PlayerLogin;
repeat
FillBags;
until (false)
end.

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

Boreas

2007-02-23 17:34:29

Player switching- check
Anti randoms - check
Standards and general script- good enough but work your standards a bit

Also helpful on forums

Yes from me

Ejjman

2007-02-23 17:36:14

So, I like it ;)

But…The whole MoveHumanMouse isn't needed, use MMouse and Mouse in SRL. My wait is a nice procedure you made, def give you street cred. So, I really like it. I'm going to have to say yes. I look foward to great scripts from u

pwnaz0r

2007-02-23 18:02:24

Yeah it looks pretty good im going to give it a yes

YoHoJo

2007-02-23 21:27:41

Id get rid of that massive auto respoindg.
Its stupid and unnecessary.
Other than that everything looks ifne

omgh4x0rz

2007-02-23 22:09:15

I thought it was useful :(

Thanks everyone who has responded so far.

YoHoJo

2007-02-23 23:03:37

Sorry im a tough grader.
I just have things against talking procedures like that.
I think they are retarded :p
Just be happy i voted yes :P

Pentti

2007-02-24 03:11:01

Ok for me-Yes from me! :D

eddie

2007-02-24 05:11:20

Good work. You are quite helpful on the forums too.Yes!

Dark_Sniper

2007-02-24 11:37:32

From: yohojo8
Sorry im a tough grader.
I just have things against talking procedures like that.
I think they are retarded :p
Just be happy i voted yes :P



just so you know yohojo never votes ys… and if i do not like them in the least bit i do not vote… if they show nubness i vote no… but in your case you get a yes looks good i am going to look into the script a lil bit farther though :).

Boreas

2007-02-24 11:44:53

I'm also fairly tough, not quite as tough as yohojo though. So good job.

edit didnt want to make an offtopic only post
From: omgh4x0rz
Nice job getting upgraded to SRL dev Boreas.


thanks

omgh4x0rz

2007-02-24 15:49:16

I am thankful to everyone, don't worry yohojo :p

Nice job getting upgraded to SRL dev Boreas.

Edit: Anyone know when I get the magic-wand waved?

Flyboy

2007-03-09 18:09:25

In. Welcome aboard.