SRL Archive - News and General

SRL Revision #15


Wizzup?

2008-04-05 12:09:38

SRL Revision #15.

  • Updated worlds.ini
  • Fixed CurrentWorld and Added GetCurrentWorld
  • All SRL-Development suggestions have been taken care of.
  • Fixed a bug in Withdraw.
  • Findlamp now supports all skills.
  • Added a new ChooseOption, which uses TPA's. What else? ;)
  • (MSX1, MSY1) has changed from (1,1) to (4,4)
  • Added a Const called SRLVersionNumber.
  • FindObj, FindObjEx and FindObjCustom use a new algorithm.
  • Players[].Pin has changed from an Integer to a String.
  • The DropItem() wait has been decreased.
  • LoggedIn now uses a findcolor instead of a getcolor.
  • All BankOpeners support Pin codes.
  • GetATPABounds, DrawTPACanvas and DrawATPACanvas have been added to WizzyPlugin.
  • w_UpdateLastBlackLine has been removed. FindDead has been adjusted so that it will still function.
  • FindRockColor and FindWaterColor have been updated,
  • Path.scar now uses a dynamic array. Default is still 50. Do not forget to call SetupPath;
  • You can either set the 'Path' length by using SetPathLength(yourlength) or just SetLength(Path, yourlength).
  • 'Clothes Shop' was twice in the newAutoColor array.
  • FFlag returns a boolean.
  • Added a failsafe in FixBank…

General updates and fixes:

  • We have tried to add more initilization to functions. (Result := '', Result := False, and Result := 0);
  • We have added an error system.
{*******************************************************************************
Procedure srl_Warn(ProcName, ErrorMessage: String; wVersion: Integer);
by: SRL Dev Team
Description: WriteLn's a warning message.
*******************************************************************************}

Const
warn_AllVersions = 0;
warn_Terminate = -1;
warn_Warning = -2;

Procedure srl_Warn(ProcName, ErrorMessage: String; wVersion: Integer);

Begin
Case wVersion Of
warn_Terminate: begin end;
warn_AllVersions: begin end;
warn_Warning: If Not ShowWarnings Then
Exit;
Else If wVersion <> SRLVersionNumber Then
Exit;
End;
WriteLn('** Warning in ' + ProcName + ': ' + ErrorMessage + '**');
If wVersion = -1 Then
TerminateScript;
End;

Apart from the three constants, you can also give the procedure a certain Revision number. Like we did in the new Deposit:
Procedure Deposit(SlotFrom, SlotTo: Integer; vType: Variant);

Var
DepositX: Boolean;
All: Variant;
I, T, x, y: Integer;

Begin
If Not BankScreen Then
Exit;
If vType = 2 Then
srl_Warn('Deposit', '2 now means store per 2, not ''All''', 15);
DepositX := False;
Case VarType(vType) Of
3: Begin
DepositX := Not InIntArray([1, 5, 10], vType);
If vType = 1 Then
All := False
Else
All := True;
End;
11: All := vType;
End;
For I := 1 To 28 Do
Begin
If Not ExistsItem(I) Then
Continue;
MouseItem(I, Not All);
If DepositX Then
Begin
ChooseOption('Store X');
T := GetSystemTime;
While (Not FindColor(x, y, 8388608, MCX1, MCY1, MCX2, MCY2)) And (GetSystemTime - T < 3000) Do
Wait(100);
TypeSend(vType);
End Else If VarType(vType) = 3 Then
ChooseOption('Store ' + vType)
Else
ChooseOption('Store All');
T := GetSystemTime;
While ExistsItem(I) And (GetSystemTime - T < 2000) Do
Wait(50);
End;
End;

New ChooseOption:

function ChooseOption(txt: string): Boolean;
var
B: TBox;
P: TPointArray;
X, Y: Integer;

begin
GetClientDimensions(B.X2, B.Y2);
B.X1 := 0;
B.Y1 := 0;
FindColorsTolerance(P, 4674653, B.X1, B.Y1, B.X2, B.Y2, 0);
If Length(P) = 0 Then
Exit;
B := GetTPABounds(P);
If FindText(X, Y, txt, upchars, B.X1, B.Y1, B.X2, B.Y2) Then
Begin
Result := True;
Mouse(B.X1 + 5, y + 1, Random(B.X2 - B.X1), random(13), True);
End
Else
begin
MMouse(B.X1 - 50, B.Y1 - 50, 40, B.Y2 - B.Y1);
Wait(200 + Random(100));
end;
end;

The Claw

2008-04-05 12:15:53

epic

n3ss3s

2008-04-05 12:16:24

Great job everyone!

I'll talk to you about another possible uber idea for ChooseOption later.

Harry

2008-04-05 12:22:53

Wow. The second I turn on the forums, it is released :) Cool, great works Devs, and a few SRL Members ;)

JW, what is
{*******************************************************************************
Procedure srl_Warn(ProcName, ErrorMessage: String; wVersion: Integer);
by: SRL Dev Team
Description: WriteLn's a warning message.
*******************************************************************************}

Const
warn_AllVersions = 0;
warn_Terminate = -1;
warn_Warning = -2;

Procedure srl_Warn(ProcName, ErrorMessage: String; wVersion: Integer);

Begin
Case wVersion Of
warn_Terminate: begin end;
warn_AllVersions: begin end;
warn_Warning: If Not ShowWarnings Then
Exit;
Else If wVersion <> SRLVersionNumber Then
Exit;
End;
WriteLn('** Warning in ' + ProcName + ': ' + ErrorMessage + '**');
If wVersion = -1 Then
TerminateScript;
End;
all about? :confused:

# Added a Const called SRLVersionNumber.
# FindObj, FindObjEx and FindObjCustom use a new algorithm.

Thanks for SRLVersionNumber! :)
How exactly was FindObjCustom changed?

munk

2008-04-05 12:26:11

jaw to the floor

this is an excellent update. thank you so much devs!


All SRL-Development suggestions have been taken care of.

and thank you mems :)

Ive wanted alot of these and even changed some of them in my srl. MSX1/MSY1! pin string! FFlag boolean! Fixbank! im so happy right now.

PvH

2008-04-05 12:28:48

yay rev 15 is out:D
thanks a lot and keep up the good work:)

P1nky

2008-04-05 12:30:22

Thanks Srl Devs!

bullzeye95

2008-04-05 13:06:05

Nice job :)

But what's the point in initializing results? Does the engine once in a while fail at it?

Wizzup?

2008-04-05 13:15:00

From: bullzeye95
Nice job :)

But what's the point in initializing results? Does the engine once in a while fail at it?


Yes. The engine sometimes messes up the result… It's a common Delphi bug.
I think you can recreate it in SCAR, too.


program new;
var
s:string;

begin
s := '636hfdhfe633';
s := trimnumbers(s);
writeln(s);
end.

If this fives you a normal result, then Freddy has already initialized the GetNumbers result in SCAR 3.15. I am on Ubuntu at the moment so I can't test it. Haven't installed WINE yet.

ShowerThoughts

2008-04-05 13:16:45

Don't know if it worked but:
Successfully compiled (233 ms)
636hfdhfe633hfdhfe
Successfully executed

Sweet, and i have the same question as Hy^^

igotgrapes

2008-04-05 13:17:45

edit
i'll just figure it out myself.

Cazax

2008-04-05 13:18:58

From: Hermpie
Don't know if it worked but:
Successfully compiled (233 ms)
636hfdhfe633hfdhfe
Successfully executed

Sweet, and i have the same question as Hy^^


Didnt work, becouse it should delete that numbers, as you see it didnt…

Nice job devs & members.

Pierre14

2008-04-05 17:36:35

Cool 15 is out!!!

Just a quick question doe's this mean that 14 isn't good anymore?

Oh and thank you dev team and member's!! great job!!!

Sir R. M8gic1an

2008-04-05 17:52:41

14 is still good, because runescape didn't update, this is just us evolving ;)

great job to all the devs :D

and yay i got my name in the include twice! (very proud :) )

~RM

Daniel

2008-04-05 18:55:28

Yay! Congratulations! But what was the point in adding this when Runescape hadn't updated it? Or is it just to add new functions/procedures?

lakerzz8

2008-04-05 19:11:59

From: IP-Drowner
Yay! Congratulations! But what was the point in adding this when Runescape hadn't updated it? Or is it just to add new functions/procedures?


When Runescape updates it is necessary to change some things to keep Scar working, however when Runescape doesn't update SRL can still be updated to improve functionality, add more features, fix previous bugs that may go unnoticed, etc.

Timer

2008-04-05 19:14:09

It WAS Nessisary. RS Colors Updated. All Auto-Color Was Broke..

Daniel

2008-04-05 19:14:13

From: lakerzz8
When Runescape updates it is necessary to change some things to keep Scar working, however when Runescape doesn't update SRL can still be updated to improve functionality, add more features, fix previous bugs that may go unnoticed, etc.


I know that. But to me it was already nearly pushed to the limit.

From: timer
It WAS Nessisary. RS Colors Updated. All Auto-Color Was Broke..

Really? How the hell can you find out if colours change all the time?

Timer

2008-04-05 19:15:56

OffTopic… LOL. IP GOT UN-SRL MEMBERARIZED!!! WTF?

lakerzz8

2008-04-05 19:58:46

From: Timer
OffTopic… LOL. IP GOT UN-SRL MEMBERARIZED!!! WTF?



Huh? It still says SRL Member under his name…

MylesMadness

2008-04-05 20:16:28

From: lakerzz8
Huh? It still says SRL Member under his name…
Yeah. You high or something?

goakley

2008-04-05 22:42:31

(BACKONTOPIC) It was? Didn't know that.

NiCbaZ

2008-04-05 22:50:48

nice update devs, i got a suggestion for a next rev, how about when rs gets updated wait (10000) of something and just change to non members world then back to members vice versa.

Wizzup?

2008-04-06 06:02:10

From: Mylesmadness
Yeah. You high or something?


I'm just too quick. ;)
I fixed IP Drowner's problem already.

EvilChicken!

2008-04-06 06:53:33

Wait, I like nicbaz' suggestion. Or wait a bit more. SCAR would loose focus. Is his suggestion good?

Negaal

2008-04-06 06:57:46

Oh, now I have to update my scripts a bit, I promised I update LCK when rev 15 comes out.

Nice job though:)

kingarabian

2008-04-07 17:59:30

Ummm….so how do we use findobjex now? I didnt get what wizzup? was saying.