FFs Posted July 12, 2011 Posted July 12, 2011 Hi, i need some help here. Tryskell tryed to explain me that but i dont understand it so much :S I need help to make the pets dont hit the players. I think something like: if L2Character, pet can hit=false; return;
0 UnixCode Posted July 13, 2011 Posted July 13, 2011 if L2Character, pet can hit=false; return; this i will tell you is just an example: you need something like: boolean canhit = false if (this instanceof L2PetInstance) canhit = false; if (!x.canhit) return; Now, where to add them i can't tell you i dont have eclipse to explain you now. but that's the way i think
0 Tryskell Posted July 13, 2011 Posted July 13, 2011 if L2Character, pet can hit=false; return; this i will tell you is just an example: you need something like: boolean canhit = false if (this instanceof L2PetInstance) canhit = false; if (!x.canhit) return; Now, where to add them i can't tell you i dont have eclipse to explain you now. but that's the way i think <______________________________< It's not really better than FFs "idea code". RequestActionUse clientpacket, search for case 22: // Attack (pet attack) You got the whole code about the "green attack button" from pet panel. The 3 useful variables are pet, activeChar and target. There are already many checks in this part of code you can compare and code your idea using it.
0 FFs Posted July 13, 2011 Author Posted July 13, 2011 Thanx, my friend Rizel helped me and it works with this code: if(this instanceof L2PetInstance && target instanceof L2PcInstance) return; But now i need pets dont hit with skills. How i do that or where i put this code?
0 Tryskell Posted July 14, 2011 Posted July 14, 2011 Same packet, top bottom, you got useSkill() method.
0 FFs Posted July 14, 2011 Author Posted July 14, 2011 Same packet, top bottom, you got useSkill() method. No useSkill() method. Only: doCast
0 Tryskell Posted July 14, 2011 Posted July 14, 2011 From not reworked IL to last beta HI5, it's useSkill(). I still talk of RequestActionUse clientpacket.
0 FFs Posted July 14, 2011 Author Posted July 14, 2011 From not reworked IL to last beta HI5, it's useSkill(). I still talk of RequestActionUse clientpacket. Fixed, close the topic :) Thanx Rizel and Thanx Tryskell :)
0 Justice Posted July 14, 2011 Posted July 14, 2011 Fixed, close the topic :) Thanx Rizel and Thanx Tryskell :) Locked.
Question
FFs
Hi, i need some help here.
Tryskell tryed to explain me that but i dont understand it so much :S
I need help to make the pets dont hit the players.
I think something like:
9 answers to this question
Recommended Posts