All pastes #439993 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-14 18:08 UTC
rendered paste body
dialog Poll_System {
  title "Poll System By Edie"
  size -1 -1 177 153
  option dbu
  text "Type the Poll Question here:", 2, 30 10 100 10
  edit "Poll Question...", 1, 10 20 130 10 
  text "Type here The 2 Answers", 3, 30 33 90 80
  edit "Answer 1...", 4, 10 43 60 12
  edit "Answer 2...", 5, 80 43 60 12
  button "Create Poll", 6, 45 58 60 12
  text "Edie's Poll Script 1.0 { BETA } ", 7, 50 130 50 30
} 
on *:dialog:Poll_System:sclick:6:{ 
  write PollQuestion.txt $did(Poll_System,1) 
  write AnswerOne.txt $did(Poll_System,4)
  write AnswerTwo.txt $did(Poll_System,5)
  unset %onevote
  unset %twovote
  unset %votetimer*
  /dialog -x Poll_System
  notice $nick Your poll is Created. Thank you for using Edie's Poll Script.
}
menu * {
  Poll System:/dialog -m Poll_System Poll_System
}
ON *:text:!poll:#:{  
  /notice $nick 3 The Current poll Question is:4 $read(PollQuestion.txt,$lines(PollQuestion.txt))))
  /notice $nick 3 To vote this one, Type: 7!vote 14 : $read(AnswerOne.txt,$lines(AnswerOne.txt))))
  /notice $nick 3 To vote this one, Type: 7!vote 24 : $read(AnswerTwo.txt,$lines(AnswerTwo.txt))))
}
ON *:text:!vote 1:#:{
  if (%votetimer [ $+ [ $address ] ]) { 
    notice $nick You did already vote! 
    halt 
  }
  else { notice $nick 3 Je hebt gestemd op:4 $read(AnswerOne.txt,$lines(AnswerOne.txt)))) 3 %onevote people also did! 
    set %votetimer [ $+ [ $address ] ] blaat 
    inc %onevote 1
  }
}
ON *:text:!vote 2:#:{
  if (%votetimer [ $+ [ $address ] ]) { 
    notice $nick You did already vote! 
    halt 
  }
  else { notice $nick 3 You did vote on:4 $read(AnswerTwo.txt,$lines(AnswerTwo.txt)))) 3 %twovote people also did! 
    set %votetimer [ $+ [ $address ] ] blaat 
    inc %twovote 1
  }
}
ON *:text:!results:#:{
  notice $nick Poll Question: $read(PollQuestion.txt,$lines(PollQuestion.txt))))
  notice $nick  %onevote  people did vote on: $read(AnswerOne.txt,$lines(AnswerOne.txt))))
  notice $nick  %twovote  people did vote on: $read(AnswerTwo.txt,$lines(AnswerTwo.txt))))
}