Jump to content
  • 0

Shift Click


FunKermaN

Question

Καλησπέρα παιδία μηπως μπορεί κάποιος να μου πει πως μπορώ να κάνω όταν κάποιος πατάει shift+click για να δει τα drop να γινεται μονο σε attackable npc ? πχ mob - boss klp

 

 

else if (Config.ALT_GAME_VIEWNPC)
{
// Set the target of the L2PcInstance player
player.setTarget(this);
 
// Send a Server->Client packet MyTargetSelected to the L2PcInstance player
// The player.getLevel() - getLevel() permit to display the correct color in the select window
MyTargetSelected my = new MyTargetSelected(getObjectId(), player.getLevel() - getLevel());
player.sendPacket(my);
my = null;
 
// Check if the player is attackable (without a forced attack)
if (isAutoAttackable(player))
{
// Send a Server->Client packet StatusUpdate of the L2NpcInstance to the L2PcInstance to update its HP bar
StatusUpdate su = new StatusUpdate(getObjectId());
su.addAttribute(StatusUpdate.CUR_HP, (int) getCurrentHp());
su.addAttribute(StatusUpdate.MAX_HP, getMaxHp());
player.sendPacket(su);
su = null;
}
 
NpcHtmlMessage html = new NpcHtmlMessage(0);
TextBuilder html1 = new TextBuilder("<html><body>");
 
html1.append("<br><center><font color=\"LEVEL\">[Combat Stats]</font></center>");
html1.append("<table border=0 width=\"100%\">");
html1.append("<tr><td>Max.HP</td><td>" + (int) (getMaxHp() / getStat().calcStat(Stats.MAX_HP, 1, this, null)) + "*" + (int) getStat().calcStat(Stats.MAX_HP, 1, this, null) + "</td><td>Max.MP</td><td>" + getMaxMp() + "</td></tr>");
html1.append("<tr><td>P.Atk.</td><td>" + getPAtk(null) + "</td><td>M.Atk.</td><td>" + getMAtk(null, null) + "</td></tr>");
html1.append("<tr><td>P.Def.</td><td>" + getPDef(null) + "</td><td>M.Def.</td><td>" + getMDef(null, null) + "</td></tr>");
html1.append("<tr><td>Accuracy</td><td>" + getAccuracy() + "</td><td>Evasion</td><td>" + getEvasionRate(null) + "</td></tr>");
html1.append("<tr><td>Critical</td><td>" + getCriticalHit(null, null) + "</td><td>Speed</td><td>" + getRunSpeed() + "</td></tr>");
html1.append("<tr><td>Atk.Speed</td><td>" + getPAtkSpd() + "</td><td>Cast.Speed</td><td>" + getMAtkSpd() + "</td></tr>");
html1.append("<tr><td>Race</td><td>" + getTemplate().race + "</td><td></td><td></td></tr>");
html1.append("</table>");
 
html1.append("<br><center><font color=\"LEVEL\">[Basic Stats]</font></center>");
html1.append("<table border=0 width=\"100%\">");
html1.append("<tr><td>STR</td><td>" + getSTR() + "</td><td>DEX</td><td>" + getDEX() + "</td><td>CON</td><td>" + getCON() + "</td></tr>");
html1.append("<tr><td>INT</td><td>" + getINT() + "</td><td>WIT</td><td>" + getWIT() + "</td><td>MEN</td><td>" + getMEN() + "</td></tr>");
html1.append("</table>");
 
html1.append("<br><center><font color=\"LEVEL\">[Drop Info]</font></center>");
html1.append("Rates legend: <font color=\"ff0000\">50%+</font> <font color=\"00ff00\">30%+</font> <font color=\"0000ff\">less than 30%</font>");
html1.append("<table border=0 width=\"100%\">");
 
for (final L2DropCategory cat : getTemplate().getDropData())
{
final FastList<L2DropData> drops = cat.getAllDrops();
if (drops != null)
for (final L2DropData drop : drops)
{
if (drop == null || ItemTable.getInstance().getTemplate(drop.getItemId()) == null)
{
continue;
}
 
final String name = ItemTable.getInstance().getTemplate(drop.getItemId()).getName();
 
if (drop.getChance() >= 600000)
{
html1.append("<tr><td><font color=\"ff0000\">" + name + "</font></td><td>" + (drop.isQuestDrop() ? "Quest" : cat.isSweep() ? "Sweep" : "Drop") + "</td></tr>");
}
else if (drop.getChance() >= 300000)
{
html1.append("<tr><td><font color=\"00ff00\">" + name + "</font></td><td>" + (drop.isQuestDrop() ? "Quest" : cat.isSweep() ? "Sweep" : "Drop") + "</td></tr>");
}
else
{
html1.append("<tr><td><font color=\"0000ff\">" + name + "</font></td><td>" + (drop.isQuestDrop() ? "Quest" : cat.isSweep() ? "Sweep" : "Drop") + "</td></tr>");
}
}
}
 
html1.append("</table>");
html1.append("</body></html>");
 
html.setHtml(html1.toString());
player.sendPacket(html);
 
html = null;
html1 = null;
}
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Τι Project χρησιμοποιείς αμα εχεις L2jfrozen

πήγαινε Εδω και  καντο True

 

Config/head/altsettings.properties

 

# Allows Players to Shift-click Mobs and view their Stats and Droplist
AltGameViewNpc = False
Link to comment
Share on other sites

  • 0

 

Τι Project χρησιμοποιείς αμα εχεις L2jfrozen

πήγαινε Εδω και  καντο True

 

Config/head/altsettings.properties

 

# Allows Players to Shift-click Mobs and view their Stats and Droplist
AltGameViewNpc = False

 

Σοβαρά τώρα δεν ήξερες τι να κάνεις και είπες να "κάνω spam να περάσει η ώρα" ?

Link to comment
Share on other sites

  • 0

 

- if (isAutoAttackable(player))

+ if (target instanceof L2Attackable)

 

CS1554242_02_A_BIG.jpg

 

L2PcInstance pl = player.getTarget();

if (pl instanceof L2Attackable)

Edited by Fanky
Link to comment
Share on other sites

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