Code: Show/Hide void botInfo::moveFlag(Flag *f, int destx, int desty) { tell(makeFollowing(false)); tell(makeFlying(true)); tell(makeShip(SHIP_Warbird)); me->move(f->x, f->y); tell(makeSendPosition(true)); tell(makeGrabFlag(f->ident)); me->move(destx*16, desty*16); tell(makeSendPosition(true)); tell(makeDropFlags()); tell(makeShip(SHIP_Spectator)); tell(makeFollowing(true)); tell(makeFlying(false)); } |
Quote: |
; Required settings:
; [Flag]FlagDropDelay=? <- Set really high ; [Flag]CarryFlags=2 <- Only carry one flag at a time, important if one flagger kills another flagger ; [Flag]FlagMode=1 <- Warzone style ; [Flag]FlagReward=0 <- Never win jackpot ; [Flag]FlagTerritoryRadius=0 <- The bot needs to drop flags with precision ; [Flag]FlagTerritoryRadiusCentroid=0 <- ditto ; Recommended settings: ; [Flag]FlaggerOnRadar=1 <- So people can compete ; [Flag]NoDataFlagDropDelay=32767 <- Bot may have trouble with this ; [Flag]FlagBlankDelay=32767 <- Bot may have trouble with this ; [Team]MaxPerTeam=255 ; [Team]MaxFrequency=2 <- Bot may have trouble with this ; [Flag]MaxFlags=2 <- Bot may have trouble with this ; [Team]DesiredTeams=2 |
Code: Show/Hide case EVENT_Tick:
{ for (int i = 0; i < 5; ++i) --countdown[i]; // resume spectating if (!countdown[0]) { tell(makeFollowing(true)); tell(makeFlying(false)); tell(makeShip(SHIP_Spectator)); } ... case EVENT_FlagMove: ... if (countdown[0] <= 0) { tell(makeFollowing(false)); tell(makeFlying(true)); tell(makeShip(SHIP_Warbird)); countdown[0] = 1; } tell(makeTeam(fident)); tell(makeGrabFlag(fident)); me->move(info->xAtRest * 16, info->yAtRest * 16); tell(makeSendPosition(true)); tell(makeDropFlags()); |