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

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

    • Lol good joke.   If I'd be the one contacting yo then I'd say at least 50% in advance because you can basically just fuck off when things doesn't go your way, and then you as a developer just wasted days or even weeks of time with development.
    • "Just make your own game!" sounds simple until you’ve tried it. I did, with Epic Dragon World and learned the hard way that "open source" often means "free labor for resellers." The MIT license became a buffet for people to grab code, rebrand it and ghost the project. Even basic collaboration collapsed because everyone wanted their vision, not *a* vision. NCSoft’s lawyers aren’t theoretical. They’re a sword of Damocles. Even if you rebuild a client from scratch, if it feels like Lineage 2, they’ll come knocking. Ask the Chrono Trigger fangame corpses how that goes. MMOs are hospice care. The genre’s on life support, kept alive by whales and nostalgia. Look at Throne and Liberty, NCSoft’s own "successor" to L2, flopping harder than a 2004 PKer in ToI. Classic reboots (WoW, L2) are bandaids, not resurrections. This is the hobby. Optimizing old systems, reverse-engineering spaghetti code and preserving janky mechanics is the fun part. Monetizing it turns it into customer service hell. No thanks. Community? What community? The L2 scene is 90% resellers, 10% players who’ll quit the second they don’t get +16 on day one. Both asking how to install Java and why running the uncompiled server does not work.
    • Dear players, Open beta test for C3 begins today at 19:00 server time (GMT +2). 💰 All participants who find bugs during OBT will be rewarded with Coin of Luck (CoL): - 1 CoL for each staticmesh issue found — e.g., walking through textures, etc., - 2 CoL or more for server-side issues, depending on their severity., We strongly recommend reviewing the quest list - when switching to Chronicle 3, the total number of quests should match the number shown in the upper right corner of the window and correspond to the quest count from Chronicle 2. To log into the game, use the same data you use to access the Airin server. 📌 Download client: Google Drive
  • 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