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.
❖Items that are sent by physical delivery are sent using someone else's data. That is, if you are not able to accept the parcel, we will not be able to return it. Please keep this in mind.
READY IN STOCK
PAYMENT SYSTEMS
4x4 io, Weststein, Paysafecard, Paysend, Genome, Conotoxia, Mybrocard, Payz Silver, Pockit UK, NagaPay, Volet com, SpectroCoin, SwissMoney, Yuh, Lydia / Sumeria, Ka.App, Wittix, Western Union, MyGuava, Xapo Bank, Bunq on emulator (DE, NL, FR, ES, IE ibans), Revolut on emulator (UK/EU), ICard, BlackCatCard, Vivid DE, Bankera, Bitsa, Wise EU/UK, N26 DE/ES on emulator, Skrill, Neteller, Trasta, Wirex, Lama, Paysera, Moneyjar
CRYPTOEXCHANGE
BINGX com, Bybit LVL 2, KuCoin, Binance LVL 2, Mexc, Latoken, Poloniex, Bitmart, Kraken, WhiteBit, Quppy, Nexo, Gate, OKX, Paybis, Paxful, Huobi (HTX), xcoins com, Bit2Me
BUSINESS ACCOUNTS
Stripe, Payoneer EU, Wise Business UK/EU, Revolut Business EU/UK, N26 Business DE, Wallester Business EU, Kraken Business Pro, Monzo Business, Vivid Business, Zen Business EU, Millennium Business PL, AirWallex EU/UK, Finom business, PayPal business, Payset business
NATIONAL BANKS / BANKS
BBVA, CommerzBank, ING, Santander, Kaspi Bank, Sberbank, AlfaBank, Tbank, Raiffeisen, mBank, Paribas, Bereke Bank, Kapital Bank
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hood-services
https://campsite.bio/utchihaamkt
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
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.