SRL Archive - News and General

SRL Public Revision #29 & 30


Wizzup?

2008-12-08 08:06:33

Revision #29!

The latest SMART has been added. Please note that this version still only works minimized.
The source of SkyScripter's awesome plugin has been added.

More info will probably be posted in this thread. :p

EDIT: I think I forgot the set the SRLVersionNumber… ;)

TheChineseMan

2008-12-08 08:10:47

kool but thought next rev would have SMART fixed ohh well longer wait…

Wizzup?

2008-12-08 08:12:46

Fixed something. Use #30 instead. :)

Kyle Undefined

2008-12-08 08:14:31

Very nice, thanks :)

~Camo

noodlesalan

2008-12-08 08:18:36

Has the randoms been fixed?

I hope so…. T.T

Narcle

2008-12-08 09:37:19

Lrn2 put new Worlds.ini in revs, kthxbi

Freddy1990

2008-12-08 09:41:47

From: Wizzup?
EDIT: I think I forgot the set the SRLVersionNumber… ;)


Hmm ;)

EvilChicken!

2008-12-08 11:19:33

Revision #29 also contains a really neat feature possibly worth checking out, in globals.scar, called SRL procedure constants. They are basically variables that are called during various times throughout commonly used SRL procedures and functions, as their names might imply.

To make use of this feature, simply assign a procedure to one of the 9 SRL_Procs variables! Like this:

procedure LOL;
begin
WriteLn('Yay?');
end;

begin
SetUpSRL;
SRL_Procs[0] := @LOL; { Here, we assign the SRL_Procs[0] variable (declared in Globals.scar) to procedure LOL;. }
if (SRL_Procs[0] <> nil) then { Not really needed in this exact case, but just an example on
how to check if a procedure variable actually is assigned to a procedure. }
SRL_Procs[0](); { Here, we finally call the procedure assigned to the variable. }
end.

I highly reccomend you to check out globals.scar in the core folder to get better understanding of this feature.

Nava2

2008-12-08 15:04:14

New feature makes for some very useful… thoughts?

Not sure how to explain it. But, I will be using :)

lordsaturn

2008-12-08 15:08:51

What are the advantages of using the SRL_Procs variables?

senrath

2008-12-08 15:09:17

Sweet. Those new things in globals.scar look fun. I'm definitely gonna fiddle around with them.

Edit:
From: lordsaturn
What are the advantages of using the SRL_Procs variables?


They're called during various things within SRL. From what I understand if you defined, say, SRL_Procs[7] as procedure Blah, then it would call Blah whenever you called FindNormalRandoms, FindInventoryRandoms, or FindNonInventoryRandoms.

Hugolord

2008-12-08 15:12:06

Have any randoms been fixed update in this rev?

Wizzup?

2008-12-08 15:43:17

From: Hugolord
Have any randoms been fixed update in this rev?


There have been small fixes mainly, I don't think the Box has been fully fixed yet, though.
The SRL_Procs are used to make SRL performs certain functions at fixed events. Like if it has finished talking to a random, then it will call the SRL_Procs[srl_OnFindRandom]. You can assign a procedure to this function.

Add this to your script:

Procedure WriteInRandoms;
Begin
WriteLn('We are calling FindNormalRandoms');
End;

And in the setup:
SRL_Procs[srl_OnRandomCall] := @WriteInRandoms;

You'll see what it does soon enough. ;)

Blumblebee

2008-12-08 15:51:25

wow thats pretty sweet, could you call your proggies, ect with it? /me gets a bunch of ideas…

Harry

2008-12-08 15:57:32

EDIT: I think I forgot the set the SRLVersionNumber… ;)

Darn you Wizzup :p

Anything else changed except for randoms and SMART? :)

botsrs

2008-12-08 16:02:17

Line 77: [Error] (94:1): 'BEGIN' expected in script C:\Program Files\SCAR 3.15\includes\srl/srl/misc/smart.scar
<<<<<<< .mine
// SRL Development Team
procedure SmartSetupEx(worldnumber: integer; members, signed, superdetail: boolean);
=======
procedure SmartSetupEx(worldnumber: integer; members, signed, superdetail: boolean);
>>>>>>> .r30
I get that error since the new update.

Timer

2008-12-08 16:31:51

From: botsrs
Line 77: [Error] (94:1): 'BEGIN' expected in script C:\Program Files\SCAR 3.15\includes\srl/srl/misc/smart.scar
<<<<<<< .mine
// SRL Development Team
procedure SmartSetupEx(worldnumber: integer; members, signed, superdetail: boolean);
=======
procedure SmartSetupEx(worldnumber: integer; members, signed, superdetail: boolean);
>>>>>>> .r30
I get that error since the new update.

Delete that file then re download srl… ;)
============================================
Hmm, nice, Rev 29, add
UseAutoResponder := True;
, rev 30, just to remove it.. ;)

Hmm, why'd you guys change
      0..9: text := IntToStr(I);
to
      0: text := '0'; //Zero
1: text := '1'; //One
2: text := '2'; //Two
3: text := '3'; //Three
4: text := '4'; //Four
5: text := '5'; //Five
6: text := '6'; //Six
7: text := '7'; //Seven
8: text := '8'; //Eight
9: text := '9'; //Nine

Huh -
unit WizzyPlugin_AquaPet;
and
package perspective;

*
* @author benland100
*)
-confused…- xD

Nice updates, looked at em all.

botsrs

2008-12-08 17:35:18

Thanks, Timer. But still, none of my scripts actually start. They're all SMART, and I redid the SMART fixes. They start fine, but end just as fast. The SMART window doesn't even come up in some.

MylesMadness

2008-12-08 18:28:13

Whats WizzyPlugin_AquaPet?

Wizzup?

2008-12-08 18:35:33

From: Mylesmadness
Whats WizzyPlugin_AquaPet?


It's for 3d -> 2d conversions.

Narcle

2008-12-08 18:59:38

Perhaps someone should make a small tut on SRL_Procs? They are very useful and should be explained in detail so people can start implementing them. (I'm too busy atm)

Wizzup?

2008-12-08 19:03:49

From: Narcle
Perhaps someone should make a small tut on SRL_Procs? They are very useful and should be explained in detail so people can start implementing them. (I'm too busy atm)


I think my previous post explained them quite well..

Narcle

2008-12-08 19:07:29

From: Wizzup?
I think my previous post explained them quite well..


yes but how many will even read it? :p

EvilChicken!

2008-12-08 19:11:20

Fine, I'll write a short tutorial on them.

Shaxper

2008-12-08 22:25:42

//Click 'Log In' on main menu
<<<<<<< .mine
while (GetColor(343, 175) <> 7750) do
=======

Line 332: [Error] (5336:1): Identifier expected in script

line 332 is the <<<mine line. how do i fix this

P1nky

2008-12-08 22:39:19

awsome job Srl staff :)

ya a bit confuzed on the srl funcs.

make the tut fast! lol

Method

2008-12-08 22:41:32

From: Shaxper
//Click 'Log In' on main menu
<<<<<<< .mine
while (GetColor(343, 175) <> 7750) do
=======

Line 332: [Error] (5336:1): Identifier expected in script

line 332 is the <<<mine line. how do i fix this


Delete that file and re-download SRL through the SVN repository. That should fix your error.

ZephyrsFury

2008-12-09 06:25:15

Some more examples for SRL_Procs… (I use some of these personally).

OnRandomCall -> Refresh copied SMART client on the debug image window.

procedure PaintSmartClient;
begin
//Actual stuff here
end;

procedure SetupScript;
begin
SetupSRL;
SRL_Procs[srl_OnRandomCall] := @PaintSmartClient;
end;

OnNextPlayer -> SwitchWorlds

procedure SwitchWorlds;
begin
//blah blah
end;

procedure SetupScript;
begin
SetupSRL;
SRL_Procs[srl_OnNextPlayer] := @SwitchWorlds;
end;

Inbuilt antiban:

procedure MyAntiBanProc;
begin
// all your usual script based antiban here
end;

procedure SetupScript;
begin
SetupSRL;
SRL_Procs[srl_AntiBan] := @MyAntiBanProc;
end;

SRL_Procs[srl_AntiBan] is called when during FFlag and Flag whilst waiting for the character to reach the flag. You could also assign MyAntiBanProc to srl_OnRandomCall to make sure antiban is called at the same time as FindNormalRandoms.

Just a few examples but the point I'm trying to make is that the procedure doesn't have to be simple. Use your imagination and go beserk.

Also something that was not mentioned….


{*******************************************************************************
function GetChatBoxText(Line, TextCol: Integer): string;
By: ZephyrsFury
Description: Gets text on the line Line with colour TextCol. (Line 1 is the top,
Line 8 is the bottom line).
Colours:
clMessage/clBlack - Black text messages ("Oh Dear you are dead", etc).
clChat/clBlue - Chat messages from you and other players.
clTrade/clPurple - Colour of trade request text.
clFriend - Colour of friend and clan chat.
Works with other colours too.
*******************************************************************************}

{*******************************************************************************
function FindChatBoxText(Text: string; Line: Integer; TextCol: Integer): Boolean;
By: ZephyrsFury
Description: Searches for Text on Line with colour TextCol. True if found.
*******************************************************************************}

{*******************************************************************************
function IsChatBoxTextAnyLine(Text: string; TextCol: Integer): Boolean;
By: ZephyrsFury
Description: Returns true if Text with colour TextCol is found anywhere in the
chat box.
*******************************************************************************}

{*******************************************************************************
function ChatBoxTextArray(TextCol: Integer): TStringArray;
By: ZephyrsFury
Description: Gets and return a TStringArray with the contents of each line with
the colour TextCol (see GetChatBoxText for list of colours).
Line 1 is Result[1]
Line 2 is Result[2]
Line 3 is Result[3]
Line 4 is Result[4]
Line 5 is Result[5]
Line 6 is Result[6]
Line 7 is Result[7]
Line 8 is Result[8]
*******************************************************************************}

New Chat Box Text Functions in Text.scar.


These new functions combine old Chatbox functions where there used to be separate functions for just black message and blue chat text. These new functions work with all chat text including message, chat, trade and private chat messages. The 4 functions above are similar to many of the old functions and do the same thing (apart from the colour) as to minimise the amount of editing a script requires to be ready for SRL #30.

Changes for commom old functions:



IsBlackText('Text', LineNo) -> FindChatBoxText(LineNo, 'Text', clMessage)

GetBlackText(LineNo) -> GetChatBoxText(LineNo, clMessage)

IsBlackTextAnyLine('Text') -> IsChatBoxTextAnyLine('Text', clMessage)

ChatsBlackText -> ChatBoxTextArray(clMessage)

MylesMadness

2008-12-09 07:21:34

From: Wizzup?
It's for 3d -> 2d conversions.
Like, bens box solver?

vikrant60

2008-12-11 07:00:46

LOL sounds mean ^^ GJ BRO :)

weequ

2008-12-13 11:56:16

Finally smart is back:) GJ and YEAH!!!

Naum

2008-12-14 05:22:57

Hmm, I remember Wizzup? making a tutorial on these functions???

Really cool guys, easy to use :)

EvilChicken!

2008-12-14 05:57:30

Oh, I obviously forgot to post on this thread, if anyone is interested in those user-defined procedures, the link for the tutorial to them is here:

http://www.villavu.com/forum/showthread.php?t=39358?t=42267

r3dr4g0n

2008-12-14 12:35:31

Nice…

So SMART will only run if you minimize it ASAP correct?

So im guessing the next SRL Revision will have a fully functional and proper SMART fix? :D


Thanks SRL Staff… keep up the good work!

Method

2008-12-14 12:52:05

From: r3dr4g0n
So im guessing the next SRL Revision will have a fully functional and proper SMART fix? :D


Unless BenLand suddenly decides to fix it, no, there probably won't be a fixed SMART in the next revision.

r3dr4g0n

2008-12-15 18:10:15

Hmm fair enough, no one has unlimited free time anyway :)

Nose Smasher

2008-12-16 00:37:54

I noticed the changes in text.scar -> Any chance RC is working again? :p

EvilChicken!

2008-12-16 03:31:09

From: nose_smasher
I noticed the changes in text.scar -> Any chance RC is working again? :p


I have a "temp" fix that works, but it only reads commands and it doesn't respond.

This hasn't been fixed becuase the chars in the "friends" tabs are special chars not found anywhere else in RS, and freddy will probably include them in next release of SCAR if he hasn't alredy. In any way, it's SCAR, not SRL's fault.

NCDS

2008-12-21 22:50:45

All these fixes seem cool, Im somewhat excited to use the new user proc's but when can we expect some randoms fixes? Any suspected dates or anything on that yet? I understand they take time, Im just curious is all :)

Wizzup?

2008-12-22 06:19:37

From: N C D S
All these fixes seem cool, Im somewhat excited to use the new user proc's but when can we expect some randoms fixes? Any suspected dates or anything on that yet? I understand they take time, Im just curious is all :)


I hope to bring some random fixes, as well with hopefully the Prison Pete solver. :)

jakeyboy29

2008-12-22 08:35:05

From: Wizzup?
I hope to bring some random fixes, as well with hopefully the Prison Pete solver. :)


from the manfromchech?

Method

2008-12-22 11:29:30

From: jakeyboy29
from the manfromchech?


Presumably, yes, considering it's the only one we've been made aware of thus far. I'm looking forward to it. :)