Jump to content

InFocus

Members
  • Posts

    306
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by InFocus

  1. http://
  2. Well , melron i always will respect you! You are greate developer in java and everywhere in Lineage 2. and i want to understand this public boolean hasGradeEquipped(CrystalType type) { return getInventory().getItems().stream().filter(i -> i.isEquipped() && i.getItem().getCrystalType() == type).findAny().isPresent(); } i give you the code, i put this in l2pcinstance and this part of code //Usage if (activeChar.hasGradeEquipped(CrystalType.S)) { activeChar.sendMessage("You cannot use this command."); return false; } in .command? P.S.-And yes. this package no have player.class, so i must move in L2PcInstance
  3. Melron?
  4. Hh, what's this? :)) and yea, thank you Kara` for reply http://
  5. package handlers.voicedcommandhandlers; import java.util.HashMap; import java.util.Map; import com.l2jserver.gameserver.handler.IVoicedCommandHandler; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.clientpackets.Say2; import com.l2jserver.gameserver.network.serverpackets.CreatureSay; /** * @author L2Amyra */ public class FarmZone implements IVoicedCommandHandler { private static final String[] VOICED_COMMANDS = { "easy", "mid", "hard", "dungeon" }; private static final long delay = 5000; // Millisecounds private static Map<Integer, Long> _reuse = new HashMap<>(); @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { if (_reuse.containsKey(activeChar.getObjectId())) { if (_reuse.get(activeChar.getObjectId()) > System.currentTimeMillis()) { activeChar.sendMessage("Sorry, you can not use this command. You can use it within " + ((_reuse.get(activeChar.getObjectId()) - System.currentTimeMillis()) / 1000) + " sec's"); return false; } } { if (activeChar.isDead()) { activeChar.sendMessage("You can't teleport while you are dead!"); return false; } else if (activeChar.isInOlympiadMode()) { activeChar.sendMessage("You can't use this command durring olympiad!"); return false; } else if (activeChar.isInDuel()) { activeChar.sendMessage("You can't use this command when you are in duel!"); return false; } else if (activeChar.isInCombat()) { activeChar.sendMessage("You can't use this command when you are in combat!"); return false; } else if (activeChar.getPvpFlag() > 0) { CreatureSay i = new CreatureSay(activeChar.getObjectId(), Say2.PARTY, "admin", "You can't use this command when you are flagged. Try again...!"); activeChar.sendPacket(i); return false; } else if (activeChar.isJailed()) { activeChar.sendMessage("You can't use this command when you are in jail"); return false; } else if (activeChar.getInventory().getInventoryItemCount(57, 0) < 50000) { activeChar.sendMessage("No enough Adena!"); return false; } else if (activeChar.getKarma() > 0) { activeChar.sendMessage("Go away. You are not welcome here !"); return false; } else if (!activeChar.isNoble()) { activeChar.sendMessage("Only Noblesse players can teleport."); return false; } else if (activeChar.getLevel() < 80) { activeChar.sendMessage("You can only use the command after level 80"); return false; } { if (command.startsWith("easy")) { if (!activeChar.isNoble()) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); } if (!(activeChar.getLevel() < 80)) { activeChar.sendMessage("You have been teleported to easy zone "); activeChar.teleToLocation(89006, 27373, -15691); } _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if (command.startsWith("mid")) { if (!activeChar.isNoble()) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); } if (!(activeChar.getLevel() < 80)) { activeChar.sendMessage("You have been teleported to mid zone "); activeChar.teleToLocation(89006, 27373, -15691); } _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if (command.startsWith("hard")) { if (!activeChar.isNoble()) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); } if (!(activeChar.getLevel() < 80)) { activeChar.sendMessage("You have been teleported to hard zone "); activeChar.teleToLocation(89006, 27373, -15691); } _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } else if (command.startsWith("dungeon")) { if (!activeChar.isNoble()) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); } if (!(activeChar.getLevel() < 80)) { activeChar.sendMessage("You have been teleported to dungeon zone "); activeChar.teleToLocation(89006, 27373, -15691); } _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } } return true; } } @Override public String[] getVoicedCommandList() { return VOICED_COMMANDS; } }
  6. You right
  7. I want restrictions for command all items and for exemple for s grade don't ( S grade means armors and weapons)
  8. Hi all, i have just a question. It is possible to restrict all items (armor,weapons,etc etc) and leave just 1 type or armor to access in zone? I mean for VoiceCommand teleport?
  9. Thank you! it is working ! Solved. Can close topic ! Thanks to 'Baggos'
  10. I did now like that if (command.startsWith("easy")) { if (!activeChar.isNoble()) { activeChar.sendMessage("Only Noblesse players can teleport."); } activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(89006, 27373, -15691); activeChar.sendMessage("You have teleported to easy farm zone"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } and i no have Noble status and work teleport. I want without noblesse, do not teleport :)
  11. Good job 'Baggos' i have a bit complicated code. Every zone is independent. I must add isNoble for each other. Or i don't know if i can make it for all. This is for 1 zone if (command.startsWith("easy")) { activeChar.destroyItemByItemId("consume", 57, 50000, activeChar, true); activeChar.teleToLocation(89006, 27373, -15691); activeChar.sendMessage("You have teleported to easy farm zone"); _reuse.put(activeChar.getObjectId(), System.currentTimeMillis() + delay); } This is one. I have 3 more this config with 3 different zones. So i need the parameters for all in one
  12. Hi friends, i add voicecommand with custom locations and i want to know what line i need for Noblesse can teleport in zone? I try with activeChat.isNoble() but doesn't work.
  13. And mad on skype?
  14. The problem is , i work for that 30 euro 12 h 1 and 2 why u make me gipsy?
  15. Topic can be closed. Thank you all (Except Kara`)
  16. And sorry Kara`, i don;t want to be helped by scammers
  17. What u say about `other stuff`? Yes, i pay you look here http:// +40 = 70 euro for nothing ! you are really scammer from maxcheaters !
  18. I don't send you money for premium? or? and you are racist? make me gipsy?
  19. http:// and i can post here all chat from skype if u want more proves !
  20. Ok, let's post here paypal
  21. Well, i don't need your help when i pay you and you do nothing ! withdraw feedback right now from that topic !
  22. And this is what i want http://
  23. Well i solved, but not from this topic !! and this is fking godamn AbstractNpcInfo.java // writeC(_npc.getTeam().getId()); if (Config.L2JMOD_CHAMPION_ENABLE && _npc.isChampion()) { writeC(_npc.isAggressive() ? 2 : 1); } else { writeC(0); } Why i don't get any help ? and Kara` shut up. I pay u for premium 40 Euro and you make premium like for noobs and like without money !
  24. I fking try with _npc. Still don't working !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! i have fking 60 replyes and still don't fix? what site it's this?
×
×
  • Create New...