That one won't remove points. I have fixed it so it does remove as well, kind of? It's hard to explain really what's going on lol but I'll try.

Basically, right now it will remove points and add points and I believe I've fixed the "Unknown Command" issue. Right now I want to have it so if it's going to remove points it'll say "Username LOST X Points!" and if they win it'll say "Username WON X Points!"

I've been searching for a way on youtube, google, the forums, hawkee... But I can't seem to find a way to have an "if" statement for the random options...


It works, but it lies. It'll say they lost/won every time, but sometimes it'll be wrong. It will add and remove the points though. I'll post it once I get it all fixed up. Right now I have a few other things to do as well.




EDIT: Here it is...

Code:
on *:text:!spin:#: {
    flood thespin 600 $nick
    var %r $r(1,250)
    $iif($r(1,2) == 1,addspin,remspin) $nick %r
}


alias flood {
  if (YOURNICK !isin $1-) {
    if ($1 !isnum) {
      if ($($+(%,flood.,#,.,$1),2)) { echo 4 # Flood control | halt }
      set -z %flood. $+ # $+ . $+ $1 $2 
    } 
    else {
      if ($($+(%,flood.,#),2)) { echo 4 # Flood control | halt }
      set -z %flood. $+ # $1 
    }
  }
}



alias addspin {
  var %topic $+(#,.,$nick)
  var %points $calc($readini(Points.ini,%topic,Points) + $2)
  writeini -n Points.ini %topic Points %points
  .timerAdd 1 2 msg # $nick has won $2 points! $chr(91) $+ %points $+ $chr(93)
  echo -a $nick $chr(91) $+ %points $+ $chr(93)
}

alias remspin {
  var %topic $+(#,.,$nick)
  var %points $calc($readini(Points.ini,%topic,Points) - $2)
  writeini -n Points.ini %topic Points %points
  .timerRem 1 2 msg # $nick has lost $2 points! $chr(91) $+ %points $+ $chr(93)
  echo -a $nick - $2 points! Total -> $chr(91) $+ %points $+ $chr(93)
}



The problem with multiple entry's is still a question. But other than that, it's getting there. I think. lol.


Also, this is still in "testing" so be aware that it is possible to go in the negative. Fixing that later, after I figure out the multiple entry thing. Really all you need to do is a pointcheck and if they have less than 1 stop them from being able to do the game.

Last edited by Bramzee; 09/01/15 12:59 AM.