Well, this is a quick and easy way to do it if you store the pet information in the hash $bot->{pets}->{$usernames}->{etc} like that.
Code:
my $next_time = (time + 60 * 60); # Add 1 hour to current time<br /><br />while (1) {<br /> $msn->do_one_loop(); # or whatever<br /><br /> if (time >= $next_time) { # If the time has come<br /> foreach $user (keys %{$bot->{pets}}) {<br /> foreach $key (keys %{$bot->{pets}->{$user}}) {<br /> $bot->{pets}->{$user}->{$key} = $bot->{pets}->{$user}->{$key} - 10;<br /> }<br /> }<br /><br /> # Re-set the waiting time.<br /> $next_time = (time + 60*60);<br /> }<br />}
Shouldn't be too hard to convert your command, just go into Notepad -> Edit -> Replace, $bot->{users}->{$user} <=> $bot->{pets}->{$user} _________________ Current Site (2008) http://www.cuvou.com/