Voting Booth Client v.1.0.0.0

By Tamaki on Jun 03, 2009

This is the client to the voting booth. Please note that this is only an alternative to typing !vote or /notice !vote .

The purpose of this script is to vote when someone uses the Voting Booth v.1.0.0.0

Simply load into your remotes. When someone uses the voting booth v.1.0.0.0, type /voting or right-click on the person who started the vote and select voting booth.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;Voting Client;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;v.1.0.0.0;;;;;;;;;;;;;;;
;;;;;The_Almighty_Duelist's Scripts;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;Loading and Starting;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:LOAD: {
  echo -a When you see someone use the voting system, type /voting <option 1> to open the voting booth. Option 1 = nick of the person who started the vote. Or you can right click their nick and select Voting Booth.
}

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

alias voting {
  If ($1 != $null) {
    .notice $1 showvote
  }
  Else {
    echo -a Please type /voting <nick of the person who started the vote>
  }
}

alias checkvoting {
  If ($did(voting, 3) == $null) {
    did -h voting 3,4
  }
  Else {
    If ($did(voting, 4) == $null) {
      did -h voting 4
    }
  }
}

;;;;;;;;;;;;;;;;;
;;;;;Dialogs;;;;;
;;;;;;;;;;;;;;;;;

dialog voting {
  title Voting Booth
  option dbu
  size -1 -1 201 65
  text "", 100, 1 1 200 20
  button "", 1, 1 21 200 10
  button "", 2, 1 32 200 10
  button "", 3, 1 43 200 10
  button "", 4, 1 54 200 10
}

;;;;;;;;;;;;;;;;;;;;;
;;;;;Activations;;;;;
;;;;;;;;;;;;;;;;;;;;;

on *:DIALOG:voting:sclick:*: {
  If ($did == 1) {
    .notice %vote.nick !vote 1
  }
  If ($did == 2) {
    .notice %vote.nick !vote 2
  }
  If ($did == 3) {
    .notice %vote.nick !vote 3
  }
  If ($did == 4) {
    .notice %vote.nick !vote 4
  }
  dialog -x voting
}

on *:NOTICE:vote*:*: {
  set %vote.nick $nick
  dialog $iif($dialog(voting) == voting,-v,-m voting) voting
  If ($2 == q) {
    did -ra voting 100 $3-
  }
  If ($2 == 1) {
    did -ra voting 1 $3-
  }
  If ($2 == 2) {
    did -ra voting 2 $3-
  }
  If ($2 == 3) {
    did -ra voting 3 $3-
  }
  If ($2 == 4) {
    did -ra voting 4 $3-
  }
  .timer 1 1 checkvoting
}

on *:NOTICE:ftv*:*: {
  echo -a There is no poll going on right now.
}

;;;;;;;;;;;;;;;;;;
;;;;;Nicklist;;;;;
;;;;;;;;;;;;;;;;;;

menu nicklist {
  .Voting Booth: /.notice $$1 showvote
}

Comments

Sign in to comment.
Tamaki   -  Jul 07, 2009

i will work on it....

....and it's fixed! :)

 Respond  
Razor_FX_II   -  Jul 07, 2009

Only displays the first 2 voting options in the popup window even if there are 4 choices to vote on.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.