Jump to content

Recommended Posts

Posted

About //get_vitality

 

... who want to show informations in HTML file

 

1. Add This Code - Remove Old

 

			else if (cmd.equals("admin_get_vitality"))
		{
			target.getVitalityLevel();
			target.getVitalityPoints();

			target.updateVitalityLevel(false);

			String htmFile = "data/html/custom/other/vitality.htm";
			String htmContent = HtmCache.getInstance().getHtm(htmFile);
			if (htmContent != null)
			{
				NpcHtmlMessage html = new NpcHtmlMessage(1);
				html.setHtml(htmContent);
				html.replace("%get_Vitality_Level%", String.valueOf(target.getVitalityLevel()));
				html.replace("%get_Vitality_Points%", String.valueOf(target.getVitalityPoints()));
				activeChar.sendPacket(html);	
			}

		}

 

2. go html/custom ( create folder with name "other" ) (and in folder "other" create vitality.html)

     html/custom/other/vitality.htm

 

HTML Code

 

<html><body>
<br><br>
<center>
<img src="l2ui.squaregray" width="300" height="1"><br>
<font color=0099FF>Player Vitality Panel</font>
<img src="l2ui.squaregray" width="300" height="1">

<table width=300>
<tr><td><font color=00ff00>Player Vitality Level:</td><td>%get_Vitality_Level%</font></td></tr>
<tr><td><font color=00ff00>Player Vitality Points:</td><td>%get_Vitality_Points%</font></td></tr>
</table>

<img src="l2ui.squaregray" width="300" height="1">
</center><br>
</body></html>

 

Result - Photo

t455237_1.bmp.jpg

 

 

 

 

  • 1 month later...
  • 1 month later...
  • 4 months later...
  • 1 month later...

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


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..