I could not compile the scripts because you forgot to attach include files.
So, analysing the code, i suggest to do this changes:
Lines 147 and 148 of spawnpointmanager.src:
Code: Select all
Start_Script( ":spawnpoint:allspawner", time_between_all_spawn );
set_critical(0);
Change the order. See:
Code: Select all
set_critical(0);
Start_Script( ":spawnpoint:allspawner", time_between_all_spawn );
Line 202 of spawnpointmanager.src:
Code: Select all
function SpawnAllPoints()
foreach point in spawnpoints
if( point )
CheckPoint(point);
endif
endforeach
endfunction
Add the Sleepms(10) fuction before the 'endforeach'.
With this change, all your Spawn Points will finish in 31 seconds (3163 runes * 10ms).
See the change:
Code: Select all
function SpawnAllPoints()
foreach point in spawnpoints
if( point )
CheckPoint(point);
endif
Sleepms(10);
endforeach
endfunction
Lines 99 and 117 of checkpoint.src:
Comment these lines. I think that you don't need to use this function in this case. set_critical() function can freeze your shard.
So, see the changes:
Code: Select all
for( num := 0; num < numtospawn; num := num + 1 )
//set_critical(1);
case( pt_data[1] )
"NPC": ret := CreateSpawnPointNpc( point, pt_data[2], pt_data );
"Group": ret := CreateSpawnPointNpcFromGroup( point, pt_data );
"Item": ret := CreateSpawnPointItem( point, pt_data );
"Container": ret := CreateSpawnPointContainer( point, pt_data );
"Custom NPC": ret := CreateSpawnPointNpc( point, pt_data[2], pt_data );
endcase
if( ret == error )
if( ret.errortext["Invalid spawning location."] )
pt_data[7] := 1;
SetObjProperty( point, PROPID_SPAWNPOINT_SETTING, pt_data );
return ret;
elseif( ret.errortext["Can't spawn any more npcs."] )
return ret;
endif
endif
//set_critical(0);
Sleepms(5);
endfor
Lines 118 of checkpoint.src:
Increase the time to 10 miliseconds.
See:
Well, try to do this changes, to compile and see if it works.
Regards,
Skinny.