criss22

Members
  • Content Count

    483
  • Joined

  • Last visited

  • Feedback

    0%

Community Reputation

0 Neutral

About criss22

  • Rank
    Elder

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi all, someone know from where i can get code for L2Tower for this type of captcha?
  2. Hi all, how i can set Rates from community board for premium? I need help syntax in Java. I have this: content = content.replace("%ratexp%", String.valueOf(Math.round(Config.RATE_XP))); content = content.replace("%ratesp%", String.valueOf(Math.round(Config.RATE_SP))); content = content.replace("%ratedrop%", String.valueOf(Math.round(Config.RATE_DROP_ITEMS))); And looks like http:// I want when player get Premium, to increase +1 for all rates. Thanks
  3. Yauuu, hello all. I want to ask if it's possible to make voice command available for CB. When i press .info, to open in CB. And how i can edit that. Thanks
  4. I speak about this http:// I solved. Topic can be closed. Thank you !
  5. This is voice command .giran .aden .ore etc etc. But i want when i enter in Safe zone, to type .Info with specific zone drop only for Safe. (When i enter in another farm zone, i want when player type .info, to have info about farm zone, not for Safe zone.)
  6. Hellou. Today i want to make something different. it is not hard, but i need an order how to start xD. I want to make voicecommandhandler for 5 zones. All info to be individual. for ex. Safe zone have info about low drop and Farm 1 to have info with mid drop. I think i must edit zones and add voicecommand on code. Or idk. I need a hint.
  7. I delete what i did. But teleport for noble still no working...at custom npc i mean. And this npc comes with project.
  8. But lol, i try to set zone for noble only, but no work...i still can teleport without noblesse. LOL?
  9. I try to make individual zones for premium. And i try to add in table Teleport, tab Premium, like fornoble. I make setting in L2TeleportLocation.java public void setIsPremium(boolean val) { _premiumService = val; } +++ private boolean _premiumService; +++ public boolean IsPremium() { return _premiumService; } TeleportLocationTable.java public void reloadAll() { _teleports.clear(); try (Connection con = L2DatabaseFactory.getInstance().getConnection(); Statement s = con.createStatement(); ResultSet rs = s.executeQuery("SELECT id, loc_x, loc_y, loc_z, price, fornoble, premium, itemId FROM teleport")) { L2TeleportLocation teleport; while (rs.next()) { teleport = new L2TeleportLocation(); teleport.setTeleId(rs.getInt("id")); teleport.setX(rs.getInt("loc_x")); teleport.setY(rs.getInt("loc_y")); teleport.setZ(rs.getInt("loc_z")); teleport.setPrice(rs.getInt("price")); teleport.setIsForNoble(rs.getInt("fornoble") == 1); teleport.setIsPremium(rs.getInt("premium") == 1); teleport.setItemId(rs.getInt("itemId")); _teleports.put(teleport.getTeleId(), teleport); } _log.info(getClass().getSimpleName() + ": Loaded " + _teleports.size() + " Teleport Location Templates."); } catch (Exception e) { _log.error(getClass().getSimpleName() + ": Error loading Teleport Table.", e); } if (Config.CUSTOM_TELEPORT_TABLE) { int _cTeleCount = _teleports.size(); try (Connection con = L2DatabaseFactory.getInstance().getConnection(); Statement s = con.createStatement(); ResultSet rs = s.executeQuery("SELECT id, loc_x, loc_y, loc_z, price, fornoble, premium, itemId FROM custom_teleport")) { L2TeleportLocation teleport; while (rs.next()) { teleport = new L2TeleportLocation(); teleport.setTeleId(rs.getInt("id")); teleport.setX(rs.getInt("loc_x")); teleport.setY(rs.getInt("loc_y")); teleport.setZ(rs.getInt("loc_z")); teleport.setPrice(rs.getInt("price")); teleport.setIsForNoble(rs.getInt("fornoble") == 1); teleport.setIsPremium(rs.getInt("premium") == 1); teleport.setItemId(rs.getInt("itemId")); _teleports.put(teleport.getTeleId(), teleport); } _cTeleCount = _teleports.size() - _cTeleCount; if (_cTeleCount > 0) { _log.info(getClass().getSimpleName() + ": Loaded " + _cTeleCount + " Custom Teleport Location Templates."); } } catch (Exception e) { _log.warn(getClass().getSimpleName() + ": Error while creating custom teleport table " + e.getMessage(), e); } } } Table Design http:// And in Teleports table i set premium to 1, and nothing happend
  10. Hello all. I make tab for real status for player with P. Atk, M. Atk, Atk. Spd., C. Speed. And i make it in TopBBSManagerm. Now, in TopBBSManager,java i have content = content.replace("%patk%", String.valueOf((int) ((L2Character) activeChar).getPAtk(null))); all good. When i add html to first page, i see real status. but when i add in Link http:// I see like that Where i must set private String replaceVars(L2PcInstance activeChar, String content) ? Thank you. Project: L2jSunrise High Five
  11. else if (command.startsWith(_servicesBBSCommand + "_teleport")) { BoardsManager.getInstance().addBypass(activeChar, "Service Teleport", command); content = HtmCache.getInstance().getHtm(activeChar, activeChar.getHtmlPrefix(), "data/html/CommunityBoard/services/gatekeeper/premium.htm"); separateAndSend(content, activeChar); if (!CommunityServicesConfigs.COMMUNITY_SERVICES_TP_ALLOW) { activeChar.sendMessage("This function is disabled by admin."); return; } if (!activeChar.isPremium() || activeChar.isInCombat() || activeChar.isJailed() || activeChar.isAlikeDead() || activeChar.isInOlympiadMode() || activeChar.inObserverMode() || SunriseEvents.isInEvent(activeChar) || OlympiadManager.getInstance().isRegistered(activeChar)) { activeChar.sendMessage("Cannot use at the moment."); return; } try { String tp = commandSeperator(command); Integer[] c = new Integer[3]; c[0] = TopListsLoader.getInstance().getTeleportInfo(Integer.parseInt(tp))[0]; c[1] = TopListsLoader.getInstance().getTeleportInfo(Integer.parseInt(tp))[1]; c[2] = TopListsLoader.getInstance().getTeleportInfo(Integer.parseInt(tp))[2]; boolean onlyForNobless = TopListsLoader.getInstance().getTeleportInfo(Integer.parseInt(tp))[3] == 1; int itemIdToGet = TopListsLoader.getInstance().getTeleportInfo(Integer.parseInt(tp))[4]; int price = TopListsLoader.getInstance().getTeleportInfo(Integer.parseInt(tp))[5]; if (!CommunityServicesConfigs.ALLOW_TELEPORT_DURING_SIEGE) { if (SiegeManager.getInstance().getSiege(c[0], c[1], c[2]) != null) { activeChar.sendPacket(SystemMessageId.NO_PORT_THAT_IS_IN_SIGE); return; } else if (TownManager.townHasCastleInSiege(c[0], c[1]) && activeChar.isInsideZone(ZoneIdType.TOWN)) { activeChar.sendPacket(SystemMessageId.NO_PORT_THAT_IS_IN_SIGE); return; } } if (Conditions.checkPlayerItemCount(activeChar, itemIdToGet, price)) { if (onlyForNobless && !activeChar.isNoble() && !activeChar.isGM()) { activeChar.sendMessage("Only noble chars can teleport there."); return; } if (activeChar.isTransformed()) { if ((activeChar.getTransformationId() == 9) || (activeChar.getTransformationId() == 8)) { activeChar.untransform(); } } if (activeChar.isInsideZone(ZoneIdType.PEACE) || activeChar.isGM()) { activeChar.setInstanceId(0); activeChar.teleToLocation(c[0], c[1], c[2]); } else { activeChar.abortCast(); activeChar.abortAttack(); activeChar.sendPacket(ActionFailed.STATIC_PACKET); activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); activeChar.setTarget(activeChar); activeChar.disableAllSkills(); Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, 1050, 1, 0, 0), 810000); activeChar.sendPacket(new SetupGauge(SetupGauge.BLUE, 0)); activeChar.setSkillCast(ThreadPoolManager.getInstance().scheduleGeneral(new Teleport(activeChar, c[0], c[1], c[2]), 0)); activeChar.forceIsCasting(10 + GameTimeController.getInstance().getGameTicks() + (0 / GameTimeController.MILLIS_IN_TICK)); } activeChar.destroyItemByItemId("Community Teleport", itemIdToGet, price, activeChar, true); } } catch (Exception e) { SecurityActions.startSecurity(activeChar, SecurityType.COMMUNITY_SYSTEM); } } else if (command.startsWith(_servicesBBSCommand + "_teleport")) { BoardsManager.getInstance().addBypass(activeChar, "Service Teleport", command); content = HtmCache.getInstance().getHtm(activeChar, activeChar.getHtmlPrefix(), "data/html/CommunityBoard/services/gatekeeper/normal.htm"); separateAndSend(content, activeChar); if (!CommunityServicesConfigs.COMMUNITY_SERVICES_TP_ALLOW) { activeChar.sendMessage("This function is disabled by admin."); return; } if (activeChar.isInCombat() || activeChar.isJailed() || activeChar.isAlikeDead() || activeChar.isInOlympiadMode() || activeChar.inObserverMode() || SunriseEvents.isInEvent(activeChar) || OlympiadManager.getInstance().isRegistered(activeChar)) { activeChar.sendMessage("Cannot use at the moment."); return; } try { String tp = commandSeperator(command); Integer[] c = new Integer[3]; c[0] = TopListsLoader.getInstance().getTeleportInfo(Integer.parseInt(tp))[0]; c[1] = TopListsLoader.getInstance().getTeleportInfo(Integer.parseInt(tp))[1]; c[2] = TopListsLoader.getInstance().getTeleportInfo(Integer.parseInt(tp))[2]; boolean onlyForNobless = TopListsLoader.getInstance().getTeleportInfo(Integer.parseInt(tp))[3] == 1; int itemIdToGet = TopListsLoader.getInstance().getTeleportInfo(Integer.parseInt(tp))[4]; int price = TopListsLoader.getInstance().getTeleportInfo(Integer.parseInt(tp))[5]; if (!CommunityServicesConfigs.ALLOW_TELEPORT_DURING_SIEGE) { if (SiegeManager.getInstance().getSiege(c[0], c[1], c[2]) != null) { activeChar.sendPacket(SystemMessageId.NO_PORT_THAT_IS_IN_SIGE); return; } else if (TownManager.townHasCastleInSiege(c[0], c[1]) && activeChar.isInsideZone(ZoneIdType.TOWN)) { activeChar.sendPacket(SystemMessageId.NO_PORT_THAT_IS_IN_SIGE); return; } } if (Conditions.checkPlayerItemCount(activeChar, itemIdToGet, price)) { if (onlyForNobless && !activeChar.isNoble() && !activeChar.isGM()) { activeChar.sendMessage("Only noble chars can teleport there."); return; } if (activeChar.isTransformed()) { if ((activeChar.getTransformationId() == 9) || (activeChar.getTransformationId() == 8)) { activeChar.untransform(); } } if (activeChar.isInsideZone(ZoneIdType.PEACE) || activeChar.isGM()) { activeChar.setInstanceId(0); activeChar.teleToLocation(c[0], c[1], c[2]); } else { activeChar.abortCast(); activeChar.abortAttack(); activeChar.sendPacket(ActionFailed.STATIC_PACKET); activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); activeChar.setTarget(activeChar); activeChar.disableAllSkills(); Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, 1050, 1, 0, 0), 810000); activeChar.sendPacket(new SetupGauge(SetupGauge.BLUE, 0)); activeChar.setSkillCast(ThreadPoolManager.getInstance().scheduleGeneral(new Teleport(activeChar, c[0], c[1], c[2]), 0)); activeChar.forceIsCasting(10 + GameTimeController.getInstance().getGameTicks() + (0 / GameTimeController.MILLIS_IN_TICK)); } activeChar.destroyItemByItemId("Community Teleport", itemIdToGet, price, activeChar, true); } } catch (Exception e) { SecurityActions.startSecurity(activeChar, SecurityType.COMMUNITY_SYSTEM); } } With this setting, without Premium, i can use teleport at Premium tab
  12. Well, i have here code for Normal and for Premium
  13. Hi all, how i can make Second Tab to work just for premium users? I try if (!activeChar.isPremium() && !activeChar.isGM()) { activeChar.sendMessage("Only Premium chars can teleport there."); return; } but no work..nothing happend!