This is a replication of WhipperSnapper's (#idle-like-a-fox on irc.coldfront.net) IRPG game. Basically you register, login, and then wait. The script will do everything else. Talk, and the user receives an amount of time added to their clock. It took me awhile to get where I am, but it's still in progress. Hopefully tomorrow it will be finished.
P.S. This script is programmed for #idle-like-an-eagle on aerialman.homeip.net. Change everywhere it says #idle-like-an-eagle and yitbe ready for your channel.
on *:notice:register*:?:{
if ($nick ison #idle-like-an-eagle) {
writeini IRPG_Users.ini $nick Username $2
writeini IRPG_Users.ini $nick Password $3
writeini IRPG_Users.ini $nick Class $4-
writeini IRPG_Users.ini $nick Level 1
writeini IRPG_Times.ini $nick Seconds 600
notice $nick You have successfully registered; to login type /msg Aerialbot login <character name> <password>.
}
if ($nick !ison #idle-like-an-eagle) {
msg $nick Sorry, you have to be on #idle-like-an-eagle to register.
}
}
on *:notice:login*:?:{
if ($nick ison #idle-like-an-eagle) {
if ($$2 == $readini(IRPG_Users.ini,$nick,Username) {
if ($$3 == $readini(IRPG_Users.ini,$nick,Password) {
set %irpg_ $+ $nick $nick
/timerirpg $+ $nick 0 1 /irpgtimer
writeini IRPG_Users.ini $nick Logged_On? Yes
notice $nick Logon successful!
msg #idle-like-an-eagle $nick $+ , the level $readini(IRPG_Users,$nick,level) $readini(IRPG_Users,$nick,Class) $+ , is now online from nickname $nick $+ . Reaches next level in $duration($readini(IRPG_Times.ini,$nick,Seconds),3) $+ .
}
else { notice $nick That password is wrong. Please try again.
}
}
else That username is not registered, to register type /msg Aerialbot register <character's name> <password> <character class>.
}
}
alias irpgtimer {
if ($readini(IRPG_Times.ini,%irpg_nick,Seconds) == 0) {
var %level $readini(IRPG_Users.ini,%irpg_nick,Level)
msg #idle-like-an-eagle Congratulations! %irpg_nick has advanced to level $calc($readini(IRPG_Users.ini,%irpg_nick,Level) +1) $+ ! Next level in $duration($readini(IRPG_Times.ini,%irpg_nick,Seconds),3)
writeini IRPG_Users.ini %irpg_nick Level $calc($readini(IRPG_Users.ini,%irpg_nick,Level) +1)
writeini IRPG_Times.ini %irpg_nick Seconds $readini(IRPG_Users.ini,%irpg_nick,Level) $+ 000
}
else { writeini IRPG_Times.ini %irpg_nick Seconds $calc($readini(IRPG_Times.ini,%irpg_nick,Seconds) -1) }
}
on *:notice:logout:?:{
if ($nick ison #idle-like-an-eagle) {
if ($readini(IRPG_Users.ini,$nick,Logged_On?) == Yes) {
/timerirpg $+ $nick off
writeini IRPG_Users.ini $nick Logged_On? No
msg $nick You have successfully logged out.
msg #idle-like-an-eagle $readini(IRPG_Users.ini,$nick,Username) has successfully logged out from username $nick $+ .
}
else { To logout, you have to be logged in ;/. To log in, type /msg Aerialbot login <character name> <password>. }
}
}
on *:notice:attack*:?:{
if ($2 !ison #idle-like-an-eagle) {
msg $nick Sorry, that nickname is not on the channel.
}
else {
set %irpg_attack $rand(1,2)
set %award_time $rand(300,1800)
if ($readini(IRPG_Users.ini,$nick,Level) <= 5) {
msg $nick Sorry, you have to be at least level 5 to attack someone. }
if (%irpg_attack == 1) {
msg #idle-like-an-eagle $nick has attacked $2 $+ ! $nick wins, removing %award_time minutes from their clock.
writeini IRPG_Times.ini $nick Minutes $calc($readini(IRPG_Times,$nick,Seconds) - $+ %award_time $+ )
}
if (%irpg_attack == 2) {
msg #idle-like-an-eagle $nick has attacked $2 $+ ! $2 wins, removing %award_time for their clock.
writini IRPG_Times.ini $2 Minutes $calc($readini(IRPG_Times.ini,$2,Seconds) - $+ %award_time $+ )
}
}
}
on *:part:#idle-like-an-eagle:{
if ($readini(IRPG_Users.ini,$nick,Logged_On?) == Yes) {
var %irpg_punish_part $readini(IRPG_Users.ini,$nick,Level) $+ 000
/timerirpg $+ $nick off
writeini IRPG_Users.ini $nick Logged_On? No
writeini IRPG_Times.ini $nick Seconds %irpg_punish_part
/msg $nick You have parted from #idle-like-an-eagle , adding %irpg_punish_part seconds to your clock.
}
}
on *:quit:{
if ($chan == #idle-like-an-eagle) {
var %irpg_punish_quit $readini(IRPG_Users.ini,$nick,Level) $+ 00
var %irpg_date $fulldate
writeini IRPG_Users.ini $nick Logged_On? No
writeini IRPG_Times.ini $nick Seconds %irpg_punish_quit
/ms send $nick You have quit #idle-like-an-eagle on %irpg_date $+ . %irpg_punish_quit seconds have been added to your clock.
}
}
on *:text:*:#idle-like-an-eagle:{
%var %irpg_punish $readini(IRPG_Users.ini,$nick,Level) $+ 000
notice $nick For talking, your clock has raised %irpg_punish seconds. This is an idling channel, not a party ;/
writeini IRPG_Times.ini $nick Seconds %irpg_punish
}
Lol not bad .. could do with some random events .... like the original iRPG xD
LMAO, could do with a check to see if someone has actually registered/logged in before awarding penalties
[12:20] -IdleBot- For talking, your clock has raised seconds. This is an idling channel, not a party ;/
Edit; and it's missing a hell of a lot of brackets for the if statements - part of me thinks you haven't properly tested/used this?
There's this amazing thing that's known as the original IdleRPG :| It in every way tops mIRC scripting.
on *:notice:login*:?:{
if ($nick ison #idle-like-an-eagle) {
if ($$2 == $readini(IRPG_Users.ini,$nick,Username) {
if ($$3 == $readini(IRPG_Users.ini,$nick,Password) {
set %irpg_ $+ $nick $nick
/timerirpg $+ $nick 0 1 /irpgtimer
writeini IRPG_Users.ini $nick Logged_On? Yes
notice $nick Logon successful!
msg #idle-like-an-eagle $nick $+ , the level $readini(IRPG_Users,$nick,level) $readini(IRPG_Users,$nick,Class) $+ , is now online from nickname $nick $+ . Reaches next level in $duration($readini(IRPG_Times.ini,$nick,Seconds),3) $+ .
}
else { notice $nick That password is wrong. Please try again.
}
}
else That username is not registered, to register type /msg Aerialbot register <character's name> <password> <character class>.
}
}
Could and should be:
on *:notice:login*:?: {
if ($nick ison #idle-like-an-eagle) {
if (($2 != $readini(IRPG_Users.ini,$nick,Username) && ($3 != $readini(IRPG_Users,$nick,Password)) { notice $nick Incorrect Username/Password, try again | halt }
set %irpg_ $+ $nick $nick
.timerrpg $+ $nick 0 1.irpgtimer
writeini IRPG_Users.ini $nick Logged_On? Yes
notice $nick Logon Successful!
msg #idle-like-an-eagle $nick $+ , the level $readini(IRPG_Users,$nick,level) $readini(IRPG_users.ini,$nick,Class) $+ , is now online from nickname $nick $+ . $nick reaches next level in $duration($readini(IRPG_Times.ini,$nick,Seconds),3) $+ .
}
What do you have to spot if a username isn't registered? also
/msg Aerialbot register <character's name> <password> <class>
What if someone doesn't name their bot that?
Use:
/msg $me register <character's name> <password> <class>
Besides..
else That username is not registered, to register type /msg Aerialbot register <character's name> <password> <character class>.
}
}
Uhmm..
else { That username is not registered, to register type /msg Aerialbot register <character's name> <password> <character class>.
}
}
tips his hat
--Editted-- reason: added stuff so i wouldn't double post.