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!

ObtacleAtom Spawn Packet

Skilled Illusionist
Joined
Jul 16, 2010
Messages
318
Reaction score
116
The misspelling in the title is intentional, because that's the way Nexon spelled it. Go figure.

This packet, when written to the client, spawns a moving projectile object that does damage if it collides with a player. It's used to spawn the bombs in Magnus, Hekaton, Chaos Root Abyss (Von Bon's final phase), and a few other things.

You can send the packet on any map, though. It's not at all limited or hardcoded. Useful for custom stuff.

Opcode is 0x17F in v155 I believe. Not sure what it is in lower versions, can't be assed to pop open IDA and find out. Doesn't exist in any version before Magnus release (v125 or so).

Comments should be sufficient to explain the packet structure.
PHP:
    public static byte[] spawnObtacleAtomBomb(List<ObtacleAtom> bombs){
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.SPAWN_OBTACLE_ATOM.getValue());
        
        //Number of bomb objects to spawn.  You can also just send multiple packets instead of putting them all in one packet.
        mplew.writeInt(bombs.size());
        
        //Unknown, this part is from IDA.
        byte unk = 0;
        mplew.write(unk); //animation data or some poop
        if(unk == 1){
            mplew.writeInt(300); //from Effect.img/BasicEff/ObtacleAtomCreate/%d
            mplew.write(0); //rest idk
            mplew.writeInt(0);
            mplew.writeInt(0);
            mplew.writeInt(0);
            mplew.writeInt(0);
        }
        
        for(ObtacleAtom bomb : bombs){
            mplew.write(1);
            
            //Bomb type.  Determines the graphics used as well as the projectile's hitbox.
            //Pointer to an entry in Effect.wz/BasicEff.img/ObtacleAtom/
            mplew.writeInt(bomb.getType());
            
            //This must be unique for every bomb you spawn on the map.  Give it an ObjectID, or something.
            mplew.writeInt(bomb.getUniqueID());
            
            //Spawnpoint, X origin.
            mplew.writeInt(bomb.getPosition().x);
            
            //Spawnpoint, Y origin.
            mplew.writeInt(bomb.getPosition().y);
            
            //Maximum movement speed.  Roughly 2 * pixels per second.
            mplew.writeInt(bomb.getMaxSpeed());
            
            //Acceleration.  Always below 5 in GMS, unsure exactly how it's calculated.  Setting this to 0 makes a permanent, stationary bomb.
            mplew.writeInt(bomb.getAcceleration());
            
            //No idea, set it to 0.  If you find out what this does, please let me know.
            mplew.writeInt(bomb.getUnk());
            
            //Affects exploding, the higher the number, the quicker it explodes.  25 is the value GMS uses.
            mplew.writeInt(bomb.getExplodeSpeed());
            
            //Percent of the character's Max HP to deal as damage.  You can set this to negative values, which will heal the player.
            //Damage dealt by projectiles ignores all defenses, resistances, and evasion.  Your source must support damage type -5, which is what these projectiles use.
            mplew.writeInt(bomb.getDamagePercent());
            
            //Time, in milliseconds, to wait until actually spawning the projectile.
            mplew.writeInt(bomb.getSpawnDelay());
            
            //The maximum distance the projectile will move before exploding.  Measured in pixels.
            mplew.writeInt(bomb.getDistance());
            
            //Direction.  Behaves oddly; from 0 upwards, the angle goes clock wise, until it hits 80, then you add 80 and it'll continue going clockwise, until it hits 240, add 80 and it'll continue to go clockwise until 360 is hit then it starts over.
            //Varies among different projectile types.
            mplew.writeInt(bomb.getAngle());
        }
        return mplew.getPacket();
    }
 
Last edited:
Junior Spellweaver
Joined
Jan 2, 2014
Messages
150
Reaction score
50
This is actually pretty cool, I should find a use for this.
 
Newbie Spellweaver
Joined
Apr 12, 2008
Messages
61
Reaction score
28
I just found some info on the 'ObtacleAtomCreate' part of this packet, and wanted to share it.
Btw this info is not counted in the first int that has spawn size.

Code:
        mplew.write(doCreateEff);
        if (doCreateEff == 1) {
            mplew.writeInt(300); // from Effect.img/BasicEff/ObtacleAtomCreate
            mplew.write(0); // facing pos, 0 = spawn from right, 1 = left
            mplew.writeInt(10000); // speed, higher = slower
            mplew.writeInt(-300); // spawn y pos

            //these 2 flip depending on facing pos
            mplew.writeInt(1800); // spawn x pos
            mplew.writeInt(3000); // end x pos
        }

This is what it looks like..




It's used for the Dimensional Invasion PQ, and some event.
Hopefully its useful for someone.
 
Skilled Illusionist
Joined
Aug 17, 2011
Messages
360
Reaction score
88
how do you find packets directly from Nexon. I remember a past version like v9x had a issue that stated all official Nexon packet terms, this is for v125+ how did you manage to get this?
 
<3
Joined
Feb 4, 2011
Messages
481
Reaction score
123
how do you find packets directly from Nexon. I remember a past version like v9x had a issue that stated all official Nexon packet terms, this is for v125+ how did you manage to get this?

Make an unpacked client for v125+ using Extalia's dumper, then name stuff based off the v95 IDB. And figure out the rest yourself.
 
Legendary Battlemage
Joined
Mar 7, 2013
Messages
686
Reaction score
43
hi, how to use this packet, example in boss magnus ? any explain pleasae, how to use this packet
 
Back
Top