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 to fix crashing skills?

Newbie Spellweaver
Joined
May 24, 2017
Messages
57
Reaction score
1
Hello,

So currently I've been experiencing an issue with the battleship skill where it will crash my client with no error codes. However, the same issue occurs with monster magnet except it will only crash other players when used against a mob...can anyone help me with this? I've been searching for hours across ragezone and no solution.

I understand that it might be related to buffstat or a wrong packet but I don't have much experience with packets. If someone could just tell me where to look and what I need to change I'll try to check other sources for help.

Thanks.
 
Newbie Spellweaver
Joined
May 24, 2017
Messages
57
Reaction score
1
The reason you're likely crashing is because you're not sending the proper data that the client is expecting.
If you'd like to learn more about MapleStory's packet structures, I recommend checking out this guide as a first step.
http://forum.ragezone.com/f922/getting-packet-structures-opcodes-using-792436/
Don't let packets intimidate you, they're much simpler than you'd think.

I'm currently trying to fix Monster Magnet and I can't seem to figure out why it still won't get fixed. The skill only crashes another player if it's used on a monster and it doesn't if it's used plainly...

I've also tried seeing other people's solution and the only solution that I've seen is adding mplew.writeLong(0); to showBuffeffect packet and I have but it's still not getting fixed...I've also tried to copy MapleSolaxia's showbuffeffect packet since it's different than mine and it also seems to have added long and it's still no use. :(

This is my showbuffeffect without adding long:


PHP:
public static MaplePacket showBuffeffect(int cid, int skillid, int effectid, byte direction) {       

MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(12);  
     mplew.writeShort(SendPacketOpcode.SHOW_FOREIGN_EFFECT.getValue());
 mplew.writeInt(cid); // ?       
 if (skillid == Buccaneer.SUPER_TRANSFORMATION || skillid == Marauder.TRANSFORMATION || skillid == WindArcher.EAGLE_EYE || skillid == ThunderBreaker.TRANSFORMATION) {           
mplew.write(1);   
mplew.writeInt(skillid);            
mplew.write(direction);            
mplew.write(1);       
 } else {           
mplew.write(effectid); //buff level            
mplew.writeInt(skillid);           
 //mplew.write(3);           
 // if (direction != (byte) 3) {            
mplew.write(direction);          
  //   }           
 mplew.write(1); // although this might have to be put in an "else" or some poop      
  }        return mplew.getPacket();  
  }

And also this skill is handled in specialmovehandler.java

PHP:
if (skillid == Hero.MONSTER_MAGNET || skillid == Paladin.MONSTER_MAGNET || skillid == DarkKnight.MONSTER_MAGNET) { // Monster Magnet           
int num = slea.readInt();            
int mobId;            
byte success;           
for (int i = 0; i < num; i++) {                

mobId = slea.readInt();                
success = slea.readByte();               
c.getPlayer().getMap().broadcastMessage(c.getPlayer(), MaplePacketCreator.showMagnet(mobId, success), false);                
MapleMonster monster = c.getPlayer().getMap().getMonsterByOid(mobId);                
if (monster != null) {                    
monster.switchController(c.getPlayer(), monster.isControllerHasAggro());                
}            
}            
byte direction = slea.readByte();           
 c.getPlayer().getMap().broadcastMessage(c.getPlayer(), MaplePacketCreator.showBuffeffect(c.getPlayer().getId(), skillid, 1, direction), false);            
c.getSession().write(MaplePacketCreator.enableActions());           
 return;


I'm not sure what to do I'm very lost here...
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
May 21, 2007
Messages
31
Reaction score
24
Assuming that your crashing skill just crashes everyone else in the map (remote/foreign effect), and the skill is not an attack, you can try taking a look in IDA. Check out a pdb closest to your version (v95 would be the closest I guess?) + your own version's idb, and try locating CUser::OnEffect. This is the part of the client that handles the SHOW_FOREIGN_EFFECT packet, so you can try to match your server's packet to the client's.

So for the monster magnet, my guess is that your showMagnet function is not correct -> misplacing the mobId causing a crash. Try to compare the IDA function and your own, and see where the differences are.

Some more resources on packets/ida:
http://forum.ragezone.com/f922/understanding-packets-644427/
http://forum.ragezone.com/f922/tutorial-create-maplestory-idb-1071185/ (if you need to create an idb for your own version)
 
Upvote 0
Back
Top