Ir para conteúdo
  • Cadastre-se
  • 0

Ajuda com HTML


SheZ

Pergunta

Olá boa noite a todos, to pensando em abrir um servidor pra relembrar antigamente, só que ele será com opção de Multi Skill, e estou precisando de uma ajuda pra HTML do NPC que vai dar as Skills.

 

Na rev que vou utilizar no caso L2JFrozen, a HTML já está incluída no JAVA, mas preciso que ela seja na datapack para ficar melhor a separação de classes, races e etc... mas não to conseguindo!

 

A parte do código é essa:

 

if (Config.ALT_GAME_SKILL_LEARN)
{
final String id = command.substring(9).trim();
if (id.length() != 0)
{
player.setSkillLearningClassId(ClassId.values()[integer.parseInt(id)]);
showSkillList(player, ClassId.values()[integer.parseInt(id)]);
}
else
{
boolean own_class = false;
for (final ClassId cid : _classesToTeach)
{
if (cid.equalsOrChildOf(player.getClassId()))
{
own_class = true;
break;
}
}
String text = "<html><body><center>Skill learning:</center><br>";
if (!own_class)
{
final String mages = player.getClassId().isMage() ? "fighters" : "mages";
text += "Skills of your class are the easiest to learn.<br>" + "Skills of another class are harder.<br>" + "Skills for another race are even more hard to learn.<br>" + "You can also learn skills of " + mages + ", and they are" + " the hardest to learn!<br>" + "<br>";
}
// make a list of classes
if (_classesToTeach.length != 0)
{
int count = 0;
ClassId classCheck = player.getClassId();
while (count == 0 && classCheck != null)
{
for (final ClassId cid : _classesToTeach)
{
if (cid.level() != classCheck.level())
{
continue;
}
if (SkillTreeTable.getInstance().getAvailableSkills(player, cid).length == 0)
{
continue;
}
text += "<a action=\"bypass -h npc_%objectId%_SkillList " + cid.getId() + "\">Learn " + cid + "'s class Skills</a><br>\n";
count++;
}
classCheck = classCheck.getParent();
}
classCheck = null;
}
else
{
text += "No Skills.<br>";
}
text += "</body></html>";
insertObjectIdAndShowChatWindow(player, text);
player.sendPacket(ActionFailed.STATIC_PACKET);
text = null;
}
}
else
{
player.setSkillLearningClassId(player.getClassId());
showSkillList(player, player.getClassId());
}
}

 

 

 

Alguém poderia me ajudar ?

Agradecido.

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts recomendados


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.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  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.

Processando...




×
×
  • Criar Novo...

Important Information

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.