- bool CWorldServer::LoadRespawnData( )
- {
- Log( MSG_LOAD, "RespawnZones data " );
- MYSQL_ROW row;
- MYSQL_RES *result = DB->QStore("SELECT id,x,y,map,radius,type FROM list_respawnzones");
- if(result==NULL) return false;
- while( row = mysql_fetch_row(result) )
- {
- CRespawnPoint* thisrespawnpoint = new (nothrow) CRespawnPoint;
- if(thisrespawnpoint==NULL)
- {
- Log(MSG_ERROR, "Error allocing memory" );
- DB->QFree( );
- return false;
- }
- thisrespawnpoint->id = atoi(row[0]);
- thisrespawnpoint->dest.x = (float)atof(row[1]);
- thisrespawnpoint->dest.y = (float)atof(row[2]);
- thisrespawnpoint->destMap = atoi(row[3]);
- thisrespawnpoint->radius = atoi(row[4]);
- thisrespawnpoint->masterdest = (atoi(row[5]) == 1);
- //LMA: check if out of memory.
- if (thisrespawnpoint->destMap>=MapList.max)
- {
- Log(MSG_WARNING,"RespawnZones, index overflow trapped %i>%i (should not happen)",thisrespawnpoint->destMap,MapList.max);
- delete thisrespawnpoint;
- continue;
- }
- MapList.Index[thisrespawnpoint->destMap]->RespawnList.push_back( thisrespawnpoint );
- }
- DB->QFree( );
- Log( MSG_LOAD, "RespawnZones Data loaded" );
- return true;
- }
So what the heck do i do now? you ask.
This isn't going to be a tutorial as such but rather just a list of instructions that you need to follow in order to get off to a nice quick start.
- First of all, go into your client root directory and extract all of the VFS. ( yes ALL of it ) Then put the whole lot into the 3DDATA folder of the client, including all sub folders so that the folder is a perfect mirror to the VFS structure. The client will load the files in from here. Technically we shouldn't need ALL of it but I fucked something up somewhere and now there is at least one file type that won't load from VFS. I have no idea which one though and frankly I can't be bothered to go searching for it to fix the stupid thing so for now lets just load the whole lot from the folder.
- DO NOT copy the STB, QSD and AIP files to your server. The ones you just extracted are the UNMODIFIED versions. You will actually have to do the exact opposite since any STBs etc. in your server are actually the master files so you will periodically (whenever new files are downloaded via the repo) have to copy them into the client instead
- Next make sure that you download the trose.exe that I included in the post with the client link. Use it to overwrite the trose.exe in the donor client
- That's the donor client finished with.
- Now download the server. From the repo page at github you can either Clone or Download the entire repository. There's a big ass green button that says "Clone or Download" You can't miss it.... honest
- If you are familiar with GIT then clone it to your computer someplace. That is the recommended method. That way you will be able to pull down changes whenever they are made. If you really don't want to get into that kind of thing then just download the zip. It's your choice.
- Now you need a database. All the files are there in the "Database folder" as .sql files
- I recommend that you go and download xampp from here https://www.apachefriends.org/index.html Install it ( i don't typically install it as a service. I just use the "xampp start" and "xampp stop" files that come with it ) and run it
- xampp comes with a built in program called phpmyadmin which you can use to create your database. Follow a couple of tutorials if you need to. There are plenty out there. Make a new database and call is "osrose" or "fishlegs" or "jaberwockies_rule". Whatever you like. just make sure that your database name, user and password line up with the values in your conf files.
- EDIT your .conf files (loginserver.conf, charserver.conf, worldserver.conf) to match the stuff you just set up in your database otherwise your servers will be unhappy. DO NOT change any IP settings at this point. The files are set up to run on localhost so please get it all working there before you try opening it up to external connections.
- Navigate into your new empty "Jaberwockies_rule" database from within PHPMyAdmin (or whatever other database management tool you chose to use.) and click "IMPORT" then navigate to the database folder in your server files and start importing them. Sorry but you will have to do them one by one. I didn't ever get around to making a universal sql file to load the whole lot. If anybody wants to make one then please submit it here. Just be aware that the tables will very probably mutate over time. new columns added here and taken away elsewhere as I (we perhaps) continue to develop this project
- So now you have your database ready and you have completed conf files that match
- Run your servers and watch for any errors in the console windows, particularly anything that says it failed to read a value from a database table. Post in the bugs forum immediately if that happens. It's quite possible that I might need to update one or two db tables in the repo before this all works flawlessly.
- Assuming all is good, run your client from the batch file that is included in your donor client (it might be called RoseZA.bat actually. I can't actually remember) When it crashes horribly, start to cry in frustration and then post up as much information about your issue as possible in the BUGS forum
Have fun