Guys - list_golist.sql doesn't seem to work. I'm using devrev4 worldserver2 (there are 2 compiled exes in the svn and the worldserver1 errors and crashes about npc quesdata).
Found this in the gmcmds.cpp:
- if(Config.Command_Go > thisclient->Session->accesslevel)
- {
- DB->QFree( );
- return true;
- }
- if ((tmp = strtok(NULL, " ")) == NULL) tmp = 0;
- int loc = atoi(tmp);
- int x = 0;
- int y = 0;
- int map = 0;
- MYSQL_ROW row;
- MYSQL_RES *result = NULL;
- result = DB->QStore("SELECT lvlmin,map,locx,locy,mapname,lvlmax FROM list_golist WHERE isactive=1 AND loc=%i",loc);
- row = mysql_fetch_row(result);
- if (row==NULL)
- {
- SendPM(thisclient, "Please input a number after the go command, below is a list of places and their appropriate number");
- DB->QFree( );
- result = DB->QStore("SELECT loc,mapname FROM list_golist WHERE isactive=1");
- while(row = mysql_fetch_row(result)) SendPM(thisclient, "%i = %s",atoi(row[0]),row[1]);
- SendPM(thisclient, "Example; /go 1");
- DB->QFree( );
- return true;
- }
- else
- {
- if (thisclient->Stats->Level<atoi(row[0]))
- {
- SendPM(thisclient, "You need to be a least Level %i to visit %s!",atoi(row[0]),row[4]);
- DB->QFree( );
- return true;
- }
- if (thisclient->Stats->Level>atoi(row[5]))
- {
- SendPM(thisclient, "You need to be between Level %i and %i to visit %s !",atoi(row[0]),atoi(row[5]),row[4]);
- DB->QFree( );
- return true;
- }
- if ( thisclient->Stats->HP < (thisclient->Stats->MaxHP / 2) || thisclient->Stats->HP < 1 || thisclient->Session->inGame == false )
- {
- SendPM(thisclient, "You need at least 50% HP in order to warp");
- DB->QFree( );
- return true;
- }
- fPoint coord;
- int map = atoi(row[1]);
- coord.x = atoi(row[2]);
- coord.y = atoi(row[3]);
- SendPM(thisclient, "teleport to map: %i",map);
- MapList.Index[map]->TeleportPlayer( thisclient, coord, false );
- Log( MSG_GMACTION, " %s : /go %i" , thisclient->CharInfo->charname, loc);
- DB->QFree( );
- return true;
-
- }
the next code which is also hard coded in the server the one that doesn't need database is here and omitted..
- else if (strcmp(command, "go")==0) // AtCommandGo
- {
- if(Config.Command_go > thisclient->Session->accesslevel)
- return true;
- if ((tmp = strtok(NULL, " ")) == NULL) tmp = 0; int loc=atoi(tmp);
- if(Config.Command_Go > thisclient->Session->accesslevel)
- return true;
- int x = 0;
- int y = 0;
- int map = 0;
- if(loc == 1) // Adventure Plains
- {
- map = 22;
- x = 5644; //old map
- y = 5174; // old map
- //x = 5098; // new map
- //y = 5322; // new map
- }
- else if(loc == 2) // Canyon City of Zant
- {
- map = 1;
- x = 5240;
- y = 5192;
- }
- else if (loc == 3) // Junon Polis
- {
- map = 2;
- x = 5514;
- y = 5364;
- }
- else if (loc == 4) // Magic City of Eucar - Luna
- {
- if (thisclient->Stats->Level<50)
- {
- SendPM(thisclient, "You need to be a least Level 50 to visit Eucar!");
- return true;
- }
- {
- map = 51;
- x = 5357;
- y = 5013;
- }
- }
- else if (loc == 5) // Xita Refuge - Eldeon
- {
- if (thisclient->Stats->Level<120)
- {
- SendPM(thisclient, "You need to be a least Level 120 to visit Eldeon!");
- return true;
- }
- {
- map = 61;
- x = 5434;
- y = 4569;
- }
- }
- else if (loc == 6) // Training Grounds
- {
- map = 6;
- x = 5199;
- y = 5280;
- }
- else if (loc == 7) // Lions Plains
- {
- if(thisclient->Session->accesslevel > 299)
- {
- map = 8;
- x = 5160;
- y = 5080;
- }else
- {
- SendPM(thisclient,"You need to be GM to access this map");
- return true;
- }
- }
- else if (loc == 8) // Luna Clan Field
- {
- //if (thisclient->Stats->Level<120)
- if (thisclient->Stats->Level<120 && thisclient->Stats->Level>160)
- // Luna Clan Field actually restricted to from 120 - 160 only, will above work?
- {
- SendPM(thisclient, "You need to be between Level 120 and 160 to visit Luna Clan Field!");
- return true;
- }
-
- {
- map = 59;
- x = 5095;
- y = 5128;
- }
- }
- else if (loc == 9) // Desert of the Dead
- {
- map = 29;
- x = 5093;
- y = 5144;
- }
- //Added By Thriel
- else if (loc == 10) // Goblin Caves
- {
- map = 31;
- x = 5516;
- y = 5437;
- }
- else if (loc == 11) // Sikuku Underground Prison
- {
- if (thisclient->Stats->Level<160) // by Terr0risT
- {
- SendPM(thisclient, "You need to be a least Level 160 to visit Sikuku Underground Prison!");
- return true;
- }
- else
- {
- map = 65;
- x = 5485;
- y = 5285;
- }
- }
- //Added By Thriel
- else if (loc == 12) // Gorge Of Silence
- {
- map = 28;
- x = 5205;
- y = 4911;
- }
- //Added By Thriel
- else if (loc == 13) // Forgotten Temple
- {
- if (thisclient->Stats->Level<120)
- {
- SendPM(thisclient, "You need to be a least Level 120 to visit Forgotten Temple!");
- return true;
- }
- else
- {
- map = 56;
- x = 5035;
- y = 5200;
- }
- }
- //Added By Thriel
- else if (loc == 14) // Oblivion Temple
- {
- if (thisclient->Stats->Level<140)
- {
- SendPM(thisclient, "You need to be a least Level 140 to visit Oblivion Temple!");
- return true;
- }
- else
- {
- map = 41;
- x = 5062;
- y = 5201;
- }
- }
-
- //Orlo Added By Thriel
- else if (loc == 15) // Orlo
- {
- if (thisclient->Stats->Level<160)
- {
- SendPM(thisclient, "You need to be a least Level 160 to visit Oro!");
- return true;
- }
- else
- {
- map = 74;
- x = 5168;
- y = 5227;
- }
- }
-
- //Sikuku Ruins Added By Thriel
- else if (loc == 16) // Sikuku Ruins
- {
- if (thisclient->Stats->Level<150)
- {
- SendPM(thisclient, "You need to be a least Level 150 to visit Sikuku Ruins!");
- return true;
- }
- else
- {
- map = 66;
- x = 5997;
- y = 5255;
- }
- }
-
- //Cave of Ulverick Entrance Added By Thriel
- else if (loc == 17) // Cave of Ulverick
- {
- if (thisclient->Stats->Level<150)
- {
- SendPM(thisclient, "You need to be a least Level 150 and leader of party to enter Cave of Ulverick!");
- return true;
- }
- else
- {
- map = 29;
- x = 5843;
- y = 5105;
- }
- }
-
The server seemed to follow this second code.
I'm not much of a coder tho - so maybe I could ask your help about this.
I just want to fix golist in the sql's - not wanting to mess up with the cpp's too much.
Thanks. Thanks again RoseZa for this release.
:::EDIT:::
Fixed. Thanks a lot osRose.
Downloaded the new SVN and the worldserver.exe (the first one) worked perfectly now.