SRL Archive - Archive

Mylesmadness - SRL Member Application Form


MylesMadness

2007-11-24 12:37:49

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

What is the meaning to life?


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


Programming Knowledge
A tiny but of html

Other Communitys
http://www.kyab.asssoft.org/

How Long have You Played Runescape
2 Years

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

Hey all,
I've been player runescape for 2 years but i started autoing about 6 months ago. I applied with a bad script and got declined but I didn't want to give up. I started this script then I saw kyab and joined there. I wanted to become a member there so I changed this script to kyab and I got in. Now I wanted to become a member her so I changed this script back to srl and added some more stuff. So here it is!

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

{=========================================================================]
[ NAME : MEM ]
[ WRITER : MylesMadness ]
[ CATEGORY : Mineing ]
[ DESCRIPTION : Mines Iron and Banks It ]
[ USAGE : Start In Varock East Bank ]
[ AUTOCOLOR : Yes ]
[ NOTES : Pick must be in inventory ]
[=========================================================================]
[ Instructions. ]
[=========================================================================]
[ 1. USE Runescape with Low Detail, Very Bright. ]
[ 2. Set your Screen to 32 bit TRUE color. ]
[ 3. Set Playernames and Passwords in DeclarePlayers. ]
[ 4. Start script Logged In! ]
[=========================================================================}
program MEM;
{.include srl/srl.scar}
{.include srl\srl\skill\Mining.scar}

var
x, y, Ax, Ay, Mined, loads, IronOre, Item: integer;
EndForm: Boolean;
Form1: TForm;
Player, Start: TButton;

procedure DtmsAndBitmaps;
begin
IronOre := DTMFromString('78DA6314616060106640038C482490660712A' +
'204D408000945026AE481840C0135AA40828F801A2920C141400D' +
'C85FECF8D50000ACCF0135');
end;

procedure SetPlayers(Sender: TObject);
begin
SRLPlayerForm(True, [], ['Loads'], [], [])
end;

procedure StartTheScipt(Sender: TObject);
begin
form1.Caption := form1.Caption + '.';
form1.ModalResult := mrOk;
end;

// When the form is closed, this code will be executed.

procedure FormOnClose(Sender: TObject; var Action: TCloseAction);
begin
if (not (Form1.ModalResult = 1)) then
EndForm := True;
end;

// This form was parsed using: DFM Form Parser v.25 by Ron.

procedure Form;
begin
Form1 := CreateForm;
with Form1 do
begin
OnClose := @FormOnClose;
Position := poScreenCenter;
BorderStyle := bsSingle;
BorderIcons := [biMinimize, biSystemMenu];
ClientWidth := 267;
ClientHeight := 43;
Caption := 'MEM - By Mylesmadness';
Color := clBtnFace;
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'Tahoma';
Font.Style := [];
PixelsPerInch := 96;
end;
Player := TButton.Create(Form1);
with Player do
begin
Parent := Form1;
Left := 0;
Top := 0;
Width := 129;
Height := 41;
Caption := 'Player Form';
TabOrder := 0;
Onclick := @SetPlayers
end;
Start := TButton.Create(Form1);
with Start do
begin
Parent := Form1;
Left := 136;
Top := 0;
Width := 129;
Height := 41;
Caption := 'Start';
TabOrder := 1;
Onclick := @StartTheScipt
end;
end;

procedure SafeForm;
var
V: TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('Form', V);
end;

procedure ShowFormModal;
begin
Form1.ShowModal;
end;

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

procedure MainForm;
begin
SafeForm;
SafeShowFormModal;
FreeForm(Form1);
end;

procedure LoadForm;
begin
ClearDebug;
GetSelf.WindowState := wsMinimized;
MainForm;
GetSelf.WindowState := wsNormal;
if (EndForm) then
TerminateScript;
end;

procedure NoBan;
begin
if (not (LoggedIn)) then
Exit;
case Random(50) of

0: begin
HoverSkill('Mining', false);
wait(1500 + Random(500));
end;
1: begin
HoverSkill('random', false);
wait(1500 + Random(500));
GameTab(4);
end;
2: PickUpMouse;
3: AlmostLogOut;
4: RandomRClick;
5: begin
case random(5) of
0: TypeSend('Whats up?');
1: TypeSend('Mining lvls?');
2: TypeSend('Mine levels?');
3: TypeSend('Sup?');
end;
end;
6: begin
MakeCompass('N');
wait(10 + random(5));
MakeCompass('S');
wait(10 + random(5));
MakeCompass('N');
end;
7: begin
LowestAngle;
wait(10 + random(10));
HighestAngle;
end;
8: GameTab(Random(14) + 1)
9: begin
LowestAngle;
wait(10 + random(5));
Makecompass('E')
wait(10 + random(5));
HighestAngle;
wait(10 + random(5));
Makecompass('S')
wait(10 + random(5));
lowestAngle;
wait(10 + random(5));
Makecompass('W')
wait(10 + random(5));
HighestAngle;
wait(10 + random(5));
Makecompass('N')
wait(10 + random(5));
end;
end;
end;

function CheckActive: Boolean;
var
Active: integer;
begin
for Active := 0 to HowManyPlayers - 1 do
begin
if (Players[Active].Active = True) then
Result := True;
if (result) then
Exit;
end;
end;

procedure Changeplayer;
begin
loads := 0;
NextPlayer(LoggedIn)
end;

Procedure WalkMine;
begin
if (not (LoggedIn)) then
Exit;
makecompass('s')
highestangle;
RadialRoadWalk(FindVarrockRoadColor, 90, 30, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 70, 110, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 165, 125, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 160, 190, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 180, 210, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 165, 200, 70, 2, 2);
Mouse(602, 129, 6, 6, True)
Flag;
if (findSymbol(x, y, 'mining site')) then
begin
writeln('Found the mine')
end
else
begin
writeln('We are lost. Logging out')
Logout;
end;
end;

Procedure WalkBank;
begin
if (not (LoggedIn)) then
Exit;
makecompass('n')
RadialRoadWalk(FindVarrockRoadColor, 0, 20, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 330, 360, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 355, 325, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 330, 300, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 285, 260, 70, 2, 2);
mouse(582, 113, 2, 2, true)
flag;
end;

procedure Bankit;
begin
if (not (LoggedIn)) then
Exit;
If(findbank('veb')) then
if FindDTM(x, y, IronOre, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 3, 3, false)
chooseoption('tore')
Mined := Mined + 28
CloseBank;
end
else
begin
logout;
end;
end;

procedure HitRock;
var
trys: integer;
begin
if (not (LoggedIn)) then
Exit;
repeat
if (FindObjCustom(x, y, ['Mine'], [2832993], 6)) then
begin
Mouse(x, y, 1, 1, True);
exit;
end
else
begin
Inc(trys)
end;
until (trys > 5)
Writeln('I Think were lost. Logging out')
Logout;
end;

Procedure DoAntiGasStuff;
begin
if (not (LoggedIn)) then
Exit;
if GasFound(Ax, Ay) then
Mouse(628, 83, 7, 8, True)
flag;
GameTab(5)
if findcolor(x, y, hc1, MIX1, MIY1, MIX2, MIY2) and findcolor(x, y, hc2, MIX1, MIY1, MIX2, MIY2) and findcolor(x, y, hc3, MIX1, MIY1, MIX2, MIY2) and findcolor(x, y, hc4, MIX1, MIY1, MIX2, MIY2) and findcolor(x, y, hc5, MIX1, MIY1, MIX2, MIY2) then
begin
Writeln('We avoided the gas')
end
else
begin
Writeln('We Lost The Pick :( Logging out')
Logout;
end;
end;

procedure Mine1;
var
MineTime: integer;
begin
if (not (LoggedIn)) then
Exit;
repeat
HitRock;
MarkTime(MineTime)
Item := Item + 1
DoAntiGasStuff
FindNormalRandoms
repeat
NoBan;
until ExistsItem(Item) or (TimeFromMark(MineTime) > 5000)
until (invfull)
Item := 1
end;

begin
Loadform;
setupsrl;
ActivateClient;
FindPickHeadColor;
repeat
repeat
WalkBank;
walkMine;
Mine1;
WalkBank;
Bankit;
until (not (LoggedIn) or (Players[CurrentPlayer].Integers[0] = Loads))
Changeplayer;
until (not (CheckActive))
FreeDtm(IronOre)
end.

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

n3ss3s

2007-11-24 12:54:09

Hmm….

a)

DO NOT use NextPlayer inside procedures, do it in start or end of mainloop.
In start of every procedure have If Not LoggedIn Then Exit so when you logout because of something unexpected, it skips all the procs until it reaches the NextPlayer.

b)
Maybe a little improvement to your checking if avoided gas by pick, first find one color and then find the others around it.

c) Must have a lot failsafes, your walking is very "unsafe", what if one of the radialwalks fails?

Good try though, read some tutorials about

*DDTMs / DTMs
*Learn to use failsafes when walking
*Failsafes
*Some more failsafes
*Oh and failsafes
*Try to make a complex advanced script that utilizes SRL multiplayer well.

Failsafes are one of the corner stones of scripting.

GoF

2007-11-24 13:05:02

Failsafes… I don't see too many there.. I think it's a no.

MylesMadness

2007-11-24 13:06:15

Ok I fixed the first one. I really tried to use ddtms somewhere because I know them I just couldn't find somewhere to use them. If my walking fails it logs out and uses next player.

[-jesus-]

2007-11-24 13:09:21

Procedure WalkMine;
begin
if (not (LoggedIn)) then
Exit;
makecompass('s')
highestangle;
RadialRoadWalk(FindVarrockRoadColor, 90, 30, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 70, 110, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 165, 125, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 160, 190, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 180, 210, 70, 2, 2);
RadialRoadWalk(FindVarrockRoadColor, 165, 200, 70, 2, 2);
Mouse(602, 129, 6, 6, True)
Flag;
if (findSymbol(x, y, 'mining site')) then
begin
writeln('Found the mine')
end
else
begin
writeln('We are lost. Logging out')
Logout;
end;
end;

Won't that just click each radial walk in a row w/o waiting… you need FFlag();, or Flag;… or no..:confused:

MylesMadness

2007-11-24 13:13:43

[-jesus-], Radial walk has a flag; already.

[-jesus-]

2007-11-24 13:36:27

From: Mylesmadness
[-jesus-], Radial walk has a flag; already.


:duh: srry

P1nky

2007-11-26 13:00:20

like i always say to others scripters never use typesend =S unless its a autotyper…..

im going to hold this vote =) GL

n3ss3s

2007-11-26 13:05:23

Seriously, what is wrong with typesend?

P1nky

2007-11-26 17:09:56

i pmed you what i mean.. =S

Santa_Clause

2007-11-26 22:51:38

What the? Since when did RadialWalk have Flag in it?

RAM

2007-11-27 21:10:33

From: Santa_Clause
What the? Since when did RadialWalk have Flag in it?


{*******************************************************************************
function RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
By: WT-Fakawi & Wizzup?
Description: Walks TheColor from StartRadial to EndRadial for Radius Distance
Valid Arguments:
TheColor:= Any Color, but Road- or WaterColor will do fine :)
StartRadial/EndRadial := Any number between 0-1440. 0=N,90=E,180=S,270=W. DO NOT USE NUMBERS UNDER 0 or ABOVE 1440
Radius:= Distance from the centre of minimap, i.e. how far away the mouse clicks. Use numbers 20-72
XMod, YMod := deviation from MouseFindFlag. -2 to 2.
*******************************************************************************}

function RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius:
Integer; Xmod, Ymod: Integer): Boolean;
var
mx, my: Integer;
begin
if (StartRadial = EndRadial) then
begin
WriteLn('WARNING: Using LinearRalk, StarRadial, and EndRadial are the same');
if LinearRoadWalk(TheColor, StartRadial, Radius, XMod, YMod) then
Result := True;
end else
if (radialwalkex(mx, my, 648, 83, thecolor, 0, startradial, endradial, radius)) then
begin
MouseFindNoFlag(mx, my, Xmod, Ymod);
Result := True;
FFlag(10);
end;
end;


:)

Santa_Clause

2007-11-29 05:04:35

FFlag(10), that waits until the distance between player and flag is 10 pixels, not too efficient since I always use FFlag(0)…

n3ss3s

2007-11-29 11:47:21

Umm Flag = FFlag(0)…

Though typing a wait after flag looks gayer than Mr.Garrison is…

YoHoJo

2007-12-05 19:33:41

Poll Expired.
0 Yes
8 No
Please read all of your feedback and try again later.