Please for heaven's sake, do NOT tell me I did a bad job on this. I did my best, and clearly I'm not the best scripter ever.
on *:TEXT:!present:#:{
set %gift $rand(1,4)
if (%gift == 1) { msg # 4here's an 7Xbox 360, $nick $+ ! 3Enjoy it while 9it lasts. :) }
if (%gift == 2) { msg # Here's a guitar, $nick $+ ! Start Shredding out! }
if (%gift == 3) { msg # Here's a cookie, $nick $+ ! If you eat it now, I'll eat your head. WAIT TILL CHRISTMAS }
if (%gift == 4) { msg # Here's your high school diploma back, sorry I had to take it, but I needed to get into this sweet party(Jk) }
}
Yea sorry, I had worked on it for a specific channel and such, forgot to change it to #. Thanks for the positive comments, unlike on my other script, and I will change the name. :P Also on Kirby's comment on "Only operators?" I should probably change that, but I had it like that because the operators were trying to flood me when I had it, so yea. :P
Great job, looks and works nice, and as Kirby said not every one has a channel called that.
If you looking to only have it for your channel try:
on *:TEXT:!present:#:{
if ($chan == your channel)
if ($nick !isop $chan) {
set %gift $rand(1,4)
if (%gift == 1) { msg # 4here's an 7Xbox 360, $nick $+ ! 3Enjoy it while 9it lasts. :) }
if (%gift == 2) { msg # Here's a guitar, $nick $+ ! Start Shredding out! }
if (%gift == 3) { msg # Here's a cookie, $nick $+ ! If you eat it now, I'll eat your head. WAIT TILL CHRISTMAS }
if (%gift == 4) { msg # Here's your high school diploma back, sorry I had to take it, but I needed to get into this sweet party(Jk) }
}
}
}
you should use local vars instead of global as well as adding a flood protection to it.
you could do
on *:TEXT:!Present:#:{
if (!$($+(%,Presentflood,.,$nick),2)) {
set -u3 $+(%,Presentflood,.,$nick) on
var %@ a Xbox 360, $nick $+ ! Enjoy it while it lasts. :)|a guitar, $nick $+ ! Start Shredding out!|a cookie, $nick $+ ! If you eat it now, I'll eat your head. WAIT TILL CHRISTMAS|your high school diploma back, sorry I had to take it, but I needed to get into this sweet party(Jk)
msg # here's $gettok(%@,$r(1,4),124)
}
}