The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SPAWN that checks townstone?
Author Message
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #1
SPAWN that checks townstone?
im looking for a way to make a SPAWN check the REGION for the TOWNSTONE to see what the OWNERS of the townstone's GUILD is


any ideas how to do that?

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 01-19-2015 12:43 PM by x77x.)
01-12-2015 02:49 AM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #2
RE: SPAWN that checks townstone?
a spawn group that uses IF perhaps?

Dragons of Time 2000-2020
http://dragonsoftime.com
01-12-2015 02:29 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #3
RE: SPAWN that checks townstone?
Create [TYPEDEF t_spawn_townstone] for example with a ON=@Timer trigger inside checking that (yes, that IF), and apply it to the spawn you want to change between IDs.
01-14-2015 03:11 AM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #4
RE: SPAWN that checks townstone?
quick example please?

Dragons of Time 2000-2020
http://dragonsoftime.com
01-15-2015 06:06 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #5
RE: SPAWN that checks townstone?
Code:
[TYPEDEF t_spawn_townstone]
ON=@Timer
if (<the linked townstone.link.guild>==x)
more=bla
else
more=ble
endif
01-15-2015 11:09 PM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #6
RE: SPAWN that checks townstone?
something like this?

Code:
[TYPEDEF t_spawn_townstone_brit]
ON=@Timer
if (<040001fb2.link.guild>==040004000)//townstoneid - guildstoneid wei
more=c_wei_infantry_light_f
else
if (<040001fb2.link.guild>==040004001)//townstoneid - guildstoneid wu
more=c_wu_infantry_light_f
endif


wouldnt you check for the townstone owners guild?
the town owners will change hands, so whatever guild the town owner is, thats what type of spawns will spawn... if it changes to a different guild then so will the spawns

Dragons of Time 2000-2020
http://dragonsoftime.com
01-16-2015 02:54 AM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #7
RE: SPAWN that checks townstone?
Code:
[TYPEDEF t_spawn_luoyang]
ON=@Timer
IF (<UID.040004100.LINK>==01ffd)//caocao
more=c_wei_infantry_light_f
more=c_wei_infantry_light_c
ELIF (<UID.040004100.LINK>==01fda)//sunquan
more=c_wu_infantry_light_f
more=c_wu_infantry_light_c
ELIF (<UID.040004100.LINK>==01fd1)//liubei
more=c_shu_infantry_light_f
more=c_shu_infantry_light_c
ELIF (<UID.040004100.LINK>==01fd5)//yuanshao
more=c_ys_infantry_light_f
more=c_ys_infantry_light_c
ELIF (<UID.040004100.LINK>==01fc5)//lubu
more=c_lb_infantry_light_f
more=c_lb_infantry_light_c
ELIF (<UID.040004100.LINK>==01ff7)//zhangjiao
more=c_yt_infantry_light_f
more=c_yt_infantry_light_c
ELIF (<UID.040004100.LINK>==01fdc)//menghuo
more=c_mh_infantry_light_f
more=c_mh_infantry_light_c
ENDIF

[TYPEDEF t_spawn_changan]
ON=@Timer
IF (<UID.040004101.LINK>==01ffd)//caocao
more=c_wei_infantry_light_f
more=c_wei_infantry_light_c
ELSE
IF (<UID.040004101.LINK>==01fda)//sunquan
more=c_wu_infantry_light_f
more=c_wu_infantry_light_c
ELSE
IF (<UID.040004101.LINK>==01fd1)//liubei
more=c_shu_infantry_light_f
more=c_shu_infantry_light_c
ELSE
IF (<UID.040004101.LINK>==01fd5)//yuanshao
more=c_ys_infantry_light_f
more=c_ys_infantry_light_c
ELSE
IF (<UID.040004101.LINK>==01fc5)//lubu
more=c_lb_infantry_light_f
more=c_lb_infantry_light_c
ELSE
IF (<UID.040004101.LINK>==01ff7)//zhangjiao
more=c_yt_infantry_light_f
more=c_yt_infantry_light_c
ELSE
IF (<UID.040004101.LINK>==01fdc)//menghuo
more=c_mh_infantry_light_f
more=c_mh_infantry_light_c


okay so now how do i use this with a spawngem ?

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 01-19-2015 12:33 PM by x77x.)
01-19-2015 12:39 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #8
RE: SPAWN that checks townstone?
.xevents +t_spawn_luoyang ->target the spawn -> after finishing with all the spawns remember that they are static items (or use to be) and they need to be saved as statics (serv.savestatics).
01-19-2015 11:01 PM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #9
RE: SPAWN that checks townstone?
im confused... what about the min max time and range?

Dragons of Time 2000-2020
http://dragonsoftime.com
01-20-2015 01:01 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #10
RE: SPAWN that checks townstone?
Look at your code:
Code:
[TYPEDEF t_spawn_changan]
ON=@Timer
IF (<UID.040004101.LINK>==01ffd)//caocao
more=c_wei_infantry_light_f
more=c_wei_infantry_light_c
ELSE
IF (<UID.040004101.LINK>==01fda)//sunquan
more=c_wu_infantry_light_f
more=c_wu_infantry_light_c
ELSE
IF (<UID.040004101.LINK>==01fd1)//liubei
more=c_shu_infantry_light_f
more=c_shu_infantry_light_c
ELSE
IF (<UID.040004101.LINK>==01fd5)//yuanshao
more=c_ys_infantry_light_f
more=c_ys_infantry_light_c
ELSE
IF (<UID.040004101.LINK>==01fc5)//lubu
more=c_lb_infantry_light_f
more=c_lb_infantry_light_c
ELSE
IF (<UID.040004101.LINK>==01ff7)//zhangjiao
more=c_yt_infantry_light_f
more=c_yt_infantry_light_c
ELSE
IF (<UID.040004101.LINK>==01fdc)//menghuo
more=c_mh_infantry_light_f
more=c_mh_infantry_light_c

this looks like:
Code:
[TYPEDEF t_spawn_changan]
ON=@Timer
IF (<UID.040004101.LINK>==01ffd)//caocao
    more=c_wei_infantry_light_f
    more=c_wei_infantry_light_c
ELSE
    IF (<UID.040004101.LINK>==01fda)//sunquan
        more=c_wu_infantry_light_f
        more=c_wu_infantry_light_c
    ELSE
        IF (<UID.040004101.LINK>==01fd1)//liubei
            more=c_shu_infantry_light_f
            more=c_shu_infantry_light_c
        ELSE
            IF (<UID.040004101.LINK>==01fd5)//yuanshao
                more=c_ys_infantry_light_f
                more=c_ys_infantry_light_c
            ELSE
                IF (<UID.040004101.LINK>==01fc5)//lubu
                    more=c_lb_infantry_light_f
                    more=c_lb_infantry_light_c
                ELSE
                    IF (<UID.040004101.LINK>==01ff7)//zhangjiao
                        more=c_yt_infantry_light_f
                        more=c_yt_infantry_light_c
                    ELSE
                        IF (<UID.040004101.LINK>==01fdc)//menghuo
                            more=c_mh_infantry_light_f
                            more=c_mh_infantry_light_c

You may not know but elif/elseif are different than else -> if. Try to add a tab or a whitespace between IF and ELSE and/or ELIF and/or ENDIF (and always use ENDIF to close).

Anyway, what's wrong with min,max and range? You are only giving a bit of customization to the spawn... you are not overriding its default behaviour. Try to test things and then ask questions.
01-20-2015 05:02 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)