Jump to content

Recommended Posts

  • 1 month later...
Posted

com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer [Character: qrr[268484525] - Account: FirefoxAurora- IP: 127.0.0.1] sent not handled RequestBypassToServer: [drop]

 

com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer [Character: qrr[268484525] - Account: FirefoxAurora - IP: 127.0.0.1] sent not handled RequestBypassToServer: [spoil]

 

And quest's button doesn't work

 

Something i didn't did correct :/

Server Freya, any solutions?

Posted

com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer [Character: qrr[268484525] - Account: FirefoxAurora- IP: 127.0.0.1] sent not handled RequestBypassToServer: [drop]

 

com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer [Character: qrr[268484525] - Account: FirefoxAurora - IP: 127.0.0.1] sent not handled RequestBypassToServer: [spoil]

 

And quest's button doesn't work

 

Something i didn't did correct :/

Server Freya, any solutions?

 

you did everything correct this shit is bugged

 

private static final String[] COMMANDS =
{
	"drop",
	"spoil",
	"info",
	"quest1"
};

 

if (command.startsWith("quest1"))
		{
			try
			{
				html.setFile(activeChar.getHtmlPrefix(), "data/html/custom/mobquest.htm");

				if (!(npc.isChampion() || npc.isMinion() || npc.isRaid() || npc.isRaidMinion() || npc.isMob()))
					return false;
				if (npc.getTemplate().getDropData().isEmpty())
				{
					droptext = "WARNING: This Npc has no Drops!";
					html.replace("%drops%", droptext);
					activeChar.sendPacket(html);
					return false;
				}

 

just change quest to quest1

Posted

Still the same :/

 

i think i must register handler at com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer

<td><button action="bypass -h quest1" value="Panel Quest" width=90 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>

forgot the html part xD

Posted

<td><button action="bypass -h quest1" value="Panel Quest" width=90 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>

forgot the html part xD

 

com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer  [Character: qrr[268484525] - Account: FirefoxAurora- IP: 127.0.0.1] sent not handled RequestBypassToServer: [drop]

 

 

same again :/

 

for sure problem is here

com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer ---- not handled RequestBypassToServer: [drop]

Posted

 

game\data\scripts\handlers -> MasterHandler

 

import handlers.bypasshandlers.VoiceCommand;
import handlers.bypasshandlers.Wear;
+import handlers.bypasshandlers.DropInfo;

%%%%%%%%%%%%%%%%%%%%%%%

	BypassHandler.getInstance().registerBypassHandler(new VoiceCommand());
	BypassHandler.getInstance().registerBypassHandler(new Wear());
+		BypassHandler.getInstance().registerBypassHandler(new DropInfo());

 

Posted

 

import handlers.bypasshandlers.VoiceCommand;
import handlers.bypasshandlers.Wear;
+import handlers.bypasshandlers.DropInfo;

%%%%%%%%%%%%%%%%%%%%%%%

	BypassHandler.getInstance().registerBypassHandler(new VoiceCommand());
	BypassHandler.getInstance().registerBypassHandler(new Wear());
+		BypassHandler.getInstance().registerBypassHandler(new DropInfo());

 

 

already did that :/

Posted

com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer  [Character: qrr[268484525] - Account: FirefoxAurora- IP: 127.0.0.1] sent not handled RequestBypassToServer: [drop]

 

This, I have no idea how things goes on freya and l2jserver, but since it's telling you 'not handled request..'

 

Try to paste this into RequestBypassToServer.java

 

		if (command.startsWith("drop"))
		{
			try
			{
				html.setFile(activeChar.getHtmlPrefix(), "data/html/custom/mobdrop.htm");

				if (!(npc.isChampion() || npc.isMinion() || npc.getInstanceType() == InstanceType.L2GrandBossInstance || npc.isRaid() || npc.isRaidMinion() || npc.isMob()))
					return false;	
				if (npc.getTemplate().getDropData().isEmpty())
				{
					droptext = "WARNING: This Npc has no Drops!";
					html.replace("%drops%", droptext);
					activeChar.sendPacket(html);
					return false;
				}
				String champ = "";
				String imgsg = "<img src=\"l2ui.squaregray\" width=\"274\" height=\"1\">";
				String ta_op = "<table bgcolor=333333 cellspacing=2 cellpadding=1><tr><td height=38 fixwidth=36><img src=\"";
				String ta_op2 = "\" height=32 width=32></td><td fixwidth=234><table VALIGN=top valing = top width=234 cellpadding=0 cellspacing=0><tr>";

				final StringBuilder droptext1 = StringUtil.startAppend(9000, champ + "<br>" + imgsg);
				for (L2DropCategory cat : npc.getTemplate().getDropData())
				{
					for (L2DropData drop : cat.getAllDrops())
					{
						final L2Item item = ItemTable.getInstance().getTemplate(drop.getItemId());
						if (item == null)
							continue;
						if (cat.isSweep())
							continue;
						if (drop.isQuestDrop())
							continue;



						String smind = null, drops = null;
						String name = item.getName();
						double chance = ((double)drop.getChance()/10000);


						if (item.getCrystalType() == 0)
						{
							smind = "<img src=\"L2UI_CH3.joypad_shortcut\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 1)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_D\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 2)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_C\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 3)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_B\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 4)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_A\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 5)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_S\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 6)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_80\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 7)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_84\" width=16 height=16>";
						}

						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("Recipe - Sealed"))
							name = "<font color=00FF00>(Re)</font><font color=FF00FF>(Sl)</font>" + name.substring(16);
						if (name.startsWith("Sealed "))
							name = "<font color=FF00FF>(Sl)</font>" + name.substring(7);
						if (name.startsWith("Common Item - "))
							name = "<font color=00FFFF>(Ci)</font>" + name.substring(14);
						if (name.startsWith("Recipe: "))
							name = "<font color=00FF00>(Re)</font>" + name.substring(8);
						if (name.startsWith("Recipe -"))
							name = "<font color=00FF00>(Re)</font>" + name.substring(8);
						if (name.startsWith("Mid-Grade Life Stone"))
							name = "<font color=fff600>Mid-Grade LS</font>" + name.substring(20);
						if (name.startsWith("High-Grade Life Stone"))
							name = "<font color=fff600>High-Grade LS</font>" + name.substring(21);
						if (name.startsWith("Top-Grade Life Stone"))
							name = "<font color=fff600>Top-Grade LS</font>" + name.substring(20);
						if (name.startsWith("Forgotten Scroll - "))
							name = "<font color=fff600>FS - </font>" + name.substring(19);
						if (name.startsWith("Greater Dye of "))
							name = "<font color=fff600>G Dye of </font>" + name.substring(15);

						droptext1.append(ta_op + item.getIcon()+ta_op2+"<td align=left width=16>" +smind+ "</td><td align=left width=260><font color=fff600>" +name+ "</font></td></tr><tr><td align=left width=16><img src=\"L2UI_CH3.QuestWndToolTipBtn\" width=16 height=16></td><td align=left width=55><font color=E15656>" +drops+ "%</font></td></tr></table></td></tr></table>" + imgsg);
					}
				}
				droptext = droptext1.toString();
				html.replace("%drops%", droptext);
				activeChar.sendPacket(html);
			}
			catch (Exception e)
			{
				activeChar.sendMessage("Something went wrong with the drop preview.");
			}
		}
		if (command.startsWith("spoil"))
		{
			try
			{
				html.setFile(activeChar.getHtmlPrefix(), "data/html/custom/mobspoil.htm");

				if (!(npc.isChampion() || npc.isMinion() || npc.isRaid() || npc.isRaidMinion() || npc.isMob()))
					return false;
				if (npc.getTemplate().getDropData().isEmpty())
				{
					droptext = "WARNING: This Npc has no Drops!";
					html.replace("%drops%", droptext);
					activeChar.sendPacket(html);
					return false;
				}
				String champ = "";
				String imgsg = "<img src=\"l2ui.squaregray\" width=\"274\" height=\"1\">";
				String ta_op = "<table bgcolor=333333 cellspacing=2 cellpadding=1><tr><td height=38 fixwidth=36><img src=\"";
				String ta_op2 = "\" height=32 width=32></td><td fixwidth=234><table VALIGN=top valing = top width=234 cellpadding=0 cellspacing=1><tr>";
				final StringBuilder droptext1 = StringUtil.startAppend(1000, champ + "<br>" + imgsg);
				for (L2DropCategory cat : npc.getTemplate().getDropData())
				{
					for (L2DropData drop : cat.getAllDrops())
					{
						final L2Item item = ItemTable.getInstance().getTemplate(drop.getItemId());
						if (item == null)
							continue;
						if (!(cat.isSweep()))
							continue;



						String smind = null, drops = null;
						String name = item.getName();
						double chance = ((double)drop.getChance()/10000);


						if (item.getCrystalType() == 0)
						{
							smind = "<img src=\"L2UI_CH3.joypad_shortcut\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 1)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_D\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 2)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_C\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 3)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_B\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 4)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_A\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 5)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_S\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 6)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_80\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 7)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_84\" width=16 height=16>";
						}

						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("Recipe - Sealed"))
							name = "<font color=00FF00>(Re)</font><font color=FF00FF>(Sl)</font>" + name.substring(16);
						if (name.startsWith("Sealed "))
							name = "<font color=FF00FF>(Sl)</font>" + name.substring(7);
						if (name.startsWith("Common Item - "))
							name = "<font color=00FFFF>(Ci)</font>" + name.substring(14);
						if (name.startsWith("Recipe: "))
							name = "<font color=00FF00>(Re)</font>" + name.substring(8);
						if (name.startsWith("Recipe -"))
							name = "<font color=00FF00>(Re)</font>" + name.substring(8);
						if (name.startsWith("Mid-Grade Life Stone"))
							name = "<font color=fff600>Mid-Grade LS</font>" + name.substring(20);
						if (name.startsWith("High-Grade Life Stone"))
							name = "<font color=fff600>High-Grade LS</font>" + name.substring(21);
						if (name.startsWith("Top-Grade Life Stone"))
							name = "<font color=fff600>Top-Grade LS</font>" + name.substring(20);
						if (name.startsWith("Forgotten Scroll - "))
							name = "<font color=fff600>FS - </font>" + name.substring(19);
						if (name.startsWith("Greater Dye of "))
							name = "<font color=fff600>G Dye of </font>" + name.substring(15);

						droptext1.append(ta_op + item.getIcon()+ta_op2+"<td align=left width=16>" +smind+ "</td><td align=left width=260><font color=fff600>" +name+ "</font></td></tr><tr><td align=left width=16><img src=\"L2UI_CH3.QuestWndToolTipBtn\" width=16 height=16></td><td align=left width=55><font color=E15656>" +drops+ "%</font></td></tr></table></td></tr></table>" + imgsg);
					}
				}
				droptext = droptext1.toString();
				html.replace("%drops%", droptext);
				activeChar.sendPacket(html);
			}
			catch (Exception e)
			{
				activeChar.sendMessage("Something went wrong with the drop preview.");
			}
		}
		if (command.startsWith("quest"))
		{
			try
			{
				html.setFile(activeChar.getHtmlPrefix(), "data/html/custom/mobquest.htm");

				if (!(npc.isChampion() || npc.isMinion() || npc.isRaid() || npc.isRaidMinion() || npc.isMob()))
					return false;
				if (npc.getTemplate().getDropData().isEmpty())
				{
					droptext = "WARNING: This Npc has no Drops!";
					html.replace("%drops%", droptext);
					activeChar.sendPacket(html);
					return false;
				}
				String champ = "";
				String imgsg = "<img src=\"l2ui.squaregray\" width=\"274\" height=\"1\">";
				String ta_op = "<table bgcolor=333333 cellspacing=2 cellpadding=1><tr><td height=38 fixwidth=36><img src=\"";
				String ta_op2 = "\" height=32 width=32></td><td fixwidth=234><table VALIGN=top valing = top width=234 cellpadding=0 cellspacing=1><tr>";
				final StringBuilder droptext1 = StringUtil.startAppend(1000, champ + "<br>" + imgsg);
				for (L2DropCategory cat : npc.getTemplate().getDropData())
				{
					for (L2DropData drop : cat.getAllDrops())
					{
						final L2Item item = ItemTable.getInstance().getTemplate(drop.getItemId());
						if (item == null)
							continue;
						if (!(drop.isQuestDrop()))
							continue;



						String smind = null, drops = null;
						String name = item.getName();
						double chance = ((double)drop.getChance()/10000);


						if (item.getCrystalType() == 0)
						{
							smind = "<img src=\"L2UI_CH3.joypad_shortcut\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 1)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_D\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 2)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_C\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 3)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_B\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 4)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_A\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 5)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_S\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 6)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_80\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 7)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_84\" width=16 height=16>";
						}

						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("Recipe - Sealed"))
							name = "<font color=00FF00>(Re)</font><font color=FF00FF>(Sl)</font>" + name.substring(16);
						if (name.startsWith("Sealed "))
							name = "<font color=FF00FF>(Sl)</font>" + name.substring(7);
						if (name.startsWith("Common Item - "))
							name = "<font color=00FFFF>(Ci)</font>" + name.substring(14);
						if (name.startsWith("Recipe: "))
							name = "<font color=00FF00>(Re)</font>" + name.substring(8);
						if (name.startsWith("Recipe -"))
							name = "<font color=00FF00>(Re)</font>" + name.substring(8);
						if (name.startsWith("Mid-Grade Life Stone"))
							name = "<font color=fff600>Mid-Grade LS</font>" + name.substring(20);
						if (name.startsWith("High-Grade Life Stone"))
							name = "<font color=fff600>High-Grade LS</font>" + name.substring(21);
						if (name.startsWith("Top-Grade Life Stone"))
							name = "<font color=fff600>Top-Grade LS</font>" + name.substring(20);
						if (name.startsWith("Forgotten Scroll - "))
							name = "<font color=fff600>FS - </font>" + name.substring(19);
						if (name.startsWith("Greater Dye of "))
							name = "<font color=fff600>G Dye of </font>" + name.substring(15);

						droptext1.append(ta_op + item.getIcon()+ta_op2+"<td align=left width=16>" +smind+ "</td><td align=left width=260><font color=fff600>" +name+ "</font></td></tr><tr><td align=left width=16><img src=\"L2UI_CH3.QuestWndToolTipBtn\" width=16 height=16></td><td align=left width=55><font color=E15656>" +drops+ "%</font></td></tr></table></td></tr></table>" + imgsg);
					}
				}
				droptext = droptext1.toString();
				html.replace("%drops%", droptext);
				activeChar.sendPacket(html);
			}
			catch (Exception e)
			{
				activeChar.sendMessage("Something went wrong with the drop preview.");
			}
		}

 

Ofc there may be errors, like return false; => return; or (command => (_command and so on. Just try to fix errors and test it.

Posted

This, I have no idea how things goes on freya and l2jserver, but since it's telling you 'not handled request..'

 

Try to paste this into RequestBypassToServer.java

 

		if (command.startsWith("drop"))
		{
			try
			{
				html.setFile(activeChar.getHtmlPrefix(), "data/html/custom/mobdrop.htm");

				if (!(npc.isChampion() || npc.isMinion() || npc.getInstanceType() == InstanceType.L2GrandBossInstance || npc.isRaid() || npc.isRaidMinion() || npc.isMob()))
					return false;	
				if (npc.getTemplate().getDropData().isEmpty())
				{
					droptext = "WARNING: This Npc has no Drops!";
					html.replace("%drops%", droptext);
					activeChar.sendPacket(html);
					return false;
				}
				String champ = "";
				String imgsg = "<img src=\"l2ui.squaregray\" width=\"274\" height=\"1\">";
				String ta_op = "<table bgcolor=333333 cellspacing=2 cellpadding=1><tr><td height=38 fixwidth=36><img src=\"";
				String ta_op2 = "\" height=32 width=32></td><td fixwidth=234><table VALIGN=top valing = top width=234 cellpadding=0 cellspacing=0><tr>";

				final StringBuilder droptext1 = StringUtil.startAppend(9000, champ + "<br>" + imgsg);
				for (L2DropCategory cat : npc.getTemplate().getDropData())
				{
					for (L2DropData drop : cat.getAllDrops())
					{
						final L2Item item = ItemTable.getInstance().getTemplate(drop.getItemId());
						if (item == null)
							continue;
						if (cat.isSweep())
							continue;
						if (drop.isQuestDrop())
							continue;



						String smind = null, drops = null;
						String name = item.getName();
						double chance = ((double)drop.getChance()/10000);


						if (item.getCrystalType() == 0)
						{
							smind = "<img src=\"L2UI_CH3.joypad_shortcut\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 1)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_D\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 2)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_C\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 3)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_B\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 4)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_A\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 5)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_S\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 6)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_80\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 7)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_84\" width=16 height=16>";
						}

						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("Recipe - Sealed"))
							name = "<font color=00FF00>(Re)</font><font color=FF00FF>(Sl)</font>" + name.substring(16);
						if (name.startsWith("Sealed "))
							name = "<font color=FF00FF>(Sl)</font>" + name.substring(7);
						if (name.startsWith("Common Item - "))
							name = "<font color=00FFFF>(Ci)</font>" + name.substring(14);
						if (name.startsWith("Recipe: "))
							name = "<font color=00FF00>(Re)</font>" + name.substring(8);
						if (name.startsWith("Recipe -"))
							name = "<font color=00FF00>(Re)</font>" + name.substring(8);
						if (name.startsWith("Mid-Grade Life Stone"))
							name = "<font color=fff600>Mid-Grade LS</font>" + name.substring(20);
						if (name.startsWith("High-Grade Life Stone"))
							name = "<font color=fff600>High-Grade LS</font>" + name.substring(21);
						if (name.startsWith("Top-Grade Life Stone"))
							name = "<font color=fff600>Top-Grade LS</font>" + name.substring(20);
						if (name.startsWith("Forgotten Scroll - "))
							name = "<font color=fff600>FS - </font>" + name.substring(19);
						if (name.startsWith("Greater Dye of "))
							name = "<font color=fff600>G Dye of </font>" + name.substring(15);

						droptext1.append(ta_op + item.getIcon()+ta_op2+"<td align=left width=16>" +smind+ "</td><td align=left width=260><font color=fff600>" +name+ "</font></td></tr><tr><td align=left width=16><img src=\"L2UI_CH3.QuestWndToolTipBtn\" width=16 height=16></td><td align=left width=55><font color=E15656>" +drops+ "%</font></td></tr></table></td></tr></table>" + imgsg);
					}
				}
				droptext = droptext1.toString();
				html.replace("%drops%", droptext);
				activeChar.sendPacket(html);
			}
			catch (Exception e)
			{
				activeChar.sendMessage("Something went wrong with the drop preview.");
			}
		}
		if (command.startsWith("spoil"))
		{
			try
			{
				html.setFile(activeChar.getHtmlPrefix(), "data/html/custom/mobspoil.htm");

				if (!(npc.isChampion() || npc.isMinion() || npc.isRaid() || npc.isRaidMinion() || npc.isMob()))
					return false;
				if (npc.getTemplate().getDropData().isEmpty())
				{
					droptext = "WARNING: This Npc has no Drops!";
					html.replace("%drops%", droptext);
					activeChar.sendPacket(html);
					return false;
				}
				String champ = "";
				String imgsg = "<img src=\"l2ui.squaregray\" width=\"274\" height=\"1\">";
				String ta_op = "<table bgcolor=333333 cellspacing=2 cellpadding=1><tr><td height=38 fixwidth=36><img src=\"";
				String ta_op2 = "\" height=32 width=32></td><td fixwidth=234><table VALIGN=top valing = top width=234 cellpadding=0 cellspacing=1><tr>";
				final StringBuilder droptext1 = StringUtil.startAppend(1000, champ + "<br>" + imgsg);
				for (L2DropCategory cat : npc.getTemplate().getDropData())
				{
					for (L2DropData drop : cat.getAllDrops())
					{
						final L2Item item = ItemTable.getInstance().getTemplate(drop.getItemId());
						if (item == null)
							continue;
						if (!(cat.isSweep()))
							continue;



						String smind = null, drops = null;
						String name = item.getName();
						double chance = ((double)drop.getChance()/10000);


						if (item.getCrystalType() == 0)
						{
							smind = "<img src=\"L2UI_CH3.joypad_shortcut\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 1)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_D\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 2)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_C\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 3)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_B\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 4)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_A\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 5)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_S\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 6)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_80\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 7)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_84\" width=16 height=16>";
						}

						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("Recipe - Sealed"))
							name = "<font color=00FF00>(Re)</font><font color=FF00FF>(Sl)</font>" + name.substring(16);
						if (name.startsWith("Sealed "))
							name = "<font color=FF00FF>(Sl)</font>" + name.substring(7);
						if (name.startsWith("Common Item - "))
							name = "<font color=00FFFF>(Ci)</font>" + name.substring(14);
						if (name.startsWith("Recipe: "))
							name = "<font color=00FF00>(Re)</font>" + name.substring(8);
						if (name.startsWith("Recipe -"))
							name = "<font color=00FF00>(Re)</font>" + name.substring(8);
						if (name.startsWith("Mid-Grade Life Stone"))
							name = "<font color=fff600>Mid-Grade LS</font>" + name.substring(20);
						if (name.startsWith("High-Grade Life Stone"))
							name = "<font color=fff600>High-Grade LS</font>" + name.substring(21);
						if (name.startsWith("Top-Grade Life Stone"))
							name = "<font color=fff600>Top-Grade LS</font>" + name.substring(20);
						if (name.startsWith("Forgotten Scroll - "))
							name = "<font color=fff600>FS - </font>" + name.substring(19);
						if (name.startsWith("Greater Dye of "))
							name = "<font color=fff600>G Dye of </font>" + name.substring(15);

						droptext1.append(ta_op + item.getIcon()+ta_op2+"<td align=left width=16>" +smind+ "</td><td align=left width=260><font color=fff600>" +name+ "</font></td></tr><tr><td align=left width=16><img src=\"L2UI_CH3.QuestWndToolTipBtn\" width=16 height=16></td><td align=left width=55><font color=E15656>" +drops+ "%</font></td></tr></table></td></tr></table>" + imgsg);
					}
				}
				droptext = droptext1.toString();
				html.replace("%drops%", droptext);
				activeChar.sendPacket(html);
			}
			catch (Exception e)
			{
				activeChar.sendMessage("Something went wrong with the drop preview.");
			}
		}
		if (command.startsWith("quest"))
		{
			try
			{
				html.setFile(activeChar.getHtmlPrefix(), "data/html/custom/mobquest.htm");

				if (!(npc.isChampion() || npc.isMinion() || npc.isRaid() || npc.isRaidMinion() || npc.isMob()))
					return false;
				if (npc.getTemplate().getDropData().isEmpty())
				{
					droptext = "WARNING: This Npc has no Drops!";
					html.replace("%drops%", droptext);
					activeChar.sendPacket(html);
					return false;
				}
				String champ = "";
				String imgsg = "<img src=\"l2ui.squaregray\" width=\"274\" height=\"1\">";
				String ta_op = "<table bgcolor=333333 cellspacing=2 cellpadding=1><tr><td height=38 fixwidth=36><img src=\"";
				String ta_op2 = "\" height=32 width=32></td><td fixwidth=234><table VALIGN=top valing = top width=234 cellpadding=0 cellspacing=1><tr>";
				final StringBuilder droptext1 = StringUtil.startAppend(1000, champ + "<br>" + imgsg);
				for (L2DropCategory cat : npc.getTemplate().getDropData())
				{
					for (L2DropData drop : cat.getAllDrops())
					{
						final L2Item item = ItemTable.getInstance().getTemplate(drop.getItemId());
						if (item == null)
							continue;
						if (!(drop.isQuestDrop()))
							continue;



						String smind = null, drops = null;
						String name = item.getName();
						double chance = ((double)drop.getChance()/10000);


						if (item.getCrystalType() == 0)
						{
							smind = "<img src=\"L2UI_CH3.joypad_shortcut\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 1)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_D\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 2)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_C\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 3)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_B\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 4)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_A\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 5)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_S\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 6)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_80\" width=16 height=16>";
						}
						else if (item.getCrystalType() == 7)
						{
							smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_84\" width=16 height=16>";
						}

						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("Recipe - Sealed"))
							name = "<font color=00FF00>(Re)</font><font color=FF00FF>(Sl)</font>" + name.substring(16);
						if (name.startsWith("Sealed "))
							name = "<font color=FF00FF>(Sl)</font>" + name.substring(7);
						if (name.startsWith("Common Item - "))
							name = "<font color=00FFFF>(Ci)</font>" + name.substring(14);
						if (name.startsWith("Recipe: "))
							name = "<font color=00FF00>(Re)</font>" + name.substring(8);
						if (name.startsWith("Recipe -"))
							name = "<font color=00FF00>(Re)</font>" + name.substring(8);
						if (name.startsWith("Mid-Grade Life Stone"))
							name = "<font color=fff600>Mid-Grade LS</font>" + name.substring(20);
						if (name.startsWith("High-Grade Life Stone"))
							name = "<font color=fff600>High-Grade LS</font>" + name.substring(21);
						if (name.startsWith("Top-Grade Life Stone"))
							name = "<font color=fff600>Top-Grade LS</font>" + name.substring(20);
						if (name.startsWith("Forgotten Scroll - "))
							name = "<font color=fff600>FS - </font>" + name.substring(19);
						if (name.startsWith("Greater Dye of "))
							name = "<font color=fff600>G Dye of </font>" + name.substring(15);

						droptext1.append(ta_op + item.getIcon()+ta_op2+"<td align=left width=16>" +smind+ "</td><td align=left width=260><font color=fff600>" +name+ "</font></td></tr><tr><td align=left width=16><img src=\"L2UI_CH3.QuestWndToolTipBtn\" width=16 height=16></td><td align=left width=55><font color=E15656>" +drops+ "%</font></td></tr></table></td></tr></table>" + imgsg);
					}
				}
				droptext = droptext1.toString();
				html.replace("%drops%", droptext);
				activeChar.sendPacket(html);
			}
			catch (Exception e)
			{
				activeChar.sendMessage("Something went wrong with the drop preview.");
			}
		}

 

Ofc there may be errors, like return false; => return; or (command => (_command and so on. Just try to fix errors and test it.

 

 

 

in what line i have to paste that?

 

Thanks for your reply! :)

Posted

No matter what line. Open the file and you will see there is a lot of else if, somewhere between 2 of them paste it, or after last else if :P

 

Ohh and from this code change those if to else if :D Play with it, sooner or later you will manage :D

Posted

No matter what line. Open the file and you will see there is a lot of else if, somewhere between 2 of them paste it, or after last else if :P

 

Ohh and from this code change those if to else if :D Play with it, sooner or later you will manage :D

 

Tons of error's xD xD

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • Ты настолько смешон, что создал специально для этого левый аккаунт?)))  ты не стоишь даже капли с моего члена что бы я ради тебя писал что-то на анг)  Человек видимо облажался с запуском, слил бабки в помойку теперь с горящей жопой бегает по форуму и не знает кого обвинить))))) перечитай что я тебе написал, мне насрать на тебя на твой сервер и на то что ты там выложил)  это все дерьмо неактуально уже давно, скажу тебе если твоя тупая голова это не поняла, АКТУАЛЬНОЕ НИКТО НЕ ПРОДАЕТ, потому что любая продажа это = шара, все что продается ЭТО ОТЪЕЗЖЕННОЕ ГОВНО которое не нужно хозяину, старое как твои обвисшие от гнева сиськи    
    • L2 HARMONY - BANNERS & ICONS       L2 COLD - NPC ANIMATED BANNER
    • LA ERA DE EINHASAD - Lineage 2 en Castellano Lineage II Crónica 4: Vástagos del Destino x5 - Main Class - Full Craft ───────────────────────────── La diosa Einhasad ha despertado... Una nueva era comienza para los verdaderos aventureros. Un mundo completamente traducido al español, fiel al Lineage II original, creado para una comunidad hispanohablante unida por la nostalgia y la pasión. ───────────────────────────── APERTURA OFICIAL: 14 de NOVIEMBRE - 20:00hs (GMT-3) ───────────────────────────── INFORMACIÓN PRINCIPAL Rates: x5 Tipo: Main Class Sistema: Full Craft Idioma: 100% Español (traducción completa del juego) Comunidad hispanohablante Balance original con mínimas modificaciones Buffer Offline, los jugadores pueden crear sus tiendas de buffs Progresión de crónicas cada 4 meses aprox. Economía estable - Sin Pay to Win - No venta de items/adena por donación Comunidad de 1.000 personas Anterior versión x1 duro casi 3 años con 952 IPs distintas de pico ───────────────────────────── CARACTERÍSTICAS DESTACADAS Experiencia fiel al Lineage II clásico, sin alteraciones invasivas Interfaz, diálogos y objetos completamente en español Ventana de comunidad con servicios personalizados y comercio por Monedas de Oro Olimpiadas, Épicos y Asedios originales Recompensas por votación, Eventos TVT con 3 arenas diferentes. Participan todos sin importar el nivel, pero dentro de la arena solo se atacan por rango cercano Soporte activo y presencia constante del administrador Tickets de soporte con atención rápida en Discord ante cualquier problema ───────────────────────────── ENLACES OFICIALES Website: La Era de Einhasad Discord: https://discord.com/invite/A6PtCCN2SF ───────────────────────────── Una comunidad unida por el idioma, la pasión y la nostalgia. Redescubrí Aden… en tu propio idioma. Bienvenido a La Era de Einhasad.  
    • English you belarus retard ) Seems you so desperate and angry cant even speak back in EN, well guys you see how its easy to destroy scammer xD
    • Чувак) мне на него насрать давно, ты не мне сделал подлянку а людям которые купили и используют. Я его удалил год назад) когда закрыл продажи.   мне вообще похер кто ты и что ты.    Можешь сесть и попрыгать на тот же член на котором ты прыгаешь все это время) и этой версии более 3х лет) ты откопал залупу мамонта , поздравляю)) кто скачает это дерьмо используйте на свой страх и риск)) кто знает что там наворочено)))  удачи в шаринге обиженный жизнью неандерталец.   Можешь лизнуть мое очко на прощание.
  • 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