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

    • Hello Everyone  I hope you missed Old nostalgia BNB , is time to come back and be ready for the new journey  L2 BnB C3 Website: https://l2bnb.eu/ Discord: https://discord.gg/jaCJKYXgYZ Max Level 75 Max Grade (A) Safe:3 , Max:16 Anti-Botting. Auto learning skills , Auto Loot , Auto Create Account Subclass (NO) quest. Retail Buffs/DS Time ,Need Buffer Char (NO NPC Buffer) OfflineShop,OfflineCraft,ChangePass No GM Shop,No Global Gk,No Donate,Free Teleport only LVL 1 commands: .offline , .changepassword 99+% Retail 1+1 Window Per Pc BASIC FEATURES: Exp/SP: x 3 Adena: x3 Drop: х3 Spoil: x3 Support 24/7 GLOBAL COMMUNITY
    • 亲爱的朋友们,我们很高兴向您介绍我们的全新服务 —— KYC 实名认证,适用于任何平台!️ 我们为加密货币交易所、在线市场、社交网络、主机服务商、赌场及其他合法网站提供实名认证服务。认证可通过护照或驾驶证完成。不支持任何涉及非法活动的网站。 可用国家: 东欧:俄罗斯、乌克兰、白俄罗斯、乌兹别克斯坦、亚美尼亚、吉尔吉斯斯坦、哈萨克斯坦 — $30–33 欧盟(西欧,通常为拉脱维亚和爱沙尼亚) — $80–88 非洲:尼日利亚、肯尼亚 — $30–33 如果您需要注册并验证您的账户,总金额将额外收取 10% 手续费。 如需申请 KYC 认证或咨询其他问题,请通过以下方式联系我们: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ 邮箱: solomonbog@socnet.store SOCNET 商店有效链接: 数字商品商店(网站):进入 商店 Telegram 机器人:进入 – 通过 Telegram 消息应用便捷访问商店。 Telegram 星星购买机器人:进入 – 快速且优惠地购买 Telegram 星星。 SMM 面板:进入 – 推广您的社交媒体账户。 我们为您准备了最新的促销与特别优惠,用于购买我们的产品与服务: 1. 使用优惠码 OCTOBER2025(8% 折扣)即可在 9 月于我们的商店(网站或机器人)购物享受优惠!首次购买还可使用优惠码 SOCNET(15% 折扣)。 2. 获得 $1 商店余额或 10–20% 折扣 —— 只需在网站注册后按照以下格式留言:"SEND ME BONUS, MY USERNAME IS..." – 在我们的论坛帖中发布即可! 3. 首次试用 SMM 面板可获得 $1 奖励 —— 只需在网站(支持)提交标题为 “Get Trial Bonus” 的工单。 4. 每周在我们的 Telegram 频道及星星购买机器人中举行 Telegram 星星赠送活动! 新闻资讯: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh
    • 亲爱的朋友们,我们很高兴向您介绍我们的全新服务 —— KYC 实名认证,适用于任何平台!️ 我们为加密货币交易所、在线市场、社交网络、主机服务商、赌场及其他合法网站提供实名认证服务。认证可通过护照或驾驶证完成。不支持任何涉及非法活动的网站。 可用国家: 东欧:俄罗斯、乌克兰、白俄罗斯、乌兹别克斯坦、亚美尼亚、吉尔吉斯斯坦、哈萨克斯坦 — $30–33 欧盟(西欧,通常为拉脱维亚和爱沙尼亚) — $80–88 非洲:尼日利亚、肯尼亚 — $30–33 如果您需要注册并验证您的账户,总金额将额外收取 10% 手续费。 如需申请 KYC 认证或咨询其他问题,请通过以下方式联系我们: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ 邮箱: solomonbog@socnet.store SOCNET 商店有效链接: 数字商品商店(网站):进入 商店 Telegram 机器人:进入 – 通过 Telegram 消息应用便捷访问商店。 Telegram 星星购买机器人:进入 – 快速且优惠地购买 Telegram 星星。 SMM 面板:进入 – 推广您的社交媒体账户。 我们为您准备了最新的促销与特别优惠,用于购买我们的产品与服务: 1. 使用优惠码 OCTOBER2025(8% 折扣)即可在 9 月于我们的商店(网站或机器人)购物享受优惠!首次购买还可使用优惠码 SOCNET(15% 折扣)。 2. 获得 $1 商店余额或 10–20% 折扣 —— 只需在网站注册后按照以下格式留言:"SEND ME BONUS, MY USERNAME IS..." – 在我们的论坛帖中发布即可! 3. 首次试用 SMM 面板可获得 $1 奖励 —— 只需在网站(支持)提交标题为 “Get Trial Bonus” 的工单。 4. 每周在我们的 Telegram 频道及星星购买机器人中举行 Telegram 星星赠送活动! 新闻资讯: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh
    • 亲爱的朋友们,我们很高兴向您介绍我们的全新服务 —— KYC 实名认证,适用于任何平台!️ 我们为加密货币交易所、在线市场、社交网络、主机服务商、赌场及其他合法网站提供实名认证服务。认证可通过护照或驾驶证完成。不支持任何涉及非法活动的网站。 可用国家: 东欧:俄罗斯、乌克兰、白俄罗斯、乌兹别克斯坦、亚美尼亚、吉尔吉斯斯坦、哈萨克斯坦 — $30–33 欧盟(西欧,通常为拉脱维亚和爱沙尼亚) — $80–88 非洲:尼日利亚、肯尼亚 — $30–33 如果您需要注册并验证您的账户,总金额将额外收取 10% 手续费。 如需申请 KYC 认证或咨询其他问题,请通过以下方式联系我们: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ 邮箱: solomonbog@socnet.store SOCNET 商店有效链接: 数字商品商店(网站):进入 商店 Telegram 机器人:进入 – 通过 Telegram 消息应用便捷访问商店。 Telegram 星星购买机器人:进入 – 快速且优惠地购买 Telegram 星星。 SMM 面板:进入 – 推广您的社交媒体账户。 我们为您准备了最新的促销与特别优惠,用于购买我们的产品与服务: 1. 使用优惠码 OCTOBER2025(8% 折扣)即可在 9 月于我们的商店(网站或机器人)购物享受优惠!首次购买还可使用优惠码 SOCNET(15% 折扣)。 2. 获得 $1 商店余额或 10–20% 折扣 —— 只需在网站注册后按照以下格式留言:"SEND ME BONUS, MY USERNAME IS..." – 在我们的论坛帖中发布即可! 3. 首次试用 SMM 面板可获得 $1 奖励 —— 只需在网站(支持)提交标题为 “Get Trial Bonus” 的工单。 4. 每周在我们的 Telegram 频道及星星购买机器人中举行 Telegram 星星赠送活动! 新闻资讯: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh
  • 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