JoeDaFlow Posted March 20, 2010 Posted March 20, 2010 Hello guys, i was wondering how can i make my Pk-Guard smarter so he detects Hide, Silent move etc?
0 newname Posted March 20, 2010 Posted March 20, 2010 you need to change his instance so its java, anyway.. i dont have that one anymore, but if you post the handle cast code.. im sure i can try to help you more..
0 imacopycat3 Posted March 20, 2010 Posted March 20, 2010 L2GuardInstance... maybe this can help you. Index: L2JEclipse-Game/java/net/sf/l2j/gameserver/model/actor/instance/L2GuardInstance.java =================================================================== --- L2JEclipse-Game/java/net/sf/l2j/gameserver/model/actor/instance/L2GuardInstance.java (revision 649) +++ L2JEclipse-Game/java/net/sf/l2j/gameserver/model/actor/instance/L2GuardInstance.java (working copy) @@ -202,11 +203,19 @@ @Override public void onAction(L2PcInstance player) { - if (!canTarget(player)) return; + if (!canTarget(player)) + return; // Check if the L2PcInstance already target the L2GuardInstance if (getObjectId() != player.getTargetId()) { + + if (!player.isAlikeDead() || player.isFakeDeath()) + return; + + if (!player.isSilentMoving()) + return; + if (Config.DEBUG) _log.fine(player.getObjectId()+": Targetted guard "+getObjectId()); // Set the target of the L2PcInstance player
0 down Posted March 20, 2010 Posted March 20, 2010 try to add in L2AttackableAI.java find: if (!(me instanceof L2RaidBossInstance) && player.isSilentMoving() && !player.isCastingNow() && !player.isAttackingNow()) return false; and make it: if (!(me instanceof L2RaidBossInstance) && !(me instanceof L2GuardInstance) && player.isSilentMoving() && !player.isCastingNow() && !player.isAttackingNow()) return false;
Question
JoeDaFlow
Hello guys, i was wondering how can i make my Pk-Guard smarter so he detects Hide, Silent move etc?
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now