Disable /target on GM.
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- Notorious
- Posts: 501
- Joined: Thu May 28, 2009 3:50 pm
- Location: Sweden
Disable /target on GM.
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!
You should be able to click-target him, but not use /target.
Thanks for input!
- Bloodshed
- L2j Veteran
- Posts: 816
- Joined: Mon Jun 23, 2008 9:54 am
- Location: Dorf Town
Re: Disable /target on GM.
good idea 
maybe there is something like that in skilleffect for Hide skill

maybe there is something like that in skilleffect for Hide skill
taking a break;
-
- L2j Veteran
- Posts: 3437
- Joined: Wed Apr 30, 2008 8:53 am
- Location: Russia
Re: Disable /target on GM.
Try to sniff packets first, and you will see.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
public static final int PI = 3.1415926535897932384626433832795;
- Notorious
- Posts: 501
- Joined: Thu May 28, 2009 3:50 pm
- Location: Sweden
Re: Disable /target on GM.
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);
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.
-
- L2j Veteran
- Posts: 3437
- Joined: Wed Apr 30, 2008 8:53 am
- Location: Russia
Re: Disable /target on GM.
This will make clicking impossible too.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
public static final int PI = 3.1415926535897932384626433832795;
- Notorious
- Posts: 501
- Joined: Thu May 28, 2009 3:50 pm
- Location: Sweden
Re: Disable /target on GM.
Until a better solution is found, I can live with that!_DS_ wrote:This will make clicking impossible too.

But, where do I put it?

- Notorious
- Posts: 501
- Joined: Thu May 28, 2009 3:50 pm
- Location: Sweden
Re: Disable /target on GM.
Maybe I could make it configurable, so it's only when I need it it's active.
- Notorious
- Posts: 501
- Joined: Thu May 28, 2009 3:50 pm
- Location: Sweden
Re: Disable /target on GM.
On second thought, disabling it altogether is not an option!Notorious wrote:Until a better solution is found, I can live with that!_DS_ wrote:This will make clicking impossible too.
But, where do I put it?

- Notorious
- Posts: 501
- Joined: Thu May 28, 2009 3:50 pm
- Location: Sweden
Re: Disable /target on GM.
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?
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?
- JIV
- L2j Veteran
- Posts: 1882
- Joined: Sun Jan 06, 2008 8:17 pm
- Location: Slovakia
- Contact:
Re: Disable /target on GM.
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
- Notorious
- Posts: 501
- Joined: Thu May 28, 2009 3:50 pm
- Location: Sweden
Re: Disable /target on GM.
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!
But I will try!

Thanks again!
- Notorious
- Posts: 501
- Joined: Thu May 28, 2009 3:50 pm
- Location: Sweden
Re: Disable /target on GM.
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!

Will test it on live, then post it here if it works out like I hope!

-
- Posts: 176
- Joined: Tue Apr 21, 2009 3:09 pm
Re: Disable /target on GM.
Try to put one space " " before GM name
-
- Posts: 176
- Joined: Tue Apr 21, 2009 3:09 pm
Re: Disable /target on GM.
If you put one space before GM name they can't be target I tested it. 

- Notorious
- Posts: 501
- Joined: Thu May 28, 2009 3:50 pm
- Location: Sweden
Re: Disable /target on GM.
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!
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!
