Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How can i controll global rate spawn?

Initiate Mage
Joined
Apr 15, 2017
Messages
3
Reaction score
0
How can i change my whole server to make fast respawn for regular mobs?
 
Newbie Spellweaver
Joined
Jan 15, 2014
Messages
6
Reaction score
0
I'll give you this snippit and let you figure out what to do with it.

public boolean isSpawnBuffedMap() { return mapid == 270030100; }

Key MapleMap.java
 
Upvote 0
(O_o(o_O(O_O)o_O)O_o)
Loyal Member
Joined
Apr 9, 2009
Messages
1,088
Reaction score
322
I'll give you this snippit and let you figure out what to do with it.

public boolean isSpawnBuffedMap() { return mapid == 270030100; }

Key MapleMap.java

That looks like something not every source would have...

Anyway; maplemap.java or w/e handles fields in your source should be the place to be. Just look for timer thread schedules. There should be some that set the respawn time whenever a monster is killed. Just change that respawn time and you're good.
 
Upvote 0
Newbie Spellweaver
Joined
Jan 15, 2014
Messages
6
Reaction score
0
That looks like something not every source would have...

Anyway; maplemap.java or w/e handles fields in your source should be the place to be. Just look for timer thread schedules. There should be some that set the respawn time whenever a monster is killed. Just change that respawn time and you're good.

Forgot this part, put it in your maplemap.java and you'll be set. No idea what happened to the formatting but it's still viable

PHP:
  public void respawn() {        
if (characters.isEmpty()) {            
return;        
}
        
short numShouldSpawn;
       
if (isSpawnBuffedMap()) {            
numShouldSpawn = (short) ((monsterSpawn.size() * 2 - spawnedMonstersOnMap.get()));        
} else if (mapid == 103040200 || mapid == 103040201) { // Yeti and Penguin Claw Machine spawn fix            
numShouldSpawn = 26;
            
for (MapleMapObject mobs : getMapObjects()) {                
if (mobs instanceof MapleMonster) {                    
MapleMonster mob = (MapleMonster) mobs;                    
if (mob.isAlive()) {                        
if (mob.getId() == 3400005 || mob.getId() == 3400003) {                            
numShouldSpawn--;                        
}                    
}                
}            
}
            
if (numShouldSpawn < 0) {               
 numShouldSpawn = 0;            
}       
 } else if (isCPQMap()) {            
numShouldSpawn = 26;
for (MapleMapObject mobs : getMapObjects()) {                
if (mobs instanceof MapleMonster) {                    MapleMonster mob = (MapleMonster) mobs;                    
if (mob.isAlive()) {                        
numShouldSpawn--;                    
}                
}           
 }
if (numShouldSpawn < 0) {                
numShouldSpawn = 0;            
}
        } else {            
numShouldSpawn = (short) ((monsterSpawn.size() - spawnedMonstersOnMap.get()));        
}
if (numShouldSpawn > 0) {            
List<SpawnPoint> randomSpawn = new ArrayList<>(monsterSpawn);           
Collections.shuffle(randomSpawn);            
short spawned = 0;            
for (SpawnPoint spawnPoint : randomSpawn) {                
if (spawnPoint.shouldSpawn()) {                    
spawnMonster(spawnPoint.getMonster());                    
spawned++;                
}                
if (spawned >= numShouldSpawn) {                    
break;
                
}            
}        
}    
}
 
Upvote 0
(O_o(o_O(O_O)o_O)O_o)
Loyal Member
Joined
Apr 9, 2009
Messages
1,088
Reaction score
322
Forgot this part, put it in your maplemap.java and you'll be set. No idea what happened to the formatting but it's still viable

PHP:
  public void respawn() {        
if (characters.isEmpty()) {            
return;        
}
        
short numShouldSpawn;
       
if (isSpawnBuffedMap()) {            
numShouldSpawn = (short) ((monsterSpawn.size() * 2 - spawnedMonstersOnMap.get()));        
} else if (mapid == 103040200 || mapid == 103040201) { // Yeti and Penguin Claw Machine spawn fix            
numShouldSpawn = 26;
            
for (MapleMapObject mobs : getMapObjects()) {                
if (mobs instanceof MapleMonster) {                    
MapleMonster mob = (MapleMonster) mobs;                    
if (mob.isAlive()) {                        
if (mob.getId() == 3400005 || mob.getId() == 3400003) {                            
numShouldSpawn--;                        
}                    
}                
}            
}
            
if (numShouldSpawn < 0) {               
 numShouldSpawn = 0;            
}       
 } else if (isCPQMap()) {            
numShouldSpawn = 26;
for (MapleMapObject mobs : getMapObjects()) {                
if (mobs instanceof MapleMonster) {                    MapleMonster mob = (MapleMonster) mobs;                    
if (mob.isAlive()) {                        
numShouldSpawn--;                    
}                
}           
 }
if (numShouldSpawn < 0) {                
numShouldSpawn = 0;            
}
        } else {            
numShouldSpawn = (short) ((monsterSpawn.size() - spawnedMonstersOnMap.get()));        
}
if (numShouldSpawn > 0) {            
List<SpawnPoint> randomSpawn = new ArrayList<>(monsterSpawn);           
Collections.shuffle(randomSpawn);            
short spawned = 0;            
for (SpawnPoint spawnPoint : randomSpawn) {                
if (spawnPoint.shouldSpawn()) {                    
spawnMonster(spawnPoint.getMonster());                    
spawned++;                
}                
if (spawned >= numShouldSpawn) {                    
break;
                
}            
}        
}    
}

This seems like code to increase the count of spawned monsters. Not to decrease the respawn time.
 
Upvote 0
Newbie Spellweaver
Joined
Jan 15, 2014
Messages
6
Reaction score
0
Doubles the spawn rate. I mean if not it's useful elsewhere XD.
 
Last edited:
Upvote 0
Back
Top