Jump to content

[Share]Mob Drop Preview Panel


Darule

Recommended Posts

Hi there i'd like to share a Drop Preview Panel for Mobs.

 

So what this system does?

When you Shift + Click a mob you can view its Drops.

 

Drop Preview Panel Supports: (for each item)

Item Icon

Item Name

Item Min+Max Drop

Item Drop Quantity

Item Percentage Drop % (enhanced for low drops)

 

 

Here is a preview pic of the system

droppreview.png

 

This is the patch file for the latest action shift for l2jhi5.

 

Index: L2NpcActionShift.java
===================================================================
--- L2NpcActionShift.java	(revision 8584)
+++ L2NpcActionShift.java	(working copy)
@@ -183,77 +183,13 @@
				activeChar.sendPacket(su);
			}

-			NpcHtmlMessage html = new NpcHtmlMessage(0);
-			int hpMul = Math.round((float)(((L2Character)target).getStat().calcStat(Stats.MAX_HP, 1, (L2Character)target, null) / BaseStats.CON.calcBonus((L2Character)target)));
-			if (hpMul == 0)
-				hpMul = 1;
-			final StringBuilder html1 = StringUtil.startAppend(
+			NpcHtmlMessage html = new NpcHtmlMessage(0);final StringBuilder html1 = StringUtil.startAppend(
					1000,
-					"<html><body>" +
-					"<br><center><font color=\"LEVEL\">[Combat Stats]</font></center>" +
-					"<table border=0 width=\"100%\">" +
-					"<tr><td>Max.HP</td><td>",
-					String.valueOf(((L2Character)target).getMaxHp() / hpMul),
-					"*",
-					String.valueOf(hpMul),
-					"</td><td>Max.MP</td><td>",
-					String.valueOf(((L2Character)target).getMaxMp()),
-					"</td></tr>" +
-					"<tr><td>P.Atk.</td><td>",
-					String.valueOf(((L2Character)target).getPAtk(null)),
-					"</td><td>M.Atk.</td><td>",
-					String.valueOf(((L2Character)target).getMAtk(null, null)),
-					"</td></tr>" +
-					"<tr><td>P.Def.</td><td>",
-					String.valueOf(((L2Character)target).getPDef(null)),
-					"</td><td>M.Def.</td><td>",
-					String.valueOf(((L2Character)target).getMDef(null, null)),
-					"</td></tr>" +
-					"<tr><td>Accuracy</td><td>",
-					String.valueOf(((L2Character)target).getAccuracy()),
-					"</td><td>Evasion</td><td>",
-					String.valueOf(((L2Character)target).getEvasionRate(null)),
-					"</td></tr>" +
-					"<tr><td>Critical</td><td>",
-					String.valueOf(((L2Character)target).getCriticalHit(null, null)),
-					"</td><td>Speed</td><td>",
-					String.valueOf(((L2Character)target).getRunSpeed()),
-					"</td></tr>" +
-					"<tr><td>Atk.Speed</td><td>",
-					String.valueOf(((L2Character)target).getPAtkSpd()),
-					"</td><td>Cast.Speed</td><td>",
-					String.valueOf(((L2Character)target).getMAtkSpd()),
-					"</td></tr>" +
-					"<tr><td>Race</td><td>",
-					((L2Npc)target).getTemplate().getRace().toString(),
-					"</td><td></td><td></td></tr>" +
-					"</table>" +
-					"<br><center><font color=\"LEVEL\">[basic Stats]</font></center>" +
-					"<table border=0 width=\"100%\">" +
-					"<tr><td>STR</td><td>",
-					String.valueOf(((L2Character)target).getSTR()),
-					"</td><td>DEX</td><td>",
-					String.valueOf(((L2Character)target).getDEX()),
-					"</td><td>CON</td><td>",
-					String.valueOf(((L2Character)target).getCON()),
-					"</td></tr>" +
-					"<tr><td>INT</td><td>",
-					String.valueOf(((L2Character)target).getINT()),
-					"</td><td>WIT</td><td>",
-					String.valueOf(((L2Character)target).getWIT()),
-					"</td><td>MEN</td><td>",
-					String.valueOf(((L2Character)target).getMEN()),
-					"</td></tr>" +
-					"</table>"
+					"<html><head><title>"+((L2Npc) target).getName()+"</title><body><table bgcolor=444444 border=1 cellspacing=2 cellpadding=0 width=293><tr><td align=center>Drop Panel</td></tr></table><br><table  bgcolor=333333 cellpadding=0 cellspacing=0 width=274><tr><td align=center><font color=fff600>Legend</font></td></tr></table><table bgcolor=333333 width=276><tr><td align=center>[D]= Drop   [s]= Spoil   [Q]= Quest</td></tr><tr><td align=center>(CI)= Common Item</td></tr></table><br><table bgcolor=444444 cellspacing=2 cellpadding=1 border=1 width=280>"
			);

			if (!((L2Npc) target).getTemplate().getDropData().isEmpty())
			{
-				StringUtil.append(html1,
-						"<br><center><font color=\"LEVEL\">[Drop Info]</font></center>" +
-						"<br>Rates legend: <font color=\"ff9999\">50%+</font> <font color=\"00ff00\">30%+</font> <font color=\"0066ff\">less than 30%</font>" +
-						"<table border=0 width=\"100%\">"
-				);
				for (L2DropCategory cat : ((L2Npc)target).getTemplate().getDropData())
				{
					for (L2DropData drop : cat.getAllDrops())
@@ -261,31 +197,76 @@
						final L2Item item = ItemTable.getInstance().getTemplate(drop.getItemId());
						if (item == null)
							continue;
+						int mind = 0,maxd = 0;
+						String smind = null,smaxd = null,drops = null;
+						String name = item.getName();
+						double chance = 100/(1000000/(drop.getChance()));

-						final String color;
-						
-						if (drop.getChance() >= 500000)
-							color = "ff9999";
-						else if (drop.getChance() >= 300000)
-							color = "00ff00";
+						if (cat.isSweep())
+						{
+							mind = (int) (Config.RATE_DROP_SPOIL * drop.getMinDrop());
+							maxd = (int) (Config.RATE_DROP_SPOIL * drop.getMaxDrop());
+						}
+						else if (drop.getItemId()==57)
+						{
+							mind = 300 * drop.getMinDrop();
+							maxd = 300 * drop.getMaxDrop();
+						}
						else
-							color = "0066ff";
+						{
+							mind = (int) (Config.RATE_DROP_ITEMS * drop.getMinDrop());
+							maxd = (int) (Config.RATE_DROP_ITEMS * drop.getMaxDrop());
+						}
+						if (mind > 999999)
+						{
+							DecimalFormat df = new DecimalFormat("###.#");
+							smind = df.format(((double)(mind))/1000000)+" KK";
+							smaxd = df.format(((double)(maxd))/1000000)+" KK";
+						}
+						else if (mind > 999)
+						{
+							smind = ((int)(mind/1000))+" K";
+							smaxd = ((int)(maxd/1000))+" K";
+						}

+						else
+						{ 
+							smind = Integer.toString(mind);
+							smaxd = Integer.toString(maxd);
+						}
+						if (chance <= 0.001)
+						{
+							DecimalFormat df = new DecimalFormat("#.####");
+							drops = df.format(chance);
+						}
+						else if (chance <= 0.01)
+						{
+							DecimalFormat df = new DecimalFormat("#.###");
+							drops = df.format(chance);
+						}
+						else
+						{
+							DecimalFormat df = new DecimalFormat("##.##");
+							drops = df.format(chance);
+						}
+						if (name.startsWith("Common Item - "))
+						{
+							name = "(CI)" + name.substring(14);
+						}
+						if (name.length() >= 36)
+						{
+							name = name.substring(0, 33) + "...";
+						}
						StringUtil.append(html1,
-								"<tr>",
-								"<td><img src=\"" + item.getIcon() + "\" height=32 width=32></td>" + 
-								"<td><font color=\"", color, "\">", item.getName(), "</font></td>",
-								"<td>", (drop.isQuestDrop() ? "Quest" : (cat.isSweep() ? "Sweep" : "Drop")),"</td>",
-								"</tr>"
-						);
+						"<tr><td valign=top align=center height=38 width=40><img src=\""+item.getIcon()+"\" height=32 width=32></td><td><table cellpadding=0 cellspacing=1 width=237><tr><td>"+drops+"%</td></tr><tr><td>"+(drop.isQuestDrop() ? "[Q]" : (cat.isSweep() ? "[s]" : "[D]"))+"<font color=fff600>"+name+"</font>"+(maxd==1 ? "[1]" : "["+smind+" - "+smaxd+"]") + "</td></tr></table></td>"
+                        );
					}
				}
-				html1.append("</table>");
			}
-			html1.append("</body></html>");
-			
+			html1.append("</tr></table></body></html>");
			html.setHtml(html1.toString());
			activeChar.sendPacket(html);
+		
		}
		return true;
	}

 

This code can be done better, if you have any suggestion tell me here. We can do this with a config file too for more options.

Link to comment
Share on other sites

Try deleting the border to the table (table border=0), deleting the quest drop items who are shown on the droplist (i supouse).

The [D]Drop and [s Spoil delete the [s and [D] and put the indications with colors.

That would be a nice code :)

I'll try to do it by myself and if you want i can post it :)

Very good share, and keep sharing :D

Link to comment
Share on other sites

I havent test it on Interlude, maybe you need some adaptions for it.

Is there a file for shift clicking mobs on il like the L2NpcActionShift.java if yes then you can try it.

Link to comment
Share on other sites

Thanks for the share... But onlu handy for those who like to use the shift+click feature in theirs production server,... a questios, did the properties have already something like shift+click drop list?

Link to comment
Share on other sites

Thanks for the share... But onlu handy for those who like to use the shift+click feature in theirs production server,... a questios, did the properties have already something like shift+click drop list?

 

Stop using the google translator man...

Link to comment
Share on other sites

Thanks for the share... But onlu handy for those who like to use the shift+click feature in theirs production server,... a questios, did the properties have already something like shift+click drop list?

 

Yes the feature is only for servers that want to use such a feature, btw as you said there is in the configs  a shift+click feature already but its not like this system.

Link to comment
Share on other sites

  • 4 weeks later...

Erro L2Brick server

 

 

 

----------

1. ERROR in D:\L2Brick-Rev1608\game\data\scripts\handlers\actionhandlers\L2NpcAc

tionShift.java (at line 38)

        public class L2NpcActionShift implements IActionHandler

                    ^^^^^^^^^^^^^^^^

The type L2NpcActionShift must implement the inherited abstract method IActionHa

ndler.getInstanceType()

----------

2. ERROR in D:\L2Brick-Rev1608\game\data\scripts\handlers\actionhandlers\L2NpcAc

tionShift.java (at line 228)

        DecimalFormat df = new DecimalFormat("000.0");

        ^^^^^^^^^^^^^

DecimalFormat cannot be resolved to a type

----------

3. ERROR in D:\L2Brick-Rev1608\game\data\scripts\handlers\actionhandlers\L2NpcAc

tionShift.java (at line 228)

        DecimalFormat df = new DecimalFormat("000.0");

                              ^^^^^^^^^^^^^

DecimalFormat cannot be resolved to a type

----------

4. ERROR in D:\L2Brick-Rev1608\game\data\scripts\handlers\actionhandlers\L2NpcAc

tionShift.java (at line 245)

        DecimalFormat df = new DecimalFormat("0.0000");

        ^^^^^^^^^^^^^

DecimalFormat cannot be resolved to a type

----------

5. ERROR in D:\L2Brick-Rev1608\game\data\scripts\handlers\actionhandlers\L2NpcAc

tionShift.java (at line 245)

        DecimalFormat df = new DecimalFormat("0.0000");

                              ^^^^^^^^^^^^^

DecimalFormat cannot be resolved to a type

----------

6. ERROR in D:\L2Brick-Rev1608\game\data\scripts\handlers\actionhandlers\L2NpcAc

tionShift.java (at line 250)

        DecimalFormat df = new DecimalFormat("0.000");

        ^^^^^^^^^^^^^

DecimalFormat cannot be resolved to a type

----------

7. ERROR in D:\L2Brick-Rev1608\game\data\scripts\handlers\actionhandlers\L2NpcAc

tionShift.java (at line 250)

        DecimalFormat df = new DecimalFormat("0.000");

                              ^^^^^^^^^^^^^

DecimalFormat cannot be resolved to a type

----------

8. ERROR in D:\L2Brick-Rev1608\game\data\scripts\handlers\actionhandlers\L2NpcAc

tionShift.java (at line 255)

        DecimalFormat df = new DecimalFormat("00.00");

        ^^^^^^^^^^^^^

DecimalFormat cannot be resolved to a type

----------

9. ERROR in D:\L2Brick-Rev1608\game\data\scripts\handlers\actionhandlers\L2NpcAc

tionShift.java (at line 255)

        DecimalFormat df = new DecimalFormat("00.00");

                              ^^^^^^^^^^^^^

DecimalFormat cannot be resolved to a type

----------

10. ERROR in D:\L2Brick-Rev1608\game\data\scripts\handlers\actionhandlers\L2NpcA

ctionShift.java (at line 279)

        }

        ^

Syntax error, insert "}" to complete ClassBody

----------

 

Link to comment
Share on other sites

working for interlude, but IL don't have getIcon() so there is two way:

1) remove getIcon, but then you dont see icon

2) add getIcon(), its easy, but you need to add all icons to etc, armor and weapons.sql

 

btw, interlude dont have L2NpcActionShift.java, so we add to L2NpcInstance this code.

Link to comment
Share on other sites

  • 3 weeks later...

wow amazing share where all servers need (low rate)

 

thx for share keep ur work

 

Thanks a lot, although i think that even high rate servers can use it too, its good for the player to know the drops cause they are sometimes distrustfull xD

Link to comment
Share on other sites

  • 9 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Hello members of the forum! We offer hosting services for a different range of services: - ip spoofing; - scanning; - phishing; - botnets; - proxy; - gambling; - stealers; - legal adult; Prices: - VPS starting at $24; - Dedicated servers  starting at  $110; Contctats: layer0.ltd@gmail.com Telegram: @layer0_ltd Discord: layer0.ltd#6843 site: layer0.ltd
    • OUR OFFICIAL WEBSITE / FORUM - MILLENNIUM-HOOK.NET CHEAT DESCRIPTION: Our CS2 cheat is a premium cheat which provides a ton of features for legit gamplay. The cheat was created specifically for strong leagues and anti-cheats such as Faceit, 5EWin, Gamersclub, Esportal and many others. This cheat is perfect for players who want a safe undetected and reliable multi-hack while dominating their opponents and winning the game in their own style. To ensure maximum security of our cheat, we use more than 15+ methods of protection (for example, String Encryption, PE Header Erased, Code Mutation and much more that we cannot talk about for security reasons). Settings are directly configurable via a superb looking in-game menu or over our online «Cloud Panel». Our product is constantly receiving updates in collaboration with the our coders community and suggestions by you! SUPPORTED ANTI-CHEATS: (read more on official website) - VAC (Valve Anti-Cheat) - MM (Matchmaking) - FACEIT Server-Side - FACEIT Client - CEVO / Gfinity - EAC (Easy Anti-Cheat) - ESL Wire - 5EWin / 5EPlay - Perfect World - Gamersclub - Esportal - WePlay - ESEA Our CS2 cheat has a limited number of slots to ensure greater product security! (Available slots check on official website) FEATURES: AIMBOT: - Bone Aimbot (Legit aimbot that doesn't use any angle code that other competitors use. It aims in a legitimate fashion) - Bone and Multibone (Adjust which bone to aim at or select as many Bones as you want) - Smoothaim (Adjust how smooth the aimbot is in its human-like drag) - CloseAim (Toggle distance based aiming algorithm, for increased stickyness, or whoever is closest to the crosshair) - FoV (Adjust the Field of View of the aimbot or percentage of the screen that the aimbot will target enemies from) - Aimkey (Adjust which key the aimbot will use to aim) - AimDraw (Toggle the drawing of the aimspot on enemies (Visible/Always) - VisibleCheck (Visible checking on enemies with close enemy) - NoHop (Aim at One Target per press of the AimKey (Aimbot Doesn't Hop to Other Targets even after death) - RandomSpot (Randomizes the Spot around the target bones, making your aim look more humanized and legit) - Aimtime (Amount of time that the aimbot and Aimbot-RCS is active for, after you press the aimkey) - Ammo Management (Disable aimbot and TriggerBot when the gun clip is empty) - CloseFoV (Different FoV for players with in a certain distance (CloseFOV Distance) - AimOnShoot (Aim when shooting, aim when not shooting) - RecoilAfter (Start recoil after x bullets (Good for 1-2 Taps) - Recoil (Adjust the recoil counter while using the aimbot) - RecoilKey (Adjust which key the anti-recoil is set on (For all Aimbot Keys) - RecoilType (Control if recoil control is always on or only when using the Aimbot) - RecoilFOV (Adjust how long the Recoil will stay stuck to the target, very usable for when playing at a LAN) TRIGGERBOT: - TriggerBot (Automatically shoot at an enemy in a radius (usable with or without Aimbot) - TriggerKey (Control what key activates the TriggerBot (use with any key) - TriggerFov (Control the radius around the AimSpot which activates the TriggerBot) - TriggerDraw (Draw the bone spot that the TriggerBot is aiming at) - TriggerBone (Select the bone that the TriggerBot will target) - TriggerDelay (To add to the legitimacy of the TriggerBot, delays shooting for up to 0.5 seconds) - MonsterTrigger (Extremely Fast & Accurate TriggerBot with Fullbody Options Perfect TriggerBot) - VisCheck (Make sure you're only hitting enemies that you can see, or turn it off to get some sick wallbangs) - Random Delay (A random delay for your trigger bot to look even more legitimate) - Trigger Button (Use any button you like to control the triggerbot) ESP: - Name (Name of the player) - Health (Shows the current health of a player) - Armor (Shows the current amount of armor a player has) - ArmorType (Show if a player currently has a Kevlar vest, a helmet or both equipped) - Weapon (See what weapon a player is currently holding) - Weapon Ammo (See how much ammo you have left in the current clip) - Index (The internal index of the player based on the CSGO engine) - Distance (The distance of each player from you) - Box (A box around each players model, adjusting with distance (new rectangle box type) - Sequence (What action or stance the player is in (Running, Ducking, Jumping, Scoped etc) - Box Size & Box Multi (The size of the boxes around the players, adjustable to how you like) - Team ESP (Toggle ESP on your teammates) - Clean Draw ESP (Move ESP away from box) - Pixel ESP (Single Pixel ESP for legitimate play, shows one single pixel on the screen so it's not noticeable to any casual observers) - Visible ESP (Different color ESP for visible & non-visible players) - Entity ESP (See weapons, defusers, Bomb Location, and defusing players) - Entity Distance (Adjust how far away you will see different Entities for the ultimate in Player-Location assistance) - List ESP (The Ultimate Legit ESP, Listing Players that are not on your screen, or players anywhere in case you don't want to know where they are exactly) MISC: - Bunny Hop (Jumps automatically while the chosen key is being held) - Crosshair (When enabled it will draw a cross-hair on your screen, perfect for snipers, it also features an adjustable size) - Weapon Config System (Weapon configurations for each weapon group (pistols, deagle, snipers, SMG, Knife, rifles, etc) - Flash reduction (Make sure you can see enemies while you're supposed to be flashed) - Radar In Game (A radar is displayed where you see opponents) REQUIREMENTS: - Included HWID Spoofer: Yes - Stream Bypass: Yes - Supported game modes: Windowed, Borderless - Supported CPU: Intel & AMD - Supported OS: Windows 10 (1903,1909,2004,20H2,21H1, 22H2), Windows 11 (All version). Supported OS change and are added periodically. More check on official website.   IN-GAME SCREENSHOTS:   - Check on the official website.
    • A very skilled guy, did the job and delivered super fast, you can go without fear   100% malaka boy
    • L2 EVO - COMMUNITY BOARD & FRAME SWAP     L2 EVO - SPLASH SCREEN
    • my char is born in the middle of the water! I'm using protocol 273 client
  • Topics

×
×
  • Create New...