Page 1 of 3

kill NPC

Posted: Tue Oct 19, 2010 2:41 pm
by kain13
L2J Revision 4422:
L2JDP Revision 7669:
sorry for newbie question, but I cant understand how to prevent killing NPCs.
On my server, people can kill some NPC, for example gatekeepers, but some NPC like Lottery cant kill, what a problem?
thnx

(know about "AltAttackableNpcs =" this is not solution)

Re: kill NPC

Posted: Tue Oct 19, 2010 2:51 pm
by Phantom2005
L2Character.java

Code: Select all

     public L2Character(int objectId, L2CharTemplate template)    {        super(objectId);        setInstanceType(InstanceType.L2Character);        initCharStat();        initCharStatus();                ......................                setIsInvul(true); <-----------------    } 
CharStatus

Code: Select all

     public void reduceHp(double value, L2Character attacker, boolean awake, boolean isDOT, boolean isHPConsumption)    {        if (getActiveChar().isDead())            return;                // invul handling        if (getActiveChar().isInvul()) <-------------------        {            // other chars can't damage            if (attacker != getActiveChar())                return;                        // only DOT and HP consumption allowed for damage self            if (!isDOT && !isHPConsumption)                return;        }................ 

I don't know what kind of "NPC Type" you are using but L2Npc should block damage.

Re: kill NPC

Posted: Tue Oct 19, 2010 2:54 pm
by kain13
I use L2NpcBuffer.

Yes, L2Npc cant die, but many other like gatekeepers, Olimp., dusk ets die.

Re: kill NPC

Posted: Tue Oct 19, 2010 5:26 pm
by Phantom2005
Those are inheritances of L2Npc...

Re: kill NPC

Posted: Tue Oct 19, 2010 6:34 pm
by kain13
npc.sql
Player can kill this NPC -->
(30080,30080,'Clarissa',0,'Gatekeeper',0,'LineageNPC.a_teleporter_FHuman',8.00,25.00,70,'female','L2Teleporter',40,2444,1225,0.00,0.00,40,43,30,21,20,20,0,0,1086,471,749,313,230,0,333,0,0,0,45,109,0,1),

Player can't kill this NPC -->
(30990,30990,'Lottery Ticket Seller',0,'',0,'LineageNPC.a_casino_MHuman',8.00,23.00,70,'male','L2Npc',40,2444,1225,0.00,0.00,40,43,30,21,20,20,0,0,1086,471,749,313,230,0,333,0,0,0,45,109,0,1),
Lol player kill Gatekeeper because of what the normal players can't teleport!
So, what now? If I change L2Teleporter то L2Npc, Gatekeeper will not work.
This problem is just me?

Re: kill NPC

Posted: Wed Oct 20, 2010 9:21 am
by _DS_
Yes, just you... check custom stuff.

Re: kill NPC

Posted: Sat Oct 23, 2010 1:25 am
by kain13
_DS_ wrote:Yes, just you... check custom stuff.
server downloaded from this http://www.l2jserver.com/nightly/
edit just server.properties and loginserver.properties. Then create char. give him admin (127) go to game, target GK, use //kill and he die! How it possible??

Re: kill NPC

Posted: Sat Oct 23, 2010 2:35 am
by Hitokiri
Sometimes the problem is not so deep that u need to search errors in the java core files. When u are starting a server try to check all configuration files not only the part for root and pasword of MySql Working with L2J from the begining never got such a problem :shock:

Try to click your nick and than tipe //ban :mrgreen:

Re: kill NPC

Posted: Sat Oct 23, 2010 6:26 am
by _DS_
kain13 wrote:
_DS_ wrote:Yes, just you... check custom stuff.
server downloaded from this http://www.l2jserver.com/nightly/
edit just server.properties and loginserver.properties. Then create char. give him admin (127) go to game, target GK, use //kill and he die! How it possible??
LOL, and if you use //shutdown server will be stopped. How it possible ????
Test with non-GM char.

Re: kill NPC

Posted: Sat Oct 23, 2010 10:36 am
by kain13
_DS_ wrote:LOL, and if you use //shutdown server will be stopped. How it possible ????
Test with non-GM char.
don't understand, you is L2j Senior Developer but writing shit. Just try yourself use command //kill on (30080,30080,'Clarissa',0,'Gatekeeper',...,'L2Teleporter',...), and (30990,30990,'Lottery Ticket Seller',...,'L2Npc) L2Teleporter will die L2Npc not.

Yes I use clear (max clear, without custom) server, and create normal character, and he is killig L2Teleporter but can't kill L2Npc.

p.s why would you not first check and then try to be clever?

Re: kill NPC

Posted: Sat Oct 23, 2010 10:44 am
by Hitokiri
kain13 wrote:
_DS_ wrote:LOL, and if you use //shutdown server will be stopped. How it possible ????
Test with non-GM char.
don't understand, you is L2j Senior Developer but writing shit. Just try yourself use command //kill on (30080,30080,'Clarissa',0,'Gatekeeper',...,'L2Teleporter',...), and (30990,30990,'Lottery Ticket Seller',...,'L2Npc) L2Teleporter will die L2Npc not.

Yes I use clear (max clear, without custom) server, and create normal character, and he is killig L2Teleporter but can't kill L2Npc.

p.s why would you not first check and then try to be clever?
You want to say that a normal player can use commands like //kill //sethero and so on? :shock:
Could it be that u gave 127 acces rights to players? What is the acces level of character that u use for testing? Check it in database.

Re: kill NPC

Posted: Sat Oct 23, 2010 10:54 am
by Edelvez
I understood that... What he meant is that an ordinary player, with access level 0, can kill an NPC L2Teleporter type shock and a type L2Npc, can hit but not killed.

Well understood?? :|

Re: kill NPC

Posted: Sat Oct 23, 2010 10:59 am
by kain13
Edelvez wrote:I understood that... What he meant is that an ordinary player, with access level 0, can kill an NPC L2Gatekeeper type shock and a type L2Npc, can hit but not killed.

Well understood?? :|
yes, one people with working brain.

normal character = 0 access, Admin = 127.
normal character can kill with weapon (30080,30080,'Clarissa',0,'Gatekeeper',...,'L2Teleporter',...) but can't (30990,30990,'Lottery Ticket Seller',...,'L2Npc)
Admin can kill with comand //kill (30080,30080,'Clarissa',0,'Gatekeeper',...,'L2Teleporter',...) but can't (30990,30990,'Lottery Ticket Seller',...,'L2Npc)

What you can't understand?

Re: kill NPC

Posted: Sat Oct 23, 2010 11:04 am
by Edelvez
kain13 wrote:
Edelvez wrote:I understood that... What he meant is that an ordinary player, with access level 0, can kill an NPC L2Gatekeeper type shock and a type L2Npc, can hit but not killed.

Well understood?? :|
yes, one people with working brain.

normal character = 0 access, Admin = 127.
normal character can kill with weapon (30080,30080,'Clarissa',0,'Gatekeeper',...,'L2Teleporter',...) but can't (30990,30990,'Lottery Ticket Seller',...,'L2Npc)
Admin can kill with comand //kill (30080,30080,'Clarissa',0,'Gatekeeper',...,'L2Teleporter',...) but can't (30990,30990,'Lottery Ticket Seller',...,'L2Npc)

What you don't understand?
I win! I want my reward! :D


It seems odd, because I'm testing it right now and a common character attack message I get locked... bone that invunerable..

Re: kill NPC

Posted: Sat Oct 23, 2010 11:25 am
by Hitokiri
kain13 wrote:
Edelvez wrote:I understood that... What he meant is that an ordinary player, with access level 0, can kill an NPC L2Gatekeeper type shock and a type L2Npc, can hit but not killed.

Well understood?? :|
yes, one people with working brain.

normal character = 0 access, Admin = 127.
normal character can kill with weapon (30080,30080,'Clarissa',0,'Gatekeeper',...,'L2Teleporter',...) but can't (30990,30990,'Lottery Ticket Seller',...,'L2Npc)
Admin can kill with comand //kill (30080,30080,'Clarissa',0,'Gatekeeper',...,'L2Teleporter',...) but can't (30990,30990,'Lottery Ticket Seller',...,'L2Npc)

What you can't understand?
`isUndead` tinyint(1) NOT NULL DEFAULT '0', so in your npc. sql should be

Code: Select all

(30080,30080,'Clarissa',0,'Gatekeeper',0,'LineageNPC.a_teleporter_FHuman',8.00,25.00,70,'female','L2Teleporter',40,2444,1225,0.00,0.00,40,43,30,21,20,20,0,0,1086,471,749,313,230,0,333,0,0,0,0,45,109,1,0,1), 
So last 3 numbers shold be 1,0,1 not 0,0,1