Server Help

Bot Questions - Messaging Problems

Dustpuppy - Tue Feb 17, 2004 8:39 pm
Post subject: Messaging Problems
My bot has suddenly become mute, and I can't figure out why for the life of me. I'd appreciate any suggestions people can give.

Up until recently this was all working fine, so I guess I must have changed something but I've only been working on the database code recently so I don't know how it happened.

I can't see the bots public or private messages anymore, although team, remote and channel messages still appear. The weird thing is, if I send ?jackpot, the bot gets a response.

Here's what I've thought of so far:



I realise it's probably hard to see a possible cause without knowing the source, but perhaps I'm overlooking something really obvious...
ExplodyThingy - Tue Feb 17, 2004 8:49 pm
Post subject:
I have the exact same problem. The bot sends every kind of chat except public. ALthough, it gets responses from commands. Its very weird.
Smong - Thu Feb 19, 2004 1:22 pm
Post subject:
Maybe it got *shutup or something?
50% Packetloss - Fri Feb 20, 2004 2:58 am
Post subject:
I have had this many times, I added String+=GetTickCount() to the message and then the message would work. Not only merv, but a powerbot that I use to do zone messages in SWZ will ignore commands at times for no apparent reason. I change the message that I am sending and then it works. Subgame does wierd things, Ive seen it crash, ignore settings changes and lose the powerball.
Mine GO BOOM - Fri Feb 20, 2004 10:40 am
Post subject:
The server starts to ignore public messages if they are the same. So if you are having it print the same message over and over, then it won't really send. As to what it thinks is the 'same' message, I'm not sure, since it seems to be random on that.

Just have it never send public-messages, or if it needs to, make sure it doesn't send it too often, and it isn't the same message as before.
Dustpuppy - Fri Feb 20, 2004 11:21 am
Post subject:
I'm not worried about public messages, but private messages are important.

And they aren't the same. If I start up the bot and make it send something, it won't appear.
Dustpuppy - Fri Feb 20, 2004 11:50 am
Post subject:
Oh, it also can't enter subarenas any more, but I don't know if that's related.
If I try to send it to a sub, it just goes to pub.
D1st0rt - Fri Feb 20, 2004 9:02 pm
Post subject:
That happened to me also, but I did something and it worked again sa_tongue.gif
CypherJF - Fri Feb 20, 2004 9:03 pm
Post subject:
perhaps -- restart it?
Doggeti - Mon Feb 23, 2004 6:43 am
Post subject:
This is a serious problem. my bot can't do sendPublic any more. Also my self made command !hits gets ignored after the first usage:
ME: !hits
BOT: Hits: 1
ME: !hits
BOT: -
Dr Brain - Mon Feb 23, 2004 9:32 am
Post subject:
Doggeti wrote:
This is a serious problem. my bot can't do sendPublic any more. Also my self made command !hits gets ignored after the first usage:
ME: !hits
BOT: Hits: 1
ME: !hits
BOT: -


The ignored after first usage is the server ignoring duplicate public messages that are one after the other. Send it PM or say something in between the !hits.
Doggeti - Tue Feb 24, 2004 7:00 am
Post subject:
Merv also ignores the SoccerGoal event.

Code: Show/Hide
case EVENT_SoccerGoal:
      {
         int team = *(int*)&event.p[0];
         int reward = *(int*)&event.p[1];

         String s;
         if(team == 0)
            score[0]++;
         if(team == 1)
            score[1]++;

         _listnode<Player> *p = playerlist->head;
         while (p)
         {
            if(team == 0)
            {
               s = "*objset 3,4,";
               sendPrivate(p->item,s);
            }
            else
            {
               s = "*objset 1,2,";
               sendPrivate(p->item,s);
            }
            p = p->next;
         }
      }
      break;


Because it doesn't send public messages I added this while-loop to send a private message to every player. But nothing happens when I score a goal. I don't see the objects and the score remains 0-0.
Cyan~Fire - Tue Feb 24, 2004 4:54 pm
Post subject:
That event worked fine for me in my cf_score plugin.
Doggeti - Wed Feb 25, 2004 1:49 am
Post subject:
Until I started to work on Bots again a few days ago it also worked for me.
Doggeti - Thu Feb 26, 2004 7:36 am
Post subject:
It's getting even stranger. I just ran one of my 'old' bots. It is the same build (33) as this not-working one and I tested it on a server with the same version of subgame.exe and this old bot is still working fine. It can set objects, recognize goals and send public messages.

Who messed up the matrix !? new_scrambles.gif
50% Packetloss - Thu Feb 26, 2004 12:02 pm
Post subject:
um... Use the latest version

ANd the command is *objset +3,+4,
Im not sure if it works w/o the + signs?
Doggeti - Thu Feb 26, 2004 4:58 pm
Post subject:
What is the latest version (if not build 33)?

I type *objset 3,4, in game and it works. The problem is that the bot doesn't seem to get as far as that because it doesn't increase the scores. I think the bot does not receive the SoccerGoal event OR does not pass it on to the dll for some weird reason.
Cyan~Fire - Thu Feb 26, 2004 5:27 pm
Post subject:
Ok, the latest build is 38. You can get it off catid.ssihosting.com.

How are you doing the LVZ toggling? I personally would recommend using Catid's system he built into MERV (enable_object, toggle_objects, etc) because you don't have to mess around with strings that way.
CypherJF - Thu Feb 26, 2004 5:45 pm
Post subject:
I suggest .39, there are implementations for LVZ stuff obj handling... not sure how it works but yeah! w00t lol
50% Packetloss - Thu Feb 26, 2004 11:00 pm
Post subject:
You need build 39, it contains a lot of fixes to problems i found
Doggeti - Fri Feb 27, 2004 1:59 am
Post subject:
I did the whole project from scratch. I used build 39; I gave the bot mod, smod and sysop powers; I used queue_enable and toggle_objects. Nothing helped. sa_confused.gif
CypherJF - Fri Feb 27, 2004 10:39 am
Post subject:
When u do obj set doesnt it need to be +3 or whatnot? ... -3 to turn it off... and is comma's the delimiter ? :/ i dont know this stuff off the top of my head lol
Doggeti - Fri Feb 27, 2004 12:19 pm
Post subject:
In commans.txt there is an example given: *objset +2 -40

First i tried *objset +3 +4 but nothing would happen.
Then I typed *objset 3,4 but only 3 was turned on.
Finally I did *objset 3,4, and I saw both objects.

You could also use *objset +3,+4, but why would you want to make live harder than it is icon_wink.gif
CypherJF - Fri Feb 27, 2004 1:12 pm
Post subject:
I don't know I dont use objon/off or objset :/ LOL....
Cyan~Fire - Fri Feb 27, 2004 5:55 pm
Post subject:
Could you post your code using enable_object, etc?
Doggeti - Sat Feb 28, 2004 3:33 am
Post subject:
Ok, here it is
Code: Show/Hide
case EVENT_SoccerGoal:
      {
         int team = *(int*)&event.p[0];
         int reward = *(int*)&event.p[1];

         if(team == 0)
         {
            score[0]++;
            queue_enable(3);
            queue_enable(4);
            toggle_objects();
         }
         else
         {
            score[1]++;
            queue_enable(1);
            queue_enable(2);
            toggle_objects();
         }
         
         String s;
         s = "SCORE: Evens: ";
         s += score[0];
         s += "  Odds: ";
         s += score[1];
         sendPublic(s);
      }
      break;

Cyan~Fire - Sat Feb 28, 2004 1:11 pm
Post subject:
Hmmm. Does the bot trigger the score message at all?
Doggeti - Sat Feb 28, 2004 1:55 pm
Post subject:
No, I don't think so. In EVENT_PlayerEntering I have a private message that tells the entering player the score and it always says 0 - 0 though some goals had been scored.
Anonymous - Sun Feb 29, 2004 11:54 am
Post subject: LVZ toggling
new_let_it_all_out.gif <-- somebody call an exorcist!

First off, download the latest version of build 39 from my website, as it's newer than the one you have. Open the src.zip file and copy all those source codes into the parent folder to your plugin project. Now your core and your plugins will be synced with the latest version.

Get the LVZ object number for something that you know will work. Test it in the game with the *objon command before writing code to make use of it.

Give the bot sysop. I've made changes to the LVZ protocol implementation in MERVBot. He now uses a more efficient method to toggle objects, when he is a sysop.

Code: Show/Hide

object_target(0); // 0 => everyone, Player * => single player
queue_enable(4); // object id
toggle_objects(); // run the queue


If it doesn't work, try it as a supermoderator bot as opposed to a sysop bot. Whether or not it works after this point, i'd like to talk to you in e-mail. cat02e@fsu.edu
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group