SRL Archive - OSR Help

ChangeWorld misses selected world


Soundzombie

2013-05-09 11:17:22

After the update as of minutes ago, a few servers have been added. As a result, the Smart8 pointer ends up in between 2 worlds, at least on mine, and ends up canceling changing. I tried altering the array to match the new server list, but it still lingers in between. Where do I fix this?


New Array:
 worldarray :=
[301,319,341,361,+
302,320,342,362,+
303,321,343,365,+
304,322,344,366,+
305,325,345,367,+
306,326,346,368,+
308,327,349,369,+
309,328,350,370,+
310,329,351,373,+
311,330,352,374,+
312,333,353,375,+
313,334,354,376,+
314,335,357,377,+
316,336,358,378,+
317,337,359,+
318,338,360];

[ATTACH=CONFIG]21162[/ATTACH]

Soundzombie

2013-05-09 11:21:28

Sorry to double post, but I'm assuming it's somewhere in one of these functions:

(*
WorldIndexToMSPoint
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

function WorldIndexToMSPoint(Index: Integer): TPoint;

Converts the World Index (spot in World) to a Mainscreen TPoint of the Index. (Top Left)

.. note::

Author: Ashaman88

Example:

.. code-block:: pascal

msPoint := WorldIndexToMSPoint(index);
*)
function WorldIndexToMSPoint(Index: Integer): TPoint;
begin
Index := Index ;
Result := Point(200 + (Index mod 4) * 94, 86 + Floor(Index div 4) * 24);
end;

(*
WorldIndexToMSBox
~~~~~~~~~~~~~~~~~

.. code-block:: pascal

function WorldIndexToMSBox(Ind: Integer): TBox;

Converts the World Index (spot in World) to a Mainscreen TBox of the Index.

.. note::

Author: Ashaman88

Example:

.. code-block:: pascal

msBox := WorldIndexToMSBox(index);
*)
function WorldIndexToMSBox(Index: Integer): TBox;
var
P: TPoint;
begin
P := WorldIndexToMSPoint(Index);
Result.X1 := P.X;
Result.Y1 := P.Y;
Result.X2 := Result.X1 + 83;
Result.Y2 := Result.Y1 + 18;
end; {CODE]

Ashaman88

2013-05-09 11:33:27

Calling me out I see. Yeah it needs to be updated. I'll take a look tonight if someone hasn't updated by then

Soundzombie

2013-05-10 19:26:24

Not calling anyone out sir. Haha I totally understand that this is purely volunteer work. I just don't understand the scrit enough to fix it myself. :p

xltb12

2013-05-11 08:08:00

(*
WorldIndexToMSPoint
~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

function WorldIndexToMSPoint(Index: Integer): TPoint;

Converts the World Index (spot in World) to a Mainscreen TPoint of the Index. (Top Left)

.. note::

Author: Ashaman88

Example:

.. code-block:: pascal

msPoint := WorldIndexToMSPoint(index);
*)
function WorldIndexToMSPoint(Index: Integer): TPoint;
begin
Index := Index ;
Result := Point(200 + (Index mod 4) * 94, 74 + Floor(Index div 4) * 24);
end;

(*
WorldIndexToMSBox
~~~~~~~~~~~~~~~~~

.. code-block:: pascal

function WorldIndexToMSBox(Ind: Integer): TBox;

Converts the World Index (spot in World) to a Mainscreen TBox of the Index.

.. note::

Author: Ashaman88

Example:

.. code-block:: pascal

msBox := WorldIndexToMSBox(index);
*)
function WorldIndexToMSBox(Index: Integer): TBox;
var
P: TPoint;
begin
P := WorldIndexToMSPoint(Index);
Result.X1 := P.X;
Result.Y1 := P.Y;
Result.X2 := Result.X1 + 83;
Result.Y2 := Result.Y1 + 22;
end;


this works nicely for me, still not flawless though, as sometimes it will try to switch to the f2p and bug out.

And i changed the arrays aswell

CoDFan819

2013-05-13 07:46:25

From: Ashaman88
Calling me out I see. Yeah it needs to be updated. I'll take a look tonight if someone hasn't updated by then


Sorry to pester, but is there an official fix for this yet?

Cheers

Shatterhand

2013-05-13 18:10:05

http://villavu.com/forum/project.php?issueid=98 :)

EDIT: To make it work, open worldswitcher.simba, search for that worldarray, replace it (two times). Then replace the WorldIndexToMSPoint function and save.

CoDFan819

2013-05-14 02:41:31

From: Shatterhand
http://villavu.com/forum/project.php?issueid=98 :)

EDIT: To make it work, open worldswitcher.simba, search for that worldarray, replace it (two times). Then replace the WorldIndexToMSPoint function and save.


Ah nice one mate thanks :) Just about to give it a try.

Edit: Works, thanks :)