Promote and Demote Points

By DaDealer on Oct 12, 2008

Ok I saw someone had a "Point System" on here, well I didnt like it (sorry). It didnt have any type of promotions. So this code Is setup for a irc that has Op and Hop. at 3 points the person gets a voice. At 10 points (if given by a OP not a Hop) the person gets Hop. If they get demoted below that score they lose the promotion.....Most people dont need this type of thing but our # runs 24/7 with at least 100 people so the night and day op's dont know everyone. this allows the night people to know if someone that has been there all day was helpfull with the other op's.
Ok and at the bottom I just added where you can see how many points you or someone else have "!points" or "!points ". I knew someone would ask that as soon as I thought I was done lol!

I'm not the best at scripting..but it works and I'm sure there was a better way to do it.
Oh and incase your new to this stuff...Paste it in the Remote Section.

                                                          Thank you,
                                                                    DaDealer

P.S. The Base script (very very modified) Came from someones !warn Script I got on here So who ever you are thank you.

UPDATE!!!:
I just changed it to keep track of there hostmask rather then there Nick....had a problem with people changing there name or when they got the auto name from the webclient. Problem Solved!!

;****************************************;
;*******    Made By: DaDealer      ******;
;******* Some Credit would be nice ******;
;*******     If you use it.        ******;
;****************************************;

on *:text:!promote*:#: {
  if ($2 ison $chan && $nick isop $chan) {
    if ($2 == $nick) {
      halt
    }
    else {
      set %a $address($2,2)
      set %c $chan
      inc %points. [ $+ [ %a ] ] [ $+ [ %c ] ]
      if ($nick isop $chan) {
        notice $2 you currently have %points. [ $+ [ %a ] ] [ $+ [ %c ] ]
      }
      if ($nick isop $chan) {
        msg $chan $2 has gained a point and now has %points. [ $+ [ %a ] ] [ $+ [ %c ] ]
      }
      if (%points. [ $+ [ %a ] ] [ $+ [ %c ] ] > 2) { 
        if ($nick isop $chan) /notice $nick $2- has 3 or more points.
        if ($nick isop $chan) /cs voice $chan $2
      }
      if (%points. [ $+ [ %a ] ] [ $+ [ %c ] ] > 9) {
        mode $chan +h $2
        if ($nick isop $chan) /cs hop $chan add $2- 
        unset -s %a
        unset -s %c            
      }

    }
  }
  else {
    notice $nick $2 is not in $chan or you lack the power to use this command
  }
}

on *:text:!demote*:#: {
  if ($2 ison $chan) {
    if ($nick isop $chan) {
      if ($2 == $nick) {
        halt
      }

      else {
        set %b $address($2,2)
        set %c2 $chan
        dec %points. [ $+ [ %b ] ] [ $+ [ %c2 ] ]
        if ($nick isop $chan) {
          notice %b you currently have %points. [ $+ [ %b ] ] [ $+ [ %c2 ] ]
        }
        if ($nick isop $chan) {
          msg $chan $2- has lost a point and now has %points. [ $+ [ %b ] ] [ $+ [ %c2 ] ]
        }
        if (%points. [ $+ [ %b ] ] [ $+ [ %c2 ] ] < 3) { 
          if ($nick isop $chan) notice $nick $2- has less then 3 points.
          if ($nick isop $chan) {
            mode $chan -v $2 
          }
        }

        if (%points. [ $+ [ %b ] ] [ $+ [ %c2 ] ] < 10) {
          mode $chan -h $2
          if ($nick isop $chan) /cs hop $chan del $2- 
          unset -s %b  
          unset -s %c2          
        }
      }
    }
  }
  else {
    notice $nick $2 is not in $chan or you lack the power to use this command
  }
}

on *:text:!points:#: {
  set %d $address($nick,2)
  set %c3 $chan
  notice $nick you currently have %points. [ $+ [ %d ] ] [ $+ [ %c3 ] ]
  unset -s %d
}

on *:text:!points*:#:{
  set %d3 $address($2,2)
  notice $nick $2- currently has %points. [ $+ [ %d3 ] ] [ $+ [ %c3 ] ]
  unset -s %d3
}

;**********************************************************************;
;**********************************************************************;
;****    I added a couple other things incase you want them too.   ****; 
;****       On Join Voice them if they have 3 or more points.      ****; 
;****      And on !voice if they have 3 or more points incase      ****; 
;****  they use a webbased irc client and change there name after. ****;
;**********************************************************************;
;**********************************************************************;

on *:JOIN:#: {
  set %j $address($nick,2)
  set %j2 $chan
  if (%points. [ $+ [ %j ] ] [ $+ [ %j2 ] ] > 2) { 
    msg $chan $nick has 3 or more Promotion points and gets a voice!!!
    cs voice $chan $nick
    unset -s %j
    unset -s %j2
  }
}

on !1:TEXT:!voice:#:{
  set %j $address($nick,2)
  set %j2 $chan
  if (%points. [ $+ [ %j ] ] [ $+ [ %j2 ] ] > 2) { 
    msg $chan $nick has 3 or more Promotion points and gets a voice!!!
    cs voice $chan $nick
    unset -s %j
    unset -s %j2
  }
}

Comments

Sign in to comment.
94killerz   -  May 22, 2009

This may seem like a fairly obvious question, and the answer will probably come to me in 5 minutes but...
How do people earn points?

 Respond  
M1ST1C   -  Oct 12, 2008

Veryy Good Dealer... I like it

 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.