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.
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 !?
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.
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
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 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
<-- 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.
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