kill NPC
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 93
- Joined: Tue Sep 22, 2009 3:14 pm
- Location: UA
kill NPC
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)
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)
-
- Posts: 72
- Joined: Wed Jul 06, 2005 4:27 pm
- Location: Netherlands
Re: kill NPC
L2Character.java
CharStatus
I don't know what kind of "NPC Type" you are using but L2Npc should block damage.
Code: Select all
public L2Character(int objectId, L2CharTemplate template) { super(objectId); setInstanceType(InstanceType.L2Character); initCharStat(); initCharStatus(); ...................... setIsInvul(true); <----------------- }
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.
"If 64 bits isn't enough, the next logical step is 128 bits. That's enough to survive Moore's Law until I'm dead, and after that, it's not my problem."
©Jeff Bonwick
©Jeff Bonwick
-
- Posts: 93
- Joined: Tue Sep 22, 2009 3:14 pm
- Location: UA
Re: kill NPC
I use L2NpcBuffer.
Yes, L2Npc cant die, but many other like gatekeepers, Olimp., dusk ets die.
Yes, L2Npc cant die, but many other like gatekeepers, Olimp., dusk ets die.
-
- Posts: 72
- Joined: Wed Jul 06, 2005 4:27 pm
- Location: Netherlands
Re: kill NPC
Those are inheritances of L2Npc...
"If 64 bits isn't enough, the next logical step is 128 bits. That's enough to survive Moore's Law until I'm dead, and after that, it's not my problem."
©Jeff Bonwick
©Jeff Bonwick
-
- Posts: 93
- Joined: Tue Sep 22, 2009 3:14 pm
- Location: UA
Re: kill NPC
npc.sql
So, what now? If I change L2Teleporter то L2Npc, Gatekeeper will not work.
This problem is just me?
Lol player kill Gatekeeper because of what the normal players can't teleport!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),
So, what now? If I change L2Teleporter то L2Npc, Gatekeeper will not work.
This problem is just me?
-
- L2j Veteran
- Posts: 3437
- Joined: Wed Apr 30, 2008 8:53 am
- Location: Russia
Re: kill NPC
Yes, just you... check custom stuff.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
public static final int PI = 3.1415926535897932384626433832795;
-
- Posts: 93
- Joined: Tue Sep 22, 2009 3:14 pm
- Location: UA
Re: kill NPC
server downloaded from this http://www.l2jserver.com/nightly/_DS_ wrote:Yes, just you... check custom stuff.
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??
- Hitokiri
- Posts: 34
- Joined: Tue Oct 19, 2010 6:26 pm
Re: kill NPC
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 
Try to click your nick and than tipe //ban

Try to click your nick and than tipe //ban

Last edited by Hitokiri on Sat Oct 23, 2010 7:09 am, edited 1 time in total.
-
- L2j Veteran
- Posts: 3437
- Joined: Wed Apr 30, 2008 8:53 am
- Location: Russia
Re: kill NPC
LOL, and if you use //shutdown server will be stopped. How it possible ????kain13 wrote:server downloaded from this http://www.l2jserver.com/nightly/_DS_ wrote:Yes, just you... check custom stuff.
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??
Test with non-GM char.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
public static final int PI = 3.1415926535897932384626433832795;
-
- Posts: 93
- Joined: Tue Sep 22, 2009 3:14 pm
- Location: UA
Re: kill NPC
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._DS_ wrote:LOL, and if you use //shutdown server will be stopped. How it possible ????
Test with non-GM char.
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?
- Hitokiri
- Posts: 34
- Joined: Tue Oct 19, 2010 6:26 pm
Re: kill NPC
You want to say that a normal player can use commands like //kill //sethero and so on?kain13 wrote: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._DS_ wrote:LOL, and if you use //shutdown server will be stopped. How it possible ????
Test with non-GM char.
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?

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.
-
- Posts: 173
- Joined: Fri Nov 06, 2009 6:32 am
- Location: Argentina
Re: kill NPC
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??
Well understood??

Someone once told me: "The easiest way of doing things, making them the hard way" 

-
- Posts: 93
- Joined: Tue Sep 22, 2009 3:14 pm
- Location: UA
Re: kill NPC
yes, one people with working brain.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??
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?
-
- Posts: 173
- Joined: Fri Nov 06, 2009 6:32 am
- Location: Argentina
Re: kill NPC
I win! I want my reward!kain13 wrote:yes, one people with working brain.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??
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?

It seems odd, because I'm testing it right now and a common character attack message I get locked... bone that invunerable..
Someone once told me: "The easiest way of doing things, making them the hard way" 

- Hitokiri
- Posts: 34
- Joined: Tue Oct 19, 2010 6:26 pm
Re: kill NPC
`isUndead` tinyint(1) NOT NULL DEFAULT '0', so in your npc. sql should bekain13 wrote:yes, one people with working brain.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??
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?
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),