- if (strcmp(command, "spawn")==0)
- {
- SendPM(thisclient,"Attempting to use spawn command.");
- if(Config.Command_ESpawn > thisclient->Session->accesslevel || thisclient->CharInfo->isDev == 0)
- {
- return true;
- }
- int mobid;
- int max;
- int radius;
- int stime;
- int spawntype;
- int triggermontype;
- int triggeramount;
- int lim;
- int spawnk;
- int aggro;
- int refvar; //Objvar NPC reference
- int refval; //Objvar array reference
- if ((tmp = strtok(NULL, " "))==NULL)
- return true;
- else
- mobid = atoi(tmp);
- if ((tmp = strtok(NULL, " "))==NULL)
- return true;
- else
- max = atoi(tmp);
- if ((tmp = strtok(NULL, " "))==NULL)
- return true;
- else
- radius = atoi(tmp);
- if ((tmp = strtok(NULL, " "))==NULL)
- return true;
- else
- stime = atoi(tmp);
- if ((tmp = strtok(NULL, " "))==NULL)
- return true;
- else
- spawntype = atoi(tmp);
- if ((tmp = strtok(NULL, " "))==NULL)
- triggermontype = 0;
- else
- triggermontype = atoi(tmp);
- if ((tmp = strtok(NULL, " "))==NULL)
- triggeramount = 0;
- else
- triggeramount = atoi(tmp);
- if ((tmp = strtok(NULL, " "))==NULL)
- lim = 0;
- else
- lim = atoi(tmp);
- if ((tmp = strtok(NULL, " "))==NULL)
- spawnk = 1;
- else
- spawnk = atoi(tmp);
- if ((tmp = strtok(NULL, " "))==NULL)
- aggro = 1;
- else
- aggro = atoi(tmp);
- if ((tmp = strtok(NULL, " "))==NULL)
- refvar = 0;
- else
- refvar = atoi(tmp);
- if ((tmp = strtok(NULL, " "))==NULL)
- refval = 0;
- else
- refval = atoi(tmp);
- GServer->DB->QExecute("INSERT INTO list_special_spawns (map,montype,min,max,respawntime,x,y,radius,agressive,triggerammount,triggermontype,spawntype,areatrigger,lim,spawnk,refvar,refval) VALUES(%i,%i,%i,%i,%i,%f,%f,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i)",
- thisclient->Position->Map,mobid,0,max,stime,thisclient->Position->current.x,thisclient->Position->current.y,radius,aggro,triggeramount,triggermontype,spawntype,1,lim,spawnk,refvar,refval );
- CSpawnArea* thisspawn = new (nothrow) CSpawnArea;
- if(thisspawn == NULL)
- {
- Log(MSG_ERROR, "Error allocing memory" );
- DB->QFree( );
- return false;
- }
- GServer->maxSpawnId++;
- thisspawn->id = GServer->maxSpawnId;
- thisspawn->map = thisclient->Position->Map;
- thisspawn->montype = mobid;
- thisspawn->min = 0;//atoi(row[3]);
- thisspawn->max = max;
- thisspawn->respawntime = stime;
- thisspawn->point.x = thisclient->Position->current.x;
- thisspawn->point.y = thisclient->Position->current.y;
- thisspawn->radius = radius;
- thisspawn->amon = 0;
- thisspawn->lastRespawnTime = 0;
- thisspawn->type = spawntype;
- thisspawn->triggertype = triggermontype;
- thisspawn->triggeramount = triggeramount;
- thisspawn->aggressive = aggro;
- thisspawn->typeoftrigger = 1;
- thisspawn->limit = lim;
- thisspawn->spawnkey = spawnk;
- thisspawn->triggercount = 0;
- thisspawn->thisnpc = GetNPCDataByID( thisspawn->montype );
- thisspawn->RefVar = refvar;
- thisspawn->RefVal = refval;
- if(thisspawn->thisnpc == NULL)
- {
- SendPM(thisclient, "Invalid montype - Spawn %i will not be added", thisspawn->id );
- delete thisspawn;
- return true;
- }
- MapList.Index[thisspawn->map]->MonsterSpawnList.push_back( thisspawn );
- SendPM(thisclient,"Spawn successfully saved with spawn id %i.",thisspawn->id);
- return true;
- }
Hello, I looked into the spawn.sql to make sure the creatures are suppose to spawn in the correct map ID.
When I go to the map and area they are suppose to spawn. There are no creatures.
It's only in the Orlo Map and Forgotten Temple areas. Don't know what could be the problem.
Any help would be appreciated.