maxicroma

VIP Member
  • Content Count

    216
  • Joined

  • Last visited

  • Feedback

    0%

Community Reputation

0 Neutral

About maxicroma

  • Rank
    Knight

Profile Information

  • Current Mood
    Bored
  • Gender
    Male
  • Country
    Argentina
  • Location
    Argentina
  • Interests
    L2OFF

Recent Profile Visitors

1,474 profile views
  1. its shared for free on somme russian forums ,this one its not binded so you don't need key. GF Vanganth Last
  2. i found some crap inside the sources this thing called pvpzone.java package zones; import java.util.concurrent.ScheduledFuture; import l2f.commons.threading.RunnableImpl; import l2f.gameserver.ThreadPoolManager; import l2f.gameserver.listener.zone.OnZoneEnterLeaveListener; import l2f.gameserver.model.Creature; import l2f.gameserver.model.Player; import l2f.gameserver.model.Zone; import l2f.gameserver.scripts.ScriptFile; import l2f.gameserver.utils.ReflectionUtils; /** * @author L2Mythras */ public class PvPZone implements ScriptFile { private static ZoneListener _zoneListener; @Override public void onLoad() { _zoneListener = new ZoneListener(); Zone zone = ReflectionUtils.getZone("[pvp_zone_toi]"); zone.addListener(_zoneListener); } @Override public void onReload() { on reload } @Override public void onShutdown() { on shutdown } public class ZoneListener implements OnZoneEnterLeaveListener { @Override public void onZoneEnter(Zone zone, Creature cha) { ScheduledFuture<?> _checkTask = null; if (zone.getParams() == null || !cha.isPlayable()) return; if (!cha.isPlayer()) return; cha.getPlayer().sendMessage("You have entered in a PvP Zone!"); cha.startPvPFlag(null); cha.getPlayer().sendMessage("You are now flagged!"); _checkTask = ThreadPoolManager.getInstance().scheduleAtFixedRate(new checkZone((Player)cha, zone, _checkTask), 60000, 60000); } public class checkZone extends RunnableImpl { Player _cha; Zone _zone; ScheduledFuture<?> _checkTask; public checkZone(Player cha, Zone zone, ScheduledFuture<?> checkTask) { _cha = cha; _zone = zone; _checkTask = checkTask; } @Override public void runImpl() throws Exception { if(_cha.isInZone(_zone)) { _cha.startPvPFlag(null); } else { _checkTask.cancel(true); _checkTask = null; } } } @Override public void onZoneLeave(Zone zone, Creature cha) { if (cha == null) return; cha.getPlayer().sendMessage("You have left the PvP Zone !"); cha.getPlayer().stopPvPFlag(); } } }
  3. Hi im using L2Mythras files h5,i want to make a custom instant flag zone (you will be flagged all the time inside that zone). Its possible to made it ?
  4. Hi im looking for some help to change how the "Ancient Enchants" works on H5. Here its a enchant description pic. As you can read this enchant has a limit ,you can only use it on weapons by above +16. So Basically i want to change this restriction to use it from +15 to +20. Im using H5 Mythras Files ,i tried to find this "Restriction" on sources but i couldn't.
  5. Great how should i run this script ,(seriously ,have no idea )?
  6. The Hauthd have a reload option ,there its some way to call this function every x time ?
  7. i tried in both ip to put 127.0.0.1 ,but its the same it stucks on the server selection
  8. Basically i need to setup a L2OFF server with a dynamic ip(this ip changes every time that the modem restarts) I have a no-ip service,and vangath files ,so i use a noip of 15 letters (it can't containt more than 15 lettters on the dbo.server table) Example serv67.ddns.net So When Hauth Loads the server it says External IP "127.0.0.1" ,why not serv67.ddns.net? No problem i tried to log in the server but it get stucked on the server seleccion screen. Both ports are open
  9. Well i added some lines more public static synchronized void setNewOlympiadEnd() { Announcements.getInstance().announceToAll(new SystemMessage(SystemMsg.ROUND_S1_OF_THE_GRAND_OLYMPIAD_GAMES_HAS_STARTED).addNumber(Olympiad._currentCycle)); Calendar currentTime = Calendar.getInstance(); currentTime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); currentTime.set(Calendar.AM_PM, Calendar.AM); currentTime.set(Calendar.HOUR, 12); currentTime.set(Calendar.MINUTE, 0); currentTime.set(Calendar.SECOND, 0); if (currentTime.getTimeInMillis() < System.currentTimeMillis()) currentTime.add(Calendar.WEEK_OF_MONTH, 1); _olympiadEnd = currentTime.getTimeInMillis(); Calendar nextChange = Calendar.getInstance(); Olympiad._nextWeeklyChange = nextChange.getTimeInMillis() + Config.ALT_OLY_WPERIOD; Olympiad._isOlympiadEnd = false; Announcements.getInstance().announceToAll(new SystemMessage2(SystemMsg.OLYMPIAD_PERIOD_S1_HAS_STARTED).addInteger(Olympiad._currentCycle)); } And wheare says _olympiadEnd = currentTime.getTimeInMillis() ; I get this error
  10. package l2f.gameserver.model.entity.olympiad; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.Calendar; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import l2f.commons.dbutils.DbUtils; import l2f.gameserver.Announcements; import l2f.gameserver.Config; import l2f.gameserver.dao.OlympiadNobleDAO; import l2f.gameserver.database.DatabaseFactory; import l2f.gameserver.instancemanager.ServerVariables; import l2f.gameserver.model.base.ClassId; import l2f.gameserver.network.serverpackets.SystemMessage; import l2f.gameserver.network.serverpackets.SystemMessage2; import l2f.gameserver.network.serverpackets.components.SystemMsg; import l2f.gameserver.templates.StatsSet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class OlympiadDatabase { private static final Logger _log = LoggerFactory.getLogger(OlympiadDatabase.class); public static synchronized void loadNoblesRank() { Olympiad._noblesRank = new ConcurrentHashMap<Integer, Integer>(); Map<Integer, Integer> tmpPlace = new HashMap<Integer, Integer>(); Connection con = null; PreparedStatement statement = null; ResultSet rset = null; try { con = DatabaseFactory.getInstance().getConnection(); statement = con.prepareStatement(OlympiadNobleDAO.GET_ALL_CLASSIFIED_NOBLESS); rset = statement.executeQuery(); int place = 1; while (rset.next()) tmpPlace.put(rset.getInt(Olympiad.CHAR_ID), place++); } catch(Exception e) { _log.error("Olympiad System: Error!", e); } finally { DbUtils.closeQuietly(con, statement, rset); } int rank1 = (int) Math.round(tmpPlace.size() * 0.01); int rank2 = (int) Math.round(tmpPlace.size() * 0.10); int rank3 = (int) Math.round(tmpPlace.size() * 0.25); int rank4 = (int) Math.round(tmpPlace.size() * 0.50); if (rank1 == 0) { rank1 = 1; rank2++; rank3++; rank4++; } for (int charId : tmpPlace.keySet()) if (tmpPlace.get(charId) <= rank1) Olympiad._noblesRank.put(charId, 1); else if (tmpPlace.get(charId) <= rank2) Olympiad._noblesRank.put(charId, 2); else if (tmpPlace.get(charId) <= rank3) Olympiad._noblesRank.put(charId, 3); else if (tmpPlace.get(charId) <= rank4) Olympiad._noblesRank.put(charId, 4); else Olympiad._noblesRank.put(charId, 5); } /** * Сбрасывает информацию о ноблесах, сохраняя очки за предыдущий период */ public static synchronized void cleanupNobles() { _log.info("Olympiad: Calculating last period..."); Connection con = null; PreparedStatement statement = null; try { con = DatabaseFactory.getInstance().getConnection(); statement = con.prepareStatement(OlympiadNobleDAO.OLYMPIAD_CALCULATE_LAST_PERIOD); statement.setInt(1, Config.OLYMPIAD_BATTLES_FOR_REWARD); statement.execute(); DbUtils.close(statement); statement = con.prepareStatement(OlympiadNobleDAO.OLYMPIAD_CLEANUP_NOBLES); statement.setInt(1, Config.OLYMPIAD_POINTS_DEFAULT); statement.execute(); } catch(Exception e) { _log.error("Olympiad System: Couldn't calculate last period!", e); } finally { DbUtils.closeQuietly(con, statement); } for (Integer nobleId : Olympiad._nobles.keySet()) { StatsSet nobleInfo = Olympiad._nobles.get(nobleId); int points = nobleInfo.getInteger(Olympiad.POINTS); int compDone = nobleInfo.getInteger(Olympiad.COMP_DONE); nobleInfo.set(Olympiad.POINTS, Config.OLYMPIAD_POINTS_DEFAULT); if (compDone >= Config.OLYMPIAD_BATTLES_FOR_REWARD) { nobleInfo.set(Olympiad.POINTS_PAST, points); nobleInfo.set(Olympiad.POINTS_PAST_STATIC, points); } else { nobleInfo.set(Olympiad.POINTS_PAST, 0); nobleInfo.set(Olympiad.POINTS_PAST_STATIC, 0); } nobleInfo.set(Olympiad.COMP_DONE, 0); nobleInfo.set(Olympiad.COMP_WIN, 0); nobleInfo.set(Olympiad.COMP_LOOSE, 0); nobleInfo.set(Olympiad.GAME_CLASSES_COUNT, 0); nobleInfo.set(Olympiad.GAME_NOCLASSES_COUNT, 0); nobleInfo.set(Olympiad.GAME_TEAM_COUNT, 0); } } public static List<String> getClassLeaderBoard(int classId) { List<String> names = new ArrayList<String>(); try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement(classId == 132 ? OlympiadNobleDAO.GET_EACH_PAST_CLASS_LEADER_SOULHOUND : OlympiadNobleDAO.GET_EACH_PAST_CLASS_LEADER)) { statement.setInt(1, classId); try (ResultSet rset = statement.executeQuery()) { while (rset.next()) names.add(rset.getString(Olympiad.CHAR_NAME)); } } catch (SQLException e) { _log.error("Olympiad System: Couldn't get old noble ranking from db!", e); } return names; } /** * Returning List of Character Names * Names are ordered DESC by olympiad_points(current Period) * Name is taken into consideration only if base class = classId * @param classId Id of the Base Class we is looking for * @return Names of the best players */ public static List<String> getClassLeaderBoardCurrent(int classId) { List<String> names = new ArrayList<String>(); try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement(classId == 132 ? OlympiadNobleDAO.GET_EACH_CURRENT_CLASS_LEADER_SOULHOUND : OlympiadNobleDAO.GET_EACH_CURRENT_CLASS_LEADER)) { statement.setInt(1, classId); statement.setInt(2, Config.OLYMPIAD_BATTLES_FOR_REWARD); try (ResultSet rset = statement.executeQuery()) { while (rset.next()) names.add(rset.getString(Olympiad.CHAR_NAME)); } } catch (SQLException e) { _log.error("Olympiad System: Couldn't get current noble ranking from db!", e); } return names; } public static synchronized void sortHerosToBe() { if (Olympiad._period != 1) return; Olympiad._heroesToBe = new ArrayList<StatsSet>(); Connection con = null; PreparedStatement statement = null; ResultSet rset = null; try { con = DatabaseFactory.getInstance().getConnection(); StatsSet hero; for (ClassId id : ClassId.VALUES) { if (id.getId() == 133) continue; if (id.level() == 3) { statement = con.prepareStatement(id.getId() == 132 ? OlympiadNobleDAO.OLYMPIAD_GET_HEROS_SOULHOUND : OlympiadNobleDAO.OLYMPIAD_GET_HEROS); statement.setInt(1, id.getId()); statement.setInt(2, Config.OLYMPIAD_BATTLES_FOR_REWARD); rset = statement.executeQuery(); if (rset.next()) { hero = new StatsSet(); hero.set(Olympiad.CLASS_ID, id.getId()); hero.set(Olympiad.CHAR_ID, rset.getInt(Olympiad.CHAR_ID)); hero.set(Olympiad.CHAR_NAME, rset.getString(Olympiad.CHAR_NAME)); Olympiad._heroesToBe.add(hero); } DbUtils.close(statement, rset); } } } catch(Exception e) { _log.error("Olympiad System: Couldnt heros from db!", e); } finally { DbUtils.closeQuietly(con, statement, rset); } } public static synchronized void saveNobleData(int nobleId) { OlympiadNobleDAO.getInstance().replace(nobleId); } public static synchronized void saveNobleData() { if (Olympiad._nobles == null) return; for (Integer nobleId : Olympiad._nobles.keySet()) saveNobleData(nobleId); } public static synchronized void setNewOlympiadEnd() { Announcements.getInstance().announceToAll(new SystemMessage(SystemMsg.ROUND_S1_OF_THE_GRAND_OLYMPIAD_GAMES_HAS_STARTED).addNumber(Olympiad._currentCycle)); Calendar currentTime = Calendar.getInstance(); currentTime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); currentTime.set(Calendar.AM_PM, Calendar.AM); currentTime.set(Calendar.HOUR, 12); currentTime.set(Calendar.MINUTE, 0); currentTime.set(Calendar.SECOND, 0); Olympiad._olympiadEnd = currentTime.getTimeInMillis(); currentTime.add(Calendar.WEEK_OF_MONTH, 1); Calendar nextChange = Calendar.getInstance(); Olympiad._nextWeeklyChange = nextChange.getTimeInMillis() + Config.ALT_OLY_WPERIOD; Olympiad._isOlympiadEnd = false; Announcements.getInstance().announceToAll(new SystemMessage2(SystemMsg.OLYMPIAD_PERIOD_S1_HAS_STARTED).addInteger(Olympiad._currentCycle)); } public static void save() { saveNobleData(); ServerVariables.set("Olympiad_CurrentCycle", Olympiad._currentCycle); ServerVariables.set("Olympiad_Period", Olympiad._period); ServerVariables.set("Olympiad_End", Olympiad._olympiadEnd); ServerVariables.set("Olympiad_ValdationEnd", Olympiad._validationEnd); ServerVariables.set("Olympiad_NextWeeklyChange", Olympiad._nextWeeklyChange); } } Thats the whole archive i miss somethink?
  11. Im keep having this same problem even when i copy the period end time into weekly end time record in database and "synchronize" them
  12. Now it will give you weekly points when a new season start im right?
  13. Well i think its working now at least it say "period ends in 3 days(sunday)". What about the Weekly Change times , it says (6 days and 23 hours) Should i change the default value # Olympiad Weekly Period, Default: 604800000 AltOlyWPeriod = 604800000 To AltOlyWPeriod = 151200000 ?