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...

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.

×
×
  • Create New...