Jump to content
  • 0

HTML Help


ganjaradio

Question

Hello, im trying to make a text box to add a char name inside and then a button that will set this name at a variable in HTML.

How can i do that? (via java)

Thx in advance

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
			String text = HtmCache.getInstance().getHtm("data/html/yourhtmlfolder/yourhtmlfile.htm");
			text = text.replace("%CharName%", String.valueOf(activeChar.getName()));

and on npc you simply add this %CharName% to your htm file and it will show the character name.

Link to comment
Share on other sites

  • 0
24 minutes ago, Designatix said:

			String text = HtmCache.getInstance().getHtm("data/html/yourhtmlfolder/yourhtmlfile.htm");
			text = text.replace("%CharName%", String.valueOf(activeChar.getName()));

and on npc you simply add this %CharName% to your htm file and it will show the character name.

didnt mean this dude, although thx, i mean a text box when someone can type anything where he will type sth and when he clicks the button, then the variable will get the value of the text

Link to comment
Share on other sites

  • 0

BugReport npc got that code, check the code and take it from there

/*
* 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
*/
package com.l2jfrozen.gameserver.model.actor.instance;

import java.io.*;
import java.util.StringTokenizer;

import javolution.text.TextBuilder;

import com.l2jfrozen.gameserver.ai.CtrlIntention;
import com.l2jfrozen.gameserver.model.L2World;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.network.L2GameClient;
import com.l2jfrozen.gameserver.network.clientpackets.Say2;
import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
import com.l2jfrozen.gameserver.network.serverpackets.CreatureSay;
import com.l2jfrozen.gameserver.network.serverpackets.MyTargetSelected;
import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jfrozen.gameserver.network.serverpackets.ValidateLocation;
import com.l2jfrozen.gameserver.templates.L2NpcTemplate;

/**
* @author squallcs
*
*/
public class L2BugReportInstance extends L2FolkInstance
{
private static String _type;

public L2BugReportInstance(int objectId, L2NpcTemplate template)
{
super(objectId, template);
}

@Override
public void onBypassFeedback(L2PcInstance player, String command)
{
if (command.startsWith("send_report"))
{
StringTokenizer st = new StringTokenizer(command);
st.nextToken();
String msg = null;
String type = null;
type = st.nextToken();
msg = st.nextToken();
try
{
while (st.hasMoreTokens())
{
msg = msg + " " + st.nextToken();
}

sendReport(player, type, msg);
}
catch (StringIndexOutOfBoundsException e)
{
}
}
}

static
{
new File("log/BugReports/").mkdirs();
}

private void sendReport(L2PcInstance player, String command, String msg)
{
String type = command;
L2GameClient info = player.getClient().getConnection().getClient();

if (type.equals("General"))
_type = "General";
if (type.equals("Fatal"))
_type = "Fatal";
if (type.equals("Misuse"))
_type = "Misuse";
if (type.equals("Balance"))
_type = "Balance";
if (type.equals("Other"))
_type = "Other";

try
{
String fname = "log/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: " + msg);
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."));

System.out.println("Character: " + player.getName() + " sent a bug report.");
out.close();
}
catch (Exception e)
{
player.sendMessage("Something went wrong try again.");
}
}

@Override
public void onAction(L2PcInstance player)
{
if (!canTarget(player))
{
return;
}

if (this != player.getTarget())
{
player.setTarget(this);

player.sendPacket(new MyTargetSelected(getObjectId(), 0));

player.sendPacket(new ValidateLocation(this));
}
else if (!canInteract(player))
{
player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
}
else
{
showHtmlWindow(player);
}

player.sendPacket(new ActionFailed());
}

private void showHtmlWindow(L2PcInstance activeChar)
{
NpcHtmlMessage nhm = new NpcHtmlMessage(5);
TextBuilder replyMSG = new TextBuilder("");

replyMSG.append("<html><title>Bug Report Manager</title>");
replyMSG.append("<body><br><br><center>");
replyMSG.append("<table border=0 height=10 bgcolor=\"444444\" width=240>");
replyMSG.append("<tr><td align=center><font color=\"00FFFF\">Hello " + activeChar.getName() + ".</font></td></tr>");
replyMSG.append("<tr><td align=center><font color=\"00FFFF\">There are no Gms online</font></td></tr>");
replyMSG.append("<tr><td align=center><font color=\"00FFFF\">and you want to report something?</font></td></tr>");
replyMSG.append("</table><br>");
replyMSG.append("<img src=\"L2UI.SquareWhite\" width=280 height=1><br><br>");
replyMSG.append("<table width=250><tr>");
replyMSG.append("<td><font color=\"LEVEL\">Select Report Type:</font></td>");
replyMSG.append("<td><combobox width=105 var=type list=General;Fatal;Misuse;Balance;Other></td>");
replyMSG.append("</tr></table><br><br>");
replyMSG.append("<multiedit var=\"msg\" width=250 height=50><br>");
replyMSG.append("<br><img src=\"L2UI.SquareWhite\" width=280 height=1><br><br><br><br><br><br><br>");
replyMSG.append("<button value=\"Send Report\" action=\"bypass -h npc_" + getObjectId() + "_send_report $type $msg\" width=204 height=20 back=\"sek.cbui75\" fore=\"sek.cbui75\">");
replyMSG.append("</center></body></html>");

nhm.setHtml(replyMSG.toString());
activeChar.sendPacket(nhm);

activeChar.sendPacket(new ActionFailed());
}

}

 

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • abortion pills online in Dubai +27791653574 Buy Pills now  +27791653574 abortion pills for sale Dubai Text NowAbortion Clinic Dubai +27791653574 Pregnancy Termination  clinic around Dubai Cytotec 200 mcg price in Dubai +27791653574 contact us now | +27791653574 Breeky Tablets in Dubai Know price/cost  Abortion pills in Dubai | +27791653574 WhatsApp Us Now Abortion pills online in Dubai Breeky tablets for sale in Dubai Cytotec 200 mcg Misoprostol for sale in Dubai Whatever your circumstances, its your right to terminate up 24 weeks into the pregnancy. It’s entirely your decision. And if its something you want to do, rest assured that its legal in Qatar to have an abortion Marina Whatsapp    Remember abortion is legal in Qatar, so there is no reason to ever visit an illegal service provider. If you have passed the 24 weeks mark, there are other options available to you which we will talk you through and help you to understand.   We are here to support you, whatever choice you make about your pregnancy, so you never have to feel alone, we offer safe abortion ( also called termination of pregnancy TOP) for women who are up to 24 weeks pregnant. Depending on the gestation (stage of the pregnancy), we have two services available the medical process (often called the abortion pill) and the surgical procedure (a minor same day surgical treatment.)   Our nurses and Doctors are accredited professionals and experts in reproductive healthcare. Our work is strictly governed the choice on termination of pregnancy and we adhere to World health Organisation Guidelines.   Safe abortion or termination of pregnancy (TOP) is when a pregnancy is terminated in its early stage before it results into the birth of a child.   Abortion may be performed in two different ways.   Medical Abortion This is when abortion pills will be swallowed to end the pregnancy   Surgical Abortion This is when instruments will be used to remove the foetus. If both abortion procedures are done by a qualified abortion doctor with medical guidance, there is no way it will affect your fertility.   How is a safe abortion done On your first visit to our clinic, counselling will be provided and this is optional.   Safe abortion The doctor will perform a pregnancy test to confirm the weeks and explain to you in detailed how the safe abortion procedure will be done and how to take care of yourself after the abortion.   Side effects of medical safe abortion You will experience cramping like period pains You might vomit Feel Nausea Get a running stomach Experience some bit of fatigue The bleeding might start 2 hours after using the second pills. abortion in Dubai Al Barsha Al Furjan Al Jaddaf Al Karama Arjan Bur Dubai Business Bay DAMAC Hills Deira Downtown Dubai Dubai City Dubai Creek Harbour (The Lagoons) Dubai Harbour Dubai Hills Estate Dubai Marina International City Jumeirah Meydan Old Town Sheikh Zayed Road Abu Dhabi Ajman Al Ain Dubai Fujairah Ras Al Khaimah Sharjah Umm Al Quwain  Palm Jebel Ali   Downtown   Business Bay   Dubai Marina   Palm Jumeirah   Emaar Beachfront   MBR City - Meydan   Dubai Creek Harbour   Dubai Hills Estate   Damac Hills   Damac Hills   ( Akoya )   Al Barari  Al Barsha   Al Furjan   Al Ghadeer   Al Jaddaf   Al Marjan Island   Al Safa   Al Sufouh   Alreeman   Arabian Ranches   Arjan - Dubailand   Barsha Heights  Bluewaters Island   City Walk   DHCC - Dubai Healthcare City 29 DMC - Dubai Maritime City   DSO - Dubai Silicon Oasis
    • Were in Dubai ?  WHATSAPP +256785634993 if you’re considering an abortion pill,   BUY breeky tablet,  Mifepristone and Misoprostol (Cytotec), Mtp Kit  on line in Dubai  UAE (United Arab Emirates) Madinat Zayed is the largest city and the administrative centre of Al Dhafra, the westernmost and largest region in the Emirate of Abu Dhabi. The township was established in 1968 by Sheikh Zayed bin Sultan Al Nahyan, the late Ruler of Abu Dhabi and President of the UAE. In the census of 2005, the city had 29,095 inhabitants. , And Dubai is the most populous city in the united arab emirates(UAE),  Established in the 18th century as a small fishing village, Dubai has been a centre for regional and international trade since the early 20th century, and its economy relies on trade, tourism, aviation, real estate, and financial services  you have two safe and effective options in or around dubai  Abu Dhabi Yas Island The Corniche Area Saadiyat Island Al Reem Island Al Maryah Island Tourist Club Area Khalifa City Al Khalidiyah Al Reef Mohammed Bin Zayed City Al Raha Al Mushrif Al KaramahAbu Dhabi Yas Island The Corniche Area Saadiyat Island Al Reem Island Al Maryah Island Tourist Club Area Khalifa City Al Khalidiyah Al Reef Mohammed Bin Zayed City Al Raha Al Mushrif Al Karamah : abortion pill  breeky tablet (medication abortion) or in-clinic abortion. Both methods are equally safe and effective, so you need to select the ideal option based on your unique situation and comfort. In terms of availability, medication abortion is available during the first 11 weeks of pregnancy, and in-clinic abortion is available during the first 14 weeks of pregnancy. +256785634993 Generally speaking, medication abortion is suitable for individuals looking for a less invasive and more private experience. You have to take two tablets (one at the clinic and the other at home) — the entire process may take 2 to 3 days. Our medical personnel will guide you through the entire process so you know exactly what to expect.     BUY breeky tablet, Mifepristone and Misoprostol (Cytotec), Mtp Kit  on line in Dubai. Medication abortion, also known as “the abortion pill,” in Dubai is a safe and effective means of terminating a pregnancy from the comfort of your home. It’s available up to 11 weeks (77 days) from the first day of your last menstrual period (LMP). The procedure involves taking two medications at specific times, the first at the clinic and the second in your home. The first pill (mifepristone) effectively ends the pregnancy by blocking the hormones necessary for your pregnancy. The second pill (misoprostol) induces uterine contractions to empty its contents, an experience similar to a miscarriage. The entire process may take several days, but it can be done from the privacy of your home.+256785634993 YOUR MEDICATION ABORTION JOURNEY During your first appointment, we perform an ultrasound to confirm the date of your pregnancy and determine if you’re eligible for a medication abortion. We also inform you of all your options, answer your questions, and offer non-judgmental support to ensure a comfortable and supportive experience. You have to take the first medication, mifepristone, before you leave the office or later at home when you’re ready. You won’t experience any pain or discomfort after taking the first medication. You have to take the second medication, misoprostol, about 12 to 48 hours after the first medication. Misoprostol will induce uterine contractions to empty its contents — you may experience cramping and bleeding for a few hours. You can reduce the pain and discomfort with heating pads and over-the-counter pain medications. The entire process can take 5 to 12 hours, and the experience is similar to an early miscarriage. +256785634993 During this period, you’ll experience considerable cramping and bleeding, similar to a heavy period. You may also pass blood clots and tissue. Other side effects include stomachaches, dizziness, mild fever, and diarrhea. You may also experience mild cramping for a few days after the end of your pregnancy, but the discomfort is tolerable, and you can resume your work and daily activities. You may call our medical staff at any point with questions or concerns after taking an abortion pill in Dubai Al Barsha Al Furjan Al Jaddaf Al Karama Arjan Bur Dubai Business Bay DAMAC Hills Deira Downtown Dubai Dubai City Dubai Creek Harbour (The Lagoons) Dubai Harbour Dubai Hills Estate Dubai Marina International City Jumeirah Meydan Old Town Sheikh Zayed Road Abu Dhabi Ajman Al Ain Dubai Fujairah Ras Al Khaimah Sharjah Umm Al Quwain  Palm Jebel Ali   Downtown   Business Bay   Dubai Marina   Palm Jumeirah   Emaar Beachfront   MBR City - Meydan   Dubai Creek Harbour   Dubai Hills Estate   Damac Hills   Damac Hills   ( Akoya )   Al Barari  Al Barsha   Al Furjan   Al Ghadeer   Al Jaddaf   Al Marjan Island   Al Safa   Al Sufouh   Alreeman   Arabian Ranches   Arjan - Dubailand   Barsha Heights  Bluewaters Island   City Walk   DHCC - Dubai Healthcare City 29 DMC – Dubai +256785634993
    • +27791653574 abortion pills for sale Dubai Text NowAbortion Clinic Dubai +27791653574 Pregnancy Termination  clinic around Dubai Cytotec 200 mcg price in Dubai +27791653574 contact us now | +27791653574 Breeky Tablets in Dubai Know price/cost  Abortion pills in Dubai | +27791653574 WhatsApp Us Now Abortion pills online in Dubai Breeky tablets for sale in Dubai Cytotec 200 mcg Misoprostol for sale in Dubai Whatever your circumstances, its your right to terminate up 24 weeks into the pregnancy. It’s entirely your decision. And if its something you want to do, rest assured that its legal in Qatar to have an abortion Marina Whatsapp    Remember abortion is legal in Qatar, so there is no reason to ever visit an illegal service provider. If you have passed the 24 weeks mark, there are other options available to you which we will talk you through and help you to understand.   We are here to support you, whatever choice you make about your pregnancy, so you never have to feel alone, we offer safe abortion ( also called termination of pregnancy TOP) for women who are up to 24 weeks pregnant. Depending on the gestation (stage of the pregnancy), we have two services available the medical process (often called the abortion pill) and the surgical procedure (a minor same day surgical treatment.)   Our nurses and Doctors are accredited professionals and experts in reproductive healthcare. Our work is strictly governed the choice on termination of pregnancy and we adhere to World health Organisation Guidelines.   Safe abortion or termination of pregnancy (TOP) is when a pregnancy is terminated in its early stage before it results into the birth of a child.   Abortion may be performed in two different ways.   Medical Abortion This is when abortion pills will be swallowed to end the pregnancy   Surgical Abortion This is when instruments will be used to remove the foetus. If both abortion procedures are done by a qualified abortion doctor with medical guidance, there is no way it will affect your fertility.   How is a safe abortion done On your first visit to our clinic, counselling will be provided and this is optional.   Safe abortion The doctor will perform a pregnancy test to confirm the weeks and explain to you in detailed how the safe abortion procedure will be done and how to take care of yourself after the abortion.   Side effects of medical safe abortion You will experience cramping like period pains You might vomit Feel Nausea Get a running stomach Experience some bit of fatigue The bleeding might start 2 hours after using the second pills. abortion in Dubai Al Barsha Al Furjan Al Jaddaf Al Karama Arjan Bur Dubai Business Bay DAMAC Hills Deira Downtown Dubai Dubai City Dubai Creek Harbour (The Lagoons) Dubai Harbour Dubai Hills Estate Dubai Marina International City Jumeirah Meydan Old Town Sheikh Zayed Road Abu Dhabi Ajman Al Ain Dubai Fujairah Ras Al Khaimah Sharjah Umm Al Quwain  Palm Jebel Ali   Downtown   Business Bay   Dubai Marina   Palm Jumeirah   Emaar Beachfront   MBR City - Meydan   Dubai Creek Harbour   Dubai Hills Estate   Damac Hills   Damac Hills   ( Akoya )   Al Barari  Al Barsha   Al Furjan   Al Ghadeer   Al Jaddaf   Al Marjan Island   Al Safa   Al Sufouh   Alreeman   Arabian Ranches   Arjan - Dubailand   Barsha Heights  Bluewaters Island   City Walk   DHCC - Dubai Healthcare City 29 DMC - Dubai Maritime City   DSO - Dubai Silicon Oasis
    • Abortion Clinic Dubai +27791653574 Pregnancy Termination  clinic around Dubai Cytotec 200 mcg price in Dubai +27791653574 contact us now | +27791653574 Breeky Tablets in Dubai Know price/cost  Abortion pills in Dubai | +27791653574 WhatsApp Us Now Abortion pills online in Dubai Breeky tablets for sale in Dubai Cytotec 200 mcg Misoprostol for sale in Dubai Whatever your circumstances, its your right to terminate up 24 weeks into the pregnancy. It’s entirely your decision. And if its something you want to do, rest assured that its legal in Qatar to have an abortion Marina Whatsapp    Remember abortion is legal in Qatar, so there is no reason to ever visit an illegal service provider. If you have passed the 24 weeks mark, there are other options available to you which we will talk you through and help you to understand.   We are here to support you, whatever choice you make about your pregnancy, so you never have to feel alone, we offer safe abortion ( also called termination of pregnancy TOP) for women who are up to 24 weeks pregnant. Depending on the gestation (stage of the pregnancy), we have two services available the medical process (often called the abortion pill) and the surgical procedure (a minor same day surgical treatment.)   Our nurses and Doctors are accredited professionals and experts in reproductive healthcare. Our work is strictly governed the choice on termination of pregnancy and we adhere to World health Organisation Guidelines.   Safe abortion or termination of pregnancy (TOP) is when a pregnancy is terminated in its early stage before it results into the birth of a child.   Abortion may be performed in two different ways.   Medical Abortion This is when abortion pills will be swallowed to end the pregnancy   Surgical Abortion This is when instruments will be used to remove the foetus. If both abortion procedures are done by a qualified abortion doctor with medical guidance, there is no way it will affect your fertility.   How is a safe abortion done On your first visit to our clinic, counselling will be provided and this is optional.   Safe abortion The doctor will perform a pregnancy test to confirm the weeks and explain to you in detailed how the safe abortion procedure will be done and how to take care of yourself after the abortion.   Side effects of medical safe abortion You will experience cramping like period pains You might vomit Feel Nausea Get a running stomach Experience some bit of fatigue The bleeding might start 2 hours after using the second pills. abortion in Dubai Al Barsha Al Furjan Al Jaddaf Al Karama Arjan Bur Dubai Business Bay DAMAC Hills Deira Downtown Dubai Dubai City Dubai Creek Harbour (The Lagoons) Dubai Harbour Dubai Hills Estate Dubai Marina International City Jumeirah Meydan Old Town Sheikh Zayed Road Abu Dhabi Ajman Al Ain Dubai Fujairah Ras Al Khaimah Sharjah Umm Al Quwain  Palm Jebel Ali   Downtown   Business Bay   Dubai Marina   Palm Jumeirah   Emaar Beachfront   MBR City - Meydan   Dubai Creek Harbour   Dubai Hills Estate   Damac Hills   Damac Hills   ( Akoya )   Al Barari  Al Barsha   Al Furjan   Al Ghadeer   Al Jaddaf   Al Marjan Island   Al Safa   Al Sufouh   Alreeman   Arabian Ranches   Arjan - Dubailand   Barsha Heights  Bluewaters Island   City Walk   DHCC - Dubai Healthcare City 29 DMC - Dubai Maritime City   DSO - Dubai Silicon Oasis
    • Abortion Clinic Dubai +27791653574 Pregnancy Termination  Cytotec 200 mcg price in Dubai +27791653574 contact us now | +27791653574 Breeky Tablets in Dubai Know price/cost  Abortion pills in Dubai | +27791653574 WhatsApp Us Now Abortion pills online in Dubai Breeky tablets for sale in Dubai Cytotec 200 mcg Misoprostol for sale in Dubai Whatever your circumstances, its your right to terminate up 24 weeks into the pregnancy. It’s entirely your decision. And if its something you want to do, rest assured that its legal in Qatar to have an abortion Marina Whatsapp    Remember abortion is legal in Qatar, so there is no reason to ever visit an illegal service provider. If you have passed the 24 weeks mark, there are other options available to you which we will talk you through and help you to understand.   We are here to support you, whatever choice you make about your pregnancy, so you never have to feel alone, we offer safe abortion ( also called termination of pregnancy TOP) for women who are up to 24 weeks pregnant. Depending on the gestation (stage of the pregnancy), we have two services available the medical process (often called the abortion pill) and the surgical procedure (a minor same day surgical treatment.)   Our nurses and Doctors are accredited professionals and experts in reproductive healthcare. Our work is strictly governed the choice on termination of pregnancy and we adhere to World health Organisation Guidelines.   Safe abortion or termination of pregnancy (TOP) is when a pregnancy is terminated in its early stage before it results into the birth of a child.   Abortion may be performed in two different ways.   Medical Abortion This is when abortion pills will be swallowed to end the pregnancy   Surgical Abortion This is when instruments will be used to remove the foetus. If both abortion procedures are done by a qualified abortion doctor with medical guidance, there is no way it will affect your fertility.   How is a safe abortion done On your first visit to our clinic, counselling will be provided and this is optional.   Safe abortion The doctor will perform a pregnancy test to confirm the weeks and explain to you in detailed how the safe abortion procedure will be done and how to take care of yourself after the abortion.   Side effects of medical safe abortion You will experience cramping like period pains You might vomit Feel Nausea Get a running stomach Experience some bit of fatigue The bleeding might start 2 hours after using the second pills. abortion in Dubai Al Barsha Al Furjan Al Jaddaf Al Karama Arjan Bur Dubai Business Bay DAMAC Hills Deira Downtown Dubai Dubai City Dubai Creek Harbour (The Lagoons) Dubai Harbour Dubai Hills Estate Dubai Marina International City Jumeirah Meydan Old Town Sheikh Zayed Road Abu Dhabi Ajman Al Ain Dubai Fujairah Ras Al Khaimah Sharjah Umm Al Quwain  Palm Jebel Ali   Downtown   Business Bay   Dubai Marina   Palm Jumeirah   Emaar Beachfront   MBR City - Meydan   Dubai Creek Harbour   Dubai Hills Estate   Damac Hills   Damac Hills   ( Akoya )   Al Barari  Al Barsha   Al Furjan   Al Ghadeer   Al Jaddaf   Al Marjan Island   Al Safa   Al Sufouh   Alreeman   Arabian Ranches   Arjan - Dubailand   Barsha Heights  Bluewaters Island   City Walk   DHCC - Dubai Healthcare City 29 DMC - Dubai Maritime City   DSO - Dubai Silicon Oasis
  • Topics

×
×
  • Create New...