SPAWN that checks townstone? - x77x - 01-12-2015 02:49 AM
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?
RE: SPAWN that checks townstone? - x77x - 01-12-2015 02:29 PM
a spawn group that uses IF perhaps?
RE: SPAWN that checks townstone? - XuN - 01-14-2015 03:11 AM
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.
RE: SPAWN that checks townstone? - x77x - 01-15-2015 06:06 AM
quick example please?
RE: SPAWN that checks townstone? - XuN - 01-15-2015 11:09 PM
Code:
[TYPEDEF t_spawn_townstone]
ON=@Timer
if (<the linked townstone.link.guild>==x)
more=bla
else
more=ble
endif
RE: SPAWN that checks townstone? - x77x - 01-16-2015 02:54 AM
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
RE: SPAWN that checks townstone? - x77x - 01-19-2015 12:39 AM
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 ?
RE: SPAWN that checks townstone? - XuN - 01-19-2015 11:01 PM
.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).
RE: SPAWN that checks townstone? - x77x - 01-20-2015 01:01 AM
im confused... what about the min max time and range?
RE: SPAWN that checks townstone? - XuN - 01-20-2015 05:02 AM
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.
|