For use with channel #iRPG and #iRPG_scores
Mode +N is no longer needed.
If you want to use a channel besides #iRPG or #iRPG_scores, just replace each text "#iRPG" or "#iRPG_scores" with your own channel.
This was inspired by the iRPG game on deviantART's chat system. Since I couldn't find an open source iRPG IRC bot anywhere, I decided to build my own. This does not implement leaving/kicking penalties, godsends, or calamities. I might include those in a later version.
Custom greet messages are now implemented! Type "!greet message" to set your welcome-back to "message". (Without quotes.)
One thing I included that the original iRPG doesn't is the nickname formatting for long-time players. When you reach 1 hour, 12 hours, 2 days, and 1 week of playing, your greet message gets fancier. ^_^ I also implemented the highscore table for the top 3 players.
For manual nick linking (when somebody comes into the channel with a different nick than they usually have), type this:
/linkscore NewNickname OldNickname
If the game doesn't initialize, type this in the server window:
/twelveseconds
To delete a player from the system, use:
/delplayer Nickname
v3.0 has a cleaner overall system and much better highscore table.
v3.1 has a fixed, foolproof highscore table and cleaner greet messages. Also implemented delplayer.
v3.11 has better defense against retards; also updated a very old #iRPG_scores feature, "!score username".
v4.0 implements "!greet ", less code junk, and a self-correcting highscore system.
on *:JOIN:#: {
if ( $nick != $me ) {
if ( $chan == #iRPG ) {
if ( %play. [ $+ [ $nick ] ] == 1 ) { msg $chan Welcome back, 15 $+ $nick $+ . Your current score is $floor($sqrt(%score. [ $+ [ $nick ] ] )) $+ . }
if ( %play. [ $+ [ $nick ] ] == 2 ) { msg $chan Welcome back, $+ $nick $+ %greet. [ $+ [ $nick ] ] $+ . Your current score is $floor($sqrt(%score. [ $+ [ $nick ] ] )) $+ . }
if ( %play. [ $+ [ $nick ] ] == 3 ) { msg $chan Welcome back, 4 $+ $nick $+ %greet. [ $+ [ $nick ] ] $+ . Your current score is $floor($sqrt(%score. [ $+ [ $nick ] ] )) $+ . }
if ( %play. [ $+ [ $nick ] ] == 4 ) { msg $chan Welcome back, $+ $nick $+ %greet. [ $+ [ $nick ] ] $+ . Your current score is $floor($sqrt(%score. [ $+ [ $nick ] ] )) $+ . }
if ( %play. [ $+ [ $nick ] ] == 5 ) {
msg $chan Welcome back, $+ $nick $+ %greet. [ $+ [ $nick ] ] $+ . Your current score is $floor($sqrt(%score. [ $+ [ $nick ] ] )) $+ .
voice $nick
}
if ( %play. [ $+ [ $nick ] ] == $null ) {
msg $chan Welcome to iRPG,15 $nick $+ . Please read the topic before you begin idling!
set %play. [ $+ [ $nick ] ] 1
set %score. [ $+ [ $nick ] ] 0
inc %numberofplayers
set %number. [ $+ [ $nick ] ] %numberofplayers
set %scorenum. [ $+ [ %numberofplayers ] ] $nick
}
}
if ( $chan == #iRPG_scores ) {
unset %hi*
set %hinumber 0
set %hiloop 0
set %hiabove.0 $chr(32)
while ( %hiloop < %numberofplayers ) {
inc %hiloop
set %hi 0
set %hinumber 0
while ( %hinumber < %numberofplayers ) {
set %hialready 0
inc %hinumber
set %hiname %scorenum. [ $+ [ %hinumber ] ]
if ( %score. [ $+ [ %hiname ] ] == $null ) { set %score. [ $+ [ %hiname ] ] 0 }
set %hiscore %score. [ $+ [ %hiname ] ]
if ( $count(%hilist , %hiname) == 0 ) {
if ( %score. [ $+ [ %hiname ] ] > %hi ) {
set %hi %score. [ $+ [ %hiname ] ]
set %hihiname %hiname
}
}
}
if ( $count(%hilist , %hihiname) != 0 ) {
dec %numberofplayers
set %hiErrorOccured 1
}
msg #iRPG_scores %hiloop $+ : %hihiname (Played $int(%hi) minutes, currently has $floor($sqrt(%hi)) points, and is on level %play. [ $+ [ %hihiname ] ] $+ .)
set %hilist %hilist $+ $chr(32) $+ %hihiname
}
if ( %hiErrorOccured == 1 ) { msg #iRPG_scores The highscore board encountered an error and has recovered. It should work fine next time. }
}
}
else if ( $chan == #iRPG ) {
set %listing 0
timer1 0 15 twelveseconds
}
}
alias twelveseconds {
set %increasing 1
while ( $nick(#iRPG,%increasing) != $null ) {
if ( $nick(#iRPG,%increasing) != $me ) {
inc %score. [ $+ [ $nick(#iRPG,%increasing) ] ] 0.2
if ( $sqrt( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] ) == $int( $sqrt( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] ) ) ) msg #iRPG $nick(#iRPG,%increasing) $+ , your score is now $sqrt( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] ) $+ .
if ( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] > 60 && %play. [ $+ [ $nick(#iRPG,%increasing) ] ] == 1 ) {
msg #iRPG $nick(#iRPG,%increasing) $+ , you have advanced to Level 2 for logging 1 hour in iRPG. Good job!
set %play. [ $+ [ $nick(#iRPG,%increasing) ] ] 2
}
if ( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] > 720 && %play. [ $+ [ $nick(#iRPG,%increasing) ] ] == 2 ) {
msg #iRPG $nick(#iRPG,%increasing) $+ , you have advanced to Level 3 for logging 12 hours in iRPG. Wow!
set %play. [ $+ [ $nick(#iRPG,%increasing) ] ] 3
}
if ( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] > 2880 && %play. [ $+ [ $nick(#iRPG,%increasing) ] ] == 3 ) {
msg #iRPG $nick(#iRPG,%increasing) $+ , you have advanced to Level 4 for logging 48 hours in iRPG. Incredible!!
set %play. [ $+ [ $nick(#iRPG,%increasing) ] ] 4
}
if ( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] > 10080 && %play. [ $+ [ $nick(#iRPG,%increasing) ] ] == 4 ) {
msg #iRPG $nick(#iRPG,%increasing) $+ , you have advanced to Level 5 for logging one week in iRPG. Unbelievable!!!
set %play. [ $+ [ $nick(#iRPG,%increasing) ] ] 5
}
}
inc %increasing
}
}
on *:TEXT:*:#: {
if ( $nick != $me && $chan == #iRPG && $1 != !greet ) { decscore $nick $len($1-) }
if ( $chan == #iRPG_scores && $1 == !score ) { if ( %score. [ $+ [ $2 ] ] != $null ) { msg $chan $2 $+ 's exact score is $sqrt(%score. [ $+ [ $2 ] ]) $+ . } }
if ( $chan == #iRPG && $1 == !greet && %greet. [ $+ [ $nick ] ] != $null ) {
decscore $nick $len($1-)
msg #iRPG You've already set your greet message!
}
if ( $chan == #iRPG && $1 == !greet && %greet. [ $+ [ $nick ] ] == $null ) {
if ( %score. [ $+ [ $nick ] ] > 60 ) {
if ( $pos($1-,fuck,1) == $null && $pos($1-,shit,1) == $null && $pos($1-,damn,1) == $null && $pos($1-,nigg,1) == $null ) {
set %greet. [ $+ [ $nick ] ] 15 $+ $chr(91) $+ $+ $2- $+ 15 $+ $chr(93)
msg #iRPG $nick $+ , your greet message has been set to: $2-
}
else { msg #iRPG Swearing is not allowed in your greet message. Do not try to bypass the censors, or you will be banned from iRPG indefinitely. }
}
if ( %score. [ $+ [ $nick ] ] <= 60 ) { msg #iRPG You haven't idled long enough yet! Wait until you've idled an hour (Level 8). }
}
}
on *:ACTION:*:#:if ( $nick != $me && $chan == #iRPG && $pos($1-,away,1) == $null && $pos($1-,returns,1) == $null ) { decscore $nick $len($1-) }
alias linkscore {
set %oldnumber %number. [ $+ [ $2 ] ]
if ( $3 == 2 ) {
set %play. [ $+ [ $1 ] ] %play. [ $+ [ $2 ] ]
set %score. [ $+ [ $1 ] ] %score. [ $+ [ $2 ] ]
set %number. [ $+ [ $1 ] ] %oldnumber
set %scorenum. [ $+ [ %oldnumber ] ] $1
set %greet. [ $+ [ $1 ] ] %greet. [ $+ [ $2 ] ]
}
unset %play. [ $+ [ $2 ] ]
unset %score. [ $+ [ $2 ] ]
unset %number. [ $+ [ $2 ] ]
unset %oldnumber
if ( $3 == 1 ) msg #iRPG $1 $+ 's score has been kept, while $2 $+ 's has been deleted.
if ( $3 == 2 ) msg #iRPG $2 $+ 's score has been transferred to $1 $+ .
}
alias delplayer {
unset %play. [ $+ [ $1 ] ]
unset %score. [ $+ [ $1 ] ]
unset %greet. [ $+ [ $1 ] ]
set %tmp %number. [ $+ [ $1 ] ]
unset %number. [ $+ [ $1 ] ]
unset %scorenum. [ $+ [ %tmp ] ]
set %scorenum. [ $+ [ %tmp ] ] %scorenum. [ $+ [ %numberofplayers ] ]
set %tmp2 %scorenum. [ $+ [ %tmp ] ]
set %number. [ $+ [ %tmp2 ] ] %scorenum. [ $+ [ %tmp ] ]
unset %tmp*
dec %numberofplayers
msg #iRPG $1 $+ 's data has been erased.
}
alias decscore {
set %decreasing $calc($2 * -12)
inc %score. [ $+ [ $1 ] ] $calc
msg #iRPG Do not talk, $1 $+ . That cost you $calc(%decreasing * -1) seconds.
if ( %score. [ $+ [ $1 ] ] <= 0 || %score. [ $+ [ $1 ] ] == $null ) set %score. [ $+ [ $1 ] ] 0
unset %decreasing
}
on *:NICK: {
if ( %score. [ $+ [ $newnick ] ] > %score. [ $+ [ $nick ] ] ) linkscore $newnick $nick 1
if ( %score. [ $+ [ $newnick ] ] < %score. [ $+ [ $nick ] ] || %score. [ $+ [ $newnick ] ] == $null ) linkscore $newnick $nick 2
}
Anybody know where the World of Warcraft European servers are located? Someone said they are all in Britain but I am not sure. Would they have some in Germany, some in Finland etc?
I am trying to do a business plan for my own massive multiplayer game and was wonder how they spread out the resources.
haddin
Anybody know where the World of Warcraft European servers are located? Someone said they are all in Britain but I am not sure. Would they have some in Germany, some in Finland etc?
I am trying to do a business plan for my own massive multiplayer game and was wonder how they spread out the resources.
haddin
Gforce your right i didnt have the latest version. I have 1 last problem, someone has 9 scores spots taken up.
( 21:05:56 ) ( ~LordHawk ) #5: el_cuervito (Played 9 minutes, currently has 3 points, and is on level 1.)
( 21:05:56 ) ( ~LordHawk ) #6: el_cuervito (Played 9 minutes, currently has 3 points, and is on level 1.)
( 21:05:56 ) ( ~LordHawk ) #7: el_cuervito (Played 9 minutes, currently has 3 points, and is on level 1.)
( 21:05:56 ) ( ~LordHawk ) #8: el_cuervito (Played 9 minutes, currently has 3 points, and is on level 1.)
( 21:05:56 ) ( ~LordHawk ) #9: el_cuervito (Played 9 minutes, currently has 3 points, and is on level 1.)
( 21:05:56 ) ( ~LordHawk ) #10: el_cuervito (Played 9 minutes, currently has 3 points, and is on level 1.)
( 21:05:56 ) ( ~LordHawk ) #11: el_cuervito (Played 9 minutes, currently has 3 points, and is on level 1.)
( 21:05:56 ) ( ~LordHawk ) #12: el_cuervito (Played 9 minutes, currently has 3 points, and is on level 1.)
( 21:05:56 ) ( ~LordHawk ) #13: el_cuervito (Played 9 minutes, currently has 3 points, and is on level 1.)
anyway i can fix that ?
ok, ive seen alot more bugs now. #Irpg doesnt keep an updated version of the score. !score LordHawk returns . but no score, It doesnt display when someone levels, actually for that matter Drizz has been playing for 8 hours and hasnt leveled the first time yet, (which should be 1 hour after he started )
that error is from line #74 he has an extra \")\"
this line has the extra \")\"
if ( $sqrt( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] ) == $int( $sqrt( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] ) ) ) ) msg #iRPG $nick(#iRPG,%listing) $+ , your score is now $sqrt( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] ) $+ .
replace it with this
if ( $sqrt( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] ) == $int( $sqrt( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] ) ) ) msg #iRPG $nick(#iRPG,%listing) $+ , your score is now $sqrt( %score. [ $+ [ $nick(#iRPG,%increasing) ] ] ) $+ .
::: Error: Unknown command ())
( 21:43:53 ) ::: Error: Unknown command ())
( 21:47:41 ) ::: Error: Unknown command ())
( 21:47:41 ) ::: Error: Unknown command ())
this is what i keep getting. i didnt change anything in your code. Im using the same preset channels you have coded into the script. Any help?
I don\'t think it\'s very much like the original. However, I have updated this with many improvements. The game automatically tracks nickname changes, so mode +N is no longer needed. #iRPG_scores can now be used to display the top three scores on any network. It\'s overall quite a bit cleaner than the original code. Also, automatic +v for those who reach Level 5 (one straight week of playing).