Command .7rb Fandc

yelopy

Участник
Пользователь
Сообщения
2
Розыгрыши
0
Репутация
0
Реакции
0
Баллы
72
Hi guys i am look for code for Fandc Datapack for command .7rb, i any can hekp please. I do but fail with my Source, Any can Help please. Thank You.
[CITAR]
package l2f.gameserver.handler.voicecommands.impl;


import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import l2f.commons.lang.reference.HardReference;
import l2f.commons.threading.RunnableImpl;
import l2f.gameserver.Config;
import l2f.gameserver.ThreadPoolManager;
import l2f.gameserver.ai.CtrlIntention;
import l2f.gameserver.database.DatabaseFactory;
import l2f.gameserver.handler.voicecommands.IVoicedCommandHandler;
import l2f.gameserver.handler.voicecommands.VoicedCommandHandler;
import l2f.gameserver.instancemanager.CoupleManager;
import l2f.gameserver.instancemanager.ReflectionManager;
import l2f.gameserver.listener.actor.player.OnAnswerListener;
import l2f.gameserver.model.GameObjectsStorage;
import l2f.gameserver.model.Player;
import l2f.gameserver.model.Skill;
import l2f.gameserver.model.Zone;
import l2f.gameserver.model.entity.Couple;
import l2f.gameserver.model.quest.QuestState;
import l2f.gameserver.network.serverpackets.ConfirmDlg;
import l2f.gameserver.network.serverpackets.MagicSkillUse;
import l2f.gameserver.network.serverpackets.NpcHtmlMessage;
import l2f.gameserver.network.serverpackets.SetupGauge;
import l2f.gameserver.network.serverpackets.SystemMessage2;
import l2f.gameserver.network.serverpackets.components.CustomMessage;
import l2f.gameserver.network.serverpackets.components.SystemMsg;
import l2f.gameserver.skills.AbnormalEffect;
import l2f.gameserver.tables.SkillTable;
import l2f.gameserver.utils.Location;


import org.apache.commons.lang3.tuple.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class SevenRB implements IVoicedCommandHandler
{
private static final String QUEST_NAME = "Q00254_LegendaryTales";
private static final String SERVER_NAME = "(Server Name)";
private static final String[] commands =
{
"7rb",
};


public boolean useVoicedCommand(String command, Player activeChar, String target)
{
if (command.equalsIgnoreCase("7rb"))
{
QuestState st = activeChar.getQuestState(QUEST_NAME);
NpcHtmlMessage m = new NpcHtmlMessage();
m.setHtml(buildHtml(st));
activeChar.sendPacket(m);
}
return true;
}

private static final String buildHtml(QuestState st)
{
StringBuilder sb = new StringBuilder();
sb.append("<html><head>");
sb.append("<title>Lineage II " + SERVER_NAME + "</title>");
sb.append("</head>");
sb.append("<body><br>");
sb.append("<br>7 Rb Quest (Legendary Tales) status:<br>");
if (st == null)
{
sb.append("Quest is not started yet. Please visit Glimore in dragon valley in order to start it.");
sb.append("<br>");
}
else
{
if (st.isCond(1))
{
for (Bosses boss : Bosses.class.getEnumConstants())
{
sb.append(boss.getName() + ": ");
sb.append(checkMask(st, boss) ? "<font color=\"00FF00\">Killed.</font>" : "<font color=\"FF0000\">Not killed.</font>");
sb.append("<br>");
}
}
else
{
sb.append("Legendary Tales quest is completed.");
sb.append("<br>");
}
}
sb.append("</body></html>");
return sb.toString();
}

private static boolean checkMask(QuestState qs, Bosses boss)
{
int pos = boss.getMask();
return ((qs.getInt("raids") & pos) == pos);
}

@Override
public String[] getVoicedCommandList()
{
return commands;
}

public static enum Bosses
{
EMERALD_HORN("Emerald Horn"),
DUST_RIDER("Dust Rider"),
BLEEDING_FLY("Bleeding Fly"),
BLACK_DAGGER("Blackdagger Wing"),
SHADOW_SUMMONER("Shadow Summoner"),
SPIKE_SLASHER("Spike Slasher"),
MUSCLE_BOMBER("Muscle Bomber");

private final String name;
private final int _mask;

private Bosses(String name)
{
this.name = name;
_mask = 1 << ordinal();
}

public int getMask()
{
return _mask;
}

public String getName()
{
return name;
}
}
}


[/CITAR]
 

Сверху Снизу