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
?time and *timer

 
Post new topic   Reply to topic Printable version
 View previous topic  I need a source... Post :: Post i need a bot  View next topic  
Author Message
ZoAnimus
Newbie


Joined: Apr 22 2005
Posts: 11
Offline

PostPosted: Tue Apr 26, 2005 2:18 pm    Post subject: ?time and *timer Reply to topic Reply with quote

Does anyone know what event is passed when the timer runs out that is set by *timer? I want to use MervBot to do some processing anytime the *timer runs down to 0. I'm hoping that there is already a function to handle this event in the MervBot code. I can then just add my processing to that function. Any thoughts will be appreciated

Thanks,
ZoA
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Tue Apr 26, 2005 2:20 pm    Post subject: Reply to topic Reply with quote

I think it might just be *arena %103, which isn't a very good thing to use to assume the timer expired.
_________________
4,691 irradiated haggis!
Back to top
View users profile Send private message Add User to Ignore List
Muskrat
Server Help Squatter


Age:38
Joined: Aug 24 2004
Posts: 829
Location: Swamp
Offline

PostPosted: Tue Apr 26, 2005 2:48 pm    Post subject: Reply to topic Reply with quote

Do you mean this?
From the dll plugin example spawn.cpp
Code: Show/Hide
   case EVENT_TimedGameOver:
      {
         Player *p[5];
         for (int i = 0; i < 5; i++)
            p[i] = (Player*)event.p[i];
      }
      break;
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Tue Apr 26, 2005 2:59 pm    Post subject: Reply to topic Reply with quote

I thought it was EVENT_TimedGameOver, however after some testing that didn't work for me.

So I suggest you to use:
Code: Show/Hide

   case EVENT_Chat:
      {
         int type  = *(int*)&event.p[0];
         int sound = *(int*)&event.p[1];
         Player *p = (Player*)event.p[2];
         char *msg = (char*)event.p[3];

         switch (type)
         {
         case MSG_Arena:
            {
               if(strcmp(msg,"NOTICE: Game over")==0 && sound==5) {
                  //code goes here
               }
            }
            break;
[...]

or use the countdown array and check in EVENT_Tick. icon_smile.gif
_________________
Nickname: Maverick (I changed my name!)
TWCore developer | Subspace statistics
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
ZoAnimus
Newbie


Joined: Apr 22 2005
Posts: 11
Offline

PostPosted: Tue Apr 26, 2005 4:15 pm    Post subject: Reply to topic Reply with quote

I tried adding the line
sendPublic("Event happened");

to both the EVENT_TimedGameOver and MSG_Arena areas of the code. However, when the timed game ends. The Bot nevers says Event happened. I thought that just having the bot say something would be a good test as to whether or not the bot is registering the event.

Any ideas??

Edit:
I changed the line of code to
sendPublic("*arena Event Happened");

and it worked. Go figure???
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Muskrat
Server Help Squatter


Age:38
Joined: Aug 24 2004
Posts: 829
Location: Swamp
Offline

PostPosted: Tue Apr 26, 2005 4:24 pm    Post subject: Reply to topic Reply with quote

Yeah I couldnt get the EVENT_TimedGameOver to work either, I just assumed I was doing somethign wrong heh.

But I would not use that anyways, as having a timer in the bot to set and check with bot commands will allow using seconds, and allow events at intervals before it ends.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Tue Apr 26, 2005 8:03 pm    Post subject: Reply to topic Reply with quote

Quote:
sendPublic("Event happened");

to both the EVENT_TimedGameOver and MSG_Arena


Because you sent a Public message, it didn't register for your check for Arena Messages. If you had put stuff in MSG_Public, it would have worked.
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Thu Apr 28, 2005 3:59 am    Post subject: Reply to topic Reply with quote

I think EVENT_TimedGameOver is for Misc:TimedGame, which by the way cannot by overided with *timer.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Muskrat
Server Help Squatter


Age:38
Joined: Aug 24 2004
Posts: 829
Location: Swamp
Offline

PostPosted: Thu Apr 28, 2005 2:44 pm    Post subject: Reply to topic Reply with quote

cool, thanks
Back to top
View users profile Send private message Add User to Ignore List AIM Address
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: 131 page(s) served in previous 5 minutes.

phpBB Created this page in 0.469417 seconds : 34 queries executed (94.0%): GZIP compression disabled