Jump to content
  • 0

is there a command to add pvp/pk via admin panel in acis?


Question

Posted

hi members. i want to ask something. i ve use l2jacis free rev and i want to ask if there is a admin command in which you can set the pvp/pk socre of a player via admin pannel ,like l2jfrozen.

or do you need java modification in order to make that think happen?

3 answers to this question

Recommended Posts

  • 0
Posted
11 hours ago, jack21 said:

thanks for your reply mate. i know how to do it from navicat. can we find somewhere how to make it via java?

 

 

Check net.sf.l2j.gameserver.handler.admincommandhandlers. In there you should see several classes representing various admin commands. You need to make a new class by observing the existing ones and check:

if (command.startsWith("admin_add_pvp"))
{
        GameObject targetObject = player.getTarget();
        if (targetObject == null  || !(targetObject instanceof Player))
                return;


        try

        {

                int pvp = Integer.parseInt(command.substring(14));

                Player target = (Player) targetObject;

               target.setPvpKills(target.getPvpKills() + pvp);

               target.broadcastUserInfo(); // Alternatively you can target.sendPacket(new UserInfo(target)) but in case you got systems like pvp color system use this.

        }

        catch (Exception e)
        {

                player.sendMessage("Usage: //add_pvp amount");

        }

}

 

 

Please note that I wrote this code here in the reply section I didn't actually check it with aCis, it might need a few changes. You can easily make such a thing tho you don't even neeed to know java to understand how it works.

  • Upvote 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...