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
Watch damage?

 
Post new topic   Reply to topic Printable version
 View previous topic  Ranking/sorting algorithm? Post :: Post Running Merv in Linux Console  View next topic  
Author Message
tansey
Novice


Joined: Nov 03 2004
Posts: 53
Offline

PostPosted: Thu Mar 03, 2005 4:51 pm    Post subject: Watch damage? Reply to topic Reply with quote

Does MERV have a built in way to automatically watch damage for all players? Right now I have a function watchAll() that just iterates through the playerlist and pms everyone *watchdamage but for some reason that's occassionally saying it's turning watchdamage off which makes no sense.
Back to top
View users profile Send private message Add User to Ignore List
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: Thu Mar 03, 2005 6:07 pm    Post subject: Reply to topic Reply with quote

I don't think MERV has something like that. Your best bet is checking the reply and re-messaging the player if it says OFF.
_________________
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
D1st0rt
Miss Directed Wannabe


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

PostPosted: Thu Mar 03, 2005 6:45 pm    Post subject: Reply to topic Reply with quote

Or if you didn't want to deal with the chat messages, you could set WATCHED as a tag
_________________

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


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Thu Mar 03, 2005 7:55 pm    Post subject: Reply to topic Reply with quote

Code: Show/Hide
case EVENT_WatchDamage:
      {
         Player *p = (Player*)event.p[0];   // player
         Player *k = (Player*)event.p[1];   // attacker
         weaponInfo wi;
         wi.n = *(Uint16*)&event.p[2];
         Uint16 energy = *(Uint16*)&event.p[3];
         Uint16 damage = *(Uint16*)&event.p[4];
      }


When you *watchdamage on a player, every time they are damaged the above function is called. The cause for *watchdamage to turn off is the player went to another arena, example: ?go duel. Then once they return, the watchdamage is still ON as long as they didn't leave the zone. So your bot is turning it off. What you need to do is watch the chat messages you recieve from the server. So one solution might be to append player names to a linklist, so send them *watchdamage and append them to a linklist. Then when you get a responce from the server, depending on the responce (ON or OFF) then you can either send them the *watchdamage again and place them at the end of the linklist or delete them from the linklist because the *watchdamage is now ON for that player. I have no idea if the server sends the *watchgreen responce messages in the same player order as you sent them or if there is a chance that the bot might not recieve a chat message packet, if either of those are true then the above solution would not work.
Subgame wasn't really built to be bot-friendly so this is one case that doesn't have a great solution.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Cerium
Guest


Offline

PostPosted: Thu Mar 03, 2005 9:30 pm    Post subject: Reply to topic Reply with quote

Actually, im fairly sure watchdamage shuts off once they leave the arena...

The way MRBots work for that, is whenever a player enters the arena, it adds them to a list of people who *dont* have it. When they enter the game, the bot sends them the *watchdamage message, and removes them from the list. Works perfectly. Never once does the bot check the servers response.

The only time this doesnt work is when the bot reloads during primetime when people in the arena already have *watchdamage, so when the bot re-enters, it undoes its own work.

Of course it could all be a fluke, and I could be wrong, but whatever.
Back to top
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Fri Mar 04, 2005 3:15 am    Post subject: Reply to topic Reply with quote

Oops, my bad. I was thinking of *watchgreen. But that mervbot event does work.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
D1st0rt
Miss Directed Wannabe


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

PostPosted: Fri Mar 04, 2005 6:12 pm    Post subject: Reply to topic Reply with quote

Cerium's way is a variation of what I was saying, you could do it that way as well
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: 397 page(s) served in previous 5 minutes.

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