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");

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...