SRL Archive - RS3 Outdated / Broken Scripts

Sandstorm's Duel Arena Trainer!


Sandstorm

2008-11-30 11:39:50

I had made this one WAY back (last year), and was looking for something to do, so I decided to update it. I also happened to stumble across a topic asking for one of these, so all the better!

Anyways, this is my first script (besides rudimentary scripts and my responder) in over a year. Please post bugs, progress reports, thing I can do to improve, etc.

Yay, The Voice in Your Head approves :D.

(19:53:15) <TViYH^> k
(19:53:17) <TViYH^> ty :)
(19:53:28) <TViYH^> it's scripted perfectly
(19:53:34) <TViYH^> shouldnt be a mistake..
(19:53:37) <Truth> :D
(19:53:57) <Truth> Quite a difference from my old one eh?

Versions (Green is current):

V0.3 - First public version. Very crappy. Struggled to do one duel.

V0.4 - MAJOR overhaul, pretty much the whole script changed, works pretty well now.

V0.5 - Few bug fixes.

V0.6 - Added AllowArmorOff and AllowRuleChange.

V0.7 - Added multiplayer. Progress reports/bug reports are MANDATORY. This script WILL be removed if I do not get a decent amount.

V0.8 - Special attack added. Should work 95%. Thanks to Narcle and N1ke! for your procedures. I am sorry if you do not want them use, lmk asap and I'll remove them!
v0.9 - SRL Stats added. I believe I got the timer correct for them :).

V1.0 - SRL Stats currently NOT WORKING. Not 100% sure as to why this is; looking into it. Added two extra constants for you people who lag like me ^.^. Should work, untested as I cannot move my account currently. Also changed the priority of checking for a duel; it will now check it right at the start of the procedure. I have also left it in the middle to, so that it will check three times during that procedure.

V1.1 - SRL Stats should work now. Forgot to add SRLID and SRLPassword, so it wasn't working. Edited the waits a bit, should now handle the lag better but not slow the efficiency of the script down. I also randomized the waits.

V1.1.1 - Fixed progress report.

V1.2 - Added SandWait, so it should continue as soon as, or just after, the screen appears. Not 100% though. The Find Fight procedure is currently being redone, expect an update on the soon.

V1.3 - Now uses dtm's instead of colors for detection. I haven't redone the find fight procedure yet though. It should be more effective, if less efficient.

V1.4 - Fixed SRL Stats. Will now update properly. I also added in remote updating; as long as I remember to update my website, you won't have to come back here. But, if I do not start getting response (even though it's got a low download count), I WILL remove it and distribute it to a select few. Final warning.

V1.5 - Wasn't released, just a few bug fixes. Read V1.6

V1.6 - Added PostReport function, no more not posting reports :). Fixed a bug in the way it counted duels without opening the screen. Will now work properly. Fixed a bug in the way SRL Stats worked. Will now report correctly.

V1.7 - Small bug fixes, streamlining, etc. Preliminary prayer and special attack routines (I believe).

V1.8 - Gone back to the old Fighting function, and added a second, tweaked one, for faster performance in the special attack procedure.

Added prayer. Hoping I fixed the bug in it.

Streamlined the special attack procedure even more, will now sit there, special attacking, 'til it's done the amount you specified, or it's out of special (I hope).

Added Srl Player Form.

Fixed the bug that caused it to report that I set the version wrong.

Added many failsafes to the procedures, it should never lose track of where it is now.

Added some AI. Will now choose the option that gets the most duels more often. Will use antiban depending on the amount you set it to. The higher, the less. The more often it doesn't use the antiban, the more of a chance it has to use it.

Updated the progress report, it will now look prettier :P.


V1.81 - Fixed the Multiplayer problem, should now switch players correctly!

Added in an if not logged in check to the fighting functions, because it was consistently getting stuck there for me. Should be fixed.

V1.81C out. Added world favorite constant. Allows you to favorite a world and then the script will pick it, allowing you to use SMART and still be on a populated world. Added Antiban to the area where you get a duel. Added mistakes back onto the messages. The infight detection is perfect, it's actually faster then my computer can handle xD.

1.81C is not mandatory, and as such has not been added to the remote updater.


Current Abilities:

Progress report.
Decent failsafes, should never get stuck on finding a person if any duel screen is up.
Changes chat tabs to accept a duel; I couldn't get it working 100% without changing the chat tab.
Booleans to decide whether you want rules changed/armor changed, or to keep it all off before accepting. Should work, lmk if it doesn't. Doesn't work with respective characters yet. Will be soon. I believe I fixed a small bug in the way this worked.
Special attack. There's a boolean on it to check whether you can use it or not. Works with respective characters.
Should work with lag now; added a boolean and an integer constant that will help counter-act this.
Remote updating.
Prayer, with many different settings.
Switching weapons before Special Attack.


Future updates:

As close to perfection as possible.

Known bugs:

Currently, there's only some minor bugs for me.

1. If there is a red dot representing a dropped item, you will be counted as being OUTSIDE the fight arena. Fixed in the Reflection version.

2. If you spawn in such a way that any of the symbols are visible, you will also be counted as outside the arena. Fixed in the Reflection version.

3. The prayer doesn't ALWAYS activate (that I've seen anyways), but it does work 95% of the time now.

4. Sometimes gets stuck specialing. Don't know why. Only seen this on Vista though.

Let me know of any others!

Sandstorm

2008-11-30 14:43:39

Oh, forgot this post.

RESERVED FOR BEST PROGGIES!

1. By me.

You won: 16 duels.
You lost: 155 duels.
You have dueled: 171 times.
You have denied 18 duels
The script has been running for: 5 Hours, 11 Minutes and 22 Seconds
Thanks for using the Duel Arena Trainer by Sandstorm!

2. By Camo Kyle.

You won: 16 duels.
You lost: 61 duels.
You have dueled: 77 times.
You have denied 43 duels
The script has been running for: 4 Hours, 15 Minutes and 23 Seconds
Thanks for using the Duel Arena Trainer by Sandstorm!

3. By me.

/——————\
|Duel Arena Trainer|
|By:Sandstorm |
|Version:0.4 |
| —————- |
|Won: 4 |
|Lost: 1 |
\——————/

Kyle Undefined

2008-11-30 14:55:41

Nice script. It runs with out very much lag. Keep it up. ;)

~Camo

Sandstorm

2008-11-30 16:07:10

Thanks. V0.5 out. Few bugfixes, I hope.

Hugolord

2008-11-30 16:08:05

Is this actually gd exp to train with?

Sandstorm

2008-11-30 16:29:05

Not a clue. Lol. I made it because someone posted it, and because I had retrieved my old one (which surprisingly got me membership o.o).

Kyle Undefined

2008-11-30 17:26:34

Yeah, this THING got him members Lol :p
{.Script Info:
# ScriptName = Hey321's Auto-Dueler
# Author = Hey321
# Description = Auto accepts and waits until duel is over
# Version = 0.3
# Date = Dec, 17th
# Comments = Copyright i WILL take action if i find this script being: 1.Sold 2.Impersonated (saying its your when its not)
/Script Info}
{If i forgot you in credits PM me on villu-reborn.com and i will add you.
Credits:
Boreas/Yakman for the chat coords
Junior for the DuelScreen help
Da Der Der for random talking!}
Program DuelTrainer;
{.include SRL/SRL.scar}

var
FalseTimes, x, y: Integer;

function Duel: Boolean;
begin
if ( FindColorTolerance ( x, y, 12926 , MCX1, MCY1, MCX2, MCY2, 1 )) Then
begin
Result := True
WriteLn('Woot! We''re True and Safe!')
MMouse(x, y, 3, 3);
Mouse(x,y,3,3, True);
FalseTimes:=FalseTimes-1
end //<------ No Semicolon ( one of these ; ) in here
else //<---- nothing wrong here but the line above is added to this line at compile time
begin
WriteLn('OMFG It''s False');
FalseTimes:=FalseTimes+1
Result := False;
If (FalseTimes>10) Then TerminateScript;
End;
End;


Procedure FunDuel;
Var
DuelMsg : String;
Begin
Repeat
Case random(6) Of
0 : DuelMsg:= ('funning all');
1 : DuelMsg:= ('fun dueling');
2 : DuelMsg:= ('funning everyone');
3 : DuelMsg:= ('dueling for fun');
4 : DuelMsg:= ('funning');
5 : DuelMsg:= ('funning anyone');
End;
TypeSend(DuelMsg);
Until(duel)
End;

Procedure Accept1;
Begin
Sleep(1000)
If (findcolorTolerance(x, y, 32768 , MSX1, MSY1, MSX2, MSY2, 25)) Then
Begin
Sleep(1000)
MMouse(x, y, 3, 3);
Mouse(x, y, 3, 3, True);
If (findcolorTolerance(x, y, 32768 , MSX1, MSY1, MSX2, MSY2, 25)) Then
Begin
Sleep(1000)
MMouse(x, y, 3, 3);
Mouse(x, y, 3, 3, True);
Begin
Repeat
Wait(1000)
If InChat('Well Done!') or
InChat('Oh dear, you are dead!') Then Break;
Until(False)
End;
End;
End;
End;



Begin
SetupSRL;
ActivateClient;
Repeat
FunDuel;
Accept1;
Until(False);
End.

~Camo

Sandstorm

2008-11-30 17:38:59

Lol, I have the link to the script up there ^.^.

V0.6 released! Rule changing and armor changing booleans added :).

P1nky

2008-11-30 19:28:45

gj, though i think its a slow way to gain exp.



though creative job there, keep it up.

Sandstorm

2008-11-30 19:36:21

Thanks.

Update coming soon, not sure when. Will allow the player to define which items to wear and which to disable.

Griff

2008-12-01 16:08:28

Good work, I think you might be the first person to do a dueler.

-Griff

Sandstorm

2008-12-01 18:40:16

Wouldn't be surprised. Also, looking for someone to help test this. Playerform = EXTREMELY messy right now, as I have to use 9 booleans per player -.-. But it works!

Sandstorm

2008-12-01 23:30:35

Sorry for the double post. I've scrapped the idea of user-defined armor. It just wasn't working at all. I couldn't get any failsafes on it easily, that kind of stuff. It wasn't even continuing with the script after it got to the first duel screen and executed itself.

V0.7 released. Multiplayer added. Seems rather useless imo though. From now on progress reports and bug reports will be MANDATORY. If I do not get a decent amount of at least progress reports to views, this script WILL be taken down.

Kyle Undefined

2008-12-02 20:35:32

Boo on double post! Lol, I'm ready for V0.8! :D Will test fer ya.

~Camo

Sandstorm

2008-12-02 20:36:30

Lol, well, it's up there.

Added special attack. Should work 95% of the time!

Mr_Bum

2008-12-03 05:27:19

I have just tested. It doesnt find fight very well. But still is good(better then i can make). in the accept screen it sometimes doesnt hit accept. And in one fight it didnt detect and it started typing for another duel.

Sandstorm

2008-12-03 08:26:18

Yea, there's still some bugs I need to fix. The reason it doesn't find the duel very fast is because it's the fourth thing it checks for. The in fight thing is lag on your part; not the script. I've never encountered it not accepting, can you describe what happened? o.o.

Mr_Bum

2008-12-04 06:19:37

i cant remember lol. Maybe have the find duel at the start and then in that have it search for 3 , 2 ,1 or Fight! in the chatbox. If it finds that then it skips to fighting procedure.

Sandstorm

2008-12-04 08:01:49

Nah, I don't think that would be possible without setting public chat to friends. And that would screw up the rest of the script. I'll look into it though.

Kyle Undefined

2008-12-04 12:16:20

Alright, now I have time to test since I just finished my Range Guilder. But now I'm going to the mall :/ :p will test when I get back. I promise :)

~Camo

Sandstorm

2008-12-04 20:40:14

Ok, 1.0 out. It should work better.

Changes:

Moved Duel check to the start of the function, not the middle. Should accept it faster now.
Added "Lag" and "AddToWaits" constants. It adds the amount of time, in milliseconds, you input into AddToWaits, if Lag is true.

Kyle Undefined

2008-12-04 23:22:48

I will try your new version. I ran it today but didn't get a proggy :( It won 35 games tho, that's what Scar said on the name. Keep it up ;)

~Camo

Sandstorm

2008-12-04 23:24:20

Nice, to bad there was no proggy :/. Woulda went to the top spot :P. Anyways, get V1.1, just released it like 10 minutes ago lol. Fixed SRL Stats and added a version checker.

Kyle Undefined

2008-12-04 23:31:51

From: Sandstorm
Nice, to bad there was no proggy :/. Woulda went to the top spot :P. Anyways, get V1.1, just released it like 10 minutes ago lol. Fixed SRL Stats and added a version checker.


Aww…you can still list meh lol. I just downloaded your new version. Hopefully will get a proggy :)

~Camo

Sandstorm

2008-12-05 18:04:06

Looking for bug reports and suggestions.

V1.1.1 - Just fixed the progress report.

It works!

You won: 24 duels.
You lost: 81 duels.
You have dueled: 105 times.
The script has been running for: 2 Hours, 13 Minutes and 34 Seconds
Thanks for using the Duel Arena Trainer by Sandstorm!

Kyle Undefined

2008-12-07 17:58:05

Here you go, it was still running when I got home from the meeting.

You won: 16 duels.
You lost: 61 duels.
You have dueled: 77 times.
You have denied 43 duels
The script has been running for: 4 Hours, 15 Minutes and 23 Seconds
Thanks for using the Duel Arena Trainer by Sandstorm!

~Camo

Sandstorm

2008-12-07 18:45:40

Sweet. I also figured out why my stats report was screwed up :).

Brodyf11

2008-12-07 18:57:40

I will post a proggy later after use. nice and useful script.

Kyle Undefined

2008-12-09 10:22:55

Oh btw, how do I get your new version? I tested it for you and now your script is blank -.- Lol. Or did you fix that already? I can't remember.

~Camo

Sandstorm

2008-12-09 17:27:27

I'll send you the link. Either my server is becoming VERY slow for no reason, or scar isn't working properly, which is what's confusing me. It's only started after Rev #29 and #30 came out, neither of which should have affected it at all :/.

Ok, it's broken again. This is annoying lol. Here's the current script:

{.Script Info:
# ScriptName = Sandstorm's Auto Dueler
# Author = Sandstorm
# Description = Auto accepts and waits until duel is over
# Version = 1.6
# 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}
Program DuelTrainer;
{.include SRL/SRL.scar}

Const
AllowArmorOff = False; //Allow other people to turn armor off?
AllowRuleChange = False; //Allow other people to turn on/off rules?
Multiplayer = False; //Use more then one player? IMPORTANT TO FILL OUT.
Lag = False; //Do you lag? Increases waittimes if so.
AddToWaits = 1500; //How much to add to the waits, if Lag = true.
SRLStatsID = ''; // Your stats id
SRLStatsPass = ''; // Your stats password
CurrentVersion = '1.6'; // DO NOT TOUCH THIS!

Var
x, y, wins, lost, duels, marking, lagwait, denied, Duelscreendtm, dtm, duels2, CurrentDuels, CurrentWins, CurrentLosses, Currentdenied: Integer;
First : Boolean;

procedure DeclarePlayers;
begin
HowManyPlayers :=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your username
Players[0].Active := True; //Use this character or not?
Players[0].integers[0]:=10; //Duels before switching
Players[0].integers[1]:=20; //How much your special attack takes
Players[0].booleans[0]:=True; //Use special attack?
End;

Procedure ScriptTerminate;
Begin
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 DuelScreen(Second : Boolean) : Boolean;
Var
X, Y : Integer;
Begin
Case Second Of
True : Result := FindDtm(DuelScreenDtm, x, y, 162, 288, MSX2, MSY2);
False : Result := FindDtm(DuelScreenDtm, x, y, MSX1, MSY1, 228, 297);
End;
End;

Function Accept : Boolean;
Begin
Result := FindText(x, y, 'aiting for other', SmallChars, MSX1, MSY1, MSX2, MSY2);
End;

Function Accept2 : Boolean;
Begin
Result := FindText(x, y, 'aiting for other', SmallChars, MSX1, MSY1, MSX2, MSY2);
End;

Function Fighting : Boolean;
Var
I : Integer;
ColorsToUse : Array of Integer;
Begin
wait(100 + random(500));
ColorsToUse := [8946705, 6382604, 9205778, 9405202, 8482576, 8944913, 6840077, 8422416, 8882961, 9339410, 9142033];
For I:=0 To GetArrayLength(ColorsToUse)-1 Do
Begin
wait(100 + random(500));
Result := Not FindColorTolerance(x, y, ColorsToUse[i], MMX1, MMY1, MMX2, MMY2, 3) And Not FindColorTolerance(x, y, 244, MMX1, MMY1, MMX2, MMY2, 15) And Not FindSymbol(x, y, 'altar') and Not FindSymbol(x, y, 'minigame') and not FindSymbol(x, y, 'bank') and not FindSymbol(x, y, 'minigame');
wait(100 + random(500));
If Not Result Then
Break;
End;
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 SandWait(Time : Integer; Condition : Boolean);
Var
TimeMark : Integer;
Begin
MarkTime(TimeMark);
Repeat
Begin
If Condition Then
Exit
Else
Wait(1);
End;
Until(TimeFromMark(TimeMark) >= Time)
End;

Procedure Part2; Forward;

Procedure Part4; Forward;

Procedure FunDuel;
Var
DuelMsg : String;
Begin
If Duelscreen(false) Then
Part2;
If Fighting Then
Part4;
Case random(6) Of
0 : DuelMsg:= ('funning all');
1 : DuelMsg:= ('fun dueling');
2 : DuelMsg:= ('funning everyone');
3 : DuelMsg:= ('dueling for fun');
4 : DuelMsg:= ('funning');
5 : DuelMsg:= ('funning anyone');
End;
TypeSend(AddMistakes(DuelMsg, 30));
wait(100 + random(500))
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);
end;

Function SpecialActive : Boolean;
Begin
Result := FindColor(x, y, 65535, 571, 413, 716, 429);
End;

Function CheckVers : Boolean;
Begin
Result := Between('<p>', '</p>', GetPage('http://lalalacheckvers.110mb.com/CheckVersion.txt')) = CurrentVersion;
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('You won: ' + IntToStr(Wins) + ' duels.');
WriteLn('You lost: ' + IntToStr(Lost) + ' duels.');
WriteLn('You have dueled: ' + IntToStr(Duels) + ' times.');
WriteLn('You have denied ' + IntToStr(Denied) + ' duels');
WriteLn('The script has been running for: ' + TimeRunning);
WriteLn('Thanks for using the Duel Arena Trainer by Sandstorm!');
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;

Procedure Part4;
Begin
While Accept2 or Duelscreen(true) Do
Begin
Wait(1000);
If Fighting Then
Break;
If Not Accept2 and Duelscreen(true) Then
MouseBox(181, 302, 235, 317, 1);
SandWait(lagwait + 1000 + random(500), Fighting);
End;
Disguise('Fighting!');
While Fighting Do
Begin
If Players[currentplayer].booleans[0] Then
UseSpecial(Players[currentplayer].integers[1]);
wait(1000 + random(500));
End;
Disguise('Out of fight.');
If Won and not Fighting Then
Begin
Disguise('We won!');
MouseBox(359, 278, 437, 294, 1);
Inc(Wins);
Inc(Duels2);
If First Then
If TimeFromMark(Marking) >= 300000 Then
ProgressReporting;
End else
Begin
Disguise('We lost!');
Inc(Lost);
Inc(Duels2);
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
SandWait(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;
End;

Procedure Part2;
Begin
While Duelscreen(false) Do
Begin
If Not Duelscreen(false) 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;
SandWait(lagwait + 1000 + random(500), Duelscreen(true));
End;
Part3;
End;

Procedure HandleDuel;
Var
A : Integer;
Begin
If Duelscreen(false) Then
Exit;
Mousebox(293, 484, 335, 499, 1);
While Not Duelscreen(false) And Not Accept Do
Begin
If A >= 3 Then
Part1;
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;
SandWait(lagwait + 1000 + random(500), Duelscreen(false) or Fighting);
End;
Mousebox(8, 482, 53, 500, 1);
End;

Procedure Part1;
Begin
Disguise('Searching for a dueler!');
While not Duelscreen(false) or not Challenge Do
Begin
If Duel or Duelscreen(false) Then
Begin
If Duel Then
HandleDuel;
SandWait(1000 + random(500), Duelscreen(false));
If Duelscreen(false) Then
Begin
Part2;
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;
SandWait(1000 + random(500), Duelscreen(false));
If Duelscreen(false) Then
Begin
Part2;
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
FunDuel
Else
HandleDuel;
End;
wait(2000 + random(500));
Part2;
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 = ', ' ', Script);
WriteLn('Script version: '+ Version);
WriteLn('Latest version: '+ NewVersion);
If Not (Version = NewVersion) Then
Begin
WriteLn('Getting the latest script...');
NewS := RewriteFile(AppPath + 'Scripts\'+ Name +'.scar', False);
If WriteFileString(NewS, Script) Then
Begin
WriteLn('Successfully updated script to v'+ NewVersion +'!');
Result := True;
Exit;
End;
End;
End Else
Begin
WriteLn('Failed to get script.');
Result := False;
Exit;
End;
End;

Begin
SetupSRL;
If CheckVers Then
Disguise('Your up to date, continuing!')
Else
Begin
UpdateScript('SSDuelArena', 'http://lalalacheckvers.110mb.com/SSDuelArena.scar', CurrentVersion);
WriteLn('Please reload this script; it has been updated!');
TerminateScript;
End;
If SRLStatsId = '' Then
SRLId := SRLStatsId
Else
SRLID := '6348';
If SRLStatsPass = '' Then
SRLPassword:= SRLStatsPass
Else
SRLID := 'heyhey';
Scriptid := '1101';
DuelScreenDtm := DTMFromString('78DA63BCC7C8C0E005C4C8E00C84828932BE0' +
'5B23C08A8390B6479A2A9614055030065680518');
MarkTime(Marking);
Declareplayers;
If Not Loggedin Then
LoginPlayer;
Case Lag Of
True : Lagwait := AddToWaits;
False : Lagwait := 0;
End;
Case Multiplayer Of
False : Repeat
Part1;
If Not LoggedIn Then
Break;
Until(AllPlayersInactive);
True : Repeat
Duels2 := 0;
Repeat
Part1;
If Not LoggedIn Then Break;
Until(Players[currentplayer].integers[0] = duels2)
If LoggedIn Then
NextPlayer(True)
Else
NextPlayer(False);
Until(AllPlayersInactive)
End;
End.

Kyle Undefined

2008-12-09 21:52:37

Ok, I will let you know. Btw
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.
*tears* HAHA Jk. :p

~Camo

mickeymouse

2008-12-10 22:30:03

hmm i have tried it, i dragged the cross over the rs window and press run, it froze right away!

i dont know what the problem tho

Sandstorm

2008-12-10 22:49:44

You've probably got a very laggy computer. Beyond that, I can't think of anything that would cause that :/.

Kyle Undefined

2008-12-10 23:08:24

From: mickeymouse
hmm i have tried it, i dragged the cross over the rs window and press run, it froze right away!

i dont know what the problem tho


Make sure you don't have to many things running at once. Try restarting your computer then running the script.

~Camo

Ps - 600 posts FTW!

Kave

2008-12-11 18:30:35

i had this idea in mind :(

nice release will test soon.

Sandstorm

2008-12-11 18:36:38

Hah, sorry about taking it :/, And thanks, for both the compliment and testing it :P.

Sandstorm

2008-12-14 22:10:06

1.6 out. Forgot to release it lol. Added Camo Kyle and Floor's report function. If you don't want to post a report, hit the stop button and wait for it to stop itself. It'll automatically post a report to my database so you don't have to. :).

Fixed a small bug in the way the counter works. Should now not continually click in the same area.

Phran6

2008-12-23 20:33:21

where i can get the vertion 1.7 ?

Phran6

2008-12-23 21:15:01

Error. Please notify the script creator. Version is set incorrectly!
Please reload this script; it has been updated!
i get this problem what i need to do ??

Sandstorm

2008-12-23 23:00:33

Please don't double post.

Gah, my p key is broken :(.

Sorry guys, I had the wrong link in the script! Change line 774 to this, and it will work (I hope):


UpdateScript('SSDuelArena', 'http://lalalacheckvers.110mb.com/SSDuelArena.scar', CurrentVersion);

TViYH

2008-12-24 00:38:43

What's the functionality of this script out of 10?

Sandstorm

2008-12-24 09:53:58

It's currently a bit slow, but I've got a new version that has faster detection for in fight (prayer and spec). The problem is that I can't test it on my computer, as it doesn't work well. Gonna fix it up, hopefully, and release 1.8 soon.

Overall (I haven't tested 1.7 in a while), I'd probably say it's decent. 5-7 or so. I'll test it and tell you what I think about it now :P.

Friggin p key is broken -.-.

~Sandstorm

TViYH

2008-12-24 10:06:52

=P

Thanks mate. I'm going out of town today.

Sandstorm

2008-12-24 10:18:58

Ah.

I'm rather pissed off right now.

I downloaded 1.6, let it write over my version of 1.8 -.-.

So, there goes all the crude AI I had built in. Thank god it's posted on a topic here (I hope….).

~Sandstorm

P.S, it's taking a while to detect it's in a fight, and it really rather slow at everything. I'm working on a fix, but I wouldn't use 1.7 if your going afk for to long.

weby

2009-01-06 12:27:40

Script version: 1.6
Latest version:
Error. Please notify the script creator. Version is set incorrectly!
Please reload this script; it has been updated!
Successfully executed
ran it and got that :(

Sandstorm

2009-01-06 23:25:52

Read page three for the fix. I had the wrong url in. Will be fixed when I release version 1.8. Just got to test it and fix any bugs I find.

Just for a preview of what I've added:

Some crude AI.
Prayer.
Fixed a bug in the way the Fighting function worked. Apparently this opened an even bigger glitch up. :/.
Streamlined the special attack area, will now not sit there for like 5-10 seconds with a 3/4 full spec bar ^.^.

Full list when I decide not to be lazy, and when I release it.

Also, I found 1.8 on one of my portable drives. THANK GOD. :P.

~Sandstorm

Sandstorm

2009-01-09 15:33:18

Version 1.8 is ready for release.

What I've done:

Gone back to the old Fighting function, and added a second, tweaked one, for faster performance in the special attack procedure.

Added prayer. Hoping I fixed the bug in it.

Streamlined the special attack procedure even more, will now sit there, special attacking, 'til it's done the amount you specified, or it's out of special (I hope).
Added Srl Player Form.

Fixed the bug that caused it to report that I set the version wrong.

Added many failsafes to the procedures, it should never lose track of where it is now.

Added some AI. Will now choose the option that gets the most duels more often. Will use antiban depending on the amount you set it to. The higher, the less. The more often it doesn't use the antiban, the more of a chance it has to use it.

Updated the progress report, it will now look prettier :P.

Here's a sample progress report. Will be getting a larger one sometime today.

[Script run by: Sandstorm                                                        ]
[You won: 6 duels. ]
[You lost: 4 duels. ]
[You have dueled: 10 times. ]
[You have denied: 4 duels ]
[You have performed: 23 antibans ]
[The script has been running for: 28 Minutes and 13 Seconds ]
[Thanks for using the Duel Arena Trainer by Sandstorm! ]

Bugs that I've seen:

If there is a red dot representing a dropped item, you will be counted as being OUTSIDE the fight arena.

If you spawn in such a way that any of the symbols are visible, you will also be counted as outside the arena.

The prayer doesn't ALWAYS activate (that I've seen anyways), but it does work 95% of the time now.

~Sandstorm

Torrent of Flame

2009-01-10 15:59:19

Surely this should be in Jr. Membs by now?

Sandstorm

2009-01-10 16:10:54

Yea, I guess it should. I've just never gotten around to pming someone :/.

~Sandstorm

V1.81 released yesterday, fixed multiplayer, should work now.

TViYH

2009-01-10 18:41:08

My name-a TViYH. I like-a you. I like-a sex. It's nice!

Sandstorm, what would you rate the functionality of this script.

Sandstorm

2009-01-10 18:49:56

Umm…. 7-9/10 now? There's just a few bugs that I can't really control :/.

Sandstorm

2009-01-14 18:05:17

V1.81B released.

Added a bit of reflection. Will now walk to the middle after every duel. Fighting check has been reduced to one line and one function. 99.9% accurate (haven't check all the possibilities yet, but it should NEVER fail) fighting function now. The fighting function is also almost instant.

Haven't added this to the remote update area, as it isn't mandatory, just recommended (fastest and most accurate).

~Sandstorm

TViYH

2009-01-14 19:44:43

Erm..Is the antiban good enough for me to overnight this for, say, a week? Lol.

Sandstorm

2009-01-14 19:52:13

I have yet to put the antiban in the talking area, but that won't be hard. I can do that now if you like. Just adding in another thing so that you don't have to use an unpopulated world, but it doesn't seem to be working :/.

But yes, I believe it should be usable for overnighting (SHOULD be).

~Sandstorm

TViYH

2009-01-14 20:20:40

It'd be nice if you could all the antiban you could :)

And, maybe make the talking procedure ULTRA random? But still make it humanlike…

Sandstorm

2009-01-14 20:28:59

It takes the most replied to one, but at the start it is random. Give me a ton of messages and I'll implement them.

Ps - Will be releasing the next version soon (just a small update, makes it easier on the user). It lets you favorite the world you want to use, then put the place it's favorited (one or two, from left to right) and it'll choose it. Good if your a member because you can choose 132, or a populated non-member world.

~Sandstorm

TViYH

2009-01-14 20:30:29

Meh. Lol. I don't exactly have a least =/

It'd be good if you have 10-15 responses though.

Sandstorm

2009-01-14 20:51:02

V1.81C out. Added world favorite constant. Allows you to favorite a world and then the script will pick it, allowing you to use SMART and still be on a populated world. Added Antiban to the area where you get a duel. Added mistakes back onto the messages. The infight detection is perfect, it's actually faster then my computer can handle xD.

~Sandstorm

TViYH

2009-01-14 20:55:01

Thanks mate :)

Will do a test-overnight tonight.

Thanks for this.

Sandstorm

2009-01-14 20:56:33

No problem. I was going to do it, but just never got around to it. You may find yourself logged out, but still fighting. Not sure why this is. Gonna add a fix for it in a bit (reflection version anyways). I think I'm only gonna support the reflection version for now, and update the color only if it's a critical update :/.

~Sandstorm

TViYH

2009-01-14 21:04:21

Yes. Only support the reflection until the colors update.

loopa

2009-01-15 09:43:03

Nice looking script! You should apply for membership :O

Sandstorm

2009-01-15 17:02:31

I did. I was turned down because people didn't trust me -.-.

In case your confused:

http://www.srl-forums.com/forum/showthread.php?t=40442

~Sandstorm

Phran6

2009-01-15 17:31:02

it ask me witch prayer set to use ??
sory if im noob but what i answer if i have range and im 52 pray
dont understand the question

Sandstorm

2009-01-15 17:33:40

Oh crap, I forgot to list the prayers!

1 is the first melee set.
2 is the second melee set.
3 is the third.
4 is chivalry.
5 is piety.
6 is the first range prayer.
7 is the second.
8 is the third.

Sorry about that!

~Sandstorm

Phran6

2009-01-15 17:34:35

oo okay thanx :P

Phran6

2009-01-15 17:39:33

oo sory for double post you can remove this post

mormonman

2009-01-15 19:03:37

From: Sandstorm
Oh crap, I forgot to list the prayers!

1 is the first melee set.
2 is the second melee set.
3 is the third.
4 is chivalry.
5 is piety.
6 is the first range prayer.
7 is the second.
8 is the third.

Sorry about that!

~Sandstorm


no protect froms?

Sandstorm

2009-01-15 19:06:15

No, because I have no way of knowing what build the other character is, and what style they are using. It would look stupid to melee pray vs. a ranger wouldn't it?

~Sandstorm

mormonman

2009-01-15 19:06:51

From: Sandstorm
No, because I have no way of knowing what build the other character is, and what style they are using. It would look stupid to melee pray vs. a ranger wouldn't it?

~Sandstorm


quite true…

Phran6

2009-01-15 19:19:31

i have a problem whene it start fighting it alredy tell i have lost and writing during the fight funning all , funning funning everyone…

Sandstorm

2009-01-15 19:26:38

If you aren't using the reflection version, it could be caused by a red dot or one of the symbols is showing. I suggest using the reflection version for now.

~Sandstorm

Phran6

2009-01-15 19:30:26

i was using reflection vertion

Sandstorm

2009-01-15 19:32:04

In the constants, there a Lag and AddToWait area. Change the AddToWait to something like 1000, if your lagging.

It could be because it's still reading it as True :/.

~Sandstorm

TViYH

2009-01-15 23:19:55

Worked VERY nicely! However, it sucks when people set the "obstacles in area" thing when I'm using melee and they use range…Can you make it to where they can't change it to obstacles, and no melee?

[Script run by: TViYH ]
[You won: 2 duels. ]
[You lost: 10 duels. ]
[You have dueled: 12 times. ]
[You have denied: 1 duels ]
[You have performed: 445 antibans ]
[The script has been running for: 23 Minutes and 29 Seconds ]
[Thanks for using the Duel Arena Trainer by Sandstorm!

Sandstorm

2009-01-15 23:29:24

The only way that I know of to do that is through colors, and I've tried it, but it doesn't work to well :/. I'll see if I can fix it up though.

~Sandstorm

TViYH

2009-01-15 23:57:51

So, I basically mean if they change it to "Obstacles" and/or "No Melee" then it will hit deny, or w/e.

Sandstorm

2009-01-16 09:16:07

Yea, I have a feature in for that already, it's just not very good.

~Sandstorm

TViYH

2009-01-16 09:37:07

[Script run by: TViYH ]
[You won: 2 duels. ]
[You lost: 27 duels. ]
[You have dueled: 29 times. ]
[You have denied: 12 duels ]
[You have performed: 9988 antibans ]
[The script has been running for: 8 Hours, 38 Minutes and 49 Seconds ]
[Thanks for using the Duel Arena Trainer by Sandstorm ]

loopa

2009-01-16 15:17:57

From: Sandstorm
I did. I was turned down because people didn't trust me -.-.

In case your confused:

http://www.srl-forums.com/forum/showthread.php?t=40442

~Sandstorm


Oh i see.
I actually think i remember you. I hope people will get over that and start trusting you. Anyways, welcome back :)

TheSantaMan

2009-01-26 19:36:17

I think hobbit got in on a duel arena script. As far as i remember him telling me.

William

2009-01-27 17:29:23

um after it does 1 duel it doesn't do anymore..

Sandstorm

2009-01-27 18:35:58

Willie, I'll look into it. Reflection or Color? What does the error say, if there's an error? What is the error? Etc.

~Sandstorm

William

2009-01-27 20:12:36

From: Sandstorm
Willie, I'll look into it. Reflection or Color? What does the error say, if there's an error? What is the error? Etc.

~Sandstorm


wut happened wus that it did 1 fight and it just stood there then i updated reflection and got this error:

Line 177: [Error] (18314:44): Unknown identifier 'InventoryItemID' in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Reflection\GameTab.scar

Sandstorm

2009-01-27 20:24:35

That's not the fault of my script.

SRL\Reflection\GameTab.scar

~Sandstorm

William

2009-01-28 18:01:06

hey dude when ever it loses a fight it doesnt do anything else..
like it won once then fought and lost and it didnt do anything else..

TViYH

2009-01-28 19:05:34

Willie, you must have set something up wrong in the Players form.

William

2009-01-28 19:13:56

From: TViYH
Willie, you must have set something up wrong in the Players form.


im pretty darn sure its right…

EDIT: ill double check to make sure its right..

P1nky

2009-01-29 11:13:52

in the proggie you should add how much exp you gained.

trentuno30

2009-02-26 02:47:11

ummmm im shore this script would be great but the bad thing is u cant pick a world where there is alot of people in it so if u could, could u make it non smart?

cheers man

William

2009-02-28 10:25:09

From: trentuno30
ummmm im shore this script would be great but the bad thing is u cant pick a world where there is alot of people in it so if u could, could u make it non smart?

cheers man


actualy u can, just put a world with alot of peeps favorite and then on script it lets you chose the option of selecting a favorite world..

Sandstorm

2009-02-28 12:51:43

^ Correct.

Reflection is outdated though, so only the color version will work (if it still works).

~Sandstorm

Sandstorm

2009-08-30 09:57:32

Fixing it up now.

~Sandstorm