Quote:
Originally Posted by Fot@r@s
I don't know how to edit the AI and for that reason i copy&paste a regular AI guard  . I don't think that is something fantastick or difucult to make. I just share it for tha lazys...
|
I cant stop laughing hahahahaha
He made a awesome NPC!! he copy & paste TALK_SELECTED handler from other NPC... that has nothing to do with PK... or whatever... this man have absolute no idea what he is doing...
First... that guard works because you are using a super class guard_stand, but in your code there is nothing at all.. so.. when you say.. "Maybe needs some corrections" ... there is nothing to change since isnt code...
This AI will have the same effect...
Code:
class 1 pk_killer : guard_stand
class_end
And second... are you going to spawn that npc in every single GK spawn ?... because there are more than 200. I have exactly 227, but i know some of them are too close... so.. like 200... but them... your guard is going to kill each single player appaers with karma in that place..
And the last thing... the handler in charge of attack PKs will be SEE_CREATURE.
Something like...
Code:
EventHandler SEE_CREATURE(creature)
{
if (creature.karma > 0)
{
AddAttackDesire(creature,1,1500);
}
}
But you will have a new problem... players that convert into PK in front of the guard will not be attacked, but in exchange, your guard will kill for example.. people comming from Clan Hall that want to low their karma...
NOTE: You dont need to create a new guard, you can simple spawn "bowman" NPC where you want.