I remember in C1, when a player attacked a NPC inside cities (like GKs) the NPCs started running to the player and hitting him (like a guard does) and the NPC is always invul..
So...I'm trying to do this in my Interlude L2jFree server...
I tried to put this code in onAction method:
else if(!isAutoAttackable(player))
{
// Check if the L2PcInstance is in the _aggroList of the L2GuardInstance
if (containsTarget(player))
{
if (_log.isDebugEnabled()) _log.debug(player.getObjectId()+": Attacked guard "+getObjectId());
// Set the L2PcInstance Intention to AI_INTENTION_ATTACK
The method containsTarget(L2PcInstance) is undefined for the type L2NpcInstance
I took that added part from L2GuardInstance and I belive it's what makes the Guard hitting back...I studied the code and saw that L2GuardInstance is extended by L2Attackable while L2NpcInstance is extended by L2Character...
So, any suggestion to help me fix this problem and see my npcs hitting back? :P
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hoodservices
https://campsite.bio/utchihaamkt
Using Sunrise Hi5 pack latest SVN release. I killed a LOT of mobs and nothing dropping, I havent tried ALL of the quests because theres a bunch of them but I was assuming if these two quests dont work the others arent.
I was thinking about doing this but then I have to make shops for everyone to buy things. Was hoping there was something I was missing or had turned off....
Question
KaL
Hi all...
I remember in C1, when a player attacked a NPC inside cities (like GKs) the NPCs started running to the player and hitting him (like a guard does) and the NPC is always invul..
So...I'm trying to do this in my Interlude L2jFree server...
I tried to put this code in onAction method:
But it returns this error:
I took that added part from L2GuardInstance and I belive it's what makes the Guard hitting back...I studied the code and saw that L2GuardInstance is extended by L2Attackable while L2NpcInstance is extended by L2Character...
So, any suggestion to help me fix this problem and see my npcs hitting back? :P
Thanks
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.