Disable /target on GM.

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
User avatar
Notorious
Posts: 501
Joined: Thu May 28, 2009 3:50 pm
Location: Sweden

Disable /target on GM.

Post by Notorious »

I need some directions to where in the code the player-command "/target" is handled. I'd like to make it impossible to /target a GM.
You should be able to click-target him, but not use /target.

Thanks for input!
User avatar
Bloodshed
L2j Veteran
L2j Veteran
Posts: 816
Joined: Mon Jun 23, 2008 9:54 am
Location: Dorf Town

Re: Disable /target on GM.

Post by Bloodshed »

good idea :)

maybe there is something like that in skilleffect for Hide skill
taking a break;
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Disable /target on GM.

Post by _DS_ »

Try to sniff packets first, and you will see.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
User avatar
Notorious
Posts: 501
Joined: Thu May 28, 2009 3:50 pm
Location: Sweden

Re: Disable /target on GM.

Post by Notorious »

Yah, something can be found...

This might work, but where do I put it? :)
Don't even know what file to start messing with, lol!

if (target.getTarget().isGM()) target.setTarget(null);
Last edited by Notorious on Fri Sep 18, 2009 12:23 pm, edited 1 time in total.
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Disable /target on GM.

Post by _DS_ »

This will make clicking impossible too.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
User avatar
Notorious
Posts: 501
Joined: Thu May 28, 2009 3:50 pm
Location: Sweden

Re: Disable /target on GM.

Post by Notorious »

_DS_ wrote:This will make clicking impossible too.
Until a better solution is found, I can live with that! :)
But, where do I put it? :)
User avatar
Notorious
Posts: 501
Joined: Thu May 28, 2009 3:50 pm
Location: Sweden

Re: Disable /target on GM.

Post by Notorious »

Maybe I could make it configurable, so it's only when I need it it's active.
User avatar
Notorious
Posts: 501
Joined: Thu May 28, 2009 3:50 pm
Location: Sweden

Re: Disable /target on GM.

Post by Notorious »

Notorious wrote:
_DS_ wrote:This will make clicking impossible too.
Until a better solution is found, I can live with that! :)
But, where do I put it? :)
On second thought, disabling it altogether is not an option! :(
User avatar
Notorious
Posts: 501
Joined: Thu May 28, 2009 3:50 pm
Location: Sweden

Re: Disable /target on GM.

Post by Notorious »

But where in the code is the /target handled?
I mean, must be somewhere where it reads commands like that... like /invite or /allyinfo and /target
And then processes those commands.

The /target I think must check if the target is inside the radius, and then put the target active.
Or is there no difference between clicking on a target and writing the command in the chatbox?
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: Disable /target on GM.

Post by JIV »

its handled by client, it has own knownlist and /target search for name player or npc and then send action packet with proper objid. so your answer is net.sf.l2j.gameserver.network.clientpackets.Action
User avatar
Notorious
Posts: 501
Joined: Thu May 28, 2009 3:50 pm
Location: Sweden

Re: Disable /target on GM.

Post by Notorious »

Thanks, I will look into it, but at first glance it doesn't seem like it differs between a click-target and a /target, so don't know how to make it only accept click-target...
But I will try! :)

Thanks again!
User avatar
Notorious
Posts: 501
Joined: Thu May 28, 2009 3:50 pm
Location: Sweden

Re: Disable /target on GM.

Post by Notorious »

I think I've found a fix I can live with! :)

Will test it on live, then post it here if it works out like I hope! :)
tropheo
Posts: 176
Joined: Tue Apr 21, 2009 3:09 pm

Re: Disable /target on GM.

Post by tropheo »

Try to put one space " " before GM name
tropheo
Posts: 176
Joined: Tue Apr 21, 2009 3:09 pm

Re: Disable /target on GM.

Post by tropheo »

If you put one space before GM name they can't be target I tested it. ;)
User avatar
Notorious
Posts: 501
Joined: Thu May 28, 2009 3:50 pm
Location: Sweden

Re: Disable /target on GM.

Post by Notorious »

Hehehe.... yes, that's a solution that will probably work too, if it's like you say it is...

My solution is to limit the distance, so you can only target a GM if you stand close enough, like as close as you have to be to be able to shop! :)
Post Reply