kill NPC

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
Edelvez
Posts: 173
Joined: Fri Nov 06, 2009 6:32 am
Location: Argentina

Re: kill NPC

Post by Edelvez »

Hitokiri wrote:
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
You are mistaken my dear Watson ... I was testing with other rev, and Clarissa can only kill the other hand are invunerable.
Someone once told me: "The easiest way of doing things, making them the hard way" ;)
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: kill NPC

Post by janiii »

because L2NpcInstance has FolkStatus, which does nothing in reduceHp method and L2TeleporterInstance has NpcStatus, which makes the damage to the npc and it dies.


but i dont understand how you want to kill a npc, if you have in config that npc cannot be attacked and if you try to do it with normal player - he cannot attack the npc, so he cannot kill it.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
Hitokiri
Posts: 34
Joined: Tue Oct 19, 2010 6:26 pm

Re: kill NPC

Post by Hitokiri »

# Defines whether NPCs are attackable by default
# Retail: True
AltAttackableNpcs = False
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: kill NPC

Post by jurchiks »

that's only attackable, not killable...
npcs can't be killed since c5 in l2j.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: kill NPC

Post by janiii »

it is possible..

after gm uses the command //kill, then players can kill the teleporter by themselfs. but without the initial killing by gm, i could not reproduce this bug.

here a fix for when gm kills a npc, that it is not vulnerable after it.

Code: Select all

Index: data/scripts/handlers/admincommandhandlers/AdminKill.java===================================================================--- data/scripts/handlers/admincommandhandlers/AdminKill.java    (revision 5698)+++ data/scripts/handlers/admincommandhandlers/AdminKill.java    (working copy)@@ -134,8 +129,19 @@             target.reduceCurrentHp(target.getMaxHp() * Config.L2JMOD_CHAMPION_HP + 1, activeChar, null);         else         {-            if(target.isInvul()) target.setIsInvul(false);+            boolean targetIsInvul = false;+            if (target.isInvul())+            {+                targetIsInvul = true;+                target.setIsInvul(false);+            }+                         target.reduceCurrentHp(target.getMaxHp() + 1, activeChar, null);+            +            if (targetIsInvul)+            {+                target.setIsInvul(true);+            }         }         if (Config.DEBUG)             _log.fine("GM: " + activeChar.getName() + "(" + activeChar.getObjectId() + ")" + " killed character " + target.getObjectId());
// code fixed in next release

or you can also set the L2TeleporterInstance to extend not L2Npc but L2NpcInstance.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
Szponiasty
Advanced User
Advanced User
Posts: 557
Joined: Mon Apr 21, 2008 1:31 pm
Location: Eastern Poland

Re: kill NPC

Post by Szponiasty »

Hitokiri wrote:
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
Whaa? No. isUndead is only to set if its possible or not to use holy skills on them. Nothing to do with killing NPCs.
And in the next chronicle they went into space, fighting the evil empire... In a galaxy far, far away xD
Edelvez
Posts: 173
Joined: Fri Nov 06, 2009 6:32 am
Location: Argentina

Re: kill NPC

Post by Edelvez »

The most unusual that you can only kill Clarissa with a non-gm. Gatekeeper others are not affected... :?
Someone once told me: "The easiest way of doing things, making them the hard way" ;)
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: kill NPC

Post by jurchiks »

Szponiasty wrote: Whaa? No. isUndead is only to set if its possible or not to use holy skills on them. Nothing to do with killing NPCs.
isUndead was removed in the last changeset...
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: kill NPC

Post by _DS_ »

Edelvez wrote:The most unusual that you can only kill Clarissa with a non-gm. Gatekeeper others are not affected... :?
You cam kill npc with non-gm ONLY if you previously killed this npc by gm (and remove invulnerability during it). Next spawned npc will be mortal.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
Edelvez
Posts: 173
Joined: Fri Nov 06, 2009 6:32 am
Location: Argentina

Re: kill NPC

Post by Edelvez »

Well, I did not :D
Someone once told me: "The easiest way of doing things, making them the hard way" ;)
kain13
Posts: 93
Joined: Tue Sep 22, 2009 3:14 pm
Location: UA

Re: kill NPC

Post by kain13 »

_DS_ wrote: You cam kill npc with non-gm ONLY if you previously killed this npc by gm (and remove invulnerability during it). Next spawned npc will be mortal.
This is not true. I install clear server without custom, create character, go to game and I can kill GK.
Way some one from devs, can't just install clear server, from nightly, and test.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: kill NPC

Post by janiii »

i have clean server just for testing and like i already wrote (but nobody seems to read my posts actually) i could not reproduce this bug. only when i killed the gk with a gm, after that i could kill the gk with a normal player. before it i could not. for this i already posted a patch here.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
kain13
Posts: 93
Joined: Tue Sep 22, 2009 3:14 pm
Location: UA

Re: kill NPC

Post by kain13 »

janiii wrote:i have clean server just for testing and like i already wrote (but nobody seems to read my posts actually) i could not reproduce this bug. only when i killed the gk with a gm, after that i could kill the gk with a normal player. before it i could not. for this i already posted a patch here.
sorry don't understand, you test with this http://www.l2jserver.com/nightly/ Server Version=4422 Datapack Version=7669 or with your patch?
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: kill NPC

Post by janiii »

i tested with dev version, which should not be much different in this way from the nightly build. i created the fix after testing your bug. just read my posts again. anybody else can test your bug on a nightly version, ppl already wrote they cannot reproduce it either.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
Hitokiri
Posts: 34
Joined: Tue Oct 19, 2010 6:26 pm

Re: kill NPC

Post by Hitokiri »

Tonight i downloaded the last compiled version of server and tryed to kill Clarissa with admin char first with weapon and nothing happened
The system say
The atack has been blocked.
Than i tried to use //kill command and after she died and respawned i tried to use weapon one more time
System says.
Admin has given Clarissa damage off 889
So i restarted the server and after restart all became normal The atack has been blocked.
Conclusion
There is no such bug as u can kill GK without GM rights only if Admin or GM used command //kill on her.
Do not use //kill on Clarissa only //delete :)
Post Reply