Jump to content
  • 0

[Question] For NPC Stat


Question

Posted

so i have question some one can told me how can add this to default / merchant / teleport /  this code have add to Welcome.htm but how will gonna happen for NPC ?? :(

 

  adminReply.setFile("data/html/admin/"+filename);
  adminReply.replace("%name%", player.getName());
  adminReply.replace("%level%", String.valueOf(player.getLevel()));
  adminReply.replace("%clan%", String.valueOf(ClanTable.getInstance().getClan(player.getClanId())));
  adminReply.replace("%xp%", String.valueOf(player.getExp()));
  adminReply.replace("%sp%", String.valueOf(player.getSp()));
  adminReply.replace("%class%", player.getTemplate().className);
  adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
  adminReply.replace("%classid%", String.valueOf(player.getClassId()));
  adminReply.replace("%x%", String.valueOf(player.getX()));
  adminReply.replace("%y%", String.valueOf(player.getY()));
  adminReply.replace("%z%", String.valueOf(player.getZ()));
  adminReply.replace("%currenthp%", String.valueOf((int)player.getCurrentHp()));
  adminReply.replace("%maxhp%", String.valueOf(player.getMaxHp()));
  adminReply.replace("%karma%", String.valueOf(player.getKarma()));
  adminReply.replace("%currentmp%", String.valueOf((int)player.getCurrentMp()));
  adminReply.replace("%maxmp%", String.valueOf(player.getMaxMp()));
  adminReply.replace("%pvpflag%", String.valueOf(player.getPvpFlag()));
  adminReply.replace("%currentcp%", String.valueOf((int)player.getCurrentCp()));
  adminReply.replace("%maxcp%", String.valueOf(player.getMaxCp()));
  adminReply.replace("%pvpkills%", String.valueOf(player.getPvpKills()));
  adminReply.replace("%pkkills%", String.valueOf(player.getPkKills()));
  adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
  adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
  adminReply.replace("%percent%", String.valueOf(Util.roundTo(((float)player.getCurrentLoad()/(float)player.getMaxLoad())*100, 2)));
  adminReply.replace("%patk%", String.valueOf(player.getPAtk(null)));
  adminReply.replace("%matk%", String.valueOf(player.getMAtk(null,null)));
  adminReply.replace("%pdef%", String.valueOf(player.getPDef(null)));
  adminReply.replace("%mdef%", String.valueOf(player.getMDef(null, null)));
  adminReply.replace("%accuracy%", String.valueOf(player.getAccuracy()));
  adminReply.replace("%evasion%", String.valueOf(player.getEvasionRate(null)));
  adminReply.replace("%critical%", String.valueOf(player.getCriticalHit(null,null)));
  adminReply.replace("%runspeed%", String.valueOf(player.getRunSpeed()));
  adminReply.replace("%patkspd%", String.valueOf(player.getPAtkSpd()));
  adminReply.replace("%matkspd%", String.valueOf(player.getMAtkSpd()));
  adminReply.replace("%access%",String.valueOf(player.getAccessLevel()));
  adminReply.replace("%account%",account);
  adminReply.replace("%ip%",ip);

4 answers to this question

Recommended Posts

  • 0
Posted

This code its for l2j, if you are working with java server, that's why this its the wrong section.

And btw, this is not for NPC Stats, this is a builder page to View / Edit the chars.

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
Answer this question...

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