Jump to content

Carvalho123456

Members
  • Posts

    9
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

1 Follower

About Carvalho123456

Profile Information

  • Gender
    Male

Recent Profile Visitors

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

Carvalho123456's Achievements

Apprentice

Apprentice (3/16)

  • Dedicated Rare
  • First Post Rare
  • Conversation Starter Rare
  • Week One Done Rare
  • One Month Later Rare

Recent Badges

5

Reputation

  1. Hey guys, I'm trying to create my own dll to send the player's hwid, this is just a test but I'm having difficulty sending the information I can't compile from this.. true_SendPacket = (_SendPacket) splice((unsigned char*) addr, new_SendPacket); I'm making the code available... can anyone help me? I'm using RGuard dsetup as a base (I'm learning how to work with dll) Download TEST HWID SOURCE DLL
  2. =================================================================== com.l2jfrozen.Config.java @4204 + public static int SIEGE_DAY; + public static void loadSiege() + { + final String SIEGE = FService.SIEGE_CONFIGURATION_FILE; + + try + { + Properties SiegeDay = new Properties(); + InputStream is = new FileInputStream(new File(SIEGE)); + SiegeDay.load(is); + is.close(); + + SIEGE_DAY = Integer.parseInt(SiegeDay.getProperty("SiegeDay", "14")); + } + catch (Exception e) + { + e.printStackTrace(); + throw new Error("Failed to Load " + SIEGE + " File."); + } + } + + // ============================================================ public static boolean SCRIPT_DEBUG; public static boolean SCRIPT_ALLOW_COMPILATION; public static boolean SCRIPT_CACHE; public static boolean SCRIPT_ERROR_LOG; @4727 loadEnchantConfig(); loadBossConfig(); + loadSiege(); =================================================================== gameserver\config\head\siege.properties + +#Day to next siege (Retail: SiegeDay = 14) +SiegeDay = 7 + # Countdown duration of the siege (in minutes) SiegeLength = 120 ==================================================================== com.l2jfrozen.FService.java @48 public static final String SEVENSIGNS_FILE = "./config/head/sevensigns.properties"; - public static final String SIEGE_CONFIGURATION_FILE = "./config/head/siege.properties"; + public static final String SIEGE_CONFIGURATION_FILE = "./config/head/siege.properties"; public static final String ELIT_CLANHALL_CONFIG_FILE = "./config/head/elitclanhall.properties"; ==================================================================== com.l2jfrozen.gameserver.model.entity.siege.Siege.java @1682 private void setNextSiegeDate() { while (getCastle().getSiegeDate().getTimeInMillis() < Calendar.getInstance().getTimeInMillis()) { // Set next siege date if siege has passed // Schedule to happen in 14 days - getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 14); + getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, Config.SIEGE_DAY); } // Allow registration for next siege _isRegistrationOver = false; }
  3. Google Translator: without this flood, when the guy uses interface to enchant very fast, he breaks the maximum packet the character can receive. And it also doesn't make life easier for the player, who wants to put +20 in the blink of an eye.
  4. PTBR: Bom, espero que ninguem precise usar, pq em meu servidor, apareceu esse problema, e os jogadores estavam fazendo isso com enchant 50%, armas indo +16 muito facil... de qualquer forma, o codigo esta ai caso alguém precise Google Translator: Well, I hope no one needs to use it, because on my server, this problem appeared, and players were doing this with 50% enchant, weapons going +16 very easy... anyway, the code is there in case anyone needs it
  5. PTBR: Atenção administradores, verifiquem isso em sua revisão Caso usem Enchant Stackavel Colocar o UseItem Flood em 0, pode trazer prejuízo para seu servidor! Normalmente os ADMS colocam o useflood em 0 para os players fazerem macro de equipar set Isso pode bugar o enchant, se o player usar interface e clicar muito rápido para enchantar, o enchant buga, e vai direto sem falhar para corrigir esse problema criei um UseEnchantFlood que permite usar o UseItem em 0 sem bugar o enchant Google Translator: Attention admins, check this in your revision If you use Enchant Stackavel Putting the UseItem Flood at 0 can bring damage to your server! Normally ADMS set useflood to 0 for players to do macro equip set This can bug the enchant, if the player uses interface and click too fast to enchant, the enchant bugs, and goes straight without fail to fix this problem I created a UseEnchantFlood which allows using UseItem at 0 without bugging enchant (REV: FROZEN) ------------------------------------------------------------------------------ com.l2jfrozen.Config.java @3408 public static FloodProtectorConfig FLOOD_PROTECTOR_USE_ITEM; +public static FloodProtectorConfig FLOOD_PROTECTOR_USE_ENCHANT; public static FloodProtectorConfig FLOOD_PROTECTOR_ROLL_DICE; @3444 FLOOD_PROTECTOR_USE_ITEM = new FloodProtectorConfig("UseItemFloodProtector"); +FLOOD_PROTECTOR_USE_ENCHANT = new FloodProtectorConfig("UseEnchantFloodProtector"); FLOOD_PROTECTOR_ROLL_DICE = new FloodProtectorConfig("RollDiceFloodProtector"); @3499 loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_USE_ITEM, "UseItem", "1"); +loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_USE_ENCHANT, "UseEnchant", "15"); loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ROLL_DICE, "RollDice", "42"); ------------------------------------------------------------------------------ com.l2jfrozen.gameserver.util.FloodProtectors.java @32 /** * Use-item flood protector. */ private final FloodProtectorAction _useItem; +/** + * Use-Enchant flood protector. + */ +private final FloodProtectorAction _useEnchant; /** * Roll-dice flood protector. */ private final FloodProtectorAction _rollDice; /** * Firework flood protector. */ @121 _useItem = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_USE_ITEM); +_useEnchant = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_USE_ENCHANT); _rollDice = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_ROLL_DICE); @159 public FloodProtectorAction getUseItem() { return _useItem; } /** * Returns {@link #_rollDice}. * @return {@link #_rollDice} */ +public FloodProtectorAction getUseEnchant() +{ + return _useEnchant; +} + +/** + * Returns {@link #_rollDice}. + * @return {@link #_rollDice} + */ public FloodProtectorAction getRollDice() { return _rollDice; } ------------------------------------------------------------------------------ com.l2jfrozen.gameserver.network.clientpackets.RequestEnchantItem.java @135 L2PcInstance activeChar = getClient().getActiveChar(); if (activeChar == null || _objectId == 0) return; +if (!getClient().getFloodProtectors().getUseEnchant().tryPerformAction("Error! 404")) +{ + activeChar.sendPacket(SystemMessage.sendString("Flood Enchant")); + return; +} if (activeChar.getActiveTradeList() != null) { activeChar.cancelActiveTrade(); activeChar.sendMessage("Your trade canceled"); return; } ------------------------------------------------------------------------------ \gameserver\config\protected\flood.properties @20 FloodProtectorUseItemPunishmentTime = 0 +# UseItem - item usage flooding +FloodProtectorUseEnchantInterval = 15 +FloodProtectorUseEnchantLogFlooding = False +FloodProtectorUseEnchantPunishmentLimit = 0 +FloodProtectorUseEnchantPunishmentType = none +FloodProtectorUseEnchantPunishmentTime = 0 # Potion - attempts to Potion usage flooding FloodProtectorPotionInterval = 5
  6. PTBR: Já que o Alt+G não tem como visualizar o WH do Clan Resolvi criar esse código //whc, espero que gostem, é bem útil ainda sou iniciante no java caso o código tenha algo errado Rev: Frozen (fácil adaptação para outras) Google Translator: Since Alt+G has no way to view the Clan's WH I decided to create this code //whc, I hope you like it, it's very useful I'm still a java beginner in case the code has something wrong Rev: Frozen (easy adaptation to others) --------------------------------------------------------------- com.l2jfrozen.gameserver.handler.AdminCommandHandler.java @97 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminVip; +import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminWHC; import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminWho; @200 registerAdminCommandHandler(new AdminVip()); +registerAdminCommandHandler(new AdminWHC()); registerAdminCommandHandler(new AdminWho()); --------------------------------------------------------------- com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminWHC.java +package com.l2jfrozen.gameserver.handler.admincommandhandlers; + +import com.l2jfrozen.gameserver.datatables.sql.ClanTable; +import com.l2jfrozen.gameserver.handler.IAdminCommandHandler; +import com.l2jfrozen.gameserver.model.L2Clan; +import com.l2jfrozen.gameserver.model.L2World; +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; +import com.l2jfrozen.gameserver.network.serverpackets.CreatureSay; +import com.l2jfrozen.gameserver.network.serverpackets.WareHouseWithdrawalList; + +/** + * Codigo de visualização de Warehouse Clan. Esse codigo permite o adm visualizar o wh de qualquer player que tenha clan. O codigo é //whc clicado em um target com clan - + * Google Translator: Warehouse Clan preview code. This code allows the admin to view what any player who has a clan. The code is //whc clicked on a target with clan + * @author yycarvalho + */ +public class AdminWHC implements IAdminCommandHandler +{ + private static final String[] ADMIN_COMMANDS = + { + "admin_whc", + }; + + @Override + public boolean useAdminCommand(String command, L2PcInstance activeChar) + { + L2PcInstance Player = L2World.getInstance().getPlayer(activeChar.getTargetId()); + if (command.equals("admin_whc") && activeChar.getTarget() != null && Player.getClan() != null) + { + L2Clan Clan = ClanTable.getInstance().getClan(Player.getClanId()); + int LeaderId = Clan.getLeaderId(); + L2PcInstance PlayerLeader = L2PcInstance.load(LeaderId); + PlayerLeader.setActiveWarehouse(PlayerLeader.getClan().getWarehouse()); + activeChar.sendPacket(new WareHouseWithdrawalList(PlayerLeader, WareHouseWithdrawalList.CLAN)); + } + else + { + activeChar.sendPacket(new CreatureSay(activeChar.getObjectId(), 0, activeChar.getName(), "Incorrect target")); + } + + return false; + } + + @Override + public String[] getAdminCommandList() + { + return ADMIN_COMMANDS; + } +} Credits: me Créditos: eu
  7. again, google translator, hope you understand but items are not linked to obj_id? and when the player deletes the character, the items are also not deleted? and even if the player deletes the character and I delete the account, and the player creates the account with the same name including the character, will the obj_id not be different?
  8. (I am Brazilian and I used Google Translate to make this publication. so, if I couldn't understand, I beg your pardon. Whoever understands, I hope you like it) Well, I see that a lot of people use autocreate on their servers this causes an excess of players who make mistakes when logging in and ends up creating a new account when he realizes that he didn’t log in to his account, he relogs and logs in correctly but with that the account is still in the database I don't know anything about sql, and I managed to make a command that compares if the account has a char created if not, the account is deleted DELETE FROM accounts WHERE login NOT IN (SELECT account_name FROM characters); with that you can create a Query in your Navicat for this command to be saved or better, automate it with Navicat's own Schedule and place it for this command to be executed daily, weekly, or as many times as you want and together with this command, you can also use ... the one that will identify if the player has more than 3 months without logging in and deleting the char DELETE FROM characters WHERE lastAccess < 466560000; Tutorial: How to let auto commands run in navicat 1- Click on Quary 2-Paste the command in the Query Editor tab and click on Save As 3-Type a name for your query and you can close the quary 4-Click on Schedule 5-New Batch Job 6-Locate the file you just saved and double click 7-it goes to the bottom 8-click Save As and enter a name for your Job 9-Close the Schedule 10-Click on your job, still on the Schedule tab 11-Set Task Schedule 12-Set password, and type your computer's admin password and click Apply "For Navicat to execute Schedule functions automatically, it is necessary that Windows has an admin password, otherwise it will not release" 13-Click on the Agenda tab 14-Click New 15- And select the best type of schedule for you and set the time and OK NEVER YOUR DATABASE WILL BE FILLED WITH ACCOUNTS THAT ARE NOT USED Credits: myself
×
×
  • Create New...