Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
Housing misnomer
|
Author |
Message |
Shidhun
Journeyman
Posts: 59
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Jul 2012
Reputation: 1
|
RE: Housing misnomer
It should work like this.
Code:
[dialog d_evismidegis]
0,0
nomove
noclose
page 0
resizepic 0 0 3500 450 140
gumppic 10 10 100
dtextentry 165 10 195 35 044 1 ? // Put a Number instead of ?
button 360 10 4024 4025 1 0 27
[dialog d_evismidegis button]
on=27
// Change all the "?" to the Number of your dtextentry !
// i just coppied the sysmessages, so i'm not sure if they are in the correct place. I don't speak turkish
if (<type>==t_sign_gump) // shouldn't be needed, if you call the dialog via sdialog from the housegump
if !<argtxt[?]> // Nothing is written into the dialog
src.sysmessage @1152 the house-name can't be changed into "nothing"
return 1
endif
if ( strregex([^A-Za-z0-9\s]+,<argtxt[?]>) != 1 ) // Allows only letters and numbers, nothing else. Remove 0-9 if you only want letters
name=<argtxt[?]>
src.sysmessage @1152 Evinizin ismi degisti.
resendtooltip
else
src.sysmessage @32,,1 Gecersiz isim.!
endif
return 0
endif
|
|
05-30-2014 03:19 AM |
|
|
djazraell
Apprentice
Posts: 26
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2014
Reputation: 0
|
RE: Housing misnomer
Not knowing the importance of Turkish
Console error:
21:08: ERROR: (sphere_item_deco_signs.scp,633)Can't resolve <type>
21:08: ERROR: (sphere_item_deco_signs.scp,633)Undefined symbol ''
I wrote the following
Code:
[ITEMDEF 0bd1]
//brass sign
DEFNAME=i_sign_brass
TYPE=T_SIGN_GUMP
TDATA2=064
FLIP=1
RESOURCES=2 I_BOARD, 1 i_ingot_iron
CATEGORY=Decoration - Signs
SUBSECTION=Blank
DESCRIPTION=Brass Blank
DUPELIST=0bd2
on=@create
attr=attr_move_never
on=@Click
message @0481 Evin sahibi : <uid.<src.targ.more2>.name>
return 1
on=@Dclick
src.dialog d_evtabelasi
return 1
[dialog d_evtabelasi]
110,35
nomove
noclose
resizepic 0 0 3500 450 440
gumppic 10 10 100
button 150 10 4006 4007 1 0 1
dtext 195 10 1152 Evin ismini degistir
button 150 30 4006 4007 1 0 2
dtext 195 30 41 Tabelayi degistir
button 150 50 4006 4007 1 0 3
dtext 195 50 494 Evin durumu
button 150 70 4006 4007 1 0 4
dtext 195 70 5 Ayarlar
button 150 90 4006 4007 1 0 5
dtext 195 90 1152 Owner Ayarları
button 10 390 4005 4007 1 0 6
dtext 45 390 1152 Evden yasakla
button 10 410 4005 4007 1 0 7
dtext 45 410 1152 Yasak Kaldır
button 250 390 4005 4007 1 0 8
dtext 285 390 1152 Banka ac
button 250 410 4005 4007 1 0 9
dtext 285 410 1152 Kapat
dtext 45 115 494 Bu ev <src.targ.tag0.builton> tarihinde <uid.<src.targ.more2>.name>
dtext 45 150 494 tarafindan kurulmustur.
dtext 45 185 494 Tum playerlar sadece 1 ev kurabilir
dtext 45 220 494 Evler icine :
dtext 45 255 494 Dost & Ortak & Sahip 1 strongbox koyabilir.
dtext 45 290 0 Guvenli esya sayisi :
dtext 310 290 1152 <ddef.global_secure_storage>
else
dtext 310 290 1152 <dsrc.targ.tag0.storage_limit>
endif
dtext 45 325 0 Sabit esya sayisi :
dtext 310 325 1152 <dsrc.targ.tag0.locked_items>
dtext 45 360 0 Kilitli esya sayisi :
dtext 310 360 1152 <dsrc.targ.tag0.secure_cont>
[dialog d_evtabelasi button]
on 1
src.sysmessage @1152 Evinizin yeni ismi ne olsun?
src.dialog d_evisimdegis
[dialog d_evisimdegis]
0,0
nomove
noclose
resizepic 0 0 3500 450 140
gumppic 10 10 100
dtextentry 165 10 195 35 044 1 ?
button 360 10 4024 4025 1 0 27
[dialog d_evisimdegis button]
on 27
if (<type>==t_sign_gump)
if !<argtxt[?]>
src.sysmessage @38 isim yazmalisiniz.!
return 1
endif
if ( strregex([^A-Za-z0-9\s]+,<argtxt[?]>) != 1 )
name=<argtxt[?]>
src.sysmessage @1152 Evinizin ismi degisti.
resendtooltip
else
src.sysmessage @38 Gecersiz isim.!
endif
return 0
endif
I also
sphere_item_deco_signs
I'm organizing.
Or this my fault?
"House.scp" Should I create?
|
|
05-30-2014 04:19 AM |
|
|
Shidhun
Journeyman
Posts: 59
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Jul 2012
Reputation: 1
|
RE: Housing misnomer
The important part was sdialog instead of src.dialog. This way the sign is the object, which calls the dialog.
Code:
[ITEMDEF 0bd1]
//brass sign
DEFNAME=i_sign_brass
TYPE=T_SIGN_GUMP
TDATA2=064
FLIP=1
RESOURCES=2 I_BOARD, 1 i_ingot_iron
DUPELIST=0bd2
CATEGORY=Decoration - Signs
SUBSECTION=Blank
DESCRIPTION=Brass Blank
on=@create
attr=attr_move_never
on=@Click
message @0481 Evin sahibi : <name>
return 1
on=@Dclick
sdialog d_evtabelasi
return 1
[dialog d_evtabelasi]
110,35
nomove
noclose
resizepic 0 0 3500 450 440
gumppic 10 10 100
button 150 10 4006 4007 1 0 1
dtext 195 10 1152 Evin ismini degistir
button 150 30 4006 4007 1 0 2
dtext 195 30 41 Tabelayi degistir
button 150 50 4006 4007 1 0 3
dtext 195 50 494 Evin durumu
button 150 70 4006 4007 1 0 4
dtext 195 70 5 Ayarlar
button 150 90 4006 4007 1 0 5
dtext 195 90 1152 Owner Ayarlari
button 10 390 4005 4007 1 0 6
dtext 45 390 1152 Evden yasakla
button 10 410 4005 4007 1 0 7
dtext 45 410 1152 Yasak Kaldir
button 250 390 4005 4007 1 0 8
dtext 285 390 1152 Banka ac
button 250 410 4005 4007 1 0 9
dtext 285 410 1152 Kapat
dtext 45 115 494 Bu ev <src.targ.tag0.builton> tarihinde <uid.<src.targ.more2>.name>
dtext 45 150 494 tarafindan kurulmustur.
dtext 45 185 494 Tum playerlar sadece 1 ev kurabilir
dtext 45 220 494 Evler icine :
dtext 45 255 494 Dost & Ortak & Sahip 1 strongbox koyabilir.
dtext 45 290 0 Guvenli esya sayisi :
dtext 310 290 1152 <ddef.global_secure_storage>
else
dtext 310 290 1152 <dsrc.targ.tag0.storage_limit>
endif
dtext 45 325 0 Sabit esya sayisi :
dtext 310 325 1152 <dsrc.targ.tag0.locked_items>
dtext 45 360 0 Kilitli esya sayisi :
dtext 310 360 1152 <dsrc.targ.tag0.secure_cont>
[dialog d_evtabelasi button]
on 1
src.sysmessage @1152 Evinizin yeni ismi ne olsun?
sdialog d_evisimdegis
[dialog d_evisimdegis]
0,0
nomove
noclose
resizepic 0 0 3500 450 140
gumppic 10 10 100
dtextentry 165 10 195 35 044 1 ?
button 360 10 4024 4025 1 0 27
[dialog d_evisimdegis button]
on 27
if <isempty <argtxt[1]>> || (strlen(<argtxt[1]>) < 3) // A Restriction to the length of the name?
src.sysmessage @38 isim yazmalisiniz.!
return 1
endif
if ( strregex([^A-Za-z0-9\s]+,<argtxt[1]>) != 1 )
name=<argtxt[1]>
src.sysmessage @1152 Evinizin ismi degisti.
resendtooltip
else
src.sysmessage @38 Gecersiz isim.!
endif
return 0
[EOF]
|
|
05-30-2014 02:54 PM |
|
The following 1 user Likes Shidhun's post:1 user Likes Shidhun's post
djazraell (05-30-2014)
|
djazraell
Apprentice
Posts: 26
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2014
Reputation: 0
|
RE: Housing misnomer
Thank you very much.
So in this DTEXT code,
Home of the date of installation
and
How will write the name of the owner of the house?
Code:
dtext 45 115 494 Bu ev <src.targ.tag0.builton> tarihinde <uid.<src.targ.more2>.name>
The house owner
I dare say.?
(This post was last modified: 05-30-2014 03:21 PM by djazraell.)
|
|
05-30-2014 03:20 PM |
|
|
djazraell
Apprentice
Posts: 26
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2014
Reputation: 0
|
RE: Housing misnomer
and
Code:
<uid.<tag0.co_owner>.name>
can not be.
Maybe you need to use them somewhere else.
Thanks for your help.
I'll search
|
|
05-30-2014 10:23 PM |
|
|
User(s) browsing this thread: 1 Guest(s)