find;
Code:
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)
{
map = 22;
x = 5098;
y = 5322;
}
else if(loc == 2)
{
map = 1;
x = 5240;
y = 5192;
}
else if (loc == 3)
{
map = 2;
x = 5516;
y = 5236;
}
else if (loc == 4)
{
map = 51;
x = 5357;
y = 5013;
}
else if (loc == 5)
{
map = 61;
x = 5434;
y = 4569;
}
else if (loc == 6)
{
map = 6;
x = 5243;
y = 5240;
}
else if (loc == 7)
{
map = 24;
x = 5379;
y = 5329;
}
else if (loc == 8)
{
map = 31;
x = 5516;
y = 5437;
}
else if (loc == 9)
{
map = 29;
x = 5093;
y = 5144;
}
else if (loc == 10)
{
map = 65;
x = 5485;
y = 5285;
}
else
{
SendPM(thisclient, "Please input a number after the go command, below is a list of places and their appropriate number");
SendPM(thisclient, "1 = Adventurers plains");
SendPM(thisclient, "2 = The city of Zant");
SendPM(thisclient, "3 = Junon Polis");
SendPM(thisclient, "4 = The city of Eucar");
SendPM(thisclient, "5 = Xita Refuge");
SendPM(thisclient, "6 = Training grounds");
SendPM(thisclient, "7 = El Verloon Desert");
SendPM(thisclient, "8 = Goblin Cave (B1)");
SendPM(thisclient, "9 = Desert of the Dead");
SendPM(thisclient, "10 = Sikuku Underground Prison");
SendPM(thisclient, "Example; /go 3");
}
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;
}
if( (x != 0) && (y != 0) && (map != 0) )
{
fPoint coord;
coord.x = x;
coord.y = y;
MapList.Index[map]->TeleportPlayer( thisclient, coord, false );
Log( MSG_GMACTION, " %s : /go %i" , thisclient->CharInfo->charname, loc);
}
return true;
}
then add maps u want, example:
want to add anima lake simple add;
Code:
else if (loc == 11)
{
map = 25;
x = 5377;
y = 5185;
}
after;
Code:
else if (loc == 10)
{
map = 65;
x = 5485;
y = 5285;
}
then add;
Code:
SendPM(thisclient, "11 = Anima Lake");
after;
Code:
SendPM(thisclient, "10 = Sikuku Underground Prison");
and you could always switch around the #'s and junk but yeah. then recompile it.