Urbanhack

Members
  • Content Count

    128
  • Joined

  • Last visited

  • Feedback

    0%

Community Reputation

0 Neutral

About Urbanhack

  • Rank
    Heir

Contact Methods

  • Website URL
    http://gamemasters.superforo.net

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

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

  1. i solved it doing this: set all ips as default then: gameserver host = * externalip = your public or noip adress loginhost = your internal ip check it in cmd>ipconfig
  2. hi... im trying to insert this code to l2jserver last develop rev. but the pcstat.java isnt the same. so, anyone can helpme to do this? thx in advance: i test that command ingame and is working fine but i need the pcstat core side working. Core: +++ java/com/l2jserver/gameserver/model/actor/stat/PcStat.java (working copy) { return false; } + + // Check, if exp gain isn't disabled by voiced command + if (activeChar.canOverrideCond(PcCondOverride.DISABLE_EXP_GAIN)) + { + return false; + } if (!super.addExp(value)) { { return false; } - + + // Check, if exp gain isn't disabled by voiced command + if (activeChar.canOverrideCond(PcCondOverride.DISABLE_EXP_GAIN)) + { + addToExp = 0; + } + long baseExp = addToExp; int baseSp = addToSp; Datapack Side: Index: dist/game/data/scripts/handlers/MasterHandler.java =================================================================== import handlers.voicedcommandhandlers.Lang; import handlers.voicedcommandhandlers.StatsVCmd; import handlers.voicedcommandhandlers.TvTVoicedInfo; +import handlers.voicedcommandhandlers.UserOptions; import handlers.voicedcommandhandlers.Wedding; /** @@ -601,6 +602,7 @@ { // Voiced Command Handlers StatsVCmd.class, + UserOptions.class, // TODO: Add configuration options for this voiced commands: // CastleVCmd.class, // SetVCmd.class, Index: dist/game/data/scripts/handlers/voicedcommandhandlers/UserOptions.java =================================================================== --- dist/game/data/scripts/handlers/voicedcommandhandlers/UserOptions.java (revision 0) +++ dist/game/data/scripts/handlers/voicedcommandhandlers/UserOptions.java (working copy) @@ -0,0 +1,44 @@ +package handlers.voicedcommandhandlers; + +import com.l2jserver.gameserver.handler.IVoicedCommandHandler; +import com.l2jserver.gameserver.model.PcCondOverride; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; + +/** + * @author GKR, Mr.Deff + */ +public class UserOptions implements IVoicedCommandHandler +{ + private static final String[] _voicedCommands = + { + "expon", + "expoff", + }; + + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) + { + if (activeChar == null) + { + return false; + } + + switch(command) + { + case "expoff": + activeChar.addOverrideCond(PcCondOverride.DISABLE_EXP_GAIN); + activeChar.sendMessage("Exp gain disabled."); + break; + case "expon": + activeChar.removeOverridedCond(PcCondOverride.DISABLE_EXP_GAIN); + activeChar.sendMessage("Exp gain restored."); + break; + } + + return true; + } + + public String[] getVoicedCommandList() + { + return _voicedCommands; + } +}
  3. que sabes lo que tengo y lo que se? infeliz. if u know a lot then share and save your bullshit
  4. thanks you a lot for u response but we are looking for a free code cuz we are starting in a live server. so we dont have money ^^
  5. hi all, any votereward working with the last config rework for l2jserver last rev update (high five)? there is one in topgameserver but i cant adapt it cuz i dont know how. thx in advance.
  6. hi mate, im trying to use it in l2jserver high five but i stuck at this part: diff --git a/src/main/java/com/l2jserver/Config.java b/src/main/java/com/l2jserver/Config.java index 7596f49..3ab13de 100644 --- a/src/main/java/com/l2jserver/Config.java +++ b/src/main/java/com/l2jserver/Config.java @@ -111,6 +111,57 @@ public static final String EMAIL_CONFIG_FILE = "./config/Email.properties"; public static final String CH_SIEGE_FILE = "./config/ConquerableHallSiege.properties"; public static final String GEODATA_FILE = "./config/GeoData.properties"; + public static final String TGS_VOTE_FILE = "./config/tgsvote.properties"; + + // --------------------------------------------------- + // TGS Vote System + // --------------------------------------------------- + + public static boolean ENABLE_VOTE_SYSTEM; + public static long NEXT_VOTE_TIME; + public static boolean ENABLE_INDIVIDUAL_RANDOM_ITEM_REWARD; + public static boolean ENABLE_GLOBAL_RANDOM_ITEM_REWARD; + public static Map<String, Integer> REWARD_ITEMS_AMOUNT; + public static boolean ENABLE_VOTE_COMMUNITYBB; + public static boolean ENABLE_NPC_VOTE; + public static int NPC_VOTE; + public static boolean ENABLE_SHOW_VOTE_DIALOG; + public static String VOTE_DIALOG_COMMAND; + public static boolean ENABLE_GLOBAL_VOTE; + public static int INIT_TIME_TO_START_GLOBAL_REWARD; + public static int TIME_TO_CHECK_GLOBAL_VOTE_TASK; + public static boolean ENABLE_DUALBOX_GLOBAL_REWARD; + public static boolean ENABLE_ENCOURAGE_VOTES_COUNT; + public static int TIME_INTERVAL_TO_NEXT_ENCOURAGE_VOTES; + public static int INITIAL_TIME_ENCOURAGE_MESSAGE; + public static String ENCOURAGE_VOTES_MESSAGE; + public static String GLOBAL_SUCCESS_REWARD_MESSAGE; + public static int GLOBAL_VOTE_RECORD_TO_NEXT_REWARD; + public static Map<Integer, Integer> GLOBAL_VOTE_REWARD_ITEMS; // -------------------------------------------------- // L2J Variable Definitions // -------------------------------------------------- @@ -1197,6 +1248,289 @@ GAME_SERVER_SUBNETS = ipcd.getSubnets(); GAME_SERVER_HOSTS = ipcd.getHosts(); + // tgs vote system configuration + + final PropertiesParser tgsvote = new PropertiesParser(TGS_VOTE_FILE); + ENABLE_VOTE_SYSTEM = tgsvote.getBoolean("EnableVoteSystem", true); + NEXT_VOTE_TIME = tgsvote.getInt("NextVoteTime", 12) * 3600000; + ENABLE_INDIVIDUAL_RANDOM_ITEM_REWARD = tgsvote.getBoolean("EnableIndividualRandomItemReward", true); + ENABLE_GLOBAL_RANDOM_ITEM_REWARD = tgsvote.getBoolean("EnableGlobalRandomItemReward", true); + REWARD_ITEMS_AMOUNT = new HashMap<>(); + new HashMap<>(); + String[] rdata = tgsvote.getString("RewardItemsAmount", "tgs,3;hop,2;tz,2;global,3").split(";"); + if (rdata != null) + { + for (String raData : rdata) + { + String[] areward = raData.split(","); + if (areward.length != 2) + { + LOG.warn("[ItemRewardList]: invalid config property -> AmountRewardList {}", raData); + } + else + { + try + { + REWARD_ITEMS_AMOUNT.put(areward[0], Integer.parseInt(areward[1])); + } + catch (NumberFormatException nfe) + { + LOG.warn("[ItemRewardList]: invalid config property -> AmountList {}", raData); + } + } + } + } + ENABLE_VOTE_COMMUNITYBB = tgsvote.getBoolean("EnableVoteCommunityBB", true); + ENABLE_NPC_VOTE = tgsvote.getBoolean("EnableNpcVote", true); + NPC_VOTE = tgsvote.getInt("NpcVote", 25252); + ENABLE_SHOW_VOTE_DIALOG = tgsvote.getBoolean("EnableShowVoteDialog", false); + VOTE_DIALOG_COMMAND = tgsvote.getString("VoteDialogCommand", ".showvote"); + + ENABLE_GLOBAL_VOTE = tgsvote.getBoolean("EnableGlobalVote", true); + INIT_TIME_TO_START_GLOBAL_REWARD = tgsvote.getInt("InitTimeToStartGlobalReward", 30) * 1000;// -> In seconds + TIME_TO_CHECK_GLOBAL_VOTE_TASK = tgsvote.getInt("TimeToCheckGlobalVoteTask", 5) * 60000;// -> In minutes l2jserver update their code and i cant run it cuz config.java doesnt exist any more! thx in advance.
  7. not at logs, but yes! only when some announce appears in the system message
  8. hello again guys.. i need 1more thing.. i Need a Earthquake after an Announce for example welcome to the server + earthquake here is the code: Announcements.getInstance().announceToAll("Welcome To The Server!!"); Earthquake eq = new Earthquake(player.getX(), player.getY(), player.getZ(), 14, 3); Broadcast.toAllOnlinePlayers(eq); The Problem Is The "player" variable player.getX(), player.getY(), player.getZ() because doesn't exist into the code i Try With private L2Object player; but i get error. can someone helpme? ty again
  9. because this code isn't mine... anyway i solved from myself.. thx you a lot! close this th pls. GL ;)
  10. Then.. This Is Right?: PreparedStatement statement = con.prepareStatement("" + "SELECT" + " characters.charId," + " characters.char_name" + " FROM" + " characters.account_name = accounts.login" +" WHERE" + " characters.onlinetime > 0" + " GROUP BY" + " accounts.lastIP" + " ORDER BY" + " characters.level" + " DESC");
  11. Hello Guys.. Some One Can Help Me With This Error: Here Is The Error In Console: And This Is The Java Code: PreparedStatement statement = con.prepareStatement("" + "SELECT" + "characters.charId," + "characters.char_name" + "FROM" + "characters.account_name = accounts.login" +"WHERE" + "characters.onlinetime > 0" + "GROUP BY" + "accounts.lastIP" + "ORDER BY" + "characters.level" + "DESC"); Thx A Lot!
  12. this code is for the vote system... this code check the votes qty (from example hopzone page)... after get some votes, the server automatically give the characters some item for all online players. example. server check votes... after 50 votes give item after 50 votes again, give items again... etc etc. @sniffer* votesRequiredForReward = 0 VoteInfoUrl = http:// this is cool but.. i need a extended code example with your code shared votesRequiredForReward = 0 VoteInfoUrl = http:// ItemRewardId = ItemRewardQuantity = tx for help i can make the extended configs from myself but if some1 have it.. pls share this is cool... this rlz :P
  13. Hello Guys Im Looking For L2TopDaemon Code... Here Is The Config Example: # Enable / Disable Top Votes L2TopEnable = False # Min Delay For Votes Check L2TopDelay = 1 # Server Prefix L2TopServerPrefix = # Vote Link Url L2TopWebURL = http://urlexample.com/serverid=123132 # Item Reward L2TopWebRewardItemId = 1234 # Item Reward Quantity L2TopWebRewardItemCount = 1 This Config Do Not Exist Its Are Mine... Is Only An Example.. If Someone Have This Source Code Pls Share.