So upon looking at the latest code there already is such a feature:
COMMAND_SPAWN_COMBINE
case COMMAND_SPAWN_COMBINE:{
Spawn* spawn = client->GetPlayer()->GetTarget();
float radius = 0;
bool failed = true;
if(spawn && !spawn->IsPlayer() && sep && sep->arg[0] && sep->arg[0][0]){
failed = false;
if(spawn->GetSpawnGroupID() > 0){
client->SimpleMessage(CHANNEL_COLOR_YELLOW, "Can not combine this spawn as it is in a spawn group. Remove it from the group and try again.");
}
else if(sep->IsNumber(0)){
radius = atof(sep->arg[0]);
client->CombineSpawns(radius, spawn);
}
else{
if(strncasecmp(sep->arg[0], "add", 3) == 0){
client->AddCombineSpawn(spawn);
}
else if(strncasecmp(sep->arg[0], "remove", 6) == 0){
client->RemoveCombineSpawn(spawn);
}
else if(strncasecmp(sep->arg[0], "save", 4) == 0){
const char* name = 0;
if(sep->arg[1] && sep->arg[1][0])
name = sep->argplus[1];
client->SaveCombineSpawns(name);
}
else
failed = true;
}
}
if(failed){
client->SimpleMessage(CHANNEL_COLOR_YELLOW, "This command combines several spawns into a single spawn group.");
client->SimpleMessage(CHANNEL_COLOR_YELLOW,"Syntax: /spawn combine [radius/add/remove/save]");
client->SimpleMessage(CHANNEL_COLOR_YELLOW,"Ex: /spawn combine 1, /spawn combine save (spawn group name)");
}
break;
}
So upon looking at the latest code there already is such a feature:
COMMAND_SPAWN_COMBINE
case COMMAND_SPAWN_COMBINE:{
Spawn* spawn = client->GetPlayer()->GetTarget();
float radius = 0;
bool failed = true;
if(spawn && !spawn->IsPlayer() && sep && sep->arg[0] && sep->arg[0][0]){
failed = false;
if(spawn->GetSpawnGroupID() > 0){
client->SimpleMessage(CHANNEL_COLOR_YELLOW, "Can not combine this spawn as it is in a spawn group. Remove it from the group and try again.");
}
else if(sep->IsNumber(0)){
radius = atof(sep->arg[0]);
client->CombineSpawns(radius, spawn);
}
else{
if(strncasecmp(sep->arg[0], "add", 3) == 0){
client->AddCombineSpawn(spawn);
}
else if(strncasecmp(sep->arg[0], "remove", 6) == 0){
client->RemoveCombineSpawn(spawn);
}
else if(strncasecmp(sep->arg[0], "save", 4) == 0){
const char* name = 0;
if(sep->arg[1] && sep->arg[1][0])
name = sep->argplus[1];
client->SaveCombineSpawns(name);
}
else
failed = true;
}
}
if(failed){
client->SimpleMessage(CHANNEL_COLOR_YELLOW, "This command combines several spawns into a single spawn group.");
client->SimpleMessage(CHANNEL_COLOR_YELLOW,"Syntax: /spawn combine [radius/add/remove/save]");
client->SimpleMessage(CHANNEL_COLOR_YELLOW,"Ex: /spawn combine 1, /spawn combine save (spawn group name)");
}
break;
}
client->SimpleMessage(CHANNEL_COLOR_YELLOW, "This command combines several spawns into a single spawn group.");
client->SimpleMessage(CHANNEL_COLOR_YELLOW,"Syntax: /spawn combine [radius/add/remove/save]");
client->SimpleMessage(CHANNEL_COLOR_YELLOW,"Ex: /spawn combine 1, /spawn combine save (spawn group name)");
@devn00b FYI
client->SimpleMessage(CHANNEL_COLOR_YELLOW, "This command combines several spawns into a single spawn group.");
client->SimpleMessage(CHANNEL_COLOR_YELLOW,"Syntax: /spawn combine [radius/add/remove/save]");
client->SimpleMessage(CHANNEL_COLOR_YELLOW,"Ex: /spawn combine 1, /spawn combine save (spawn group name)");
need a command to combine spawns into a spawngroup based on radius
allow restriction by npc name or race id
So upon looking at the latest code there already is such a feature:
COMMAND_SPAWN_COMBINE
@devn00b FYI