Jump to content
  • 0

[Help] Pets dont hit Characters


Question

Posted

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;

9 answers to this question

Recommended Posts

  • 0
Posted

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
Posted

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
Posted

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
Posted

Same packet, top bottom, you got useSkill() method.

 

No useSkill() method.

Only: doCast

  • 0
Posted

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 :)

Guest
This topic is now closed to further replies.


  • Posts

    • Hello guys, gh0t from gh0tstudio here. This time we are putting to sale this beafitul landing page for your next server. Lineage 2 Server Landing Page Template u can check it here LINEAGE 2 DEMO SITE   Technology Stack - React 18 with TypeScript - Tailwind CSS for styling - Framer Motion for animations - Vite for fast development and builds - Multi-language support (i18n ready) Responsive Design The template is fully responsive and optimized for all screen sizes. Desktop, tablet, and mobile layouts have been carefully crafted to provide the best user experience on any device. The mobile version includes a unique notch-style hero design with custom clip paths. What is Included - Complete landing page source code - Hero section with parallax scroll effect - Server information section with animated cards - Character classes showcase with interactive gallery - Registration form (frontend only, styled and validated) - Donation packages display section - Download section for game client - Sticky navigation with transparency effects - Footer with social links - Multi-language system (Spanish/English ready) - All animations and transitions - Clean, documented code structure - Easy to customize colors and content   What is Not Included - Backend server or API - User registration panel/dashboard - Payment processing system for donations - Database integration - Connection to L2 game server - Online player counter module - Account management system - Hosting or domain   The template provides the complete frontend experience.  Price: $150 USD     Contact For purchase inquiries or questions about the template, please reach out directly.
    • 流量套利 + SMM 面板 — 强大的增长组合. 通过社交信号加强推广活动,提高信任度和转化率,加速扩张。 为套利专员和 SMM 提供的所有工具 — 在一个地方. 有效链接: SMM 面板: 前往 – 推广您的社交媒体账户。 其他服务和产品: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram 信使方便访问商店。 虚拟号码服务: 前往 用于购买 Telegram Stars 的 Telegram 机器人: 前往 – 在 Telegram 中快速且优惠地购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们想向您展示当前促销和特别优惠列表,用于购买我们服务的产品和服务: 1. 您可以在首次购买时使用促销代码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣——只需在我们网站注册后按以下模板填写您的用户名:"SEND ME BONUS, MY USERNAME IS..." ——您需要在我们的论坛主题中发布! 3. SMM 面板首次试用可获得 $1:只需在我们的网站(Support)提交主题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道和 Stars 购买机器人中每周都会赠送 Telegram Stars! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式和支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock