Jump to content
  • 0

Create mob Anti-reflect?


Question

Recommended Posts

  • 0
Posted

U could try something like this

Index: java/com/l2jserver/gameserver/model/actor/L2Character.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/L2Character.java	(revision 432)
+++ java/com/l2jserver/gameserver/model/actor/L2Character.java	(working copy)
@@ -5517,7 +5517,7 @@
				// reduce targets HP
				target.reduceCurrentHp(damage, this, null);

-				if (reflectedDamage > 0)
+				if (reflectedDamage > 0 && !(target instanceof L2Attackable))
				{
					reduceCurrentHp(reflectedDamage, target, true, false, null);


  • 0
Posted

U could try something like this

Index: java/com/l2jserver/gameserver/model/actor/L2Character.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/L2Character.java	(revision 432)
+++ java/com/l2jserver/gameserver/model/actor/L2Character.java	(working copy)
@@ -5517,7 +5517,7 @@
				// reduce targets HP
				target.reduceCurrentHp(damage, this, null);

-				if (reflectedDamage > 0)
+				if (reflectedDamage > 0 && !(target instanceof L2Attackable))
				{
					reduceCurrentHp(reflectedDamage, target, true, false, null);


 

this is for all  L2Monsters L2Raid L2GrandBoss ?

 

answer plz if this working.

  • 0
Posted

this is for all  L2Monsters L2Raid L2GrandBoss ?

 

answer plz if this working.

Not sure but I think yep, u could test it and check.

  • 0
Posted

Hmm... why

!(target instanceof L2Attackable)

 

Sorry if i'm wrong but this will disable reflect for all L2Attackable?

 

sauihasdgiojasdg scratch my last post. I'm talking out of my asshole.

  • 0
Posted

Yes, anything then L2Attackable will have this condition apply to anything which is considered attackable, which from OP's post it seems like this is what he wants.

 

 

Okey but this effect on L2Character...

That means that this actualy disable reflect at all...

Correct me if i'm wrong...

  • 0
Posted

Okey but this effect on L2Character...

That means that this actualy disable reflect at all...

Correct me if i'm wrong...

 

It depends on how you implement it. I know there are standard do_ functions regarding taking damage and attacking. If you modify a do function inside L2Character than you'll also be maybe affecting L2DoorInstance, L2Npc, L2PLayable, and L2Vehicle.

 

I don't know though where these methods are overriden across the entire hierarchy. The safest bet would be to take the highest possible sub class and override it's do_ functions.

  • 0
Posted

U could try something like this

Index: java/com/l2jserver/gameserver/model/actor/L2Character.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/L2Character.java	(revision 432)
+++ java/com/l2jserver/gameserver/model/actor/L2Character.java	(working copy)
@@ -5517,7 +5517,7 @@
				// reduce targets HP
				target.reduceCurrentHp(damage, this, null);

-				if (reflectedDamage > 0)
+				if (reflectedDamage > 0 && !(target instanceof L2Attackable))
				{
					reduceCurrentHp(reflectedDamage, target, true, false, null);


 

Anyway my mind is that i would never use this... if i wanted to do the same :D

  • 0
Posted

It's a bit odd how it's setup in the code. It would appear that almost everything related to the player attacking any potentional target is done through doAttack of L2Character, including taking HP away from the target.

 

This isn't really how I'd set it up. I had for some reason an idea that these objects also had event style methods for taking damage, in which case I'd just send the damage on it's way via doTakeDamage(). Inside that method I'd override the behavior I wanted, for example all types of this instance cannot be hurt by said damage.

 

EDIT: Infact I'll add that now

public void doTakeDamage(L2Character target) { L2Character.this.doTakeDamage(target); }

// Use @Override in the appropriate instance
protected abstract void doTakeDamage(L2Character target);

 

Now I just need to organize that heap of shit method doAttack.

  • 0
Posted

Bump. I wanted to have some kind of visual illustration of how all the 'instances' for players and npcs were sub and super classing each other. The next puzzle is to figure out what they did where as it's not completely sensical. Either way here's the image:

 

H9sOcn7.jpg

  • 0
Posted

Bump. I wanted to have some kind of visual illustration of how all the 'instances' for players and npcs were sub and super classing each other. The next puzzle is to figure out what they did where as it's not completely sensical. Either way here's the image:

 

H9sOcn7.jpg

 

You are nuts :D

  • 0
Posted

You are nuts :D

 

nothing special, he just followed the extends, extends extends exntends, or just followed the @override...

 

why not just L2MonsterInstance? L2RaidBoss and L2GrandBoss extends it

Guest
This topic is now closed to further replies.



  • Posts

    • New release   World & atmosphere   - Grass is back — terrain grass now grows across the world like the original client, with settings for on / original-style / off, two sway styles, and optional grass shadows.   - Day/night and the sky now follow the game server, including sunrise, sunset, Seven Signs skies, and red-sky events. A manual override remains available in settings.   - Doors are now live — castle and town doors open and close according to the server, can be targeted, and display their health.   - Earthquake events now shake the screen and play their original rumble sounds.    Map & navigation   - New live minimap — an always-on radar with a rotating player arrow, party, target and NPC markers, zone labels, hover tooltips, three zoom levels, and collapse and resize controls. Clicking it opens the full world map.   - Zone titles now fade onto the screen when you enter a new region.   - The world map now displays your current zone name and party-member positions.   Combat & effects   - Enchanted weapons now glow properly, complete with drifting wisps, across every weapon type — including on the character selection screen.   - Soulshot, Spiritshot, Fishing Shot, and Beast Shot activations now play their original flashes and sounds. A new “hide shot effects” option is available if you prefer not to see them.   - Item-use visuals have been restored — potions, antidotes, echo crystals, fireworks, and other usable items now play their proper effects.   - Skill damage now displays floating damage numbers, and critical skill hits shake the camera.   - New buff bar — active buffs, debuffs, and toggles now appear as icons above the HUD.   - Bow skills now nock and release their arrows at the correct animation moments.   Shops & items   - NPC shops now work — a complete buy window with prices, weight and Adena totals, stock limits, and a quantity dialog for stackable items.   - Player-to-player trading now works, including timed trade requests, complete inventory and offer panes, quantity selection for stackable items, weight preview, confirmation locking, cancellation, and trade completion.   - Item enchanting now works — using an enchant scroll opens the original-style item selection window with enchant levels and full item tooltips, plus proper selection and cancellation handling.   - Item cooldowns, including potions and similar items, now appear on the shortcut bar.   - Item tooltips and the inventory window have received further polish.   - Weapon tooltips now correctly identify weapon classes and calculate enchant-adjusted P. Atk. values for bows, two-handed weapons, fists, and dual swords.   Chat & commands   - Slash commands now work, including /time, /loc, and other server commands. GM accounts can also use // admin commands.   - Action commands can now be entered directly in chat, including sit/stand, walk/run, normal and forced attacks, trade, target next, pickup, assist, party actions, social emotes, and duels.   - System messages can optionally be separated into their own window, and the chat font size is adjustable.   - Server event announcements now appear on screen as they did in the original client.   Interface   - A live animated portrait of your character now appears beside the HP and MP bars.   - The client now ships with its own Tahoma and Noto Sans fonts, allowing text to work across languages. Chat and nameplate fonts can be selected in the new Fonts settings section.   - The target window has been refined — clicking the level chip now expands or collapses the window.   - NPC dialog windows have received additional polish, including proper window titles and button labels. Download from the launcher you have installed or at https://updates.fermata.gg/ if you don't have the launcher
    • Damn there are still people that value Lineage! Great job Elfo as always!
    • Payment Methods Credit/Debit Card, PayPal, Wise, Payoneer, Binance Pay, Bybit, Crypto, and other supported payment options depending on availability. Delivery Time / TAT General delivery time: Instants to 24 hours Depended on Products. Some products may take longer depending on stock, account eligibility, product type, payment confirmation, or activation requirements. Refund & Replacement Policy If we cannot deliver the product within the confirmed delivery time and you do not want to wait, you are eligible for a refund. If the account, gift link, gift code, or activation does not work at first login/activation, please contact us within 24 hours with screen recording proof before start purchasing. If the product is successfully delivered and activated, refund is not available unless a specific warranty was mentioned for that product. Warranty period depends on the product type. Some products may include replacement support for a limited period. Please ask before ordering if warranty is important. No refund/replacement is available if the buyer shares account details, changes recovery/security settings without asking, uses VPN/proxy in a risky way, violates platform rules, fails to provide proof, or changes their mind after successful use. If a platform changes its policy, eligibility, country availability, or subscription system after delivery, we will try to help, but we cannot control third-party platform changes. Important Notes Stock may be limited for some products at klouditem. Prices may change depending on market, stock, and product availability. Some services may require your personal email/account for upgrade. Some services are ready-made accounts only. Some products may have country or account eligibility requirements. Please read the product details before ordering. We do not claim to be an official partner of any platform unless clearly stated by the platform itself. Product names and logos belong to their respective owners. Review Copies Review copies are not always available. If we open a review copy round, we will announce it in this thread and select qualified members based on account history, activity, and availability. Please do not request review copies unless we have announced them. FAQ Q: Do you deliver instantly? A: Delivery is usually Instant to 24 hours, depending on stock and payment confirmation. Q: Can I upgrade my own account? A: Some services support own account upgrade, while others are ready-made account only. Please ask before ordering. Q: Do you provide support after delivery? A: Yes, we provide support for login, activation, and basic setup issues related to the delivered product. Q: Can I check stock before payment? A: Yes, please ask before payment. We will confirm stock and delivery time first. Q: Are prices fixed? A: Some prices are fixed, and some depend on stock/package. Q: What should I do if I face an issue? A: Contact us as soon as possible with clear screenshot or screen recording proof from purchase, and we will check it.   Contact Buy Now: https://klouditem.com Telegram Support: https://t.me/Klouditem
    • https://prnt.sc/MCxO-vS1MHuA how to zoom in? and on every click ad popup.. nonsense.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..