Jump to content

lazzytr

Members
  • Posts

    26
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

1 Follower

About lazzytr

Contact Methods

  • Website URL
    https://maxcheaters.com

Profile Information

  • Gender
    Not Telling
  • Country
    Turkey

Recent Profile Visitors

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

lazzytr's Achievements

Apprentice

Apprentice (3/16)

  • Conversation Starter Rare
  • Reacting Well Rare
  • First Post Rare
  • Collaborator Rare
  • Dedicated Rare

Recent Badges

2

Reputation

  1. I want to give 1 GCM per hour to online players. I am editing the java code I found for this, but it does not give an hourly reward. package services; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.concurrent.ScheduledFuture; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import l2f.gameserver.Config; import l2f.gameserver.ThreadPoolManager; import l2f.gameserver.database.mysql; import l2f.gameserver.model.GameObjectsStorage; import l2f.gameserver.model.Player; import l2f.gameserver.scripts.ScriptFile; /** * * @author Special */ public class AutoReward implements ScriptFile, Runnable { private static final Logger _log = LoggerFactory.getLogger(Player.class); private static final int REWARD_DELAY = 3600000; // 1h. private static final int REQUIRED_ONLINE = Config.DAILY_REWARD_REQUIRED_ONLINE * 3600000; // 1h. private static final int NOT_REWARD_AFK_DELAY = Config.DAILY_REWARD_AFK_TIME * 60000; // 10 mins.(Config 10) private static final DateFormat TIME_FORMAT = new SimpleDateFormat("HH"); private boolean CLEANED = false; private ScheduledFuture<?> _task = null; @Override public void run() { if(CLEANED && time() >= Config.DAILY_REWARD_END_HOUR || time() < Config.DAILY_REWARD_START_HOUR) CLEANED = false; if(time() >= Config.DAILY_REWARD_START_HOUR && time() <= Config.DAILY_REWARD_END_HOUR) { for(Player player : GameObjectsStorage.getAllPlayersForIterate()) { if(player.isOnline() && player.getUptime() >= REQUIRED_ONLINE && (System.currentTimeMillis() - player.getLastNotAfkTime()) > NOT_REWARD_AFK_DELAY) { if(!isRewardedDB(player)) { player.sendMessage("You have been rewarded for online time!"); setRewardDB(player); } } } } if(CLEANED == false && time() <= Config.DAILY_REWARD_START_HOUR) { CLEANED = true; wipeRewardDB(); } } public static int time() { return Integer.parseInt(TIME_FORMAT.format(new Date(System.currentTimeMillis()))); } public static boolean isRewardedDB(Player player) { String value = Config.DAILY_REWARD_PROTECTION.equals("HWID") ? player.getHWID() : player.getIP(); if(player.getVar("daily_reward") != null) return true; if(mysql.get("SELECT value FROM character_variables WHERE name='daily_reward' AND value='"+value+"'") != null) return true; return false; } public static void setRewardDB(Player player) { String value = Config.DAILY_REWARD_PROTECTION.equals("HWID") ? player.getHWID() : player.getIP(); mysql.set("INSERT INTO character_variables (obj_id, type, name, value, expire_time) VALUES (?,?,?,?,?)", player.getObjectId(), "user-var", "daily_reward", value, -1); } public static void wipeRewardDB() { mysql.set("DELETE FROM `character_variables` WHERE `type`='user-var' and `name`='daily_reward'"); } @Override public void onLoad() { _log.info("Loaded Service: AutoReward"); if(_task == null) _task = ThreadPoolManager.getInstance().scheduleAtFixedDelay(this, REWARD_DELAY, REWARD_DELAY); } @Override public void onReload() { if(_task != null) { _task.cancel(true); _task = null; } _task = ThreadPoolManager.getInstance().scheduleAtFixedDelay(this, REWARD_DELAY, REWARD_DELAY); } @Override public void onShutdown() { // } }
  2. Hello, I want to set the Olympics to end in 2 weeks. On the 1st and 15th of the month. L2JFandc pack. Can you help me plz. --------------------------------------------------------------------------------------------------------------------------------- # If you change the config make a request to the database: DELETE FROM `server_variables` WHERE `name` = 'Olympiad_End'; # Example (every two weeks): # Default = 1 and AltOlyDateEndWeekly = 0 AltOlyDateEndMonthly = 1,15 # If AltOlyDateEndWeekly is not 0, then it will be used over AltOlyDateEndMonthly, and olympiad will end every week on a certain week day # Sunday=1, Monday=2, Tuesday=3, Wednesday=4, Thursday=5, Friday=6, Saturday=7, Disabled=0 will use AltOlyDateEndMonthly instead AltOlyDateEndWeekly = 0
  3. I can't use these commands for Fandc pack. do you have? or share please.
  4. package handlers.voicedcommandhandlers; import l2r.gameserver.handler.IVoicedCommandHandler; import l2r.gameserver.model.actor.instance.L2PcInstance; import l2r.gameserver.model.quest.QuestState; import l2r.gameserver.network.serverpackets.NpcHtmlMessage; /** * @author -Invoke */ public class CommandRaid implements IVoicedCommandHandler { private static final String QUEST_NAME = "Q00254_LegendaryTales"; private static final String SERVER_NAME = "7RB Quest"; private static final String[] COMMANDS = { "7rb", }; @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { if (command.equalsIgnoreCase("7rb")) { QuestState state = activeChar.getQuestState(QUEST_NAME); NpcHtmlMessage html = new NpcHtmlMessage(); html.setHtml(buildHtml(state)); activeChar.sendPacket(html); } return true; } private static final String buildHtml(QuestState st) { StringBuilder sb = new StringBuilder(); sb.append("<html noscrollbar><head>"); sb.append("<title>" + SERVER_NAME + "</title>"); sb.append("</head>"); sb.append("<body><br>"); sb.append("<br>7 Rb Quest (Legendary Tales) status:<br>"); if (st == null) { sb.append("Quest not found. Please visit Glimore in Dragon Valley in order to begin the quest."); sb.append("<br>"); } else { if (st.isCond(1)) { for (Bosses boss : Bosses.class.getEnumConstants()) { sb.append(boss.getName() + ": "); sb.append(checkMask(st, boss) ? "<font color=\"00FF00\">Killed.</font>" : "<font color=\"FF0000\">Not killed.</font>"); sb.append("<br>"); } } else { sb.append("Legendary Tales quest is completed."); sb.append("<br>"); } } sb.append("</body></html> Make here "L2J_SunriseProject_Data\dist\game\data\scripts\handlers\voicedcommandhandlers\CommandRaid.java" Paste the code above Add it here "L2J_SunriseProject_Data\dist\game\data\scripts\handlers\MasterHandler.java" "import handlers.voicedcommandhandlers.CommandRaid;" and compile. It should work from all chars using the .7rb command
  5. You target a player and then send a captcha. this is how it works. .report , someone can tell me? Or i need find code implemented
  6. Hi. Gameserver/config/events Look at the ini files. Chance HWID working IP... # Check for windows by IP or HWid? CtF_CheckWindowMethod = IP
  7. When I issue the partymatcing command. it gives this error. [03.03.21 01:04:44] WARN: missing html page ./config/zeus/htm//eng/engine-party-matching-invitation-windows.htm
  8. I don't know the code for restriction I don't know the code for restriction. I want to prevent TRADE in a certain area. <set name="blocked_actions" val="open_private_store;open_private_workshop" /> For no trade. I can't find which command to write? sample: open_trade ?
  9. I want to close trade for a zone. Sample <set name="blocked_actions" val="open_private_store;open_private_workshop;" /> /trade _open_trade _open_exchange for a zone. Sample <zone name="[giran_pvp_battle]" type="battle_zone"> <set name="index" val="3"/> <set name="entering_message_no" val="283"/> <set name="leaving_message_no" val="284"/> <polygon> <coords loc="72493 142263 -3850 -3350"/> <coords loc="73493 142264 -3850 -3350"/> <coords loc="73493 143261 -3850 -3350"/> <coords loc="72495 143258 -3850 -3350"/> </polygon> </zone> I'm waiting for your help...
  10. Hello there. I have been dealing 1 month. Server does not auto restart. what could be the problem ? Auto restart is running once after restart from the admin panel. Does not restart in the fallowing days .. Help please thx... # Setup the server restarts # # ============================ # Daily Auto-Restart on schedule. The restart format chronology. # * * * * * command to be executed # ? ? ? ? ? # ? ? ? ? ? # ? ? ? ? ? # ? ? ? ? ?????? day of week (0 - 6) (0 or 6 are Sunday to Saturday, or use names) # ? ? ? ??????????? month (1 - 12) # ? ? ???????????????? day of month (1 - 31) # ? ????????????????????? hour (0 - 23) # ?????????????????????????? min (0 - 59) # If the field is empty, the daily Auto-Restart is disabled by default, 5:00 # Every day at hour 05:00 = AutoRestartAt = 0 5 * * * # Every day at hour 23:00 = AutoRestartAt = 0 23 * * * # Every Monday at hour 05:00 = AutoRestartAt = 0 5 * * 1 AutoRestartAt = 0 7 * * *
  11. I found the solution. I corrected the buffer.sql canuse setting in Navicat settings...
×
×
  • Create New...