
50% Packetloss
Member-
Posts
197 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Events
Everything posted by 50% Packetloss
-
you can do this then, in your ball move code if (parse->item->tile.x >= 346 && parse->item->tile.x <= 361 && parse->item->tile.y >= 453 && parse->item->tile.y <= 574) { BallCarrier= parse->item->ident; sendPublic("*arena Touchdown! by " +(String)parse->item->name +"."); } else { BallCarrier=-1; } that will only record the person if they are inside the area, and if they arnt, then it wont record them
-
this is what 1st came to my head //where this is, in spawn.h int countdown[4]; // Put bot data here //add This to it<--------------------------- Uint16 BallCarrier; //a Uint16 being a unsigned short , it will hold the ball carrier's ident public: botInfo(CALL_HANDLE given) { handle = given; callback = 0; playerlist = 0; flaglist = 0; map = 0; countdown[0] = 0; countdown[1] = 0; countdown[2] = 0; countdown[3] = 0; CONNECTION_DENIED = false; me = 0; biller_online = true; num_objects = 0; object_dest = NULL; // Put initial values here BallCarrier= -1; // <------------------belive this would work } then in your code above, thats in event ballmove if(ball->carrier != 65535) //This number means the ball is not being carried { _listnode <Player> *parse = playerlist->head; //list of all the player while (parse) //go through list { if (ball->carrier == parse->item->ident) { //if you find the player with the ball //Add this Here <------------------------- BallCarrier= parse->item->ident; //!@#$%^&*ign a person's ident to the carrier if (parse->item->tile.x >= 346 && parse->item->tile.x <= 361 && parse->item->tile.y >= 453 && parse->item->tile.y <= 574) { sendPublic("*arena Touchdown! by " +(String)parse->item->name +"."); } break; } parse = parse->next; //next player } } that will keep track of who has the ball then finally case EVENT_PlayerDeath: { Player *p = (Player*)event.p[0], *k = (Player*)event.p[1]; Uint16 bounty = (Uint16)event.p[2]; if(p->ident == BallCarrier) // <-------------------if they are holding the ball when they die { //your code here } } break; should work
-
Map Files and Sexing up Mervbot
50% Packetloss replied to 50% Packetloss's topic in General Discussion
thx for the help dust, tried this, didnt work -
Bot works like TM Baw, move over a coordinate area, and the object switches on/off, the current version is at the bottom of the page. I believe it is bug free, even from server crashes/recycles. http://forums.minegoboom.com/viewtopic.php?t=1723
-
Map Files and Sexing up Mervbot
50% Packetloss replied to 50% Packetloss's topic in General Discussion
CALL_MAP map; //spawn.h typedef BYTE *CALL_MAP; //dllcore.h typedef unsigned char BYTE; //datatypes.h nope, doesnt seem that downloading the map has anything to do with the CALL_MAP map; , i had the bot display the variable in the game but it wasnt the map name either. Im going to try a few things. Going to have the bot open the lvl file and get its size, then wait a few seconds and do it again. when the sizes are the same from both checks, the file is done downloading. Otherwise it keeps trying, the file should grow larger while the bot downloads it, so not until its done will the size be the same after both checks. doubt this will work but ill try it -
Yah, use his code, look at that cute avatar, u cant resist
-
This here, _listnode <Player> *parse = playerlist->head; is a list of all the players, and we called the variable "parse". parse holds items, which is declared between the <> symbols, in this case players in the game. So when you do parse->item , it will return a Player. We made parse equal to the top of the list of player, each time you do, parse=parse->next, it goes to the next player in the list tried to explain it in simple terms, hopefully didnt confuse you. The actual process is a lot more complex than what i have writen
-
a word of advise, forums.minegoboom.com , this is the best place for your questions..they are a lot more patient and understand better. They also have official helpers, such as kozy, that are there to help you understand and write code.
-
p->tile.x p->tile.y Use these to find player locations, in the case that i have above, parse->item->tile.x parse->item->tile.y to get them out of the linkedlist, you can also get the ball's coords, explained below struct PBall { Uint16 x, y; Sint16 xvel, yvel; Uint16 team; Uint16 ident; Uint16 carrier; Uint32 time; // Local timestamp on event (not constant) Uint32 hosttime; // Remote timestamp on event (constant until new event) Uint32 lastrecv; // Last update recv time (for timeout) }; Nope, its a unsigned variable, carrier holding the number that each player is !@#$%^&*igned when they enter, if they pick up the ball the number changes to your ident
-
One way of doing it, placing the code in Event_Ballmove, ballmove is called while the ball is on the map case EVENT_BallMove: { PBall *ball = (PBall*)event.p[0]; if(ball->carrier != 65535) //This number means the ball is not being carried { _listnode <Player> *parse = playerlist->head; //list of all the player while (parse) //go through list { if (ball->carrier == parse->item->ident) { //if you find the player with the ball //place your code here break; } parse = parse->next; //next player } } } Variable ballList is not one that you have access to, its private to the bot.
-
XP pops up a window that tells me all the useless facts about the crash, clicking debug will open visual studio
-
Joo are a F-ing genious, -*BAD WORD*- microsoft almost hides that debug button in XP. Looked at it and imediatly knew the problem, thx ekted
-
The bot is uploaded here, http://forums.minegoboom.com/viewtopic.php...p?p=10839#10839 Someone wanted to have a fighting type game, so that if they went into a building the roof would come off and they left it would go back on, with lvz. Someone suggested that TM Baw was just like this so i started to edit the code. In theory my code should work fine, and it does parcially. When i step into the target area, the bot will do *objon, but stepping out the bot crashes for some unknown reason. I explained on the forum how basiclly it works but the code at the bottom would probably be the best way to figure it out. I will be your sex slave for life if you find my problem
-
Map Files and Sexing up Mervbot
50% Packetloss replied to 50% Packetloss's topic in General Discussion
Thx for helping, but you are wrong. Files are downloaded after that case is executed or durring. Im happy to send my source to you so that you can see the same thing. -
Map Files and Sexing up Mervbot
50% Packetloss replied to 50% Packetloss's topic in General Discussion
oops, nm, it doesnt call event_file when it gets the map No matter if the map is downloaded or not, merv calls the same events. Order of events that are called when the bot enters: //numbers are thier values 4: EVENT_ArenaSettings 2: EVENT_Tick // run every second 3: Event_ArenaEner -
Map Files and Sexing up Mervbot
50% Packetloss replied to 50% Packetloss's topic in General Discussion
Here is the list of all the codes, in order, no values are !@#$%^&*igned to each, believe the enum does that automaticlly. Hopefully its of some help enum Bot2DLL_EventCodes { EVENT_Init, //DLL loaded EVENT_Term, //DLL unloaded EVENT_Tick, EVENT_ArenaEnter, EVENT_ArenaSettings, EVENT_ArenaLeave, EVENT_ArenaListEntry, EVENT_ArenaListEnd, EVENT_CreateTurret, EVENT_DeleteTurret, EVENT_PlayerEntering, EVENT_PlayerMove, EVENT_PlayerDeath, EVENT_PlayerScore, EVENT_PlayerPrize, EVENT_PlayerShip, EVENT_PlayerSpec, EVENT_PlayerTeam, EVENT_PlayerLeaving, EVENT_Chat, EVENT_LocalCommand, EVENT_LocalHelp, EVENT_RemoteCommand, EVENT_RemoteHelp, EVENT_FlagGrab, EVENT_FlagDrop, EVENT_FlagMove, EVENT_FlagVictory, EVENT_FlagReward, EVENT_TimedGameOver, EVENT_SoccerGoal, EVENT_File, EVENT_BallMove, EVENT_SelfShipReset, EVENT_SelfPrize, EVENT_SelfUFO, EVENT_PlayerWeapon, EVENT_PositionHook, EVENT_ObjectToggled, EVENT_BrickDropped, EVENT_WatchDamage, EVENT_FlagGameReset, }; EVENT_ArenaEnter is NOT what i want, it is called before the file is downloaded. EVENT_File would probablly be called when the map file was downloaded, the problem is that the file is only downloaded the 1st time the bot comes into the arena, if the map file is the same the bot wouldnt need to download it. -
Map Files and Sexing up Mervbot
50% Packetloss replied to 50% Packetloss's topic in General Discussion
how do i add that event? events are in here dllcore.h -
Map Files and Sexing up Mervbot
50% Packetloss replied to 50% Packetloss's topic in General Discussion
Bot opens lvl file, gets all the locations of the wormholes(could be anything but wormholes for now), stores them in linklist. When player moves it checks to see if they went into a wormhole. The event idea is to have cloaked spiders that use reps to knock people into wormholes, then bot spectates them. I was told that the physics of the wormhole would cause this not to work, but it seems to work with the defualt settings that come with the server app. I seem to p!@#$%^&* by the bot's location checking if i turn on super and speed into the wormhole but its probably fixable. The file needs to be downloaded before the file pointer looks through it. EVENT_File wont work becuase it doesnt redownload the file each time it goes into the arena. -
The dll im making, opens the arena's LVL file...and other unimportant stuff. Problem is that I cant open the LVL file until the bot downloads it. The bot seems to start the dll before its done downloading the file. I place the code that reads the file in, case EVENT_ArenaSettings: Need to know how to check if the bot downloaded the map, so that i can open the file after its done, and how to get the arena's name so i can just strcat(arenaname,".lvl") to the end of the arena name. looked through the source for an answer, didnt find anything that seemed to work After I figure this out ill probably add a !sex function so that it will come outta spec and be my sex slave; woops too much information