mIRC Home    About    Download    Register    News    Help

Print Thread
#175130 18/04/07 04:57 AM
Joined: Apr 2007
Posts: 8
G
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Apr 2007
Posts: 8
Okay, on this script what I am trying to do is, in the Dialog Box, I give my users the option to choose a color theme that they want the text to be, the issue I am having is, Im not sure how to get the combo box to output which text has been chosen in the script in order to be able to then set the color coded variables that I am talking about...


Code:

;;;;;;;;;;;; Dialog Box ;;;;;;;;;;;;

Dialog Test {
  Title "Scrim Finding Script"
  Size -1 -1 100 110
  option dbu

  box "Number Of Players" 1, 3 -1 96 20
  radio "5v5" 2, 5 7 15 10, push group
  radio "4v4" 3, 30 7 15 10, push
  radio "3v3" 4, 55 7 15 10, push
  radio "2v2" 5, 80 7 15 10, push

  box "Yours/Theirs" 6, 3 20 38 20
  radio "Yours" 7, 5 28 16 10,push group
  Radio "Ours" 8, 22 28 16 10, push

  box "Location" 17, 42 20 57 20
  radio "West" 18, 46 28 16 10,push group
  radio "Cent" 19, 63 28 16 10, push
  radio "East" 20, 79 28 16 10,push

  combo 9, 47 40 50 50, drop result
  text "What Color?" 10, 6 40 30 15

  edit "Map?" 11, 5 60 45 10, center
  edit "League?" 12, 50 60 45 10, center
  text "De_ and Cal- Already Added" 13, 0 71 100 10, center
  text "Limit the text to one word only for both." 14, 0 79 100 10, center


  Button "Ok", 15, 15 98 30 10, ok
  Button "Cancel", 16, 48 98 30 10, cancel 
}


;;;;;;;;;;;; Aliases ;;;;;;;;;;;;

Alias SFS {
  Colors
}

Alias Colors {
  did -ca test 9 Select One
  did -a test 9 Blue
}


;;;;;;;;;;;; On Commands ;;;;;;;;;;;;

ON *:DIALOG:Test:INIT:0: {
  SFS
}
ON *:DIALOG:Test:sclick:2 {
  set %Players 5v5
}
ON *:DIALOG:Test:sclick:3 {
  set %Players 4v4
}
ON *:DIALOG:Test:sclick:4 {
  set %Players 3v3
}
ON *:DIALOG:Test:sclick:5 {
  set %Players 2v2
}
on *:dialog:Test:sclick:15 {
  msg #randomosities %color1 %players %server %location
  .timer1 1 2 unset %players
  .timer2 1 2 unset %server
  .timer4 1 2 unset %color1
  .timer4 1 2 unset %color2
  .timer5 1 2 unset %color3
  .timer6 1 2 unset %location
  .timer7 1 2 unset %map
  .timer8 1 2 unset %league
}
on *:dialog:test:sclick:7 {
  set %server Yours
}
on *:dialog:test:sclick:8 {
  set %server Ours
}
on *:dialog:test:sclick:18 {
  set %location West
}
on *:dialog:test:sclick:19 {
  set %location Central
}
on *:dialog:test:sclick:20 {
  set %location East
  msg #randomosities $did(20)
}
on *dialog:test:sclick:9 {
  if ($did(test,9).seltext == Blue) {
    set %color1 2,1
    set %color2 1,2
    set %color3 0,2 
  }
}
;;;;;;;;;;;; Menu ;;;;;;;;;;;;
menu channel {
  Scrim Box:dialog -m test test
}

Last edited by GodOfNades; 18/04/07 04:59 AM.
GodOfNades #175131 18/04/07 05:01 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
For one, you're missing the : end of almost all of your on dialog event lines and also the beginning of the line that deals with the colors.

on *:dialog:test:sclick:9: {

I'm not sure why you're calling 2 aliases for colors (SFS and Colors), either. Maybe there's a reason, but it's not apparent here.

And, you can always use .sel and a number rather than a bunch of .seltext and color names if you prefer that method.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #175136 18/04/07 05:37 AM
Joined: Apr 2007
Posts: 8
G
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Apr 2007
Posts: 8
wow... ya... I think I was looking at it for too long... Completely missed the lack of : on the on dialogs....


Link Copied to Clipboard