on *:text:!register:#TestRPG:{
if ($readini(PokemonRPG/accounts.ini, $nick, registered) == Yes) {
notice $chan This nick is allready a account. }
else {
writeini PokemonRPG/accounts.ini $nick nick $nick
writeini PokemonRPG/accounts.ini $nick admin no
notice $nick You need to set a password
notice $nick Type /msg $me setpass <password> to create your account
}
}
on *:text:login *:?:{
if ($readini(PokemonRPG/accounts.ini, $nick, password) == $2) {
notice $nick You has succesfully logged in.
msg #TestRPG Player $charnick has logged in.
writeini PokemonRPG/accounts.ini $nick logged-in yes
}
}
alias charnick {
return $readini(PokemonRPG/accounts.ini, $nick, nick) $+ ( $+ $readini(PokemonRPG/accounts.ini, $nick, character-color) $+ $readini(PokemonRPG/accounts.ini, $nick, character) $+ )
}
on *:text:setpass *:?:{
writeini PokemonRPG/accounts.ini $nick password $2
writeini PokemonRPG/accounts.ini $nick registered yes
notice $nick Here are the characters you can pick: Mudkip, Torchic, Treecko
notice $nick $nick use !pick <character> to choose the character you want.
}
on *:join:#TestRPG:{
if ($readini(PokemonRPG/accounts.ini, $nick, registered) == Yes) {
writeini PokemonRPG/accounts.ini $nick logged-in yes
msg $chan $charnick is now online from nickname $nick }
}
on *:text:!whoami:#TestRPG:{
if ($readini(PokemonRPG/accounts.ini, $nick, registered) == Yes) {
msg $chan $nick $+ : Nick: $charnick Admin: $readini(PokemonRPG/accounts.ini, $nick, admin) }
else {
msg $chan $nick $+ : You aren't registered.
}
}
on *:text:!pick *:#:{
if ($readini(PokemonRPG/accounts.ini, $nick, registered) == $null) { notice $nick You don´t have a account. Type !register | halt }
if ($readini(PokemonRPG/accounts.ini, $nick, partner) != $null) { notice $nick You have allready a partner. | halt }
else {
if ($2 == mudkip) { writeini PokemonRPG/accounts.ini $nick character Mudkip
writeini PokemonRPG/accounts.ini $nick character-level 5
writeini PokemonRPG/accounts.ini $nick character-color 12
writeini PokemonRPG/accounts.ini $nick logged-in yes
msg #TestRPG New player: $charnick has joined PokemonRPG
msg #TestRPG $charnick has received a $readini(PokemonRPG/accounts.ini, $nick, character) with level $readini(PokemonRPG/accounts.ini, $nick, character-level)
mode #TestRPG +v $nick
halt
}
if ($2 == torchic) { writeini PokemonRPG/accounts.ini $nick character Torchic
writeini PokemonRPG/accounts.ini $nick character-level 5
writeini PokemonRPG/accounts.ini $nick character-color 7
writeini PokemonRPG/accounts.ini $nick logged-in yes
msg #TestRPG New player: $charnick has joined PokemonRPG
msg #TestRPG $charnick has received a $readini(PokemonRPG/accounts.ini, $nick, character) with level $readini(PokemonRPG/accounts.ini, $nick, character-level)
mode #TestRPG +v $nick
halt
}
if ($2 == treecko) { writeini PokemonRPG/accounts.ini $nick character Treecko
writeini PokemonRPG/accounts.ini $nick character-color 3
writeini PokemonRPG/accounts.ini $nick character-level 5
writeini PokemonRPG/accounts.ini $nick logged-in yes
msg #TestRPG New player: $charnick has joined PokemonRPG
msg #TestRPG $charnick has received a $readini(PokemonRPG/accounts.ini, $nick, character) with level $readini(PokemonRPG/accounts.ini, $nick, character-level)
mode #TestRPG +v $charnick
halt
}
else {
notice $nick That pokemon isn't supported yet.
}
}
}
on *:quit:{
if ($readini(PokemonRPG/accounts.ini, $nick, logged-in) == Yes) {
msg #TestRPG Player $charnick Automatic logged out.
writeini PokemonRPG/accounts.ini $nick logged-in no
}
}
on *:nick:{
if ($readini(PokemonRPG/accounts.ini, $nick, logged-in) == Yes) {
msg #TestRPG Player $charnick Automatic logged out.
writeini PokemonRPG/accounts.ini $nick logged-in no
}
}
on *:nick:{
if ($newnick == $readini(PokemonRPG/accounts.ini, $newnick, nick) {
msg #TestRPG Player $charnick Automatic logged in.
writeini PokemonRPG/accounts.ini $nick logged-in yes
}
}
on *:part:*:{
if ($readini(PokemonRPG/accounts.ini, $nick, logged-in) == Yes) {
msg #TestRPG Player $charnick Automatic logged out.
writeini PokemonRPG/accounts.ini $nick logged-in no
}
}