That method doesn't work, probably since the brick wasn't planted by a player. Therefore, it wouldn't inherit a minigame. Maybe is it possible to find a minigame by its name, or one hosted by a specific player? Or how about finding the nearest brick to $botSpawn and getting its minigame?
Edit: My script automatically adds items to the bot depending on its class. I can verify they are being added correctly, since when i dump() them it shows a value for tool0. When they come and attack me, they simply just use their fists. Is there any way I can force them to use their guns, like a hole zombie?
Edit2: With actual hole-spawned zombies, if you give them a flamethrower through script they don't acknowledge it either. But when you wrench their spawn point and add it in the GUI, they instantly start using it.
Edit3: I've changed things up, and added these to the part where I defined the AiPlayer I wanted:
//Winter, for poland, and france!
hMelee = 0;
hShoot = 1;
hShootTimes = 4;
hMaxShootRange = 32;
hAvoidCloseRange = 1;
hTooCloseRange = 2;
hReturnToSpawn = 0;
hSpawnDist = 500;
hWep = flamerImage;
Yet, now he just doesn't attack me :(. hWep might yeild some fruits though.
This is my ultra temporary fix for the minigame problem:
%robot.minigame = findclientbyname("Piexes").minigame;
Yet ofc I won't be online every time a bot spawns, so I need a better solution.
Edit4: Durr, turning hMelee to 1 fixes them not attacking. Still no flamethrower action, though.