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 close some job?

Newbie Spellweaver
Joined
Mar 21, 2015
Messages
14
Reaction score
1
My server is 117.2
I want close some job
How to do :blush:
 
Newbie Spellweaver
Joined
Mar 21, 2015
Messages
14
Reaction score
1
constants > JobConstants.java You can enable or disable the jobs here.
but i don't hava JobConstants.java
only have
defautsetting.java
GameConstants.java
MultiMirror.java
ServerConstants.java
WorldConstants.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
In LoginPacket -> getAuth

PHP:
// Jobs
        mplew.write(JobConstants.enableJobs ? 1 : 0); //toggle
        mplew.write(JobConstants.jobOrder); //Job Order (orders are located in wz)
        for (LoginJob j : LoginJob.values()) {
            mplew.write(j.getFlag());
        }
        mplew.write(1);
        mplew.write(4);
        // End of Jobs

        mplew.writeLong(0); // Create date

Make sure you don't increase the length of the current packet, mearly replace the bytes with this.
Then jobConstants:

PHP:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package constants;

/**
 *
 * @author Itzik
 */
public class JobConstants {

    public static final boolean enableJobs = true;
    public static final int jobOrder = ??;//IDK FOR v114

    public enum LoginJob {//disabled for beta

        Resistance(0, JobFlag.ENABLED),
        Adventurer(1, JobFlag.ENABLED),
        Cygnus(2, JobFlag.ENABLED),
        Aran(3, JobFlag.ENABLED),
        Evan(4, JobFlag.ENABLED),
        Mercedes(5, JobFlag.ENABLED),
        Demon(6, JobFlag.ENABLED),
        Phantom(7, JobFlag.ENABLED),
        DualBlade(8, JobFlag.ENABLED),
        Mihile(9, JobFlag.ENABLED);
        private final int jobType, flag;

        private LoginJob(int jobType, JobFlag flag) {
            this.jobType = jobType;
            this.flag = flag.getFlag();
        }

        public int getJobType() {
            return jobType;
        }

        public int getFlag() {
            return flag;
        }

        public enum JobFlag {

            DISABLED(0),
            ENABLED(1);
            private final int flag;

            private JobFlag(int flag) {
                this.flag = flag;
            }

            public int getFlag() {
                return flag;
            }
        }
    }
}

Obviously find the joborder,
Look into ther sources for examples an w/e.

idk if it's supported in v117 btw, but either try it or check IDA to figure out if it does.
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Mar 21, 2015
Messages
14
Reaction score
1
In LoginPacket -> getAuth

PHP:
// Jobs
        mplew.write(JobConstants.enableJobs ? 1 : 0); //toggle
        mplew.write(JobConstants.jobOrder); //Job Order (orders are located in wz)
        for (LoginJob j : LoginJob.values()) {
            mplew.write(j.getFlag());
        }
        mplew.write(1);
        mplew.write(4);
        // End of Jobs

        mplew.writeLong(0); // Create date

Make sure you don't increase the length of the current packet, mearly replace the bytes with this.
Then jobConstants:

PHP:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package constants;

/**
 *
 * @author Itzik
 */
public class JobConstants {

    public static final boolean enableJobs = true;
    public static final int jobOrder = ??;//IDK FOR v114

    public enum LoginJob {//disabled for beta

        Resistance(0, JobFlag.ENABLED),
        Adventurer(1, JobFlag.ENABLED),
        Cygnus(2, JobFlag.ENABLED),
        Aran(3, JobFlag.ENABLED),
        Evan(4, JobFlag.ENABLED),
        Mercedes(5, JobFlag.ENABLED),
        Demon(6, JobFlag.ENABLED),
        Phantom(7, JobFlag.ENABLED),
        DualBlade(8, JobFlag.ENABLED),
        Mihile(9, JobFlag.ENABLED);
        private final int jobType, flag;

        private LoginJob(int jobType, JobFlag flag) {
            this.jobType = jobType;
            this.flag = flag.getFlag();
        }

        public int getJobType() {
            return jobType;
        }

        public int getFlag() {
            return flag;
        }

        public enum JobFlag {

            DISABLED(0),
            ENABLED(1);
            private final int flag;

            private JobFlag(int flag) {
                this.flag = flag;
            }

            public int getFlag() {
                return flag;
            }
        }
    }
}

Obviously find the joborder,
Look into ther sources for examples an w/e.

idk if it's supported in v117 btw, but either try it or check IDA to figure out if it does.

PHP:
package tools.packet;
import client.MapleCharacter;import client.MapleClient;import client.PartTimeJob;import constants.ServerConstants;import handling.SendPacketOpcode;import handling.login.LoginServer;import java.util.LinkedList;import java.util.List;import java.util.Map;import java.util.Set;import server.Randomizer;import tools.HexTool;import tools.data.MaplePacketLittleEndianWriter;
public class LoginPacket {            public static byte[] updatePartTimeJob(PartTimeJob partTime) {        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(21);        mplew.writeShort(SendPacketOpcode.PART_TIME.getValue());        mplew.writeInt(partTime.getCharacterId());        mplew.write(0);      //  PacketHelper.addPartTimeJob(mplew, partTime);        return mplew.getPacket();    }     public static byte[] partTimeJob(int cid, short type, long time) {        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PART_TIME.getValue());        mplew.writeInt(cid);        mplew.write(0);        mplew.write(type);        //1) 0A D2 CD 01 70 59 9F EA        //2) 0B D2 CD 01 B0 6B 9C 18        mplew.writeReversedLong(PacketHelper.getTime(time));        mplew.writeInt(0);        mplew.write(0);
        return mplew.getPacket();    }            public static final byte[] getHello(short mapleVersion, byte[] sendIv, byte[] recvIv) {        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(15 + ServerConstants.MAPLE_PATCH.length());
        mplew.writeShort(13 + ServerConstants.MAPLE_PATCH.length());        mplew.writeShort(mapleVersion);        mplew.writeMapleAsciiString(ServerConstants.MAPLE_PATCH);        mplew.write(recvIv);        mplew.write(sendIv);        mplew.write(8);
        return mplew.getPacket();    }
    public static final byte[] getPing() {        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(2);        mplew.writeShort(SendPacketOpcode.PING.getValue());        return mplew.getPacket();    }
    public static final byte[] getAuthSuccessRequest(MapleClient client) {        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.LOGIN_STATUS.getValue());        mplew.writeZeroBytes(6);        mplew.writeInt(client.getAccID());        mplew.write(0);        mplew.write(0);        mplew.writeShort(0);        mplew.write(0);        mplew.writeMapleAsciiString(client.getAccountName());        mplew.write(2);        mplew.write(0);        //mplew.writeLong(PacketHelper.getTime(System.currentTimeMillis()));        mplew.writeLong(0L);        mplew.write(0);        mplew.writeLong(0L);        mplew.writeInt(0);        mplew.writeShort(257);        mplew.writeInt(0);        mplew.writeInt(0); //V118 uses a byte here        return mplew.getPacket();    }
    public static final byte[] getLoginFailed(int reason) {        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(16);
        mplew.writeShort(SendPacketOpcode.LOGIN_STATUS.getValue());        mplew.write(reason);        mplew.write(0);        mplew.writeInt(0);
        return mplew.getPacket();    }    /*     * location: UI.wz/Login.img/Notice/text     * reasons:     * useful:     * 32 - server under maintenance check site for updates     * 35 - your computer is running thirdy part programs close them and play again     * 36 - due to high population char creation has been disabled     * 43 - revision needed your ip is temporary blocked     * 75-78 are cool for auto register          */
    public static final byte[] getPermBan(byte reason) {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(16);
         mplew.writeShort(SendPacketOpcode.LOGIN_STATUS.getValue());         mplew.writeShort(2);         mplew.writeInt(0);         mplew.writeShort(reason);         mplew.write(HexTool.getByteArrayFromHexString("01 01 01 01 00"));
         return mplew.getPacket();    }
    public static final byte[] getTempBan(long timestampTill, byte reason) {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(17);
         mplew.writeShort(SendPacketOpcode.LOGIN_STATUS.getValue());         mplew.write(2);         mplew.write(0);         mplew.writeInt(0);         mplew.write(reason);         mplew.writeLong(timestampTill);
         return mplew.getPacket();    }
    public static final byte[] getSecondAuthSuccess(MapleClient client) {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
         mplew.writeShort(SendPacketOpcode.LOGIN_SECOND.getValue());         mplew.write(0);         mplew.writeInt(client.getAccID());         mplew.writeZeroBytes(5);         mplew.writeMapleAsciiString(client.getAccountName());         mplew.writeLong(2L);         mplew.writeZeroBytes(3);         mplew.writeInt(Randomizer.nextInt());         mplew.writeInt(Randomizer.nextInt());         mplew.writeInt(28);         mplew.writeInt(Randomizer.nextInt());         mplew.writeInt(Randomizer.nextInt());         mplew.write(1);
         return mplew.getPacket();    }
    public static final byte[] deleteCharResponse(int cid, int state) {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
         mplew.writeShort(SendPacketOpcode.DELETE_CHAR_RESPONSE.getValue());         mplew.writeInt(cid);         mplew.write(state);
         return mplew.getPacket();    }
    public static final byte[] secondPwError(byte mode) {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);
         mplew.writeShort(SendPacketOpcode.SECONDPW_ERROR.getValue());         mplew.write(0);
         return mplew.getPacket();    }
    public static byte[] enableRecommended() {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();         mplew.writeShort(SendPacketOpcode.ENABLE_RECOMMENDED.getValue());         mplew.writeInt(0);         return mplew.getPacket();    }
    public static byte[] sendRecommended(int world, String message) {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();         mplew.writeShort(SendPacketOpcode.SEND_RECOMMENDED.getValue());         mplew.write(message != null ? 1 : 0);         if (message != null) {             mplew.writeInt(world);             mplew.writeMapleAsciiString(message);        }         return mplew.getPacket();    }
    public static final byte[] getServerList(int serverId, Map<Integer, Integer> channelLoad) {        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SERVERLIST.getValue());        mplew.write(serverId);        String worldName = LoginServer.getTrueServerName();        mplew.writeMapleAsciiString(worldName);        mplew.write(LoginServer.getFlag(serverId));        mplew.writeMapleAsciiString(LoginServer.getEventMessage());        mplew.writeShort(100);        mplew.writeShort(100);        mplew.write(0);        int lastChannel = 1;        Set channels = channelLoad.keySet();        for (int i = 30; i > 0; i--) {            if (channels.contains(Integer.valueOf(i))) {                lastChannel = i;                break;            }        }        mplew.write(lastChannel);
        for (int i = 1; i <= lastChannel; i++) {            int load;
            if (channels.contains(Integer.valueOf(i)))  {                load = ((Integer) channelLoad.get(Integer.valueOf(i))).intValue();            } else {                load = 1200;            }            mplew.writeMapleAsciiString(worldName + "-" + i);            mplew.writeInt(load);            mplew.write(serverId);            mplew.writeShort(i - 1);        }        mplew.writeShort(0);        mplew.writeInt(0);
        return mplew.getPacket();    }
    //This is a guess:    public static final byte[] getTespiaServerList(String serverId, Map<Integer, Integer> channelLoad) {        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SERVERLIST.getValue());        mplew.writeAsciiString(serverId); //Might be also writeMapleAsciiString        String worldName = LoginServer.getTrueServerName();        mplew.writeMapleAsciiString(worldName);        mplew.write(LoginServer.getTespiaFlag(serverId));        mplew.writeMapleAsciiString(LoginServer.getEventMessage());        mplew.writeShort(100);        mplew.writeShort(100);        mplew.write(0);        int lastChannel = 1;        Set channels = channelLoad.keySet();        for (int i = 30; i > 0; i--) {            if (channels.contains(Integer.valueOf(i))) {                lastChannel = i;                break;            }        }        mplew.write(lastChannel);
        for (int i = 1; i <= lastChannel; i++) {            int load;
            if (channels.contains(Integer.valueOf(i)))  {                load = ((Integer) channelLoad.get(Integer.valueOf(i))).intValue();            } else {                load = 1200;            }            mplew.writeMapleAsciiString(worldName + "-" + i);            mplew.writeInt(load);            mplew.writeAsciiString(serverId); //Might be also writeMapleAsciiString            mplew.writeShort(i - 1);        }        mplew.writeShort(0);        mplew.writeInt(0);
        return mplew.getPacket();    }
    public static final byte[] getEndOfServerList() {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
         mplew.writeShort(SendPacketOpcode.SERVERLIST.getValue());         mplew.writeShort(255);
         return mplew.getPacket();    }
    public static final byte[] getLoginWelcome() {         List flags = new LinkedList();
         return CField.spawnFlags(flags);    }
    public static final byte[] getServerStatus(int status) {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
         mplew.writeShort(SendPacketOpcode.SERVERSTATUS.getValue());         mplew.writeShort(status);
         return mplew.getPacket();    }
    public static final byte[] changeBackground() {        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.LOGIN_WELCOME.getValue()); //0xD0 = V117 0xD8 = V120        mplew.write(2); //No idea? Probably background type?        mplew.writeMapleAsciiString("20120808", 9); //Some calendar? 08/08/2012        mplew.writeMapleAsciiString("20120815", 9); //Some calendar? 08/15/2012
        return mplew.getPacket();    }
    public static final byte[] getChannelSelected() {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
         mplew.writeShort(SendPacketOpcode.CHANNEL_SELECTED.getValue());         mplew.writeZeroBytes(3);
         return mplew.getPacket();    }
    public static final byte[] getCharList(String secondpw, List<MapleCharacter> chars, int charslots) {        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.CHARLIST.getValue());        mplew.write(0);        mplew.write(chars.size());        for (MapleCharacter chr : chars) {            addCharEntry(mplew, chr, (!chr.isGM()) && (chr.getLevel() >= 30), false);        }        mplew.write(secondpw != null && secondpw.length() > 0 ? 1 : (secondpw != null && secondpw.length() <= 0 ? 2 : 0)); // second pw request        mplew.write(0);        mplew.writeInt(charslots);        mplew.writeInt(0);        mplew.writeInt(0);        mplew.writeInt(0);        return mplew.getPacket();    }
    public static final byte[] addNewCharEntry(MapleCharacter chr, boolean worked) {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
         mplew.writeShort(SendPacketOpcode.ADD_NEW_CHAR_ENTRY.getValue());         mplew.write(worked ? 0 : 1);         addCharEntry(mplew, chr, false, false);
         return mplew.getPacket();    }
    public static final byte[] charNameResponse(String charname, boolean nameUsed) {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
         mplew.writeShort(SendPacketOpcode.CHAR_NAME_RESPONSE.getValue());         mplew.writeMapleAsciiString(charname);         mplew.write(nameUsed ? 1 : 0);
         return mplew.getPacket();    }
    private static final void addCharEntry(MaplePacketLittleEndianWriter mplew, MapleCharacter chr, boolean ranking, boolean viewAll) {         PacketHelper.addCharStats(mplew, chr);         PacketHelper.addCharLook(mplew, chr, true);         if (!viewAll) {             mplew.write(0);        }         mplew.write(ranking ? 1 : 0);         if (ranking) {             mplew.writeInt(chr.getRank());             mplew.writeInt(chr.getRankMove());             mplew.writeInt(chr.getJobRank());             mplew.writeInt(chr.getJobRankMove());        }    }
    public static byte[] showAllCharacter(int chars) {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();         mplew.writeShort(SendPacketOpcode.ALL_CHARLIST.getValue());         mplew.write(1);         mplew.writeInt(chars);         mplew.writeInt(chars + (3 - chars % 3));         return mplew.getPacket();    }
    public static byte[] showAllCharacterInfo(int worldid, List<MapleCharacter> chars, String pic) {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();         mplew.writeShort(SendPacketOpcode.ALL_CHARLIST.getValue());         mplew.write(chars.size() == 0 ? 5 : 0);         mplew.write(worldid);         mplew.write(chars.size());         for (MapleCharacter chr : chars) {             addCharEntry(mplew, chr, true, true);        }         mplew.write(pic.equals("") ? 2 : pic == null ? 0 : 1);         return mplew.getPacket();    }
    public static byte[] enableSpecialCreation(int accid, boolean enable) {         MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
         mplew.writeShort(SendPacketOpcode.SPECIAL_CREATION.getValue());         mplew.writeInt(accid);         mplew.write(enable ? 0 : 1);         mplew.write(0);
         return mplew.getPacket();    }
    public static byte[] activatePartTime(int cid, short type, long startDate) {        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PART_TIME.getValue());        mplew.writeInt(cid);        mplew.writeShort(type);        //1) 0A D2 CD 01 70 59 9F EA        //2) 0B D2 CD 01 B0 6B 9C 18        mplew.writeLong(startDate);        mplew.writeInt(0);        mplew.write(0);
        return mplew.getPacket();    }}

HOW TO DO?
 
Upvote 0
BloopBloop
Joined
Aug 9, 2012
Messages
892
Reaction score
275
At this version you couldn't block them with the getAuth, the only way to block job creations is:
A. client editing, like extalia did
B. Send a message that the job can't be created when a player clicks on it.
 
Upvote 0
(O_o(o_O(O_O)o_O)O_o)
Loyal Member
Joined
Apr 9, 2009
Messages
1,088
Reaction score
322
At this version you couldn't block them with the getAuth, the only way to block job creations is:
A. client editing, like extalia did
B. Send a message that the job can't be created when a player clicks on it.

makes sense cause the bytes/ int's didn't match/ fit ;)

I suppose option B is easier. Though A is cooler.
 
Upvote 0
BloopBloop
Joined
Aug 9, 2012
Messages
892
Reaction score
275
Of course, B is the ideal way while A is the advanced way. I wonder how A would be done tho @Hilia any hypotheses

when extalia was v117 i took a look at it and well... i can't remember anything ,however it should not be that hard to figure out in combination with a localhost (v83 or v90) and the v95 .idb I can remember that i saw somewhere a switch case for the click functions.... but this could also be wrong. I think i gave up because i couldn't find the correct function, but if you can find it it should be easy to "patch".

If you can locate the parts that need to be "patched", then it should be very easy to simply write a redirector and use the "WriteProccessMemory" function to inject some code.
What i would do is to create a class , that holds all the address that needs to be patched and the "patched" bytes with it. Then simply loop though all those addresses in this class and write the code to the memory of the maplestory.exe.
 
Last edited:
Upvote 0
BloopBloop
Joined
Aug 9, 2012
Messages
892
Reaction score
275
Of course, B is the ideal way while A is the advanced way. I wonder how A would be done tho @Hilia any hypotheses
@sunnyboy I have made a example for you.

So i first wrote one of the most complicated C++ programs out there:
Code:
#include <iostream>
#include <limits>


int main()
{
    std::cout << "Hello world!" << std::endl;
    std::cout << "Hello earth!" <<std::endl;




   std::cout << "Press ENTER to continue...";
   std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );


    return 0;
}

After i succeed in compiling this very complicated program i found out that i made a mistake,the program should say 2 times Hello earth,not one time...... and it gots worse i lost the source!!! , what do i do?
So i decided not to rewrite this very complicated program to fix the bug, but to write something way less complicated in C# that can solve all my problems.

After i did that i took a look in ollydbg to find the addresses:
Ah 0x00471006 is the address i need, i only have to change the pointer!!:
ms0312430 - How can I close some job? - RaGEZONE Forums


So in my C# program , i went to my memory table and added the poop i wanted to do:
Code:
 public static class MemoryTable
    {
        private static readonly List<MemoryAddressValue> mValues;


        static MemoryTable()
        {
            mValues = new List<MemoryAddressValue>();
            mValues.Add(new MemoryAddressValue(0x00471006,new byte[] { 0xC7, 0x44, 0x24,0x04 ,0x31 ,0x40, 0x47 ,0x00})); // change to both hello earth,changed pointer from 00474024 to 00474031


        }




        public static IEnumerable<MemoryAddressValue> GetValues()
        {
            return MemoryTable.mValues;
        }
    }

After that i ran the code, of course i launched the C# application as ADMIN and it worked!!!! (duck this screenshot)
ms0312430 - How can I close some job? - RaGEZONE Forums

But that was not all i wanted to do , now i decided i wanted to change the string to "Sunnyboy",
So i searched for some empty space to place 9 bytes ,found it !! at : 0x00445942
ms0312430 - How can I close some job? - RaGEZONE Forums

So i modified my my memory table again:

using System;
using MemWriter.Memory;
using System.Collections.Generic;


namespace MemWriter
{
public static class MemoryTable
{
private static readonly List<MemoryAddressValue> mValues;


static MemoryTable()
{
mValues = new List<MemoryAddressValue>();
// mValues.Add(new MemoryAddressValue(0x00471006,new byte[] { 0xC7, 0x44, 0x24,0x04 ,0x31 ,0x40, 0x47 ,0x00}));// change to both hello earth,changed pointer from 00474024 to 00474031
// mValues.Add(new MemoryAddressValue(0x00445942,System.Text.Encoding.ASCII.GetBytes("Sunnyboy"))); misses 0x00 at the end... so duck it


mValues.Add(new MemoryAddressValue(0x00445942,new byte[] {0x53,0x75,0x06E,0x6E,0x79,0x62,0x6F,0x79,0x00 })); //Sunnyboy
mValues.Add(new MemoryAddressValue(0x00471006, new byte[] { 0xC7, 0x44, 0x24, 0x04, 0x42, 0x59, 0x44, 0x00 })); // change to just created string
}




public static IEnumerable<MemoryAddressValue> GetValues()
{
return MemoryTable.mValues;
}
}
}

After that i ran the code and it worked!!!!



This does ofcourse not guarant that it will work for MapleStory,but this should show a basic example of how to write code at runtime , there are also other ways to implement this.

//THE CODE IS A MODIFIED VERSION OF A COMBINATION OF CODE FROM STACKOVERFLOW BECAUSE I AM LAZY
Source of everything:<removed,since link got removed>
Namespaces could be slightly fucked up ......

Error Code: 998 Not launched as admin
Error Code: 1008 Invalid address or something...
Extra: If you have to recompile the C++ application,the addresses might change
Edit: Ignore notepad, i was also doing some test with Notepad...
Edit 2: The way how the code is written to the memory of the client will in this example NOT work for packet clients,so it only works for "REAL" localhost, The cause for this is the following: Normally when the Ms client starts it "unpacks it self" (don't post poop about this sentence) after the program is started. Now what i do is to start the program in suspended mode: In other words: The packer does not have time to "unpack" him self so writing to the memory at this point is shenanigans. In case to write to a packet client you have to give the client the time to unpack him self , and so you can't inject code right after the program is started but has to wait a view "seconds",and to do so you have to change like 60% of the code in the source.
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Apr 6, 2017
Messages
33
Reaction score
0
At this version you couldn't block them with the getAuth, the only way to block job creations is:
A. client editing, like extalia did
B. Send a message that the job can't be created when a player clicks on it.

can i know how and where to add choice B in the source?
 
Upvote 0
Custom Title Activated
Loyal Member
Joined
Jan 18, 2010
Messages
3,109
Reaction score
1,139
can i know how and where to add choice B in the source?

Lithium: handling/login/handler/CharLoginHandler.CreateChar. There's a jobType variable, just check if it's equal to a certain job and send a serverNotice(1, "This class is disabled") packet and return.
Odin: net/login/handler/CreateCharHandler. Same thing as above, there's a job variable, just check if it's a certain job and send a packet/return.

You can't directly send a message as soon as they select the class itself because that is client-sided, but you can check once they click OK on the creation screen.
 
Upvote 0
Back
Top