SphereCommunity
Finding Region Name - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Finding Region Name (/Thread-Finding-Region-Name)



Finding Region Name - mlyon83 - 05-18-2013 04:21 AM

I would like to know how to define SRC.REGION.NAME, but "Jail" is currently unidentified in console error:

Code:
IF (<LINK.ACCOUNT.TAG.JAIL_STATUS> == 1)
    IF (<EVAL <TIME> / 10> >= <EVAL <TIME> / 10>+<EVAL <LINK.ACCOUNT.TAG.JAIL_TIME>>)
        LINK.ACCOUNT.TAG.JAIL_STATUS=0
        LINK.TAG.JAIL_LOGIN=0
        LINK.TAG.JAIL_LOGIN2=0
        LINK.EVENTS=-e_player_jailed
        LINK.GO=<LINK.TAG.JAIL_RELEASE_POSITION>
        LINK.MESSAGE @00 You feel free.
    ELSE
        IF (<LINK.REGION.NAME> != Jail)
            VAR.NEXT_JAIL_CELL=<VAR.NEXT_JAIL_CELL>+1
            IF (<VAR.NEXT_JAIL_CELL> >= 5)
                LINK.GO=3905,1255,-10
                VAR.NEXT_JAIL_CELL=0
            ELSEIF (<VAR.NEXT_JAIL_CELL> >= 4)
                LINK.GO=3904,1265,-10
            ELSEIF (<VAR.NEXT_JAIL_CELL> >= 3)
                LINK.GO=3914,1265,-10
            ELSEIF (<VAR.NEXT_JAIL_CELL> >= 2)
                LINK.GO=3914,1255,-10
            ELSEIF (<VAR.NEXT_JAIL_CELL> >= 1)
                LINK.GO=3905,1255,-10
            ENDIF
            LINK.MESSAGE @00 You cannot leave jail until you're forgiven.
        ELSE
            LINK.MESSAGE @00 Nothing shows, test.
        ENDIF
    ENDIF
ENDIF

TIMER=1
RETURN 1



RE: Finding Region Name - RanXerox - 05-18-2013 06:07 AM

The value is a string, so use STRCMP or STRCMPI


RE: Finding Region Name - Mordaunt - 05-18-2013 07:08 AM

And don't use VARS


RE: Finding Region Name - mlyon83 - 05-18-2013 10:28 AM

(05-18-2013 07:08 AM)Mordaunt Wrote:  And don't use VARS

What's wrong with VARs? What else is there to use?


RE: Finding Region Name - Alaric - 05-18-2013 10:46 AM

(05-18-2013 10:28 AM)mlyon83 Wrote:  
(05-18-2013 07:08 AM)Mordaunt Wrote:  And don't use VARS

What's wrong with VARs? What else is there to use?

tag


RE: Finding Region Name - Rattlehead - 05-18-2013 10:47 AM

use LOCAL instead, as VARs will eat up resources alot more than LOCALs will