Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
More Dialog Help =\
Author Message
Reflex
Journeyman
*

Posts: 130
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #1
More Dialog Help =\
Hello and ty in advance I know i'm a pain in the ass with dialogs so sorry =\
Sorry If I dont make sense I havent been to bed...

1. I need to know how to record text from a text input box I didn't see anything on the wiki or could find any examples.

2. Why are my checkboxes not working properly? I cant seem to get my button to recognize which is checked. I also don't understand how to make the button recognize if multiple boxes are selected and combine those boxes to do what they both are suppose to do.

3. How would I using the build item properties in the gump after clicking Apply make it record the data and store it so the exact item they are setting is viewable in the Items Preview section?

4. Sorry I know this is a lot of unfinished work im asking help with.

5. If you plan on using handouts on your shard here is a really nice staff panel dialog to do so with ;p just gotta finish the backend which im having mad trouble with.

Code:
[DIALOG d_staff_handouts]
0,0
page 0
group 0
resizepic 107 1 9270 277 472
resizepic 122 12 9200 245 32
checkertrans 123 12 246 447
dtext 183 18 003a Staff Handout Menu
dtext 183 69 1153 UNUSED
button 155 71 2117 2118 1 0 1
dtext 183 92 1153 Add Another Item
button 155 94 2117 2118 1 0 5
dtext 218 195 005d Options
checkbox 152 221 211 210 1 100
dtext 182 222 1153 Use Container
checkbox 152 246 211 210 1 101
dtext 182 247 1153 Send Message with Handout
dtext 184 115 1153 Select Container Type
button 155 117 2117 2118 1 0 2
dtext 184 139 1153 Resync Preview Items
button 155 140 2117 2118 1 0 3
button 147 423 247 248 1 0 4
button 266 423 241 243 1 0 0
checkbox 152 272 211 210 1 102
dtext 182 273 1153 Date Items
checkbox 152 297 211 210 1 103
dtext 182 298 1153 Label Items 1 of 2, Etc
dtext 138 400 005d Give Handouts
checkbox 152 323 211 210 1 104
dtext 182 324 1153 Make Item Invul
checkbox 152 349 211 210 1 105
dtext 182 350 1153 Make Item Un-Cuttable
dtext 255 401 005d Cancel Handout
dtext 184 163 1153 Set Handout Message
button 155 164 2117 2118 1 0 6
resizepic 385 242 9270 263 231
checkertrans 399 250 238 211
resizepic 382 1 9270 263 246
checkertrans 388 11 243 225
dtext 468 249 005d Items Preview
dtext 451 10 005d Build Item Properties
dtext 429 30 0229 ID:
dtext 407 53 0229 NAME:
dtext 400 77 0229 COLOR:
dtext 407 100 0229 TYPE:
dtext 393 126 0229 WEIGHT:
dtext 391 155 0229 AMOUNT:
dtext 410 178 0229 ATTR:
tilepichue 412 288 01f03 1153
tilepichue 491 288 01f03 1153
tilepichue 572 287 01f03 1153
tilepichue 412 355 01f03 1153
tilepichue 489 354 01f03 1153
tilepichue 573 354 01f03 1153
tilepichue 411 419 01f03 1153
tilepichue 491 419 01f03 1153
tilepichue 570 419 01f03 1153
resizepic 41 474 9270 675 66
checkertrans 53 488 653 41
dtextentry 455 29 169 20 1153 24 i_sample_handout
dtextentry 455 53 169 20 1153 25 Sample Handout
dtextentry 455 78 169 20 1153 26 color_fire
dtextentry 456 101 169 20 1153 27 t_normal
dtextentry 455 129 169 20 1153 28 1
dtextentry 455 154 169 20 1153 29 1
dtextentry 457 176 169 20 1153 30 04
dtext 337 478 005d Item Properties
button 425 270 2117 2118 1 0 7
button 504 270 2117 2118 1 0 8
button 586 270 2117 2118 1 0 9
button 421 334 2117 2118 1 0 10
button 502 334 2117 2118 1 0 11
button 584 334 2117 2118 1 0 12
button 425 401 2117 2118 1 0 13
button 504 401 2117 2118 1 0 14
button 586 401 2117 2118 1 0 15
dtext 62 503 0229 ID:
dtext 131 503 0229 NAME:
dtext 235 503 0229 COLOR:
dtext 321 503 0229 TYPE:
dtext 409 503 0229 WEIGHT:
dtext 514 503 0229 AMOUNT:
dtext 626 503 0229 ATTR:
resizepic 40 535 9270 675 58
checkertrans 53 544 653 41
dtext 389 554 0229 Total Items:
dtext 57 553 0229 Handout Message:
dtext 515 555 0229 Container Prewview:
tilepichue 657 545 0 1153
button 410 210 238 240 1 0 16
button 548 210 244 246 1 0 17

[DIALOG d_staff_handouts text]

[DIALOG d_staff_handouts button]

ON=0 //  Give Handouts
src.sysmessageua 022,0,0,1 You have chosen to not give out a reward! ?

ON=1 //
src.sysmessage Unused Find something to use this for or rearanage dialog

ON=2 //
src.sysmessage Select Container Type

ON=3 //
src.sysmessage Resync Images of the Preview Items

ON=4 //
//FOR 0 5
IF (<argchk[100]>)
    src.sysmessage use container
  ELSEIF (<argchk[101]>)
    src.sysmessage semd a message to clients after receiving their handout
  ELSEIF (<argchk[102]>)
    src.sysmessage date the items given out
  ELSEIF (<argchk[103]>)
    src.sysmessage Label Items
  ELSEIF (<argchk[104]>)
    src.sysmessage Make Item Invul
  ELSEIF (<argchk[105]>)
    src.sysmessage Make Item Un-Cuttable.
  ENDIF
IF <ACCOUNT.PLEVEL> == 1
SERV.ALLCLIENTS sysmessageua 1153,0,0,1 WooHoo! I just got a handout!
ELSE
src.sysmessage return blarg
ENDIF
RETURN 1

ON=5 //
src.sysmessage Add another handout to set properties to

ON=6 //
src.sysmessage Set Handout Message Clients Receive upon getting their donations.

ON=7 //
src.say View Item Properties 1
src.sdialog d_staff_handouts

ON=8 //

src.say View Item Properties 2
src.sdialog d_staff_handouts

ON=9 //
src.say View Item Properties 3
src.sdialog d_staff_handouts

ON=10 //
src.say View Item Properties 4
src.sdialog d_staff_handouts

ON=11 //
src.say View Item Properties 5
src.sdialog d_staff_handouts

ON=12 //
src.say View Item Properties 6
src.sdialog d_staff_handouts

ON=13 //
src.say View Item Properties 7
src.sdialog d_staff_handouts

ON=14 //
src.say View Item Properties 8
src.sdialog d_staff_handouts

ON=15 //
src.say View Item Properties 9
src.sdialog d_staff_handouts

ON=16 //
src.sysmessage Apply Handout Properties to new item you are creating.

ON=17 //
src.sdialog d_staff_handouts

[EOF]
(This post was last modified: 04-29-2012 11:18 PM by Reflex.)
04-29-2012 11:18 PM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #2
RE: More Dialog Help =\
Quote:1. I need to know how to record text from a text input box I didn't see anything on the wiki or could find any examples.

Here is a example of radio buttons and text entry from my Hold'em Poker script. In the DIALOG itself:

Code:
//Bottom Left Menu
resizepic       100  355  2620  200  110
Group 0
radio       105  362  1896  1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionCheck> ? 1:0> <DEF.PokerDecisionCheck>
dtext       125  362  1153  Check
radio       160  362  1896  1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionFold> ? 1:0> <DEF.PokerDecisionFold>
dtext       180  362  1153  Fold
radio       205  362  1896  1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionCheckFold> ? 1:0> <DEF.PokerDecisionCheckFold>
dtext       225  362  1153  Check/Fold
radio       105  377  1896  1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionCall> ? 1:0> <DEF.PokerDecisionCall>
dtext       125  377  1153  Call: <EVAL <REF1.TAG.CurrentBet>-<LOCAL.YourBet>>
radio       105  392  1896  1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionRaiseBlind> ? 1:0> <DEF.PokerDecisionRaiseBlind>
dtext       125  392  1153  Blind Raise: <dDEF.PokerBigBlind>
radio       105  407  1896  1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionRaisePot> ? 1:0> <DEF.PokerDecisionRaisePot>
dtext       125  407  1153  Pot Raise: <dREF1.TAG.CurrentPot>
radio       105  422  1896  1895 <QVAL <LOCAL.YourDecision>==<DEF.PokerDecisionRaiseCustom> ? 1:0> <DEF.PokerDecisionRaiseCustom>
dtext       125  422  1153  Custom
dtext       125  437  1153  Raise:
resizepic   173  424  2620  89 32
button      270  430  2714  2715  1 0 5 //Decision
dtextentrylimited  205  430  80  23 1153 3 6 <EVAL <SRC.CTAG0.Poker_NextBet>>

Then in the DIALOG BUTTON:

Code:
OnButton=5//Make decision
REF1=<SRC.TAG.PokerTable>
IF (<ARGCHKID> > 0)
   SRC.CTAG.Poker_Decision=<ARGCHKID>
   IF (<SRC.CTAG.Poker_Decision>==<DEF.PokerDecisionCall>)
      SRC.CTAG.Poker_NextBet=<EVAL <REF1.TAG0.CurrentBet>>
   ELSEIF (<SRC.CTAG.Poker_Decision>==<DEF.PokerDecisionRaiseBlind>)
      SRC.CTAG.Poker_NextBet=<EVAL <DEF.PokerBigBlind>>
   ELSEIF (<SRC.CTAG.Poker_Decision>==<DEF.PokerDecisionRaisePot>)
      SRC.CTAG.Poker_NextBet=<EVAL <REF1.TAG0.CurrentPot>>
   ELSEIF (<SRC.CTAG.Poker_Decision>==<DEF.PokerDecisionRaiseAllIn>)
      SRC.CTAG.Poker_NextBet=<EVAL <REF1.TAG0.Player<dLOCAL.YourSeat>.Chips>>
   ELSEIF (<SRC.CTAG.Poker_Decision>==<DEF.PokerDecisionRaiseCustom>)
      IF !(STRMATCH(*[0-9]*,<ARGTXT[3]>))
         SRC.CTAG.Poker_Decision=
         SRC.CTAG.Poker_NextBet=
      ELSE
         SRC.CTAG.Poker_NextBet=<EVAL <ARGTXT[3]>>
         IF (<EVAL <SRC.CTAG0.Poker_NextBet>> < <EVAL <DEF.PokerBigBlind>>)
            SRC.CTAG.Poker_NextBet=<EVAL <DEF.PokerBigBlind>>
         ELSEIF (<EVAL <SRC.CTAG.Poker_NextBet>> > <EVAL <REF1.TAG0.Player<dLOCAL.YourSeat>.Chips>>)
            SRC.CTAG.Poker_NextBet=<EVAL <REF1.TAG0.Player<dLOCAL.YourSeat>.Chips>>
         ENDIF
      ENDIF
   ENDIF
ELSE
   SRC.CTAG.Poker_Decision=
   SRC.CTAG.Poker_NextBet=
ENDIF
SDIALOG d_poker_pokertable
RETURN 1

I store the decision (i.e. the particular radio button that was last used) and the value of the custom bet (i.e. the "text entry") as CTAGs on the player. That way the dialog can be refreshed without losing the choices/values.
04-30-2012 08:29 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)