Page 1 of 1

Some Creatures wont spawn

PostPosted: Wed Sep 12, 2018 2:02 pm
by Brontophobio
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.

Re: Some Creatures wont spawn

PostPosted: Wed Sep 12, 2018 8:20 pm
by PurpleYouko
The problem is most likely that the server you are running isn't using spawn.sql
Chances are if you are using dev rev 4 it's using list_spawngroups

Re: Some Creatures wont spawn

PostPosted: Wed Sep 12, 2018 10:36 pm
by Brontophobio
Hi PY!
I'm using your KTRose on your github server.
Which I think it uses spawn.sql?
Because the spawns in Orlo also appear in list_spawngroups.sql
I thought it could be cause of a timer delay or something? But I left the server running overnight to see if they'd spawned and nothing.

Re: Some Creatures wont spawn

PostPosted: Thu Sep 13, 2018 4:07 am
by PurpleYouko
Oh so this is the stuff from RoseZA then?

I don't actually remember what spawn type that used but you might be right. i don't think it used mobgroups.

My original KTRose (pre-evo) isn't available on my github and it didn't even have any orlo maps. It only had one map from Eldeon and some of the Luna maps were even missing. Pre-evo was pretty primitive in a lot of ways.
That server used a custom spawn system that used the death count of some mobs to trigger other spawns entirely. If you just left that system alone for a month some spawns would never appear unless the correct trigger mobs were killed first.

The only other thing I have which might be labelled with the KTRose name is the project 137 stuff. I think the server there may be called KTRose. 137 (KTRose) uses a similar spawn system to the original KTRose (pre-evo) but the system is not fully loaded up in the database. It's probably missing a whole bunch of spawns.

If I get the chance tomorrow I will take a look in the database and server code to see what's going on and what needs to be updated to make it work properly

Re: Some Creatures wont spawn

PostPosted: Sat Sep 22, 2018 2:11 am
by Brontophobio
Yeah,
No problem PY! Take your time.
I was just curious since I was high enough for Orlo and no mobs were spawning I was like :shock:
So I just spawned them myself with the /mob :lol:

Re: Some Creatures wont spawn

PostPosted: Mon Sep 24, 2018 2:38 pm
by PurpleYouko
ok so the KTRose server on my github is actually built for project 137.
It uses the custom trigger spawn system from pre-evo KTRose
The database table it uses is list_special_spawns

Spawns can actually be permanently created by using the GM command "spawn"
You are going to need the IsDev field in the characters database set to 1 for the GM character and an access level of 900 in the accounts table for teh GM characters account.

You will have to look at the code to figure out the precise format of the command. It can be very complicated if you want to set up sequences with triggerspawns. Here is the code
  1. if (strcmp(command, "spawn")==0)
  2.     {
  3.         SendPM(thisclient,"Attempting to use spawn command.");
  4.         if(Config.Command_ESpawn > thisclient->Session->accesslevel || thisclient->CharInfo->isDev == 0)
  5.         {
  6.             return true;
  7.         }
  8.         int mobid;
  9.         int max;
  10.         int radius;
  11.         int stime;
  12.         int spawntype;
  13.         int triggermontype;
  14.         int triggeramount;
  15.         int lim;
  16.         int spawnk;
  17.         int aggro;
  18.         int refvar; //Objvar NPC reference
  19.         int refval; //Objvar array reference
  20.  
  21.         if ((tmp = strtok(NULL, " "))==NULL)
  22.             return true;
  23.         else
  24.             mobid = atoi(tmp);
  25.         if ((tmp = strtok(NULL, " "))==NULL)
  26.             return true;
  27.         else
  28.             max = atoi(tmp);
  29.         if ((tmp = strtok(NULL, " "))==NULL)
  30.             return true;
  31.         else
  32.             radius = atoi(tmp);
  33.         if ((tmp = strtok(NULL, " "))==NULL)
  34.             return true;
  35.         else
  36.             stime = atoi(tmp);
  37.         if ((tmp = strtok(NULL, " "))==NULL)
  38.             return true;
  39.         else
  40.             spawntype = atoi(tmp);
  41.         if ((tmp = strtok(NULL, " "))==NULL)
  42.             triggermontype = 0;
  43.         else
  44.             triggermontype = atoi(tmp);
  45.         if ((tmp = strtok(NULL, " "))==NULL)
  46.             triggeramount = 0;
  47.         else
  48.             triggeramount = atoi(tmp);
  49.         if ((tmp = strtok(NULL, " "))==NULL)
  50.             lim = 0;
  51.         else
  52.             lim = atoi(tmp);
  53.         if ((tmp = strtok(NULL, " "))==NULL)
  54.             spawnk = 1;
  55.         else
  56.             spawnk = atoi(tmp);
  57.         if ((tmp = strtok(NULL, " "))==NULL)
  58.             aggro = 1;
  59.         else
  60.             aggro = atoi(tmp);
  61.         if ((tmp = strtok(NULL, " "))==NULL)
  62.             refvar = 0;
  63.         else
  64.             refvar = atoi(tmp);
  65.         if ((tmp = strtok(NULL, " "))==NULL)
  66.             refval = 0;
  67.         else
  68.             refval = atoi(tmp);
  69.  
  70.         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)",
  71.             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 );
  72.         CSpawnArea* thisspawn = new (nothrow) CSpawnArea;
  73.         if(thisspawn == NULL)
  74.         {
  75.             Log(MSG_ERROR, "Error allocing memory" );
  76.             DB->QFree( );
  77.             return false;
  78.         }
  79.         GServer->maxSpawnId++;
  80.         thisspawn->id = GServer->maxSpawnId;
  81.         thisspawn->map = thisclient->Position->Map;
  82.         thisspawn->montype = mobid;
  83.         thisspawn->min = 0;//atoi(row[3]);
  84.         thisspawn->max = max;
  85.         thisspawn->respawntime = stime;
  86.         thisspawn->point.x = thisclient->Position->current.x;
  87.         thisspawn->point.y = thisclient->Position->current.y;
  88.         thisspawn->radius = radius;
  89.         thisspawn->amon = 0;
  90.         thisspawn->lastRespawnTime = 0;
  91.         thisspawn->type = spawntype;
  92.         thisspawn->triggertype = triggermontype;
  93.         thisspawn->triggeramount = triggeramount;
  94.         thisspawn->aggressive = aggro;
  95.         thisspawn->typeoftrigger = 1;
  96.         thisspawn->limit = lim;
  97.         thisspawn->spawnkey = spawnk;
  98.         thisspawn->triggercount = 0;
  99.         thisspawn->thisnpc = GetNPCDataByID( thisspawn->montype );
  100.         thisspawn->RefVar = refvar;
  101.         thisspawn->RefVal = refval;
  102.         if(thisspawn->thisnpc == NULL)
  103.         {
  104.             SendPM(thisclient, "Invalid montype - Spawn %i will not be added", thisspawn->id );
  105.             delete thisspawn;
  106.             return true;
  107.         }
  108.         MapList.Index[thisspawn->map]->MonsterSpawnList.push_back( thisspawn );
  109.         SendPM(thisclient,"Spawn successfully saved with spawn id %i.",thisspawn->id);
  110.         return true;
  111. }

A lot of the parameters can be ignored as they have default values.

What I really want to know though is
WHAT Client you are using this with?
It should only work with 137