sorry my english so bad hope you can reading
change file
/World Server/gmcmds.cpp
find
- else if (strcmp(command, "go")==0) // AtCommandGo
- {
- if(Config.Command_go > thisclient->Session->accesslevel)
- .................
- .................
- }
Replace
- else if (strcmp(command, "go")==0) // Use SQL by Likol
- {
- if(Config.Command_go > thisclient->Session->accesslevel) 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");
- return true;
- }
- int map = atoi(row[1]);
- int x = atoi(row[2]);
- int y = atoi(row[3]);
- int noqsd = 1;
- SendPM(thisclient, "Teleport to %s .",row[4]);
- DB->QFree( );
- return pakGMTele(thisclient, map, x, y,noqsd);
- }
- }
and you need add list_golist.sql to your mysql database
Now you can add /delete your go list in sql