Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Mervbot time control?

 
Post new topic   Reply to topic Printable version
 View previous topic  Ident problems Post :: Post make the bot shut up  View next topic  
Author Message
OpenBot
Newbie


Joined: Nov 15 2003
Posts: 6
Offline

PostPosted: Fri Nov 21, 2003 5:55 am    Post subject: Mervbot time control? Reply to topic Reply with quote

I am wondering if there is a time function in the mervbot that will allow me to make the bot do something at certain time??

or maybe have a command such as !settime = 10 minute and after 10 minute it will do something??

Thanks icon_lol.gif


Last edited by OpenBot on Fri Nov 21, 2003 8:31 am, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Fri Nov 21, 2003 6:09 am    Post subject: Reply to topic Reply with quote

I don't think it is possible to send a message prefixed by one ? for all to see in public chat.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Plody
Guest


Offline

PostPosted: Fri Nov 21, 2003 8:50 am    Post subject: Reply to topic Reply with quote

Yes, its possible in one sense. It wont run in terms of time of day but will run in terms of timers. Merv plugins have 5 integers, counter[0]-[4], and each is ticked down once per second in EVENT_Tick. Use !settime to convert the number into an integer and store it to countdown[0]. In EVENT_Tick, check if(!countdown[0]) to see if it has reached 0 yet. That is where you put your periodic information.
Back to top
Rifle
Guest


Offline

PostPosted: Fri Nov 21, 2003 8:52 am    Post subject: Reply to topic Reply with quote

Smong wrote:
I don't think it is possible to send a message prefixed by one ? for all to see in public chat.


That`s not possible, but using ! instead of ? is icon_wink.gif

In response to the original question :

Yes, it is possible to do a command like !settime 10 and the bot would perform a certain action after 10 minutes.

hint : Look for EVENT_Tick ( If I remember correctly )

-Rifle
Back to top
OpenBot
Newbie


Joined: Nov 15 2003
Posts: 6
Offline

PostPosted: Fri Nov 21, 2003 8:41 pm    Post subject: Reply to topic Reply with quote

Thanks Plody and Rilfe !!

But does anyone have an example where maybe I an learn from?

sa_tongue.gif
Back to top
View users profile Send private message Add User to Ignore List
ExplodyThingy
Server Help Squatter


Age:38
Gender:Gender:Male
Joined: Dec 15 2002
Posts: 528
Location: Washington DC
Offline

PostPosted: Fri Nov 21, 2003 11:51 pm    Post subject: Reply to topic Reply with quote

ok, here:

command.cpp:

if(c->check("settime"))
{
countdown[0]=atoi(c->final);
}

spawn.cpp:

EVENT_Tick
{
for(int i=0;i<4;i++)
countdown[i]--;
if(!ountdown[0]
{
//Your stuff here.
}
}
_________________
There are no stupid question, but there are many inquisitive idiots.
Loot

Dr Brain> I hate clean air and clean water. I'm a member of Evil Conservitive Industries
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sat Nov 22, 2003 1:30 pm    Post subject: Reply to topic Reply with quote

Here's the files the Explody was talking about:
http://www.mervbot.com/files/Tutorial.rar

If you have no experience with C++, tell me what you want it do do and I'll program it for you. It shouldn't be that hard.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 76 page(s) served in previous 5 minutes.

phpBB Created this page in 0.509228 seconds : 31 queries executed (90.6%): GZIP compression disabled