Stanger
2012-05-22 18:35:06
How Long have You Played Runescape?
4 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Html,Javascript,css,Pascal.
Are you a member of any other communities?
No.
Tell us about yourself…
Please show us one (or multiple) of your scripts.
4 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Html,Javascript,css,Pascal.
Are you a member of any other communities?
No.
Tell us about yourself…
From: Stanger
I am Mark Vlaar, I'm 16 year old and since I got programming lessons on school I want to create my own game. When I found this site I want first to create my own bot because I am interesting in programming. My interest are sports, gaming and going out. I want to learn more about programming bots but It is very difficoult for a starting programmer. As I don't have alot of patience I keep trying get my bot running. Sometimes till very late in the night.
Please show us one (or multiple) of your scripts.
I have spent about 50 hours in this little script. this is my first one and I don't get any further then walking in the dungeon:(
program AirOrb;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$IFDEF SMART}
{$i srl/srl/misc/paintsmart.simba}
{$ENDIF}
const
BankCol = 0 ;
BankRow = 0 ;
DebugMode = True;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
Nick := '';
Active := True;
Member := True;
Strings[0] := 'Unpowered Orb';
end;
end;
var
x, y : Integer;
aFound: Extended;
MyPath:TPointArray;
procedure Debug(S: String);
begin
if DebugMode then
Writeln(S);
Status(S);
end;
procedure Antiban;
begin
if not LoggedIn or FindNormalRandoms then
Exit;
case Random(250) Of
0: begin Debug('Antiban'); GameTab(tab_Stats); HoverSkill('Magic', False); Wait(1500 + Random(500)); GameTab(tab_Inv); Wait(1000 + Random(500)); end;
1: begin Debug('Antiban'); GameTab(tab_Stats); HoverSkill('Magic', False); Wait(1500 + Random(500)); GameTab(tab_Inv); Wait(1000 + Random(500)); end;
2: begin Debug('Antiban'); PickUpMouse; Wait(1500 + Random(500)); end;
3: begin Debug('Antiban'); ExamineInv; Wait(1500 + Random(500)); end;
4: begin Debug('Antiban'); GameTab(tab_Stats); HoverSkill('Random', False); Wait(1500 + Random(500)); GameTab(tab_Inv); Wait(1000 + Random(500)); end;
end;
end;
function UpText: String;
begin
case (Players[CurrentPlayer].Strings[0]) of
'Unpowered Orb': Result := 'orb';
end;
end;
procedure LogoutProcess(s: String; b: Boolean);
begin
Debug(s);
Players[CurrentPlayer].Active := False;
Players[CurrentPlayer].Loc := s;
if b then
CloseWindow;
Logout;
Disguise('Logged out: ' + s);
end;
procedure Bank;
var
p, t, i: Integer;
begin
Antiban;
t := 0;
repeat
Inc(t);
Debug('Attempting to open bank. Attempt: ' + IntToStr(t));
MakeCompass('n');
Wait(RandomRange(500, 1000));
if not OpenBankNPC then
OpenBank(Players[CurrentPlayer].Strings[1], False, True);
Wait(1000);
until BankScreen or PinScreen or (t = 5);
if PinScreen then
begin
p := 0;
repeat
InPin(Players[CurrentPlayer].Pin);
Inc(p);
until BankScreen or (p = 5) or not LoggedIn;
end;
if (t = 5) or (p = 5) then
begin
LogoutProcess('Failed to open bank.', False);
Exit;
end;
if BankScreen then
begin
Debug('Bank opened...');
Wait(RandomRange(500, 1000));
FixBankTab;
FixBank;
i := 0;
repeat
Debug('Withdrawing...');
MouseBankSlot(RandomRange(2, 5), mouse_move);
Wait(RandomRange(500, 1000));
Inc(i);
until WithdrawEx(BankCol, BankRow, 27, [UpText]) or (i = 15)
if (i = 15) then
begin
LogoutProcess('Out of material.', True);
Exit;
end;
Wait(RandomRange(500, 1000));
CloseBank;
end;
end;
procedure Walk;
begin
Debug('Walking...');
SPS_Setup(RUNESCAPE_SURFACE,['10_6']);
myPath := [Point(4214, 2686), Point(4203, 2685),
Point(4190, 2687), Point(4190, 2700),
Point(4199, 2707), Point(4207, 2717), Point(4211, 2735),
Point(4212, 2744), Point(4214, 2760), Point(4219, 2769)];
SPS_WalkPath(myPath);
Wait(RandomRange(500, 1000));
end;
procedure Walk1;
begin
Debug('Walking1...');
SPS_Setup(RUNESCAPE_SURFACE,['0_6']);
myPath := [Point(78, 128), Point(78, 124), Point(79, 120), Point(78, 114), Point(77, 110)];
SPS_WalkPath(myPath);
Wait(RandomRange(500, 1000));
end;
function FindTrap(var x, y : Integer) : Boolean;
var
a : Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
tmpCTS : Integer;
Box : TBox;
begin
Debug('Finding Trapdoor');
if(not(LoggedIn))then Exit;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.14, 0.21);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3423299, MSX1, MSY1, MSX2, MSY2, 4);
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 15, 15);
for a := 0 to High(ATPA) do
begin
MP := MiddleTPA(ATPA[a]);
Box := IntToBox((MP.X - 20), (MP.Y - 20), (MP.X + 20), (MP.Y + 20));
{$IFDEF SMART}
SMART_DrawBoxEx(True, Box, clYellow);
{$ENDIF}
MMouse(MP.X, MP.Y, 4, 4);
if(WaitUpText('rapd', 750))then
begin
x := MP.X; y := MP.Y;
Result := True;
{$IFDEF SMART}
SMART_ClearCanvas;
{$ENDIF}
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
procedure Opentrap();
var
x, y : Integer;
Box : TBox;
begin
Debug('Open trapdoor...');
Wait(RandomRange(500, 1000));
if(not(LoggedIn))then Exit;
Box := IntToBox(MSCX - 10, MSCY - 25, MSCX + 15, MSCY + 15);
repeat
if(not(FindNormalRandoms))then
begin
if(FindTrap(x, y))then
begin
Wait(RandomRange(500, 700));
Mouse(x, y, 2, 2, mouse_Left);
Wait(RandomRange(200, 600));
while(Animating(Box, 750, 25))do
begin
AntiBan;
Wait(RandomRange(200, 500));
end;
end else
Exit;
end;
until(not FindTrap(x, y))
end;
procedure SetupPlayer;
begin
Debug('Player setup...');
SetAngle(SRL_ANGLE_HIGH);
GameTab(tab_Inv);
SetChat('all', 0);
Disguise('FM: ' + Players[CurrentPlayer].Nick);
end;
procedure ScriptStart;
begin
ClearDebug;
Debug('SMART & SRL Loading...');
Smart_Server := 22;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
AddOnTerminate('EndOfScript');
DeclarePlayers;
MouseSpeed := 18;
LoginPlayer;
Wait(4000);
SetupPlayer;
end;
procedure MainLoop;
begin
ScriptStart;
if LoggedIn then
repeat
//Bank();
Walk();
Opentrap();
Walk1();
until(AllPlayersInactive);
end;
begin
MainLoop;
end.