Hello.. I am making a mod, where you can get territories... but i have a small problem. I have some NPC which are guards, and they hit the enemies... the problem is that when i hit the flag, and i take the territorry, the guards still hit me.. if i go back to the base, and go again, they won't hit me... the same with the enemies, if they go near guards, while near the flag, if they go near the guards the guards does not hit him. Also it takes a lil bit time to attack...
I used code like this:
int hating2 = npc.getHating(target);
if (hating2 == 0)
npc.addDamageHate(target, 5000, 5000);
setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
this code in L2AttackableAI.java, in ThinkActive...
maybe another idea to make it faster and work as I want? thanks in advance.
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 :
https://discord.com/users/325653525793210378
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/uthciha-services
https://campsite.bio/utchihaamkt
Question
[DEV]DjSt3rios
Hello.. I am making a mod, where you can get territories... but i have a small problem. I have some NPC which are guards, and they hit the enemies... the problem is that when i hit the flag, and i take the territorry, the guards still hit me.. if i go back to the base, and go again, they won't hit me... the same with the enemies, if they go near guards, while near the flag, if they go near the guards the guards does not hit him. Also it takes a lil bit time to attack...
I used code like this:
this code in L2AttackableAI.java, in ThinkActive...
maybe another idea to make it faster and work as I want? thanks in advance.
6 answers 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.