Jump to content

[Updated][Share]Vitality System L2J,L2JFree,L2Emu!


Recommended Posts

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

 

 

 

 

Link to comment
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...