Jump to content

Question

Posted

Hello guys,I am sorry to bother you again.
I am trying to create new user command.Code seems pretty simple to me,just have one trouble.Where do I find what command what id has?
I mean,where do you say "/unstuck" = 52 or something like that,cause I failed to find it.
Thank you for help.

6 answers to this question

Recommended Posts

  • 0
Posted

 

    private static final int[] COMMAND_IDS =
    {
        52
    };

 

That's the id from the core side.

 

commandname-e.dat from system folder

 

 

nbr    id    name
53    52    unstuck
  • 0
Posted (edited)

No matter what name of the command you write. It's about the ID :)

 

If the Id fits with the one from core, //logic, else do nothing (doesnt exist on core side) :P

Edited by SweeTs
  • 0
Posted

Yeah,I got it to work.
Thank you again!
And if you could I got one more question,I can't find how to get character instance by using his objId or char name.
For example,I want to make player a hero and I can get his char name or objId,so how can I get variable character,so I can character.setHero(true);
 

  • 0
Posted (edited)

You don't have to. Simple player/activeChar/target.setHero(true);

 

Where you want to put it? How to obtain it? Need more info :P

Edited by SweeTs
  • 0
Posted

For example,I have a code that check who has most online,and the player who has the most is set to hero.
And I get it like that:
PreparedStatement statement = con.prepareStatement("SELECT char_name FROM characters ORDER BY online DESC LIMIT 1");

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..