diff --git a/Irpg/Classes/Sneaky.pm b/Irpg/Classes/Sneaky.pm index 1e47ff1120d4f6362ca1b0d93e5f9725648e5ba1..dd155cbd1f413e2729921c3d73758d5194f4e0ed 100644 --- a/Irpg/Classes/Sneaky.pm +++ b/Irpg/Classes/Sneaky.pm @@ -3,7 +3,7 @@ package Irpg::Classes::Sneaky; use strict; use warnings; use Irpg::Classes::Shrewd; -our @ISA = qw(Irpg::Classes::Schrewd); +our @ISA = qw(Irpg::Classes::Shrewd); sub new { my ($class, $pl_stats) = @_; diff --git a/Irpg/Main.pm b/Irpg/Main.pm index 6410e36529a03c0e8eed1afe1b287613e59a6351..0044b4e48b14fbb1d3fb5626ef1dbec5a0ef00cc 100644 --- a/Irpg/Main.pm +++ b/Irpg/Main.pm @@ -98,7 +98,7 @@ sub reloaddb { sub finduser { my $nick = shift; my $offline = shift; - return undef if !defined($nick); + return undef if (!defined($nick)); for my $user (keys(%$rps)) { next unless ($rps->{$user}{online} || $offline); if ($rps->{$user}{nick} eq $nick) { return $user; } @@ -315,7 +315,13 @@ sub rpcheck { # check levels, update database $rps->{$k}{idled} += ($curtime - $$lasttime_ref); if ($rps->{$k}{next} < 1) { $rps->{$k}{level}++; - $rps->{$k}{points}++ if (!($rps->{$k}{level} % 5)); + if (!($rps->{$k}{level} % 5)){ + $rps->{$k}{points}++; + Irpg::Irc::notice( + "Your hard training paid off, and you have ". + "one more point to invest.", + $rps->{$k}{nick}); + } if ($rps->{$k}{level} > 60) { $rps->{$k}{next} = int(($opts->{rpbase} * ($opts->{rpstep}**60)) + @@ -336,7 +342,8 @@ sub rpcheck { # check levels, update database && $rps->{$k}{actions} < int($rps->{$k}{level}/10)) { $rps->{$k}{actions}++; $rps->{$k}{next_a} = 3600; # 1 hour - Irpg::Irc::notice("You feel ready to perform a new deed !", $rps->{$k}{nick}); + Irpg::Irc::notice("You feel ready to perform a new deed !", + $rps->{$k}{nick}); } } # attempt to make sure this is an actual user, and not just an diff --git a/Irpg/Users.pm b/Irpg/Users.pm index 8a59c7d8c1318b35a215896bc23ddf51b00fe36d..ed451eb13ea4bd8964fd7c99a741b5e1c3bdc001 100644 --- a/Irpg/Users.pm +++ b/Irpg/Users.pm @@ -91,7 +91,7 @@ sub register { } $$lastreg_ref = time(); $rps->{$arg[0]}{next} = $opts->{rpbase}; - $rps->{$arg[0]}{title} = "@arg[6..$#arg]"; + $rps->{$arg[0]}{title} = "@arg[2..$#arg]"; $rps->{$arg[0]}{level} = 0; foreach (qw(str con wis int cha dex)) { $rps->{$arg[0]}{stats}{$_} = 1; @@ -123,7 +123,7 @@ sub register { $rps->{$arg[0]}{$pen} = 0; } Irpg::Irc::chanmsg("Welcome $usernick\'s new player $arg[0], the ". - "@arg[6..$#arg] Farmer! Next level in ". + "@arg[2..$#arg] Farmer! Next level in ". duration($opts->{rpbase})."."); Irpg::Irc::privmsg("Success! Account $arg[0] created. You have ". "$opts->{rpbase} seconds idleness until you ". @@ -222,7 +222,7 @@ sub status { Irpg::Irc::privmsg("No matching user found.",$source); } else { - my $almt = $rps->{$arg[0]}{alignment}; + my $almt = $rps->{$asked}{alignment}; $almt = $almt eq 'g' ? 'Good': $almt eq 'e' ? 'Evil': 'Neutral'; @@ -243,7 +243,7 @@ sub whoami { Irpg::Irc::notice("You are not logged in.", $usernick); } else { - my $almt = $rps->{$arg[0]}{alignment}; + my $almt = $rps->{$username}{alignment}; $almt = $almt eq 'g' ? 'Good': $almt eq 'e' ? 'Evil': 'Neutral';