Hi, I'm trying to add a new command to use /xpoff or /xpon and I'm stuck. As I see the Unstuck has a command identifier which is 52.
Example unstuck:
publicclassEscape implements IUserCommandHandler{privatestatic final int[] COMMAND_IDS ={52};
And the NoExp.java that I am creating is like this:
package net.sf.l2j.gameserver.handler.usercommandhandlers;import net.sf.l2j.gameserver.handler.IUserCommandHandler;import net.sf.l2j.gameserver.model.actor.Player;publicclassNoExp implements IUserCommandHandler{privatestatic final int COMMAND_ID_XPOFF =51;privatestatic final int COMMAND_ID_XPON =52;privatestatic final int[] _userCommands ={COMMAND_ID_XPOFF, COMMAND_ID_XPON};@Overridepublicvoid useUserCommand(int id,Player player){switch(id){case COMMAND_ID_XPOFF:
player.setCantGainXP(true);
player.sendMessage("¡Has desactivado la ganancia de XP!");break;case COMMAND_ID_XPON:
player.setCantGainXP(false);
player.sendMessage("¡Has activado la ganancia de XP!");break;default:// Comando no reconocidobreak;}}@Overridepublicint[] getUserCommandList(){return _userCommands;}}
I need to know how to obtain or generate the IDs for the two commands I need. Since I can't find any XML about it, could you guide me how to do it? Thank you very much in advance.
postscript, I have not yet been able to test that the command works and therefore I do not know if the implementation I am doing will work since it was from another non-acis project.
I'm sorry for my English if it is not expressed well.
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.
no I don't want to loose my time neither my money. That's why I did this post. I'm just mention Sunrise and Scripts because are the 2 most likely to see when you search for paid H5 emulators.
L2jeternity last post was last December. Members doesn't seems to respond so far. Anyway I will keep searching I'm not in a hurry. Thanks for your response night. Appreciate it .
if somebody with so much experience does not even bother to tell you why, means does not even worth the time to explain, so does the projects, you want to lose your time go for it nobody will stop you. GOOD LUCK! the rest you can search
No i dont know how to code.
Also i think that some of the best servers out there, there Owners doesnt know to code, thats why some of the people are java developers and others are plumbers, electricians etc.
If i knew how to code i ll try to make my own project and not to buy one.
Any way thanks for your answer but i ll not stop here. Have a nice day.
Question
luzzifer
Hi, I'm trying to add a new command to use /xpoff or /xpon and I'm stuck. As I see the Unstuck has a command identifier which is 52.
Example unstuck:
And the NoExp.java that I am creating is like this:
I need to know how to obtain or generate the IDs for the two commands I need. Since I can't find any XML about it, could you guide me how to do it? Thank you very much in advance.
postscript, I have not yet been able to test that the command works and therefore I do not know if the implementation I am doing will work since it was from another non-acis project.
I'm sorry for my English if it is not expressed well.
2 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.