Sandstorm
2009-02-15 15:44:00
Sandstorm - SRL Member Application Form
Sandstorm
Sandstorm
What is the meaning to life?
42
Where you Referred to SRL? If yes, by whom?
No.
Programming Knowledge
SCAR.
Other Communitys
My clan forums. Sythe, occasionally, RSBot.
How Long have You Played Runescape
6 years.
Are you affilated in anyway with Jagex LTD?
No
Please write down a paragraph about Yourself.
Many of you know me, but for those who don't, I would just like to point this
topic out to you:
http://www.srl-forums.com/forum/showthread.php?t=40442
I'm not going to say much, but I'll give a brief background:
I found SCAR about 4 years ago, and sometime in 2006 I found the SRL forums. It was about a month or two after joining the SRL forums that I seriously started to think about learning to script. I made a few shaky scripts, including the Duel arena trainer (of which a very upgraded version you will find in my application), and a 46 line karamja powerfisher. After I got members, I started on a Rogue's Den thiever, but failed miserably and didn't script much after that. In the end, I went out with a bang due to greediness and lack of empathy. I won't go into detail, but it consisted of me stealing a bunch of items from Paul23. It's been about a year and 3-4 months since then, and I've learned my lesson. I've progressed in scripting since then enormously (or at least I think so), which is odd because I didn't script much.
Wow… I just realized I type a whole paragraph. So much for a brief background :/.
Since I know there's no box for the meaning of life, the answer is 42.
Please Post a Sample of your Work. Only SCAR Scripts Accepted
I've got two. One is reflection, one is color. Couldn't decide which one to use :/.
My reflection script:
{.Script Info:
# ScriptName = Soul Wars!
# Author = Sandstorm. Joker is working on it with me, but has not released
any material for this script thus far.
# Description = Walks into Soul Wars game walks to an afk spot,
Desc. Cont. = sits and antibans until it's outside. Repeats
# Version = 0.5 Light.
# Date = February 15th, 2009.
# Comments = Err... None.
/Script Info
Credits:
Naum and ManFromCzech for their ever so useful NAIRI include.
05hartor for letting me borrow his account to develop the script on.
}
Program New;
{.Include SRL\SRL\Misc\Smart.Scar}
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\Reflection\Reflection.Scar}
{.include SRL\SRL\core\AntiRandoms\Mime.scar}
{.include SRL\SRL\core\AntiRandoms\Mordaut.scar}
{.include SRL\SRL\core\AntiRandoms\ScapeRune.scar}
Const
ChanceToAntiban = 350; //Higher is less often.
WhichWorld = 3; //Which place is your world favorited to? First place = 1, second = 2.
//If you only have one world favorited, put one, it will compensate.
//If you don't want to use it, put zero. If you don't have a world favorited,
//leave it. It will compensate.
Var
TeamString, Team : String;
Chances, TeamInteger : Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := ''; // 3-4 letters of username
Players[0].Active := True; // Is the player active?
Players[0].Strings[0] := 'saradomin'; //Which team? Zamorak, or Saradomin)
Players[0].Integers[0] := 10; //How many games to play before switching?
//Ignore Player Integer right now, it doesn't function properly!
{Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := ''; // 3-4 letters of username
Players[1].Active := True; // Is the player active?
Players[1].Strings[0] := ''; //Which team? Zamorak, or Saradomin
Players[1].Integers[0] = 10; //How many games to play before switching?
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := ''; // 3-4 letters of username
Players[2].Strings := True; // Is the player active?
Players[2].Integers[0] := ''; //Which team? Zamorak, or Saradomin
Players[2].Integers[0] = 10; //How many games to play before switching?}
end;
procedure SetupSmart;
begin
SmartSetupEx(144, True, true, false);
while not SmartActive do wait(100);
SetTargetDC(SmartGetDC);
end;
Procedure NAIRIRandoms;
Begin
If InMimeRandom Then SolveMime;
If InScapeRune Then SolvePete;
If InMordautRandom Then SolveMordaut
Else
Exit;
End;
Function AntiBan(Chance : Integer) : Boolean;
var
x, y : Integer;
Begin
If Not (LoggedIn) Then
Exit;
Case random(Chance) Of
0: begin
PickUpMouse;
Result := True;
end;
1: begin
Result := True;
GameTab(1 + Random(12));
end;
2: begin
Result := True;
RandomRclick;
end;
3: begin
Result := True;
randomMovement;
end;
4: begin
Result := True;
MMouse(Random(MSX2), Random(MSY2), Random(MSX2), Random(MSY2));
end;
5: Begin
HoverSkill('random', false);
sleepandmovemouse(200 + Random(100));
gametab(4);
MMouse(Random(MSY1), Random(MSX1), Random(MSX2), Random(MSY2));
End;
6:
Begin
GameTab(1 + Random(13));
wait(1000 + Random(600));
Result := True;
End;
7:
Begin
HoverSkill('random', false);
sleepandmovemouse(200 + Random(100));
Result := True;
End;
8: begin
Result := True;
MMouse(x, y, (10 + random(350)), (10 + random(200)));
end;
9: begin
Result := True;
MMouse(Random(MSX2), Random(MSY2), Random(MSX2), Random(MSY2));
end;
End;
End;
Procedure DoAntiBans;
Begin
If Antiban(Chances) Then
begin
Chances := ChanceToAntiban;
end Else
Chances := Chances - randomrange(1, 5);
End;
Function DidIDie : Integer;
Begin
Result := 0;
If PointInBox(GetMyPos, IntToBox(1816, 3220, 1823, 3230)) Then //Working
Result := 1;
if PointInBox(GetMyPos, IntToBox(1841, 3217, 1843, 3219)) then //Working
Result := 2;
if PointInBox(GetMyPos, IntToBox(1932, 3244, 1934, 3246)) then //Working
Result := 3;
if PointInBox(GetMyPos, IntToBox(1951, 3234, 1958, 3244)) then //Working
Result := 4;
End;
Function InWaitingRoom(Team : String) : Boolean;
Begin
Case Lowercase(Team) of
'zamorak' : Result := PointInBox(GetMyPos, IntToBox(1900, 3157, 1909, 3166)); //Working
'saradomin': Result := PointInBox(GetMyPos, IntToBox(1871, 3159, 1879, 3166)); //Working
End;
End;
Function InAWaitingRoom : Boolean;
Begin
Result := InWaitingRoom('saradomin') or InWaitingRoom('zamorak');
End;
Function OutOfGame : Boolean;
Begin
Result := TileOnMM(Point(1899, 3162)) or TileOnMM(Point(1880, 3162));
End;
Procedure ToPortal(Portal : Integer); //1 for Zamorak, 2 for Saradomin.
Begin
If Not OutOfGame Then
Exit;
Case Portal Of
1 : Begin
If Not TileOnMM(Point(1899, 3162)) then
WalkToTile(Point(1890, 3164), 2, 1);
WalkToTile(Point(1899, 3162), 2, 1);
End;
2 : Begin
If Not TileOnMM(Point(1880, 3162)) then
WalkToTile(Point(1890, 3164), 2, 1);
WalkToTile(Point(1880, 3162), 2, 1);
End;
End;
End;
Procedure HandleChat;
Var
x, y : Integer;
Begin
While FindText(x, y, 'lease wait', npcChars, MCX1, MCY1, MCX2, MCY2) Do
Wait(750);
ClickText('nter waiting area', npcChars, MCX1, MCY1, MCX2, MCY2, true);
End;
Procedure EnterPortal(Portal : Integer); //1 for Zamorak, 2 for Saradomin.
Var
P : Tpoint;
X, Y : Integer;
C : TMe;
Begin
If InWaitingRoom('saradomin') or InWaitingRoom('zamorak') then
Exit;
Case Portal OF
1 : Begin
MakeCompass('e');
If ClickToContinue then
HandleChat;
If Not TileOnMS(Point(1900, 3162), 0) then
ToPortal(1);
C := GetMe;
If C.Speed = 0 Then
Begin
P := TileToMSEx(Tile(1900, 3162), 5);
MMouse(P.x, P.y, 3, 3);
Wait(500);
If IsUpText('ed barr') Then
Begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
End;
If ClickToContinue then
HandleChat;
If ClickToContinue then
HandleChat;
End;
End;
2 : Begin
MakeCompass('w');
If ClickToContinue then
HandleChat;
If Not TileOnMS(Point(1879, 3162), 0) then
ToPortal(2);
C := GetMe;
If C.Speed = 0 Then
Begin
P := TileToMSEx(Tile(1879, 3162), 5);
MMouse(P.x, P.y, 3, 3);
Wait(500);
If IsUpText('lue barr') Then
Begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
End;
If ClickToContinue then
HandleChat;
If ClickToContinue then
HandleChat;
End;
End;
End;
End;
Procedure SolveWest;
Begin
End;
Procedure SolveEast;
Begin
End;
Procedure HandleRoom(Team2 : string);
Var
P : Tpoint;
x, y, T : Integer;
Begin
T := DidIDie;
If not InRange(T, 0, 5) Then
Exit;
If InRange(T, 2, 3) Then
begin
If not T <> 2 Then
SolveWest
Else
If not T <> 3 Then
SolveEast;
end;
Case lowercase(Team2) Of
'zamorak' : Begin
If not T <> 4 Then
Begin
MakeCompass('E');
if WalkToTile(Point(1958, 3239), 0, 0) then
begin
Wait(1500);
P := TileToMS(Point(1959, 3239), 3);
MMouse(P.x, P.y, 3, 3);
Wait(250);
GetMousePos(x, y);
If IsUpText('ass Red') Then
Mouse(x, y, 0, 0, true);
FFlag(0);
End;
End;
End;
'saradomin' : Begin
If T = 1 Then
Begin
Wait(500);
MakeCompass('W');
if WalkToTile(Point(1816, 3224), 0, 0) then
begin
Wait(1500);
P := TileToMSEx(Tile(1816, 3226), 3);
MMouse(P.x, P.y - 30, 3, 3);
Wait(250);
GetMousePos(x, y);
If IsUpText('ass Blue') Then
Mouse(x, y, 0, 0, true);
FFlag(0);
end;
End;
End;
End;
End;
{*******************************************************************************
Procedure FavWorld(Which : Integer);
By: Sandstorm
Description: Chooses one of the two worlds you have favorited.
*******************************************************************************}
Procedure FavWorld(Which : Integer);
Var
XCo, YCo : Integer;
Begin
If LoggedIn Then
Exit;
Case Which Of
1 : Begin
If GetColor(429, 264) = 1648224 Then
XCo := 388
Else
XCo := 410;
YCo := 266;
If GetColor(XCo, YCo) = 1648224 Then
Mouse(XCo + Random(5), YCo, 3, 3, True)
Else
WriteLn('You don''t have a world favorited there!');
End;
2 : If GetColor(429, 264) = 1648224 Then
Mouse(435, 264, 3, 3, True)
Else
WriteLn('You don''t have a world favorited there!');
End;
End;
Function InAfkSpot(Team : Integer) : Boolean;
Begin
Case Team Of
4 : Result := PointInBox(GetMyPos, IntToBox(1959, 3234, 1959, 3236));
1 : Result := PointInBox(GetMyPos, IntToBox(1815, 3228, 1815, 3230));
End;
End;
Procedure SwitchPlayers(Active : Boolean);
Begin
NextPlayer(active)
Team := Players[currentplayer].Strings[0];
End;
Procedure Mainloop;
Var
T : Boolean;
X : String;
Mark : Integer;
Begin
MarkTime(Mark);
ClearDebug;
If Not LoggedIn Then
LoginPlayer;
Team := Players[currentplayer].Strings[0];
T := False;
X := Lowercase(Team);
Repeat
X := Lowercase(Team);
TeamString := Lowercase(X);
If OutOfGame Then
Begin
FindNormalRandoms;
NAIRIRandoms;
TeamString := X;
If TeamInteger = 0 Then
Case TeamString Of
'saradomin' : TeamInteger := 1;
'zamorak' : TeamInteger := 4;
End;
If OutOfGame and not InAWaitingRoom Then
Begin
Case X Of
'zamorak' : EnterPortal(1);
'saradomin' : EnterPortal(2);
End;
End;
End;
If not TeamInteger <> 0 Then
Case TeamString Of
'saradomin' : TeamInteger := 1;
'zamorak' : TeamInteger := 4;
End;
While InAWaitingRoom Do
Begin
Wait(500);
DoAntiBans;
End;
If Not (DidIDie = TeamInteger) = T Then
T := DidIDie = TeamInteger;
If Not OutOfGame and not InAWaitingRoom and T Then
Begin
HandleRoom(TeamString);
HandleChat;
End;
If Not (DidIDie = TeamInteger) = T Then
T := DidIDie = TeamInteger;
If Not OutOfGame and not InAWaitingRoom and not T and not InAfkSpot(TeamInteger) Then
Begin
Case TeamString Of
'saradomin' : WalkToTile(Point(1815, 3230), 1, 0);
'zamorak' : WalkToTile(Point(1959, 3234), 1, 0);
End;
End;
While (not OutOfGame) and (not InAWaitingRoom) and (T = false) and (InAfkSpot(TeamInteger)) Do
Begin
DoAntiBans;
Wait(500);
If Not (DidIDie = TeamInteger) = T Then
T := (DidIDie = TeamInteger);
End;
TeamInteger := 0;
Until(AllPlayersInactive)
End;
Begin
SetupSrl;
SetupSmart;
DeclarePlayers;
FavWorld(WhichWorld);
If Not LoggedIn Then
LoginPlayer;
Repeat
MainLoop;
Until(AllPlayersInactive)
End.And my color script:
{.Script Info:
# ScriptName = Sandstorm's Auto Dueler
# Author = Sandstorm
# Description = Auto accepts and waits until duel is over
# Version = 1.81
# Date = Dec, 17th, 2007 (initial release, remake: November 29, 2008)
# Comments = Err... None.
/Script Info
Credits:
Camo Kyle for doing just about everything that we could think
of to help. He's spent much of his free time in the past few weeks
helping me, and I don't think I could have made this script function as
well as it does without him helping me and commenting on what I could do
to make it better.
N1ke! for his UseSpecial function.
Narcle for his SpecialPercent function.
Thanks to Floor66 for his UpdateScript function. Not working for some reason.
Thanks Camo Kyle and Floor66 for the PostReport function.
Really helpful, no more leeching :).
~~Joker~~ for his AntiBan procedure. Changed it a bit.}
Program DuelTrainer;
{.Include SRL\SRL\Misc\Smart.Scar}
{.include SRL/SRL.scar}
{.include srl/srl/skill/Prayer.scar}
{.include SRL/SRL/Misc/users.scar}
{.Include SRL\SRL\Reflection\Reflection.Scar}
Const
AllowArmorOff = False; //Allow other people to turn armor off?
AllowRuleChange = False; //Allow other people to turn on/off rules?
Multiplayer = True; //Use more then one player? IMPORTANT TO FILL OUT.
Lag = True; //Do you lag? Increases waittimes if so.
AddToWaits = -500; //How much to add to the waits, if Lag = true.
ChanceToAntiBan = 50; //Higher the less antiban.
SRLStatsID = ''; // Your stats id
SRLStatsPass = ''; // Your stats password
CurrentVersion = '1.81'; // DO NOT TOUCH THIS!
ForumsName = 'Sandstorm'; //Used in progress report. Not 100% needed though.
Members = True; //Are you a member?
Type
SandWaitParam = function : boolean;
Var
x, y, wins, lost, duels, chances, marking : Integer;
lagwait, denied, dtm, duels2, CurrentDuels : Integer;
CurrentWins, CurrentLosses, Currentdenied : Integer;
CurrentNbr, Antibanz : Integer;
First : Boolean;
Paramater : SandWaitParam;
Array1 : Array of String;
Array2 : Array of Integer;
procedure DeclarePlayers;
begin
SRLPlayerForm(True, ['Use special attack?', 'Use prayer?', 'Switch weapons for special attacking?', 'Use defensive prayer? Only needed if your ranging.'], ['How many duels before switching players?', 'How much of your special bar is used when you special? Round down (25% = 20%).', 'Which prayer set to use?', 'How many special attacks can you do?'], [], []);
End;
function PostReport(ScriptName, Website, Proggy : String): Boolean; Forward;
Procedure ProgressReporting; Forward;
Procedure ScriptTerminate;
Begin
If TimeFromMark(Marking) >= 300000 Then
ProgressReporting;
If Not GetDebugText = '' Then
PostReport('Duel Arena Trainer', 'http://schumaker40.site90.com/add.php', GetDebugText);
Disguise('Won: ' + IntToStr(wins) + ' Lost: ' + IntToStr(lost));
End;
Function ArmorOff : Boolean;
Begin
Result := FindColorTolerance(x, y, 114, 71, 55, 251, 259, 5);
End;
Function Challenge : Boolean;
Begin
DTM := DTMFromString('78DA637CCCC0C0709C0105FC9F210FA619A17' +
'CC6B7986A6000AEE635903843C09C4740E22CAA1A4F071354358A' +
'40D64954351E76C6286A0038C70C9C');
Result := FindDtm(DTM, x, y, MSX1, MSY1, MSX2, MSY2);
FreeDtm(dtm);
End;
Function FindTextSand(Text: string; Chars, x1, y1, x2, y2: Integer): Boolean; Forward;
Function Duel : Boolean;
Begin
Result := FindTextSand('duel with you (f', SmallChars, MSX1, MSY1, MSX2, MSY2);
End;
{*******************************************************************************
function PostReport(Website : String): Boolean;
By: Camo Kyle & Floor66
Description: Posts the Progress Report to my database which you can see
*******************************************************************************}
function PostReport(ScriptName, Website, Proggy : String): Boolean;
var
Dbase : String;
Client : Integer;
begin
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
Wait(10);
AddPostVariable(Client, 'proggy', Proggy);
AddPostVariable(Client, 'scn', ScriptName);
Dbase := PostHTTPPageEx(Client, Website);
FreeHTTPClient(Client);
Result := true;
end;
Function DuelScreen(Second : Boolean) : Boolean;
Begin
Case Second Of
True : Result := CountColor(52224, 162, 288, 546, 321) = 91;
False : Result := CountColor(52224, 139, 271, 216, 289) = 91;
End;
End;
Function Accept : Boolean;
Begin
Result := FindText(x, y, 'aiting for other', SmallChars, MSX1, MSY1, MSX2, MSY2);
End;
Function Fighting : Boolean;
Begin
Result := not TileOnMM(Point(3366, 3282));
End;
Function Changes : Boolean;
Begin
Result := FindColorTolerance(x, y, 665, 269, 54, 314, 247, 5);
End;
Function Won : Boolean;
Begin
DTM := DTMFromString('78DA636C62646090056264D000A160A28C738' +
'02C3922D4281350D30C6429E15703007FC604CE');
Result := FindDtm(DTM, x, y, MSX1, MSY1, MSX2, MSY2);
FreeDtm(dtm);
End;
Procedure SetPrayer(PrayerSet : Integer);
Var
X, Y : Integer;
Begin
Case PrayerSet Of
1 : Begin
ClickPrayer('Thick skin', True);
ClickPrayer('Burst of Strength', True);
GetMousePos(x, y);
Mmouse(x + random(50), y + random(50), 3, 3);
Wait(500 + lagwait + random(200));
ClickPrayer('Clarity of Thought', True);
End;
2 : Begin
ClickPrayer('Rock Skin', True);
ClickPrayer('Superhuman Strength', True);
GetMousePos(x, y);
Mmouse(x + random(50), y + random(50), 3, 3);
Wait(500 + lagwait + random(200));
ClickPrayer('Improved Reflexes', True);
End;
3 : Begin
ClickPrayer('Steel skin', True);
ClickPrayer('Ultimate Strength', True);
GetMousePos(x, y);
Mmouse(x + random(50), y + random(50), 3, 3);
Wait(500 + lagwait + random(200));
ClickPrayer('Incredible Reflexes', True);
End;
4 : ClickPrayer('Chivalry', True);
5 : ClickPrayer('Piety', True);
6 : begin
ClickPrayer('Sharp Eye', True);
If Players[currentplayer].booleans[3] then
begin
If not ClickPrayer('Steel Skin', True) then
If not ClickPrayer('Rock Skin', True) then
If not ClickPrayer('Thick skin', True) then
begin
WriteLn('Could not find any defensive prayers to activate, stopping this characters defensive prayer routine!');
Players[currentplayer].booleans[3] := False;
end;
end;
end;
7 : begin
ClickPrayer('Hawk Eye', True);
If Players[currentplayer].booleans[3] then
begin
If not ClickPrayer('Steel Skin', True) then
If not ClickPrayer('Rock Skin', True) then
If not ClickPrayer('Thick skin', True) then
begin
WriteLn('Could not find any defensive prayers to activate, stopping this characters defensive prayer routine!');
Players[currentplayer].booleans[3] := False;
end;
end;
end;
8 : begin
ClickPrayer('Eagle Eye', True);
If Players[currentplayer].booleans[3] then
begin
If not ClickPrayer('Steel Skin', True) then
If not ClickPrayer('Rock Skin', True) then
If not ClickPrayer('Thick skin', True) then
begin
WriteLn('Could not find any defensive prayers to activate, stopping this characters defensive prayer routine!');
Players[currentplayer].booleans[3] := False;
end;
end;
end;
End;
End;
Procedure SandWait(Time : Integer; Condition : SandWaitParam);
Var
TimeMark : Integer;
Begin
MarkTime(TimeMark);
Repeat
Begin
If Condition() Then
Exit
Else
Wait(10);
End;
Until(TimeFromMark(TimeMark) >= Time)
End;
Procedure SandWait2(Time : Integer; Condition : Boolean);
Var
TimeMark : Integer;
Begin
MarkTime(TimeMark);
Repeat
Begin
If Condition Then
Exit
Else
Wait(Time / 10);
End;
Until(TimeFromMark(TimeMark) >= Time)
End;
Procedure Part2; Forward;
Procedure Part4; Forward;
Procedure Part3; Forward;
Function FunDuel : String;
Var
P : Integer;
Begin
If Not LoggedIn Then
Exit;
If Duelscreen(false) Then
Part2;
If Duelscreen(true) then
Part3;
If Fighting then
Part4;
Case Random(Array2[0] + Array2[1] + Array2[2] + Array2[3] + Array2[4] + Array2[5]) Of
0..Array2[0] - 1 : Begin
Result := Array1[0];
CurrentNbr := 0;
End;
Array2[0]..Array2[1] + Array2[0] - 1 : Begin
Result := Array1[1];
CurrentNbr := 1;
End;
Array2[1]..Array2[2] + Array2[1] : Begin
Result := Array1[2];
CurrentNbr := 2;
End;
Array2[2]..Array2[3] + Array2[2] : Begin
Result := Array1[3];
CurrentNbr := 3;
End;
Array2[3]..Array2[4] + Array2[3] : Begin
Result := Array1[4];
CurrentNbr := 4;
End;
Array2[4]..Array2[5] + Array2[4] : Begin
Result := Array1[5];
CurrentNbr := 5;
End;
End;
If Result = '' Then
Begin
P := Random(6);
Result := Array1[P];
CurrentNbr := P;
End;
End;
function SpecialPercent: integer;
var
z: Integer;
TPA: TPointArray;
begin
GameTab(1);
z := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsTolerance(TPA, 2985515, 572, 427, 712, 428, 80);
ColorToleranceSpeed(z);
result := Round(GetArrayLength(TPA) / 283.0 * 100.0);
If Result > Players[currentplayer].integers[1] then
end;
Function SpecialActive : Boolean;
Begin
Result := FindColor(x, y, 65535, 571, 413, 716, 429);
End;
Procedure ProgressReporting;
Begin
ClearDebug;
Duels := Wins + Lost;
CurrentWins := Wins - CurrentWins;
ReportVars[0] := CurrentWins;
CurrentLosses := Lost - CurrentLosses;
ReportVars[1] := CurrentLosses;
CurrentDuels := Duels - CurrentDuels;
ReportVars[2] := CurrentDuels;
Currentdenied := Denied - CurrentDenied;
ReportVars[3] := CurrentDenied;
WriteLn('[' + Padr('Script run by: ' + ForumsName, 80) + ']');
WriteLn('[' + Padr('You won: ' + IntToStr(Wins) + ' duels.', 80) + ']');
WriteLn('[' + Padr('You lost: ' + IntToStr(Lost) + ' duels.', 80) + ']');
WriteLn('[' + Padr('You have dueled: ' + IntToStr(Duels) + ' times.', 80) + ']');
WriteLn('[' + Padr('You have denied: ' + IntToStr(Denied) + ' duels', 80) + ']');
WriteLn('[' + Padr('You have performed: ' + IntToStr(Antibanz) + ' antibans', 80) + ']');
WriteLn('[' + Padr('The script has been running for: ' + TimeRunning, 80) + ']');
WriteLn('[' + Padr('Thanks for using the Duel Arena Trainer by Sandstorm!', 80) + ']');
SRLRandomsReport;
Marktime(Marking);
If First Then
First := False;
SetTimeOut(300000, 'ProgressReporting');
End;
Function UseSpecial(PowerNeed: Integer):Boolean;
begin
Gametab(1);
If not SpecialActive Then
If SpecialPercent >= PowerNeed then
begin
MouseBox(574, 417, 710, 426, 1);
Result := True;
end;
end;
function FindTextSand(Text: string; Chars, x1, y1, x2, y2: Integer): Boolean;
var
Mask, w, h, tx, ty: Integer;
begin
try
Mask:= CreateBitmapMaskFromText(Text, Chars);
wait(100 + random(500));
except
srl_Warn('ClickText', 'Invalid Character Names', warn_AllVersions);
Exit;
end;
Result:= FindBitmapMaskTolerance(Mask, tx, ty, x1, y1, x2, 502, 10, 10);
wait(100 + random(500));
GetBitmapSize(Mask, W, H);
wait(00 + random(500));
FreeBitmap(Mask);
wait(100 + random(500));
end;
Function AntiBan(Chance : Integer) : Boolean;
var
x, y : Integer;
Begin
If Not (LoggedIn) Then
Exit;
Case random(Chance) Of
0: begin
PickUpMouse;
Result := True;
end;
1: begin
Result := True;
GameTab(1 + Random(12));
end;
2: begin
Result := True;
RandomRclick;
end;
3: begin
Result := True;
randomMovement;
end;
4: begin
Result := True;
MMouse(Random(MSX2), Random(MSY2), Random(MSX2), Random(MSY2));
end;
5: Begin
HoverSkill('random', false);
sleepandmovemouse(200 + Random(100));
gametab(4);
MMouse(Random(MSY1), Random(MSX1), Random(MSX2), Random(MSY2));
End;
6:
Begin
GameTab(1 + Random(13));
wait(1000 + Random(600));
Result := True;
End;
7:
Begin
HoverSkill('random', false);
sleepandmovemouse(200 + Random(100));
Result := True;
End;
8: begin
Result := True;
MMouse(x, y, (10 + random(350)), (10 + random(200)));
end;
9: begin
Result := True;
MMouse(Random(MSX2), Random(MSY2), Random(MSX2), Random(MSY2));
end;
End;
Inc(AntiBanz);
End;
Procedure DoAntiBans;
Begin
If Antiban(Chances) Then
begin
Chances := ChanceToAntiban;
end Else
Chances := Chances - randomrange(1, 5);
End;
Function InMiddle : Boolean;
var
P: TPoint;
Begin
P := GetMyPos;
Result := PointInBox(P, IntToBox(3365 - 1, 3273 + 1, 3373 + 1, 3277 - 1));
End;
Procedure Part4;
Label
FightArea;
Label
StartSpec;
Var
FirstSwitch, DoneSpecial, DonePrayer, SwitchBack : Boolean;
HowManySpecs : Integer;
Stringz : String;
Begin
While Accept or DuelScreen(true) Do
Begin
Wait(1000);
If Fighting Then
Break;
If Not Accept and Duelscreen(true) Then
MouseBox(181, 302, 235, 317, 1);
Paramater := @fighting;
SandWait(lagwait + 5000 + random(5000), Paramater);
End;
FightArea:
While Fighting Do
Begin
Disguise('Fighting!');
If Players[currentplayer].booleans[1] and TabExists(6) and not DonePrayer Then
Begin
Gametab(6);
SetPrayer(Players[currentplayer].integers[2]);
DonePrayer := True;
End;
If Players[currentplayer].booleans[2] and TabExists(4) and not DoneSpecial and not FirstSwitch Then
begin
Gametab(4);
MouseItem(1, true);
FirstSwitch := True;
End;
StartSpec:
If Players[currentplayer].booleans[0] and not DoneSpecial and Fighting Then
Begin
If Not SpecialActive Then
UseSpecial(Players[currentplayer].integers[1]);
Wait(250 + random(250));
If Not SpecialActive Then
HowManySpecs := HowManySpecs + 1;
If HowManySpecs >= Players[currentplayer].integers[3] Then
DoneSpecial := True;
While SpecialActive Do
begin
If Fighting Then
Break;
Wait(100);
end;
GoTo StartSpec;
End;
If DoneSpecial and not SwitchBack Then
begin
If GetMMLevels('hp', stringz) >= 5 Then
Begin
Gametab(4);
MouseItem(1, true);
SwitchBack := True;
End;
end;
If not Players[currentplayer].booleans[1] Then
DonePrayer := True;
If not Players[currentplayer].booleans[2] Then
SwitchBack := True;
If not Players[currentplayer].booleans[0] Then
DoneSpecial := True;
If DonePrayer and DoneSpecial and SwitchBack Then
DoAntiBans;
SandWait2(1000 + random(500), not DoneSpecial or not Switchback);
If Not LoggedIn Then
Exit;
End;
If Duelscreen(true) Then
GoTo FightArea;
Disguise('Out of fight.');
If Fighting Then
GoTo FightArea;
If Won and not Fighting Then
Begin
Disguise('We won!');
MouseBox(359, 278, 437, 294, 1);
Inc(Wins);
If Not InMiddle Then
WalkToTile(Point(3369 + randomrange(-4, 4), 3275 + randomrange(-2, 2)) , 0, 0);
If not SwitchBack Then
Begin
Gametab(4);
MouseItem(1, true);
SwitchBack := True;
End;
If First Then
If TimeFromMark(Marking) >= 300000 Then
ProgressReporting;
End else
Begin
If Fighting Then
GoTo FightArea;
Disguise('We lost!');
If Fighting Then
GoTo FightArea;
Inc(Lost);
If Not InMiddle Then
WalkToTile(Point(3369 + randomrange(-4, 4), 3275 + randomrange(-2, 2)) , 0, 0);
If not SwitchBack Then
Begin
Gametab(4);
MouseItem(1, true);
SwitchBack := True;
End;
If TimeFromMark(Marking) >= 300000 Then
ProgressReporting;
End;
End;
Procedure Part1; Forward;
Procedure HandleRulesAndChanges;
Begin
If Changes and Not Accept and Not AllowRuleChange or ArmorOff and Not AllowArmorOff Then
Begin
MouseBox(313, 273, 379, 286, 1);
Denied := Denied + 1;
wait(lagwait + 1000 + random(500));
Part1;
End else
Begin
While Not Accept and Duelscreen(false) Do
Begin
MouseBox(147, 277, 208, 284, 1);
wait(lagwait + 1000 + random(500));
If Not Duelscreen(false) and not Duelscreen(true) Then
Part1;
End;
End;
End;
Procedure Part3;
Begin
SandWait2(lagwait + 1000 + random(500), DuelScreen(True));
If Duelscreen(true) Then
Begin
Disguise('At part three!');
MouseBox(181, 302, 235, 317, 1);
wait(lagwait + 1000 + random(500));
Part4;
End;
Exit;
End;
Procedure Part2;
Begin
While Duelscreen(false) or Duelscreen(true) Do
Begin
If Not Duelscreen(false) and not Duelscreen(true) Then
Part1;
Disguise('At part two!');
If not Changes and not AllowRuleChange or not ArmorOff or not AllowArmorOff Then
Begin
If Duelscreen(true) Then
Part3;
HandleRulesAndChanges;
If Duelscreen(false) Then
MouseBox(147, 277, 208, 284, 1);
End Else
HandleRulesAndChanges;
SandWait2(lagwait + 1000 + random(500), Duelscreen(true));
End;
Part3;
Exit;
End;
Procedure HandleDuel;
Var
A : Integer;
Begin
If Duelscreen(false) Then
Part2;
If Duelscreen(true) then
Part3;
If Fighting then
Part4;
Mousebox(293, 484, 335, 499, 1);
While Not Duelscreen(false) And Not Accept Do
Begin
If A >= 3 Then
Begin
Mousebox(8, 482, 53, 500, 1);
Part1;
End;
If Challenge Then
Begin
MouseBox(199, 192, 312, 209, 1);
wait(1000 + random(500));
Mousebox(8, 482, 53, 500, 1);
wait(1000 + random(500));
Part1;
End;
Mousebox(15, 443, 238, 452, 1);
A := A + 1;
SandWait2(lagwait + 1000 + random(500), Duelscreen(false) or Fighting);
End;
Mousebox(8, 482, 53, 500, 1);
End;
Procedure Part1;
Begin
Disguise('Searching for a dueler!');
If AllPlayersInactive Then
TerminateScript;
If Fighting Then
Part4;
If Duelscreen(true) then
Part3;
If Duelscreen(false) then
Part2;
While not Duelscreen(false) or not Challenge Do
Begin
If Duel or Duelscreen(false) Then
Begin
If Duel Then
HandleDuel;
SandWait2(1000 + random(500), Duelscreen(false));
If Duelscreen(false) Then
Begin
Inc(Array2[CurrentNbr]);
Part2;
Exit;
End else
Part1;
End;
wait(1000 + random(500))
If Fighting Then
Part4;
wait(100 + random(500));
If Won Then
Begin
Inc(Wins);
Inc(Duels2);
MouseBox(359, 278, 437, 294, 1);
End;
If Duel or Duelscreen(false) Then
Begin
If Duel Then
HandleDuel;
SandWait2(1000 + random(500), Duelscreen(false));
If Duelscreen(false) Then
Begin
Inc(Array2[CurrentNbr]);
Part2;
Exit;
End else
Part1;
End;
wait(100 + random(500));
If Challenge Then
MouseBox(199, 192, 312, 209, 1);
wait(100 + random(500));
If not Duel Then
TypeSend(FunDuel)
Else
HandleDuel;
End;
wait(2000 + random(500));
Part2;
Exit;
End;
{*******************************************************************************
Function UpdateScript(Name, UpdateWebsite, Version: String): Boolean;
by: Floor66
Description: Auto-updates (any) script.
You _need_ to make a const like:
Const
Version = '1.00'; // MUST BE A STRING!
*******************************************************************************}
Function UpdateScript(Name, UpdateWebsite, Version: String): Boolean;
Var
Script, NewVersion : String;
NewS : Integer;
Begin
Script := GetPage(UpdateWebsite);
If Script <> '' Then
Begin
NewVersion := Between('Version = ', chr(10), Script);
WriteLn('Script version: '+ Version);
WriteLn('Latest version: '+ NewVersion);
If Version > NewVersion Then
Begin
WriteLn('Error. Please notify the script creator. Version is set incorrectly!');
Result := False;
Exit;
End;
If Not (Version = NewVersion) Then
Begin
WriteLn('Getting the latest script...');
NewS := RewriteFile(AppPath + 'Scripts\'+ Name +'.scar', True);
If WriteFileString(NewS, Script) Then
Begin
WriteLn('Successfully updated script to v'+ NewVersion +'!');
WriteLn('Please reload this script; it has been updated!');
Result := True;
TerminateScript;
Exit;
End;
End;
End Else
Begin
WriteLn('Failed to get script.');
Result := False;
Exit;
End;
End;
Procedure SetupSmart;
Var
World : Integer;
Begin
If Members Then
World := 144
Else
World := 152;
SmartSetupEx(World, Members, True, False);//Change the number in 'world84'
while not SmartActive do wait(100); //to whichever world you want.
SetTargetDC(SmartGetDC);
end;
Begin
SetupSRL;
Declareplayers;
SetupSmart;
MouseSpeed := 15;
ClearDebug;
UpdateScript('SSDuelArena', 'http://schumaker40.site90.com/SSDuelArena.scar', CurrentVersion);
If SRLStatsId = '' Then
SRLId := '6348'
Else
SRLID := SRLStatsId;
If SRLStatsPass = '' Then
SRLPassword:= 'heyhey'
Else
SRLID := SRLStatsPass;
Scriptid := '1101';
Array1 := ['funning all', 'fun dueling', 'funning everyone', 'dueling for fun', 'funning', 'funning anyone'];
Array2 := [1, 2, 3, 4, 5, 6];
Chances := ChanceToAntiban;
MarkTime(Marking);
ActivateClient;
Wait(1000);
If Not Loggedin Then
LoginPlayer;
If Lag Then
Lagwait := AddToWaits
else
Lagwait := 0;
SetRun(True);
Case Multiplayer Of
True : Repeat
Duels2 := 0;
SetRun(True);
Repeat
Part1;
Inc(Duels2);
If Not LoggedIn Then
Break;
Until(Players[currentplayer].integers[0] <= duels2)
If LoggedIn Then
NextPlayer(True)
Else
NextPlayer(False);
Until(AllPlayersInactive)
False : Repeat
Disguise('Not using Multiplayer!');
Part1;
If Not LoggedIn Then
Break;
Until(AllPlayersInactive or not Loggedin);
End;
End.~Sandstorm