User Control Panel
Advertisements

HELP US, HELP YOU!

time....taking away after a hour

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
Dazzy
Agent
Agent


Joined: 09 Jan 2004
Posts: 1731

Reputation: 72.3

PostPosted: Tue Mar 09, 2004 10:54 pm    Post subject: Reply with quote

hi....im tried looking at the hourblock command for this, i thought it would be the same concept but Wink

i want after every hour to take say 10 from a hash.....if you need more detail ill post but i think you get the drift......
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Tue Mar 09, 2004 11:43 pm    Post subject: Reply with quote

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/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group