Jump to content

Urbanhack

Members
  • Posts

    135
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Urbanhack

  1. 15 minutes ago, vampir said:

    If you are talking about very fast switching of pages, then the solution is to add flood protection in community board bypasses(RequestBypassToServer). It shouldn't send html quickly after another one was send or it should send it with a delay.

    Though if the problem is one specific html, then you have error there. In order to fix it I recommend you to cut parts of the html and narrow down spot where error might be located.

    ehcache.xml has nothing to do with the problem.

    no, the problem isnt if u switch fast the pages. u can do it slowly but still crashing randomly, can crash in one or other page. i dont know whats wrong.

  2. hi, im working with fandc files, the problem is in the cb, if u change between windows into the cb the game crash. im not only with this issue, all players have the same problem.
    the error given:

    CPU : AuthenticAMD  AMD Ryzen 7 3700X 8-Core Processor              @ 3594 MHz 2047MB RAM
    Video : NVIDIA GeForce GTX 980 Ti (4187)
    PosCode : LS1(273) 83432:148200:-3404 16/1 [692]
    
    Insufficient Memory.
    Please check the Virtual Memory Option and avilable hard drive space.
    You can check them by going to : Control Panel->System->Advanced->Performance->Settings->Advanced->Virtual memory.
    
    History: FMallocWindows::Malloc <- Size 2188 new <- NCHtmlTable::CreateFrame <- NCHtmlTable::LoadHtml 
      <- NCHtmlFrame::CreateTableFrame <- NCHtmlFrame::LoadHtml <- NCHtmlTable::CreateFrame <- NCHtmlTable::LoadHtml 
      <- NCHtmlFrame::CreateTableFrame <- NCHtmlFrame::LoadHtml <- NCHtmlTable::CreateFrame <- NCHtmlTable::LoadHtml
      <- NCHtmlFrame::CreateTableFrame <- NCHtmlFrame::LoadHtml <- NCHtmlTable::CreateFrame <- NCHtmlTable::LoadHtml 
      <- NCHtmlFrame::CreateTableFrame <- NCHtmlFrame::LoadHtml <- NCHtmlViewer::AnalyzeHtml <- NCHtmlViewer::LoadHtmlFormString 
      <- NCBBSHtmlViewer::LoadHtmlFormString <- NCBBSHtmlViewer::MergeListBuff <- NCBBSHtmlViewer::SetHtmlBuffData
      <- UHtmlHandle::execSetHtmlBuffData <- UObject::ProcessEvent 

    i try find the error but i dont know where is it, then i start here (ehcache.xml):
     

    <?xml version="1.0" encoding="UTF-8"?>
    
    <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="false"
    	monitoring="autodetect">
    
    	<diskStore path="java.io.tmpdir" />
    
    	<defaultCache maxElementsInMemory="1000" eternal="false"
    		timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="true"
    		diskPersistent="false" diskExpiryThreadIntervalSeconds="120" />
    
    	<!-- DropInfoCache -->
    	<cache name="DropInfoCache" maxElementsInMemory="30000" eternal="false"
    		overflowToDisk="false" timeToLiveSeconds="3600" timeToIdleSeconds="600" />
    
    	<!-- HtmCache -->
    	<cache name="l2f.gameserver.cache.HtmCache.ENGLISH" eternal="true" memoryStoreEvictionPolicy="LRU" maxElementsInMemory="100000" overflowToDisk="false"/>
    	<cache name="l2f.gameserver.cache.HtmCache.RUSSIAN" eternal="true" memoryStoreEvictionPolicy="LRU" maxElementsInMemory="100000" overflowToDisk="false"/>
    
    	<!-- ItemInfoCache -->
    	<cache name="l2f.gameserver.cache.ItemInfoCache"
    		maxElementsInMemory="10000" eternal="false" overflowToDisk="false"
    		timeToLiveSeconds="3600" timeToIdleSeconds="600" />
    
    	<cache name="l2f.gameserver.model.items.ItemInstance"
    		maxElementsInMemory="200000" eternal="false"  timeToIdleSeconds="1800" memoryStoreEvictionPolicy="LRU"
    		timeToLiveSeconds="3600" overflowToDisk="false" statistics="true" />
    
    	<cache name="l2f.gameserver.model.mail.Mail"
    		maxElementsInMemory="100000" eternal="false" timeToIdleSeconds="3600" memoryStoreEvictionPolicy="LRU"
    		timeToLiveSeconds="28800" overflowToDisk="false" statistics="true" />
    
    </ehcache>

    i dont know if this is the way but i apreciate for any help.

    thx in advance

  3. On 3/6/2020 at 1:32 PM, Akar0 said:

     

    As far I read at the sources, its located on "character_subclasses" table.

     

    cheers

    done, thnx you. btw, tvt, ctf and last hero events isnt working, cuz are disabled in core side, i try enable it again but isnt working cuz core side isnt complete, any way to fix it? thx you in advance

  4. On 2/16/2020 at 12:48 AM, captain.jack said:

    Hello,,

    i found confused it connect gameserver use external hostname,but if configuration internal hostname same network not problem, if use external hostname cannot login enter game then i has config router open port ip public but cannot login in game only login 

    you can help me ?

    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

  5. 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;
    +	}
    +}

     

  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. 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

  8. Hello Guys.. Some One Can Help Me With This Error:

    Here Is The Error In Console:

     

    errorsql.jpg

     

    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!

  9. 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

     

  10. 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.

     

  11. Hello Im Using The Rin4a's Buffer V.3 For Epilogue... But When I Put Acceslevel 1 In VIP Configs Dont Work...

    If I Put Access Level 1 Player Get Admin If I Put Access Level 10 Say Warning Player Entered in the Game Without Privileges...

     

    ENABLE_VIP_BUFFER = True
    VIP_ACCESS_LEVEL = 1 Get Admin
    VIP_ACCESS_LEVEL = 10 Player Entered Game Without Privileges...

     

    i have donator system.

    example if player.isdonator()

    then...

    this line..

    if ENABLE_VIP_BUFFER == False or player.getAccessLevel().getLevel() == VIP_ACCESS_LEVEL and ENABLE_VIP_BUFFER == True:

     

    is correct?

     

    if ENABLE_VIP_BUFFER == False or player.isdonator() and ENABLE_VIP_BUFFER == True:

     

    i think this is wrong...

     

    some1 can help me?.. o give me an easy way...

    thx u

  12. Hello...

    Here Have a Little, Simple, And Basic Code For Restrict 3rd Jobs At Subclass

    Maybe This Like For StuckSubs Servers.

     

    .../AltSettings.properties

    # Allow player sub-class addition without checking for unique quest items. 
    AltSubClassWithoutQuests = False 
    
    +# ----------------------
    +#  SubClass Restriction 
    +# ----------------------
    +# This Balance System: 
    +# Restrict player subclass if get 3rd job. 
    +# Only can get 3rd job with base class and player can make 3rd job 
    +# only after get all subclasses. default: False  
    +Restrict3rdJobAtSubClass = False

    +

    .../Config.java

    public static boolean               ALT_GAME_SUBCLASS_WITHOUT_QUESTS; 
    +public static boolean       RESTRICT_3RDJOB_AT_SUBCLASS; 
    --------
    ALT_GAME_SUBCLASS_WITHOUT_QUESTS                            = Boolean.parseBoolean(altSettings.getProperty("AltSubClassWithoutQuests", "False")); 
    +RESTRICT_3RDJOB_AT_SUBCLASS                                 = Boolean.parseBoolean(altSettings.getProperty("Restrict3rdJobAtSubClass", "False"));
    --------
    else if (pName.equalsIgnoreCase("AltSubClassWithoutQuests")) ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.valueOf(pValue); 
    +else if (pName.equalsIgnoreCase("Restrict3rdJobAtSubClass")) RESTRICT_3RDJOB_AT_SUBCLASS = Boolean.valueOf(pValue);

     

    gameserver/model/actor/instance/L2VillageMasterInstance.java

    after this:

     if (player.getLevel() < 75)
                       {
                           player.sendMessage("You may not add a new sub class before you are level 75 on your previous class.");
                           allowAddition = false;
                       }

     

    + put this:

               if (Config.RESTRICT_3RDJOB_AT_SUBCLASS)
                       {
                          if (player.getClassId().getId() >= 88)
                         {
                       	player.sendMessage("You Cannot Add Subclass With 3rd Job, I'm Sorry!");
               			return; 
                         }
                       }

     

    gameserver.model.actor.instance.L2ClassMasterInstance.java

    after this:

                      case First:
    		jobLevel = 1;
    		break;
    	case Second:
    		jobLevel = 2;
    		break;
    	case Third:

     

    +put this:

    if (Config.RESTRICT_3RDJOB_AT_SUBCLASS)
            {
                if (player.isSubClassActive())
              {
            	player.sendMessage("You Only Get 3rd Job In Your Base Class!");
    			return; 
              }
            }

     

    Credits To Me :/

×
×
  • Create New...