Jump to content

Question

Posted (edited)

Hello!

Well i want to change some things on the mob drop panel and i need your help!

Things i'd like to know so i'll try to modify:

  • Where i can find the html(i'd like to change some colors)
  • I'd like to know if its possible to show the quantity of each item(Like pride's one).And if its possible how to do it (newbie here)

Here are some pictures:

             MINE                                                                                                PRIDE(obviously)
2nuiybq.jpg     23lyz3d.png
                                                                     

Thank you very much for your time!

Edited by lewnidasds

15 answers to this question

Recommended Posts

  • 0
Posted

There is alot of shared customized drop panels try one of them and see where you can change them, html is hard coded inside java, small html knowledge based on table tr td you can make what ever you want :)

  • 0
Posted

Its not rly hardcoded, npcinfo.htm from admin folder.

as far I remember it was hardcoded on hellas when I was messing with it there, maybe you talking for aCis and its changed, the truth is I don't really remember now but I think this informations are very helpfull! :)

  • 0
Posted (edited)

Well i found the html of panel in L2NpcInstance.java.I've managed to change the colors(color idea taken from stacy doll panel cz i liked it :D )

But now how do i show the quantity?

Thank you everyone for the help! ^^

166bses.jpg

Edited by lewnidasds
  • 0
Posted

What happens, with your current panel, if you see antharas drops ? Just wondering if your client gonna crash :troll:

Grand bosses haven't retail drop list.So no worries about crashing!  :D

  • 0
Posted

Thanks for the answers everyone.

The thing i want to work now on the drop panel it the quantity(amount) of the drop list.(like the right picture i posted above)

Example:  Adena 180-250
                 Medal   1-5
And so on...

I absolutely have no idea how to code that.Thats where i need your help. ::)   :lol: 

 

  • 0
Posted (edited)

head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java

 

 

TextBuilder html1 = new TextBuilder("<html><body>");
 
html1.append("<br><center><font color=\"LEVEL\">[Combat Stats]</font></center>");
html1.append("<table border=0 width=\"100%\">");
html1.append("<tr><td>Max.HP</td><td>" + (int) (getMaxHp() / getStat().calcStat(Stats.MAX_HP, 1, this, null)) + "*" + (int) getStat().calcStat(Stats.MAX_HP, 1, this, null) + "</td><td>Max.MP</td><td>" + getMaxMp() + "</td></tr>");
html1.append("<tr><td>P.Atk.</td><td>" + getPAtk(null) + "</td><td>M.Atk.</td><td>" + getMAtk(null, null) + "</td></tr>");
html1.append("<tr><td>P.Def.</td><td>" + getPDef(null) + "</td><td>M.Def.</td><td>" + getMDef(null, null) + "</td></tr>");
html1.append("<tr><td>Accuracy</td><td>" + getAccuracy() + "</td><td>Evasion</td><td>" + getEvasionRate(null) + "</td></tr>");
html1.append("<tr><td>Critical</td><td>" + getCriticalHit(null, null) + "</td><td>Speed</td><td>" + getRunSpeed() + "</td></tr>");
html1.append("<tr><td>Atk.Speed</td><td>" + getPAtkSpd() + "</td><td>Cast.Speed</td><td>" + getMAtkSpd() + "</td></tr>");
html1.append("<tr><td>Race</td><td>" + getTemplate().race + "</td><td></td><td></td></tr>");
html1.append("</table>");
 
html1.append("<br><center><font color=\"LEVEL\">[Basic Stats]</font></center>");
html1.append("<table border=0 width=\"100%\">");
html1.append("<tr><td>STR</td><td>" + getSTR() + "</td><td>DEX</td><td>" + getDEX() + "</td><td>CON</td><td>" + getCON() + "</td></tr>");
html1.append("<tr><td>INT</td><td>" + getINT() + "</td><td>WIT</td><td>" + getWIT() + "</td><td>MEN</td><td>" + getMEN() + "</td></tr>");
html1.append("</table>");
 
html1.append("<br><center><font color=\"LEVEL\">[Drop Info]</font></center>");
html1.append("Rates legend: <font color=\"ff0000\">50%+</font> <font color=\"00ff00\">30%+</font> <font color=\"0000ff\">less than 30%</font>");
html1.append("<table border=0 width=\"100%\">");
 
for (final L2DropCategory cat : getTemplate().getDropData())
{
final FastList<L2DropData> drops = cat.getAllDrops();
if (drops != null)
for (final L2DropData drop : drops)
{
if (drop == null || ItemTable.getInstance().getTemplate(drop.getItemId()) == null)
{
continue;
}
 
final String name = ItemTable.getInstance().getTemplate(drop.getItemId()).getName();
 
if (drop.getChance() >= 600000)
{
html1.append("<tr><td><font color=\"ff0000\">" + name + "</font></td><td>" + (drop.isQuestDrop() ? "Quest" : cat.isSweep() ? "Sweep" : "Drop") + "</td></tr>");
}
else if (drop.getChance() >= 300000)
{
html1.append("<tr><td><font color=\"00ff00\">" + name + "</font></td><td>" + (drop.isQuestDrop() ? "Quest" : cat.isSweep() ? "Sweep" : "Drop") + "</td></tr>");
}
else
{
html1.append("<tr><td><font color=\"0000ff\">" + name + "</font></td><td>" + (drop.isQuestDrop() ? "Quest" : cat.isSweep() ? "Sweep" : "Drop") + "</td></tr>");
}
}
}
 
html1.append("</table>");
html1.append("</body></html>");
Edited by ~Sens
  • 0
Posted (edited)

My post before i found the solution. :)


My thought was to set

.getMinDrop().getMaxDrop()

Right after
 

final String name = ItemTable.getInstance().getTemplate(drop.getItemId())>>>>HERE<<<<.getName();

But i got errors..So obviously i'm not doing something right there.

I'll post my l2dropdata so you can help me a bit!  ^^

 

/*
 * L2jFrozen Project - www.l2jfrozen.com 
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 *
 * http://www.gnu.org/copyleft/gpl.html
 */
package com.l2jfrozen.gameserver.model;

import java.util.Arrays;

/**
 * /* Special thanks to nuocnam Author: LittleVexy
 * @version $Revision: 1.1.4.4 $ $Date: 2005/03/29 23:15:15 $
 */
public class L2DropData
{
	public static final int MAX_CHANCE = 1000000;
	
	private int _itemId;
	private int _minDrop;
	private int _maxDrop;
	private int _chance;
	private String _questID = null;
	private String[] _stateID = null;
	
	/**
	 * Returns the ID of the item dropped
	 * @return int
	 */
	public int getItemId()
	{
		return _itemId;
	}
	
	/**
	 * Sets the ID of the item dropped
	 * @param itemId : int designating the ID of the item
	 */
	public void setItemId(final int itemId)
	{
		_itemId = itemId;
	}
	
	/**
	 * Returns the minimum quantity of items dropped
	 * @return int
	 */
	public int getMinDrop()
	{
		return _minDrop;
	}
	
	/**
	 * Returns the maximum quantity of items dropped
	 * @return int
	 */
	public int getMaxDrop()
	{
		return _maxDrop;
	}
	
	/**
	 * Returns the chance of having a drop
	 * @return int
	 */
	public int getChance()
	{
		return _chance;
	}
	
	/**
	 * Sets the value for minimal quantity of dropped items
	 * @param mindrop : int designating the quantity
	 */
	public void setMinDrop(final int mindrop)
	{
		_minDrop = mindrop;
	}
	
	/**
	 * Sets the value for maximal quantity of dopped items
	 * @param maxdrop : int designating the quantity of dropped items
	 */
	public void setMaxDrop(final int maxdrop)
	{
		_maxDrop = maxdrop;
	}
	
	/**
	 * Sets the chance of having the item for a drop
	 * @param chance : int designating the chance
	 */
	public void setChance(final int chance)
	{
		_chance = chance;
	}
	
	/**
	 * Returns the stateID.
	 * @return String[]
	 */
	public String[] getStateIDs()
	{
		return _stateID;
	}
	
	/**
	 * Adds states of the dropped item
	 * @param list : String[]
	 */
	public void addStates(final String[] list)
	{
		_stateID = list;
	}
	
	/**
	 * Returns the questID.
	 * @return String designating the ID of the quest
	 */
	public String getQuestID()
	{
		return _questID;
	}
	
	/**
	 * Sets the questID
	 * @param questID designating the questID to set.
	 */
	public void setQuestID(final String questID)
	{
		_questID = questID;
	}
	
	/**
	 * Returns if the dropped item is requested for a quest
	 * @return boolean
	 */
	public boolean isQuestDrop()
	{
		return _questID != null && _stateID != null;
	}
	
	/**
	 * Returns a report of the object
	 * @return String
	 */
	@Override
	public String toString()
	{
		String out = "ItemID: " + getItemId() + " Min: " + getMinDrop() + " Max: " + getMaxDrop() + " Chance: " + getChance() / 10000.0 + "%";
		if (isQuestDrop())
		{
			out += " QuestID: " + getQuestID() + " StateID's: " + Arrays.toString(getStateIDs());
		}
		
		return out;
	}
	
	/**
	 * Returns if parameter "o" is a L2DropData and has the same itemID that the current object
	 * @param o object to compare to the current one
	 * @return boolean
	 */
	@Override
	public boolean equals(final Object o)
	{
		if (o instanceof L2DropData)
		{
			final L2DropData drop = (L2DropData) o;
			return drop.getItemId() == getItemId();
		}
		return false;
	}
	
	@Override
	public int hashCode()
	{
		return getItemId();
	}
}

 





Solution about quantity (Leeched from PSD pack)

Now everyone who was quantity need to re-work on html.

Thanks everyone for the help!

 

{
						if (drop == null || ItemTable.getInstance().getTemplate(drop.getItemId()) == null || drop.getItemId() == 57 || drop.getItemId() == 5575)
						{
							continue;
						}
						
						String name = ItemTable.getInstance().getTemplate(drop.getItemId()).getName();
						int countmin = ItemTable.getInstance().getTemplate(drop.getMinDrop()).getItemId();
						int countmax = ItemTable.getInstance().getTemplate(drop.getMaxDrop()).getItemId();
						
						if (drop.getChance() > 700000)
						{
							html1.append("<tr><td align=\"center\"><font color=\"0066FF\">" + countmin + "-"+countmax+" "+name+"</font></td></tr>");
						}
						else if (drop.getChance() > 500000)
						{
							html1.append("<tr><td align=\"center\"><font color=\"FF99FF\">" + countmin + "-"+countmax+" "+name+"</font></td></tr>");
						}
						else if (drop.getChance() > 300000)
						{
							html1.append("<tr><td align=\"center\"><font color=\"LEVEL\">" + countmin + "-"+countmax+" "+name+"</font></td></tr>");
						}
						else if (drop.getChance() > 100000)
						{
							html1.append("<tr><td align=\"center\"><font color=\"666666\">" + countmin + "-"+countmax+" "+name+"</font></td></tr>");
						}
						else if (drop.getChance() > 10000)
						{
							html1.append("<tr><td align=\"center\"><font color=\"FF8C00\">" + countmin + "-"+countmax+" "+name+"</font></td></tr>");
						}
						else
						{
							html1.append("<tr><td align=\"center\"><font color=\"FF0000\">" + countmin + "-"+countmax+" "+name+"</font></td></tr>");
						}
Edited by lewnidasds
Guest
This topic is now closed to further replies.


  • Posts

    • 🌟 L2Avalon – Interlude Rework x20 – Grand Opening July 4! 🌟 📅 Server Launch: Open Beta: June 26, 18:00 GMT+3 Grand Opening: July 4, 2025 📦 Chronicle & Client: Reworked Interlude (based on latest High Five features) Custom launcher with up-to-date client support ⚔️ Rates & Progression: EXP/SP: Lv 1–39: x20 Lv 40–52: x15 Lv 52–60: x10 Lv 61–70: x8 Lv 71–75: x5 Lv 76–79: x4 → x3 Lv 80+: x2 Adena: x1 (subject to adjustment) Drop/Spoil/Raid Drop: x5 Quest Drop: custom Party Bonus: up to +290% EXP 🛠️ Core Features: Auto-loot (normal drops) Auto-learn skills up to level 75 High Five-style skill system with full rebalancing Passive MP regen: +1000 MP / 15s Inventory space: 150 slots Weight limit increased Auto CP/HP/MP potions Global chat from level 40 (!), offline shop (.offline), buff selling system (.sellbuff) 🔼 Class Progression: 1st & 2nd class: Free 3rd class: Kill 700 mobs → get 1 Giant Codex Subclass: Custom quest + 4 raid bosses + 1000 B-grade Crystals Noblesse: Either via Caradine's Letter (Lv 65+) or Noblesse box from raid bosses 🏪 NPC Shops & Support: GM Shop: Full D/C gear, Low B gear Luxury Shop: TOP B gear Donation Shop: Cosmetics, premium, etc. NPC Buffer: Save & load buff schemes (premium buffs for Premium Account) Mammon functions via NPC in Giran (unseal, augment, etc.) Offline Traders, Coin of Luck auction system Special blacksmiths and unique item services 💡 Why L2Avalon? Balanced seasonal x20 rates – smooth and long-term growth Quality-of-life systems for casual & hardcore players alike Custom skill system, refined raid rewards, and unique gear upgrades Active community, continuous development, and fair monetization Beta rewards & early start advantage 🔗 Useful Links: 🌐 Website: https://www.l2avalon.net 📘 Full Server Info: https://l2avalon-net.gitbook.io/info 💬 Discord: https://discord.gg/NbM2cXmAem 📝 Join the adventure this July! Prepare your characters during Beta and get rewarded at launch!  
    • You spent over a month calling a lot of people names. I get that you want to change, but it will take a lot more than this for me to believe its sincere. And honestly, for your apology to matter, I'd have to care enough to be offended in the first place.
    • we all love you very much Guytis💖 🤗
    • W/e u smoke there, i want aswell... life has been cruel all this time! Maybe it will help me
    • I would like to take this opportunity to publicly apologize to the following people:   @Acacia, @Victory, @Splicho, @ShadowNetwork, @l2gold2025, @SkyLord, @maneco, @F4sh10n, @Maxtor, @Celestine, @911reg, @Nightw0lf. @UnknownSoldier   If at any point my words, actions, or posts offended you, I sincerely apologize. I recognize that in the past there were moments of tension and unnecessary conflict, but today I want to leave all of that behind. From now on, I choose not to hold any grudges against anyone and to let go of everything that happened — from both sides. The path I want to follow in this community is one of collaboration, mutual respect, and growth. Thank you to those who are still contributing and sharing. Sincerely,   Guytis
  • 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