Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:!buyherz &:#:{
- if (!%raffle) { msg $chan Raffle is currently closed! }
- else {
- if ($int($2) < 1) { msg $chan Do you really want to buy no Herz, $nick $+ ..? }
- elseif ($int($2) > 10) { msg $chan Sorry $nick but you can only buy up to 10 Herz at a Time. }
- else {
- var %i = 0, %ticket = $int($2)
- var %topic = $+(#,.,$nick), %user = $readini(Points.ini,%topic,Points), %end = 10 * %ticket, %delete = %user - %end
- if (%delete > 0) {
- writeini -n $qt(Points.ini) %topic Points %delete
- while (%i < %ticket) {
- write $qt(Raffle.txt) $nick
- inc %i
- }
- msg $chan $nick you have bought %ticket Herz with %end Beatz.
- }
- }
- }
- }
- on *:TEXT:!raffle &:#:{
- if ($nick isop #) {
- if (($2 == open) && (!%raffle)) || (($2 == close) && (%raffle)) {
- msg $chan RAFFLE IS NOW $replace($upper($2!!),CLOSE,CLOSED)
- if ($2 == open) { set %raffle 1 }
- else unset %raffle
- write -c $qt(Raffle.txt)
- }
- }
- }
- on *:TEXT:!roll:#:{
- if ($nick isop #) && (%raffle) {
- msg $chan RAFFLE IS NOW BEING ROLLED, GOOD LUCK!!
- .timerCD 1 3 msg $chan /me $!calc( $!timer(CD).reps + 1 ) $!+ !
- .timer 1 4 msg $chan AND THE WINNER IS:
- .timer 1 5 msg $chan $read(Raffle.txt, n)
- unset %raffle
- write -c $qt(Raffle.txt)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement