SRL Archive - SRL Archives

FavWorld - WorldSwitcher.scar


Sandstorm

2009-01-17 23:21:45

Chooses either favorite world. Not advanced at all, but perfect if you use SMART and want it to open a themed world for the run time.

{*******************************************************************************
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
MMouse(XCo + Random(5), YCo, 3, 3)
Else
WriteLn('You don''t have a world favorited there!');
End;
2 : If GetColor(429, 264) = 1648224 Then
MMouse(435, 264, 3, 3)
Else
WriteLn('You don''t have a world favorited there!');
End;
End;

First time I've ever used If LoggedIn Then xD.

~Sandstorm

Naike

2009-01-18 06:29:45

You should make a failsafe for if they don't have set a favorit world..

Narcle

2009-01-18 06:32:12

Do a reading function/color check to see if the favorite(s) is there.

Sandstorm

2009-01-18 09:37:43

Yea, haven't added that yet. I've only used it once, and just told the users to set it to 0 :P.

But yea, I'll do that now.

~Sandstorm

Baked0420

2009-01-18 09:54:03

If they don't have one it isn't a big deal, then they just don't pick the fav. world and it logs into auto world, not a big deal in my opinion. I used to have this also, but it would just click my first fav world, since that's the one I always used.

Sandstorm

2009-01-18 09:55:51

I fail. I just realized I hadn't targeted the RS screen o.o.

{*******************************************************************************
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
MMouse(XCo + Random(5), YCo, 3, 3)
Else
WriteLn('You don''t have a world favorited there!');
End;
2 : If GetColor(429, 264) = 1648224 Then
MMouse(435, 264, 3, 3)
Else
WriteLn('You don''t have a world favorited there!');
End;
End;

Works with or without favorited worlds. It can use one or two favorited worlds (The first one moves, so I had to compensate for that xD). The color seems to be static to.

~Sandstorm