SphereCommunity
IFs possible in the text portion of a gump? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: IFs possible in the text portion of a gump? (/Thread-IFs-possible-in-the-text-portion-of-a-gump)

Pages: 1 2


IFs possible in the text portion of a gump? - x77x - 10-27-2015 06:37 AM

Code:
[DIALOG d_capture]
30, 50
nomove
gumppic 0 0 5593//5528
.
.
.
button 480 170 247 249 1 0 1//okay
button 560 170 241 243 1 0 2//cancel
//
IF <uid.040004100>
text 90 150 <more> 4//brit-xuchang
ELSE
IF <uid.040004101>
text 10 90 <more> 5//yew-changan
ELSE
IF <uid.040004102>
text 150 120 <more> 6//cove-luoyang
ELSE
IF <uid.040004103>
text 185 45 <more> 7//minoc-ye
ELSE
IF <uid.040004104>
text 165 90 <more> 8//wind-xiapi
ELSE
IF <uid.040004105>
text 200 70 <more> 9//vesper-shouchun
ELSE
IF <uid.040004106>
text 320 105 <more> 10//moonglow-jianye
ELSE
IF <uid.040004107>
text 180 200 <more> 11//bucs-jiangling
ELSE
IF <uid.040004108>
text 250 110 <more> 12//njulem-chaisang
ELSE
IF <uid.040004109>
text 255 198 <more> 13//magincia-jiangxia
ELSE
IF <uid.04000410a>
text 240 240 <more> 14//ocllo-changsha
ELSE
IF <uid.04000410b>
text 120 255 <more> 15//trinsic-chengdu
ELSE
IF <uid.04000410c>
text 20 205 <more> 16//skara-hanzhong
ELSE
IF <uid.04000410d>
text 200 320 <more> 17//serpents-yongan
ELSE
IF <uid.04000410e>
text 80 350 <more> 18//jhelom-jiangzhou
ELSE
IF <uid.04000410f>
text 412 290 <more> 19//papua-jianning
ELSE
IF <uid.040004110>
text 381 365 <more> 20//delucia-yunnan
ELSE
IF <uid.040004111>
text 280 35 <more> 21//snowlands xiang ping
ELSE
IF <uid.040004112>
text 318 218 <more> 22//seaport ping yuan
ELSE
IF <uid.040004113>
text 335 325 <more> 23//fireisland wu
ELSE
IF <uid.040004114>
text 188 8 <more> 24//northlands ji

[DIALOG d_capture TEXT]
Capture the town of
//<name>
<name>
.
.
.

its finding the name correctly, but it is NOT moving it around the dialog...
its place the name in the first spot - text 90 150


RE: IFs possible in the text portion of a gump? - pointhz - 10-27-2015 07:08 AM

forget the [DIALOG d_cature TEXT]

Instead, use DTEXT in [DIALOG d_capture]

IF <uid.040004100>
Dtext 90 150 <more> 11//brit-xuchang
ENDIF


RE: IFs possible in the text portion of a gump? - x77x - 10-27-2015 07:23 AM

so...

IF <uid.040004100>
Dtext 90 150 <more> Xu Chang//brit-xuchang
ENDIF
IF <uid.040004101>
Dtext 10 90 <more> Chang An//yew-changan
ENDIF
IF <uid.040004102>
text 150 120 <more> Luo Yang//cove-luoyang
ENDIF
IF <uid.040004103>
Dtext 185 45 <more> Ye//minoc-ye
ENDIF
ect...

NO ELSES?
that doesnt work...

this dont work either

IF <uid.040004100>
Dtext 90 150 <more> Xu Chango//brit-xuchang
ELSE
IF <uid.040004101>
Dtext 10 90 <more> Chang An//yew-changan
ELSE
IF <uid.040004102>
Dtext 150 120 <more> Luo Yang//cove-luoyang
ELSE
IF <uid.040004103>
Dtext 185 45 <more> Ye//minoc-ye
ELSE


RE: IFs possible in the text portion of a gump? - pointhz - 10-27-2015 07:56 AM

IF
ELSE
IF
ELSE

makes no sense.

You either use

IF
ENDIF

or

IF
ELSEIF
ENDIF

or

IF
ELSE
ENDIF

what is IF <uid.040004102> ? That doesn't seem to make any sense either


RE: IFs possible in the text portion of a gump? - Kanibal - 10-27-2015 07:57 AM

Code:
IF <uid.040004100>
Dtext 90 150 <more> Xu Chango//brit-xuchang
ELIF <uid.040004101>
Dtext 10 90 <more> Chang An//yew-changan
ELIF <uid.040004102>
Dtext 150 120 <more> Luo Yang//cove-luoyang
ELIF <uid.040004103>
Dtext 185 45 <more> Ye//minoc-ye
ELSE
...
ENDIF



RE: IFs possible in the text portion of a gump? - x77x - 10-27-2015 08:06 AM

still nothing...

Code:
IF <uid.040004100>
Dtext 90 150 <more> Xu Chango//brit-xuchang
ELIF <uid.040004101>
Dtext 10 90 <more> Chang An//yew-changan
ELIF <uid.040004102>
Dtext 150 120 <more> Luo Yang//cove-luoyang
ELIF <uid.040004103>
Dtext 185 45 <more> Ye//minoc-ye
ELIF <uid.040004104>
Dtext 165 90 <more> Xia Pi//wind-xiapi
ELIF <uid.040004105>
Dtext 200 70 <more> Shou Chun//vesper-shouchun
ELIF <uid.040004106>
Dtext 320 105 <more> Jian Ye//moonglow-jianye
ELIF <uid.040004107>
Dtext 180 200 <more> Jiang Ling//bucs-jiangling
ELIF <uid.040004108>
Dtext 250 110 <more> Chai Sang//njulem-chaisang
ELIF <uid.040004109>
Dtext 255 198 <more> Jiang Xia//magincia-jiangxia
ELIF <uid.04000410a>
Dtext 240 240 <more> Chang Sha//ocllo-changsha
ELIF <uid.04000410b>
Dtext 120 255 <more> Cheng Du//trinsic-chengdu
ELIF <uid.04000410c>
Dtext 20 205 <more> Han Zhong//skara-hanzhong
ELIF <uid.04000410d>
Dtext 200 320 <more> Yong An//serpents-yongan
ELIF <uid.04000410e>
Dtext 80 350 <more> Jiang Zhou//jhelom-jiangzhou
ELIF <uid.04000410f>
Dtext 412 290 <more> Jian Ning//papua-jianning
ELIF <uid.040004110>
Dtext 381 365 <more> Yun Nan//delucia-yunnan
ELIF <uid.040004111>
Dtext 280 35 <more> Xiang Ping//snowlands xiang ping
ELIF <uid.040004112>
Dtext 318 218 <more> Ping Yuan//seaport ping yuan
ELIF <uid.040004113>
Dtext 335 325 <more> Wu//fireisland wu
ELIF <uid.040004114>
Dtext 188 8 <more> Ji//northlands ji
ELSE
RETURN 0
ENDIF

im trying to use 1 gump for 21 different townstones

its checking to see which townstone this is
and putting up the correct name on the map, in the correct location

shouldnt it be something like IF (<uid>==040004100) ??


RE: IFs possible in the text portion of a gump? - Kanibal - 10-27-2015 08:12 AM

(10-27-2015 08:06 AM)x77x Wrote:  im trying to use 1 gump for 21 different townstones

its checking to see which townstone this is
and putting up the correct name on the map, in the correct location

shouldnt it be something like IF (<uid>==040004100) ??
Is the town stones has unique name, or better TAG's(HEX or DEC)?


RE: IFs possible in the text portion of a gump? - x77x - 10-27-2015 08:21 AM

they are all named, but i think it would be better check for the correct serial

BUT they are all tagged

TAG.namez="xuchang"
TAG.namez="changan"


RE: IFs possible in the text portion of a gump? - Kanibal - 10-27-2015 08:25 AM

(10-27-2015 08:21 AM)x77x Wrote:  they are all named, but i think it would be better check for the correct serial
facepalm.jpg

You shoul'd check ITEMDEF or DEFNAME better.


RE: IFs possible in the text portion of a gump? - x77x - 10-27-2015 08:27 AM

so you think this?

IF <tag.xuchang>
Dtext 90 150 <more> Xu Chang//brit-xuchang
ELIF <tag.changan>
Dtext 10 90 <more> Chang An//yew-changan
ELIF <tag.luoyang>
Dtext 150 120 <more> Luo Yang//cove-luoyang