Jump to content
  • 0

high five [L2J] Bug Report Manager Problem


Question

Posted

Hello Maxcheaters..!

so i've got a bug report manager from here from -=DoctorNo=- Version 2.3

 

I have L2J High Five (unstable)

the problem is:
when i'm pressing the button to create the report file, it doesn't work..!

it's like the button saying to close the window... the window is closing and nothing happened... no errors, no logs... just nothing...

 

the code:

package custom.BugReport;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.StringTokenizer;
import java.util.logging.Logger;

import com.l2jserver.gameserver.cache.HtmCache;
import com.l2jserver.gameserver.model.L2World;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.network.L2GameClient;
import com.l2jserver.gameserver.network.clientpackets.Say2;
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;

/**
 * @author -=DoctorNo=- Version 2.3
 */
public class BugReport extends Quest
{
	private final Logger _log = Logger.getLogger(BugReport.class.getName());
	private static final int NpcId = 40000; // npc id here
	private static String htmlLoc = "data/scripts/custom/BugReport/1.html";
	
	public BugReport(int questId, String name, String descr)
	{
		super(questId, name, descr);
		addFirstTalkId(NpcId);
		addTalkId(NpcId);
		addStartNpc(NpcId);
		_log.warning("Test 1");
	}
	
	@Override
	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
	{
	_log.warning("Test 2");
		if (event.startsWith("report"))
		{
			sendReport(event, npc, player, event);
		}
		return "";
	}
	
	private void sendReport(String event, L2Npc npc, L2PcInstance player, String command)
	{
		StringTokenizer st = new StringTokenizer(command);
		st.nextToken();
		_log.warning("Test 3");
		
		String message = "";
		String _type = null; // General, Fatal, Misuse, Balance, Other
		L2GameClient info = player.getClient().getConnection().getClient();
		
		try
		{
		_log.warning("Test 4");
			_type = st.nextToken();
			while (st.hasMoreTokens())
			{
				message = message + st.nextToken() + " ";
			}
			
			if (message.equals(""))
			{
				player.sendMessage("Message box cannot be empty.");
				return;
			}
			
			String fname = "data/BugReports/" + player.getName() + ".txt";
			File file = new File(fname);
			boolean exist = file.createNewFile();
			if (!exist)
			{
				player.sendMessage("You have already sent a bug report, GMs must check it first.");
				return;
			}
			
			FileWriter fstream = new FileWriter(fname);
			BufferedWriter out = new BufferedWriter(fstream);
			out.write("Character Info: " + info + "\r\nBug Type: " + _type + "\r\nMessage: " + message);
			player.sendMessage("Report sent. GMs will check it soon. Thanks...");
			
			for (L2PcInstance allgms : L2World.getInstance().getAllGMs())
			{
				allgms.sendPacket(new CreatureSay(0, Say2.SHOUT, "Bug Report Manager", player.getName() + " sent a bug report."));
				allgms.sendPacket(new CreatureSay(0, Say2.SHOUT, "Report Type", _type + "."));
			}
			
			_log.info("Character: " + player.getName() + " sent a bug report.");
			out.close();
		}
		catch (Exception e)
		{
			player.sendMessage("Something went wrong try again.");
		}
	}
	
	@Override
	public String onFirstTalk(L2Npc npc, L2PcInstance player)
	{
	_log.warning("Test 5");
		final int npcId = npc.getId();
		if (player.getQuestState(getName()) == null)
		{
			newQuestState(player);
		}
		
		if (npcId == NpcId)
		{
			String html = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htmlLoc);
			html = html.replaceAll("%player%", player.getName());
			
			NpcHtmlMessage npcHtml = new NpcHtmlMessage(0);
			npcHtml.setHtml(html);
			player.sendPacket(npcHtml);
		}
		return "";
	}
	
	public static void main(final String[] args)
	{
		new BugReport(-1, BugReport.class.getSimpleName(), "custom");
		System.out.println("CUSTOM: BugReport Manager loaded");
	}
}

and the action from the button on html:

action="bypass -h Quest BugReport $report $type $msg"

any Idea?!

13 answers to this question

Recommended Posts

  • 0
Posted

Instead of logging "test" stuff, log the way the command is cutted. If nothing happens, it probably means the bypass isn't correctly cutted.

 

Probably "report" instead of "$report" in your bypass should make it work.

  • 0
Posted (edited)

Are you adding the proper line inside scripts.cfg?

if not, the text wont open... cause it's reading the html from the code..!

 

Instead of logging "test" stuff, log the way the command is cutted. If nothing happens, it probably means the bypass isn't correctly cutted.

 

Probably "report" instead of "$report" in your bypass should make it work.

 

hmmm.... i think you are right... i'm gonna test it!

 

edit: the logging commands is from me to check...!

       the call report instead of $report doesn't work too!

Edited by xXObanXx
  • 0
Posted (edited)

if not, the text wont open... cause it's reading the html from the code..!

True soz, my newbie question filter didn't work properly... let me figure out what's wrong...

Post full html pls :P

U sure that what Tryskell said isn't working?

Edited by ^Wyatt
  • 0
Posted

True soz, my newbie question filter didn't work properly... let me figure out what's wrong...

Post full html pls :P

U sure that what Tryskell said isn't working?

<html>
<title>Bug Report Manager</title>
<body>
<br><br>
<center>
<table border="0" height=10 bgcolor="444444" width=240>
<tr><td align=center><font color="00FFFF">Hello %player%.</font></td></tr>
<tr><td align=center><font color="00FFFF">There are no Gms online</font></td></tr>
<tr><td align=center><font color="00FFFF">and you want to report something?</font></td></tr>
<tr><td align=center><font color="00FFFF">Now it is possible.</font></td></tr>
</table>
<br>
<img src="L2UI.SquareWhite" width=280 height=1>
<br><br>
<table width=250>
<tr>
<td><font color="LEVEL">Select Report Type:</font></td>
<td><combobox width=105 var=type list=General;Npc;Event;Balance;Other></td>
</tr>
</table>
<br><br>
<multiedit var="msg" width="250" height="50"><br>
<button value="Report It" action="bypass -h Quest BugReport $report type message" width="128" height="26" back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>
<br>
<img src="L2UI.SquareWhite" width=280 height=1>
<br>
<img src="L2UI.SquareWhite" width=280 height=1>
</center>
</body></html>

pretty sure...

i've tried with the following calls:

action="bypass -h Quest BugReport report type msg"
action="bypass -h Quest BugReport report type message"
action="bypass -h Quest BugReport report _type msg"
action="bypass -h Quest BugReport report _type message"
  • 0
Posted (edited)

It's the only thing I can see that could be causing it hm....

 

U could try to change this but I don't think it can affect.

<td><combobox width=105 var=type list=General;Npc;Event;Balance;Other></td>
to

<td><combobox width="105" var="type" list="General;Npc;Event;Balance;Other"></td>
Edited by ^Wyatt
  • 0
Posted (edited)

It's the only thing I can see that could be causing it hm....

 

U could try to change this but I don't think it can affect.

<td><combobox width=105 var=type list=General;Npc;Event;Balance;Other></td>
to

<td><combobox width="105" var="type" list="General;Npc;Event;Balance;Other"></td>

nah... on html that is not a wrong code... but with " " is more "stable"

 

btw don't work too!

Edited by xXObanXx
  • 0
Posted (edited)

I have an idea... i was thinking... the call is $report $type $msg but...

few days ago i've seen that on tvt the %max% for max players is handling from this line inside the TvTEvent.java

npcHtmlMessage.replace("%max%", String.valueOf(Config.TVT_EVENT_MAX_LVL));

so... if we were put a code like this? couldn't work?

Edited by xXObanXx

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

    • looking for someone who has cache cleaner for h5 
    • I’m looking to buy GeoEngine compatible with L2Scripts (Essence). A test server must be provided so I can verify functionality before purchase. DM here or through Telegram: @nick77737
    • fixed !.. thank you veru much @NevesOma  someone lock it
    • OFFICIAL DEVELOPERS Undetected since : Release Updated for last patch : 29/11/2025 After payment you will receive: Product download link1 Activation key for the selected period. Free support for the duration of the product subscription.   ✅AC - Undetected ▸WINDOWS 10/11 (All versions, even 24H2) ▸INTEL / AMD ▸Our software mainly targets player wanting to cheat legitimately. . Precision. Stealth. Performance.   The external ARC Raiders cheats from stern designed to elevate your gameplay without slowing your system. Fully compatible with Windows 10/11 — Intel & AMD ready.   Our Functions: AIMBOT **Enable Aim requires a mandatory confirmation popup, so there’s zero risk of activating it by accident for users who don’t want to use it. Aimbot Aimbot Drone Fov Aim (Draw fov circle) Target Line (Draw targetline) Arrow Fov (Draw arrow fov) Visible Check (Aim visible) Humanize (Aim randomize) Custom Aim Key Fov Value / Smooth Value / Aim Delay Arrow Size & Spacing VISUALS – PLAYERS Box ESP (2D / Corner) Health / Shield Bar Skeleton ESP Distance ESP Name ESP Tracers / Player Lines Visible & Invisible Check Squad Name ESP Draw Eyes Directions Radar ESP Radar Distance ESP Players Flags (corpse/knocked/exit/alive) VISUALS – ENTITY Pickup Base ESP Drone ESP Probe Crashed ESP Apricot ESP Mullein ESP Agave ESP MossRock ESP Crate ESP Salvage Container ESP Rsr Lockers ESP Raiders Cache Esp Bin Trash Esp Shredder Esp Fruit Basket ESP Ammo Box ESP Computer ESP Backpack ESP Leaper ESP Probe ESP Mushroom ESP Cargo Ship ESP Firewall ESP Assault Rifle ESP Battle Rifle ESP SMG ESP Grenade ESP Medical Bag ESP Turret ESP Sentinel Esp Weapon Case Esp Extraction ESP All Weapons ESP Max Distance & Fade distance MISC FOV Arrow Player Count Display Custom Arrow Size & Distance Streamproof (Invisible in recordings & screenshots) External (No injection) Maximum Privacy & Security 24/7 Support Available: replies within minutes Our prices: Prices must be checked directly on our website, as they may change at any time to control sales — however, we remain among the most competitive in the market.   Discover our website   GET GOOD, GET STERN
    • I paid this guy yesterday (i got screen for the payment for proof), he told me that someone will log to send me my adena. Then he said he had some problems and couldn't send me the adena. Waited and waited and waited until he replied that he can't find the guy and he will return the money i gave him. Today still no money returned and he doesn't reply to the discord messages. If he doesn't return the money i paid or send the adena he promised in game, i will report him in every single website and many more. Stay away. I have all the discussion screenshot on discord with him. He knows who i am so he better keep his promise legit.
  • 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