Server Help

Bot Questions - Ufo

WarFan - Wed Feb 04, 2004 5:17 pm
Post subject: Ufo
Im wanting the bot to UFO when it comes out of spec and perform its operations.

Tried: tell(makeSelfUFO());

without any luck. Can someone post the correct code
Mine GO BOOM - Wed Feb 04, 2004 8:54 pm
Post subject:
Have the bot send *ufo as a command. The server will then send out the "Person X is a UFO" packet to everyone, including you. Your bot core should then record that you are a ufo, so you don't un-ufo again with another command.

Just remember to enable cloaking as you move around. Stealth is already set via the server for you, but cloaking isn't.
SuSE - Wed Feb 04, 2004 9:10 pm
Post subject:
...I thought when you're *ufo'ed you can't be seen regardless of whether or not stealth/cloak are on

...?
50% Packetloss - Thu Feb 05, 2004 2:28 am
Post subject:
me->ufo=true; //i believe this works

i believe you can turn on stealth/cloak this way too if they arent already turned on.
Mine GO BOOM - Thu Feb 05, 2004 3:11 am
Post subject:
A UFO can uncloak, but cannot unstealth. Also, the server does (or did) block the ufo toggle bit until you do *ufo.

In the good old days, back in the VIE zones, UFO was designed to not be seen, unless chosen to be. It had permanent stealth, which X could not detect. The username of the pilot was never shown, cloaked or uncloaked. You were unable to spec on his name, even if he was uncloaked (an old method for how to figure out which name was Jeff at the time, hehe). While he is cloaked, X cannot see him. Cloak does not auto-turn off for any reason, unless you manually turn it off via the correct hotkeys. So you could shoot without being seen.

Also, the UFO was the Shark ship, which used to not be accessible by any means other than *ufo. While you were a UFO, all damage was reduced to 0, no matter what. So a UFO could never die, while a *super player could.

Now, as anyone with a zone can use it, the UFO has lost its special feel. Was much more fun back in the VIE days, or the rare times I ran my VIE subgame I stole (go *getfile !) from Sheep Cloning zone. I still have it somewhere...
WarFan - Fri Feb 13, 2004 6:57 am
Post subject:
ok, been trying a few things with this plugin. Basically our soccerball has been transformed into a stick of dynamite. When you score with it, the bot is suppose to come out of spec and let off a burst, thus giving the effect of exploding dynamite. With the following code, it works about 1/2 the time. The other 1/2 it just comes out of spec and then jumps back into spec without the burst. I have left the ufo part commented out as it wont burst at all with it.

Code: Show/Hide

void botInfo::burstIt()
{


   weaponInfo wi;
   wi.type = PROJ_Burst;

   tell(makeFireWeapon(&wi));
}

   case EVENT_Tick:
      {
             --countdown[0];
                if (countdown[0]<0 )
                tell(makeShip(SHIP_Spectator));

      }
      break;

   case EVENT_SoccerGoal:
      {
     countdown[0] = 3;
     int team = *(int*)&event.p[0];
     int reward = *(int*)&event.p[1];
     tell(makeShip(SHIP_Weasel));
//   me->ufo=true;
     tell(makeTeam(team));
     me->move(setts.Goals[team].x * 16, setts.Goals[team].y * 16);
     burstIt();
      }
      break;


This is my first attempt at merv plugins, have been guessing at stuff from others people source code. Just wondering why it only works half the time. Thanks
Smong - Fri Feb 13, 2004 7:49 am
Post subject:
Have you tried making the countdown bigger?
50% Packetloss - Fri Feb 13, 2004 12:40 pm
Post subject:
do this


in event tick
Code: Show/Hide

   if(me->ship!=SHIP_Spectator)
   {
         --countdown[0];
         if (countdown[0]<0 )
         {
                tell(makeShip(SHIP_Spectator));
         }
   }



Thats just a small mistake. rest of it looks good
WarFan - Fri Feb 13, 2004 2:02 pm
Post subject:
I added your code and got an error with your
Code: Show/Hide
InGame=false;


error C2065: 'InGame' : undeclared identifier

Seems to work fairly well without that line though
Cyan~Fire - Fri Feb 13, 2004 6:08 pm
Post subject:
Are you sure the bot has enough bursts?

Try putting this in EVENT_PlayerWeapon:
Code: Show/Hide
if (p == me && wi.type == PROJ_Burst)
    tell(makeShip(SHIP_Spectator));

And screw the countdown.
WarFan - Fri Feb 13, 2004 6:27 pm
Post subject:
Quote:
And screw the countdown.


How will the bot stay in the arena long enough for the burst to fly around without a countdown?

And dont bots always have super or something? Shouldnt that give it all weapons? just wondering since you cant kill a bot.
50% Packetloss - Sat Feb 14, 2004 12:09 am
Post subject:
delete the InGame=false; , I was thinking of something else and forgot to delete it. Bots dont have weapons. They just send a packet to the server that tells the server that they just set off a burst. The server trusts the client to tell it the truth
WarFan - Sat Feb 14, 2004 1:36 am
Post subject:
Cool. Everyhting seems to be working perfect now except the ufo part. Soon as I uncomment that, it does ufo but then fails to do the burst . *shrugs* But I can live with it.
Cyan~Fire - Sat Feb 14, 2004 10:12 am
Post subject:
Oh yeah, I forgot the server doesn't know what items you have.

With my example, I was saying that that code would replace the countdown.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group