Hey what i do wrong? all import good need get classid and if match then teleport to town.
@Override
protected void onEnter(Creature Creature)
{
Creature.setInsideZone(ZoneId.FLAG, true);
if (Creature instanceof Player)
{
Player player = Creature.getActingPlayer();
PvpFlagTaskManager.getInstance().remove(player);
noblesse.getEffects(player, player);
player.updatePvPFlag(1);
((Player) Creature).sendMessage("AUTO NOBLESS ON");
Creature.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
// THIS ZONE WRONG
if (player.getClassId() && 83)
player.teleToLocation(Rnd.get(82833, 83000),Rnd.get(148605, 148800),-3472, 0);
player.sendMessage("Your class is not allowed in the PvP zone.");
return;
}
}
error:
Bad operand types for binary operator '&&'
[javac] if (player.getClassId() && 83)
[javac] first type: ClassId
Lineage2 Acessen- INTERLUDE PVP-PVE LOW CLASSIC
RETAIL SERVER !!
💫 NPC BUFFER SENCILLO A PARTIR DE LVL 20
Exp x1.50 | Adena x1.50
Sistema de Casas por alquiler ( incluyen niveles para mejorar la casa + beneficios )
Sistema de tradeo mediante buffalo ( transporte de items de ciudad a ciudad, con ganancia de adena ).
Website: acessen.com.ar
Discord: https://discord.gg/jzyyQtEKmf PARA MAS INFORMACIÓN
🎯 Looking for a stable and fun server to grind with your friends?
Join L2Roosters over 1000+ players online daily, intense epic battles, fair economy, no corruption, and exciting daily events!
💎 Got friends? Bring them along and claim 1 WEEK of FREE Premium Access!
🔥 Start your journey with us today!
Hey everyone!
L2Evolution – Inspired by L2Pride
We’ve just released more info about the server everything you need to know is now available!
👉 Learn more here: https://l2evolution.org/Forum/wiki/
🌐 Official Website: l2evolution.org
Question
martuxas1
Hey what i do wrong? all import good need get classid and if match then teleport to town.
@Override protected void onEnter(Creature Creature) { Creature.setInsideZone(ZoneId.FLAG, true); if (Creature instanceof Player) { Player player = Creature.getActingPlayer(); PvpFlagTaskManager.getInstance().remove(player); noblesse.getEffects(player, player); player.updatePvPFlag(1); ((Player) Creature).sendMessage("AUTO NOBLESS ON"); Creature.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true); // THIS ZONE WRONG if (player.getClassId() && 83) player.teleToLocation(Rnd.get(82833, 83000),Rnd.get(148605, 148800),-3472, 0); player.sendMessage("Your class is not allowed in the PvP zone."); return; } }
error:
Bad operand types for binary operator '&&' [javac] if (player.getClassId() && 83) [javac] first type: ClassId
7 answers to this question
Recommended Posts