insaNNe Posted May 14, 2012 Posted May 14, 2012 How can i make only 3 races available ( like orc, elf and human ) ? And is there client modding too ? Quote
0 dpbBryan Posted May 15, 2012 Posted May 15, 2012 I think the character creation process is only done client side. What happens when you hit create is all of the selected properties are sent to the server in a packet. There is a static function in L2PcInstance called create, which creates a character. One of the paramters is L2PcTemplate template. You can look at public final Race race; and see what the character picked. If the race isn't whichever one you want you can block the character from being created. Quote
0 Tryskell Posted May 15, 2012 Posted May 15, 2012 I guess you can "block" character creation if race != range, but about how to "cleanup" the selection, you have to play with client. Quote
0 insaNNe Posted May 16, 2012 Author Posted May 16, 2012 i want to "cleanup" the selections, any ideas where it can be ? Quote
0 dpbBryan Posted May 16, 2012 Posted May 16, 2012 This is a client side issue, this has nothing to do with the server. For you to make the modification you want you'd need access to the client source code. You should ask these dudes down here for help: http://maxcheaters.com/forum/index.php?board=68.0 But what I honestly think is that it isn't possible to modify this. The only thing you can do is block it via the server. Quote
0 Fanky Posted May 16, 2012 Posted May 16, 2012 enterworld. if(activeChar.getRace() != Race.XXX) { //code return; } you can do it only via this way,but still I dont know how you can totally remove their selection(dwarf example),and I rly doubt if that can be achieved. the only way that you can do a such thing,or semi one,is what i posted above. Quote
0 adenaman Posted May 16, 2012 Posted May 16, 2012 enterworld. if(activeChar.getRace() != Race.XXX) { //code return; } you can do it only via this way,but still I dont know how you can totally remove their selection(dwarf example),and I rly doubt if that can be achieved. the only way that you can do a such thing,or semi one,is what i posted above. EnterWorld is executed after the creation of the character (if im not wrong), so its not a rly good way to block it, the best one is to find the packet received with data of the new char and send some action failed pack ( even the one that say that the name is already in use) Btw Franky gratz for "Posts: 3.500" Quote
0 Fanky Posted May 16, 2012 Posted May 16, 2012 EnterWorld is executed after the creation of the character (if im not wrong), so its not a rly good way to block it, the best one is to find the packet received with data of the new char and send some action failed pack ( even the one that say that the name is already in use) Btw Franky gratz for "Posts: 3.500" yes i know. I explained before that its not a good way to do it,because they will be able to select the race and only when they are logging in the game they will be kicked/ban or whatever he wants.I dont think that there is a way to totally remove their selection,but even if that's possible for sure it needs client edit too. Btw Franky gratz for "Posts: 3.500" thanks (?) Quote
0 dpbBryan Posted May 16, 2012 Posted May 16, 2012 If you want to get rid of all the characters that aren't these races already, just run a DELETE query on your database where rows match the ID's you don't want to have in your world. Then where you should put the check is in: public static L2PcInstance create(int objectId, L2PcTemplate template, String accountName, String name, byte hairStyle, byte hairColor, byte face, boolean sex) { // Create a new L2PcInstance with an account name PcAppearance app = new PcAppearance(face, hairColor, hairStyle, sex); L2PcInstance player = new L2PcInstance(objectId, template, accountName, app); // Set the name of the L2PcInstance player.setName(name); // Set the base class ID to that of the actual class ID. player.setBaseClass(player.getClassId()); if (Config.ALT_GAME_NEW_CHAR_ALWAYS_IS_NEWBIE) player.setNewbie(true); // Add the player in the characters table of the database boolean ok = player.createDb(); if (!ok) return null; return player; } Which is called whent he player wants to create a character. You can just return null if they're using a race you don't want them to use. Quote
Question
insaNNe
How can i make only 3 races available ( like orc, elf and human ) ? And is there client modding too ?
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.