Jump to content

Salty Mike

Members
  • Posts

    164
  • Credits

  • Joined

  • Last visited

  • Days Won

    15
  • Feedback

    0%

Posts posted by Salty Mike

  1. Pick one and your guess would be as good as any!
     

    // Checks for armor set for the equipped chest.
    if (!ArmorSetsData.getInstance().isArmorSet(chest.getId()))
    {
           player.sendMessage("Error: You can't visualize current set.");
           useVoicedCommand("dress-armorpage", player, args);
           return false;
    }
    
    L2ArmorSet armoSet = ArmorSetsData.getInstance().getSet(chest.getId());
    if ((armoSet == null) || !armoSet.containAll(player))
    {
           player.sendMessage("Error: You can't visualize, set is not complete.");
           useVoicedCommand("dress-armorpage", player, args);
           return false;
    }
    
    if (!chest.getArmorItem().getItemType().getDescription().equals(dress.getType()))
    {
           player.sendMessage("Error: You can't visualize current set.");
           useVoicedCommand("dress-armorpage", player, args);
           return false;
    }



     

    4 hours ago, Yun_kr said:

    You can't visualize current set.

    sunrise pack

    1726446858630.jpg

     

  2. On 9/6/2024 at 12:20 AM, midnightx86 said:

    Hi, im using l2jmobius a classic version (Protocol 152),  when i mount a strider, it didn't show the strider skills, it shows the character one, someone have an idea why?

    Kind regards!

    Shot00000.jpg


    That is probably because on newer chronicles, the skills of pets were replaced by "ACTIONS". In any case, you can circumvent that like this:

    Find a packet titled something similar to "SkillList". It might be named differently. Depends on your build revision, I suppose. There, you can add an IF to check whether the character is mounted, then take the MOUNT ID, and fetch the skills of the player's summon/mount and add them to the list of available/known skills.

  3. 16 hours ago, gripao said:

    Hello!!

    I'm trying to make a quest to kill X mobs and give you a reward. I already have it ready, or so I think.

     

    Now I would like to add the function of making it daily or weekly. I've tried to control this in the same java file of the quest, but I haven't been able to...

     

    I was thinking of putting a marker on the quest so that it is "daily" or "weekly" and ¿generating another java program? that is in charge of restarting all the quests with the daily marker at 9 in the morning every day and on Wednesdays at 9 every Wednesday.

     

    Since I'm new to java programming (I had already programmed in bash) and developing l2j I don't know where I should create that program. Could it be in the java folder with a name like "org.l2jmobius.xxx.xxx"?

     

    I don't know how to approach it because I don't understand the logic of the files and that how runs every day to reset quest with marker.

     

    Could anyone help me understand this and explain how I should do it? I'm not asking for ready-made code, I can do that myself, but how to deal with it 😛

     

    I also don't know if this method is better or in the java file itself (but I haven't managed to do it this way).

     

    See you guys and thanks for all. 


    If you are this new to java, I would strongly recommend using IntelliJ Community Edition (free) instead of Eclipse since it indexes your entire source and makes it extremely easy to navigate forward and backward dependencies and method calls.

    Now, on the topic.

    Unless your Mobius sources are ancient, they should already have native support. It is called `DailyTaskManager`.
    It would be impossible to give you a mould without such a DailyTaskManager. I would suggest you parse/adapt it from a newer source version if you don't have it.

    The logic is rather simple once you get to understand it.
    1. You need a handler to count the mobs and give rewards, etc.
    2. You need to keep mission status for each individual player in the database.
    3. You need to INSERT the data when a player takes the mission, UPDATE it whenever you like, be it on every single mob or not (I would only update the DB on player disconnect/log out, or on mission completion), and SELECT/extract it when the player logs in (EnterWorld.java).
    4. You need a way to get the Mission Reset Type (Daily/Weekly), and you should call a reset method similar to the one at the bottom of my post from within the DailyTaskManager every day at 9am or whenever you like.

    Keep in mind that the above is not an exhaustive list, but some generalised approach aimed at helping you see the bigger picture.
     

    public synchronized void reset()
        {
            DailyMissionResetType reset = _holder.getResetType(); 
            switch (reset)
            {
                case NEVER ->
                {
                    return;
                }
                case MONTHLY ->
                {
                    if (Calendar.getInstance().get(Calendar.DAY_OF_MONTH) != 1)
                    {
                        return;
                    }
                }
                case WEEKLY ->
                {
                    if (Calendar.getInstance().get(Calendar.DAY_OF_WEEK) != Calendar.MONDAY)
                    {
                        return;
                    }
                }
                case WEEKEND ->
                {
                    if (Calendar.getInstance().get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY)
                    {
                        return;
                    }
                }
                case DAILY ->
                {
                }
                default ->
                {
                    LOGGER.warning("Unhandled daily mission reset type: " + reset);
                    return;
                }
            }
    
            try (
                    Connection con = DatabaseFactory.getConnection();
                    PreparedStatement ps = con.prepareStatement("DELETE FROM character_daily_rewards WHERE missionId = ? AND status = ?"))
            {
                ps.setInt(1, _holder.getId());
                ps.setInt(2, DailyMissionStatus.COMPLETED.getClientId());
                ps.execute();
            }
            catch (SQLException e)
            {
                LOGGER.log(Level.WARNING, "Error while clearing data for: " + getClass().getSimpleName(), e);
            }
            finally
            {
                _entries.clear();
                // resets the entries in the Manager.
                DailyMissionsManager.getInstance().clearEntries();
            }
        }


    *Disclaimer: The provided code snippet is just an adaptation of Mobius' implementation on newer chronicles.
     

  4. 6 hours ago, jullien said:

    캡2024-09-0513-07-55-899.thumb.jpg.f73b7913f4c61505c8986cf5148153fd.jpg

     

    커뮤니티 게시판에 마우스를 올리면 설명이 나타나게 하고 싶습니다. 

    I want to make a description appear when I hover over the community board.


    Newer clients have a feature called `itemtooltip`. High Five client does not support it natively, as far as I know. However, it should be recreatable by some skilled client dev.

  5. The error says it all, buddy. You are trying to assign a value to an INT that is greater than MAX_INTEGER value. It won't work like this, and there will be so many more problems and places you'd have to touch.

    I'm even shocked that the client accepts these crazy-ass IDs, at all.

  6. 21 minutes ago, thepwned2 said:

    I can't use another ids due the icons of weapons will not work or they will be broken.

     

    My server can't run when i have so big id number in XML (using sunrise project Hi5)


    Sure you can change the weapon IDs. I can think of not one, but two approaches, outright.

    1. The Icons are supposed to be stored in a DAT file and sourced from there by the client. If you are talking about icons in HTML, then you could alter the structure of your datapack's items, and respectively the Item Template and Parser structures in the java core. The structural change would involve adding a hard-coded string for icons. You could also write a parser to get the info from within the client DAT file and put it in the XMLs.

    2. Alternatively, you could check if the `buildFastLookupTable()` method in the ItemData.java stores the item ID as an INT and change it to a LONG.

  7. 12 hours ago, LordPanic said:

    Q"after so so many years of work on that chronicle one would expect that we are just improving things at this point, but no... bugs?!"

    Interlude client is bad even if you manage to fix all core side problems so in the end u will still have some issues. This is why some big name servers to speed things up created their own project investing thousands either by reworking it to a decent level or by resorting to newer chronicles and downgrade them to interlude.

     


    I only have one comment, the rest I agree with. If they are well-known, it means their core is top notch and their work ethic, community management, advertising, business practices, etc are top notch too.

    Assuming they were to start anew with a different core, it would mean they would have to first fix the core, in its entirety, else they'd lose their players. It all sounds quite a bit speculative and extremely superficial to me.

    The best way to keep the authenticity is to upgrade, as opposed to downgrade. Making an IL core working on new client is better than making a new chronicle "play like IL", just like "downgrading" your favourite newer BMW car, say a 2024 X5, to a look like/resemble an older version, say the 2008 variant, won't make it drive nor sound anything like the original you are aiming for, unless you completely take its insides out and rebuild them from scratch. While it will probably run much more smoothly, people who love the older version and cannot stand the newer versions, such as the IL-loving community, would never be happy and outright refuse to get taken on a ride.

    It is a bit counter-intuitive, I know. But people are who they are, especially the IL community. Too stubborn to get outside of their comfort zone, I suppose. Not shaming anyone here, just expressing an opinion.

    In any case, now you can #start_hating.

     

  8. 1 hour ago, MegaCheat said:

    Maybe just give some code bcs I don’t understand->


    There is no code I could give that would do the job for you. It is quite tricky and depends on many unknown variables, mainly the source you use, the build version, etc. 

    And before you spill the beans - no, I don't know each and every single build by heart, so don't bother.

    Just find a packet named "Say" or something similar, and search for an IF or a SWITCH case featuring a party check. Inside, you add a simple IF to check whether the player has enough currency or not and to take their money.

    This is as far as any guide on the matter could go, without providing a bunch of code that you wouldn't be able to use in 99.9% of cases.

    • Haha 1
    • Upvote 1
  9. 6 hours ago, MegaCheat said:

    Hallo guys who know how to make 

    chat party and global need adena and gold coin for use it.. thanks Max


    You just intercept the chat attempt packet in the server, since it must go through the server to reach the other clients/players, and then set a couple of checks, if chat type is party or world -> do this and that, else do as before.

  10. I've been getting similar for as long as I could remember, usually from random IPs. The one I could track in its entirety led me to a cyber-security firm, who was making random requests to test for vulnerabilities, as per their website.

    As such, I came to the conclusion that these random packet requests were just automated scanners looking for unsecured connections and/or vulnerabilities they could exploit.
    Could it be a malicious request - I'd say totally!
    Is there something to worry about - I wouldn't give 2 fks about it since they couldn't get through.

    The server closed the connection, and that's what matters. They'll prolly receive an `attempt failed/connection refused` response in their logs.

  11. 1 hour ago, Jimbo24 said:

    Thanks for the tips. Well I have already found a free build with the server interlude with customized npcs and customized menu to call Phantom players, and even pvp bots. I've already run with them. But now the second problem I have a package of armor and weapons as well as sql files from them. And I can not add it all on the server. I pour sql files through Novicad, and I get an error that such a table with this name does not exist. I even created a table with the right name, but that didn't help either. Can you give me a hint?


    Can't be done without Java knowledge. You need to push and pull info from the DB table, which is done by SQL queries through the java core. You would need at least one method to SELECT (extract) the existing data.

    If such a method was not provided with the said package of weapons and armors, I'd assume that it was created for a particular set of servers, which use DB to store static data, quering it every single time it is to be used, as opposed to XMLs and keeping the data in memory for future use, thus reducing DB usage.

    There are pros and cons in both approaches, but I personally prefer using XML over SQL for such type of data, especially considering the difference in the amount of RAM servers had back then vs now. The overhead shouldn't be a problem if handled carefully/properly.

     

  12. If you want to learn how to edit the Interlude client by yourself, I suggest you start searching and reading ancient posts since the client is ancient itself and the topic is multi-faceted, but has been raised numerous times over the years.

    Mobius already comes with some basic fake players engine, which can be built upon. As far as I'm aware it was a client contribution the development of which has been discontinued, but I could be wrong. In any case, it is more of a proof of concept than anything.
    Regardless, if you insist on the L2JRoboto, you should be aware that the project has been discontinued and has been replaced by the "Autobots", written by the same person, which are more complex and not written in java.

    As such, judging by the abstraction of your questions, your best course of action would be to pay someone to do it for you.

    There's no shortcut!

    It was written for a different platform/development/build/pack. As such, it is not compatible with Mobius builds "out of the box". Also, adaptations of complex features like that require many portions of the code to be reconstructed, or completely rewritten based on logic, which takes time and several iterations until you get it JUST RIGHT.

  13. 35 minutes ago, Eldamar said:

    WTF, this is fucked up.

     

    But I guess Baylee has basically almost the entire chat history in screenshots that could be used against him (probably).

     

    Thanks @911reg for sharing more details about this scumbag!

     

    I just hope that Baylee can chargeback on paypal..


    The PayPal Buyer Protection has an expiration time of 180 days after transaction completion.

    On top of that, intangible goods (such as digital goods) are now also covered by the Buyer Protection, as evident HERE.

  14. 1 hour ago, maxximuns said:

    Does anyone know how to downgrade higher versions of l2? I would like to use the Assassins client for h5



    You don't downgrade, you upgrade HF to Assassin.
    Anything different than that is not HF any more - they call it Classic HF, HF Improved and what not. It is not HF any more, because, at the very least, the damage calculation formulas are different, and a whole bunch of other stuff.

    Overall, upgrading HF to the newest chronicles would take no more than 2 months, at least for a team of 2 well-versed devs - 1 for the server and 1 for the client.

  15. 1 hour ago, misterelax said:

    The thing is, I have always wanted to introduce a graphical evolution into the game. However, the need to use a third-party DLL that I haven't developed and really have no clue how it works is starting to seem like a workaround.Shouldn't this mod be more robust to actually use the term 'mod'?

    Well, now I'm thinking again maybe it's a feeling of guilt that I haven't made it work entirely by my own


    It is just semantics. Doesn't matter if you haven't developed it on your own. Fact of the matter is that you are introducing a modification of the original game, hence the term `mod`.

    • Like 2
  16. 54 minutes ago, Williams said:

    I'm upgrading my aCis and I came across these files. I didn't see any connection with the Client because all High Five projects use this?

     

    rmVISl3.png 



    I will allow myself to make the assumption that you are versed in JAVA. As such, I'll give you the following reference in hope that you understand it better.

    XSD to an XML file is like an INTERFACE to a JAVA CLASS. It lists all of the required elements/methods that the XML which implements the XSD must have. However, unlike INTERFACE, XSD has a way to label certain elements/attributes as optional.

    With that out of the way, you should've already concluded that they are not related to the CLIENT in any way, but are rather used in tandem with the XMLs in your server's DATAPACK, and by extension, are used by your server's XML parsers.

    • Thanks 1
  17. On 7/11/2024 at 10:15 AM, killer666 said:

    Seems easy enough, but last days after many tests, i failed hard multiple times, so i have to ask for help.

    Pretty sure some fella can give me the solution here. xml / item / skill all done correctly. Also by compiling there is no error. 

     

    #Weapon.java	
      
    	private IntIntHolder _enchant4Skill;
    +	private IntIntHolder _enchant8Skill;
    +	private IntIntHolder _enchant12Skill;
    
    		
    		if (set.containsKey("enchant4_skill"))
    			_enchant4Skill = set.getIntIntHolder("enchant4_skill");
    +	
    +		if (set.containsKey("enchant8_skill"))
    +			_enchant8Skill = set.getIntIntHolder("enchant8_skill");
    +
    +		if (set.containsKey("enchant12_skill"))
    +			_enchant12Skill = set.getIntIntHolder("enchant12_skill");
    +
      
      	public L2Skill getEnchant4Skill()
    	{
    		return (_enchant4Skill == null) ? null : _enchant4Skill.getSkill();
    	}
    +	
    +	public L2Skill getEnchant8Skill()
    +	{
    +		return (_enchant8Skill == null) ? null : _enchant8Skill.getSkill();
    +	}
    +	
    +	public L2Skill getEnchant12Skill()
    +	{
    +		return (_enchant12Skill == null) ? null : _enchant12Skill.getSkill();
    +	}
    +	
      
      ------------------------------------------------------
      #RequestEnchantItem.java
      
      					if (it instanceof Weapon && item.getEnchantLevel() == 4)
    					{
    						final L2Skill enchant4Skill = ((Weapon) it).getEnchant4Skill();
    						if (enchant4Skill != null)
    						{
    							player.addSkill(enchant4Skill, false);
    							player.sendSkillList();
    						}
    					}
    +					else if (it instanceof Weapon && item.getEnchantLevel() == 8)
    +					{
    +						final L2Skill enchant8Skill = ((Weapon) it).getEnchant8Skill();
    +						if (enchant8Skill != null)
    +						{
    +							player.addSkill(enchant8Skill, false);
    +							player.sendSkillList();
    +						}
    +					}
    +					else if (it instanceof Weapon && item.getEnchantLevel() == 12)
    +					{
    +						final L2Skill enchant12Skill = ((Weapon) it).getEnchant12Skill();
    +						if (enchant12Skill != null)
    +						{
    +							player.addSkill(enchant12Skill, false);
    +							player.sendSkillList();
    +						}
    +					}
    +
    
      
      					if (it instanceof Weapon && item.getEnchantLevel() >= 4)
    					{
    						final L2Skill enchant4Skill = ((Weapon) it).getEnchant4Skill();
    						if (enchant4Skill != null)
    						{
    							player.removeSkill(enchant4Skill.getId(), false);
    							player.sendSkillList();
    						}
    					}
    +					else if (it instanceof Weapon && item.getEnchantLevel() >= 8)
    +					{
    +						final L2Skill enchant8Skill = ((Weapon) it).getEnchant8Skill();
    +						if (enchant8Skill != null)
    +						{
    +							player.removeSkill(enchant8Skill.getId(), false);
    +							player.sendSkillList();
    +						}
    +					}
    +					else if (it instanceof Weapon && item.getEnchantLevel() >= 12)
    +					{
    +						final L2Skill enchant12Skill = ((Weapon) it).getEnchant12Skill();
    +						if (enchant12Skill != null)
    +						{
    +							player.removeSkill(enchant12Skill.getId(), false);
    +							player.sendSkillList();
    +						}
    +					}
    +
    
      ------------------------------------------------
      
      #ItemPassiveSkillsListener.java
      
      
      			if (item.getEnchantLevel() >= 4)
    			{
    				final L2Skill enchant4Skill = ((Weapon) it).getEnchant4Skill();
    				if (enchant4Skill != null)
    				{
    					player.addSkill(enchant4Skill, false);
    					update = true;
    				}
    			}
    +			
    +			else if (item.getEnchantLevel() >= 8)
    +			{
    +				final L2Skill enchant8Skill = ((Weapon) it).getEnchant8Skill();
    +				if (enchant8Skill != null)
    +				{
    +					player.addSkill(enchant8Skill, false);
    +					update = true;
    +				}
    +			}
    +
    +			else if (item.getEnchantLevel() >= 12)
    +			{
    +				final L2Skill enchant12Skill = ((Weapon) it).getEnchant12Skill();
    +				if (enchant12Skill != null)
    +				{
    +					player.addSkill(enchant12Skill, false);
    +					update = true;
    +				}
    +			}
    +
      
      			if (item.getEnchantLevel() >= 4)
    			{
    				final L2Skill enchant4Skill = ((Weapon) it).getEnchant4Skill();
    				if (enchant4Skill != null)
    				{
    					player.removeSkill(enchant4Skill.getId(), false, enchant4Skill.isPassive() || enchant4Skill.isToggle());
    					update = true;
    				}
    			}
    +			
    +			else if (item.getEnchantLevel() >= 8)
    +			{
    +				final L2Skill enchant8Skill = ((Weapon) it).getEnchant8Skill();
    +				if (enchant8Skill != null)
    +				{
    +					player.removeSkill(enchant8Skill.getId(), false, enchant8Skill.isPassive() || enchant8Skill.isToggle());
    +					update = true;
    +				}
    +			}
    +			
    +			else if (item.getEnchantLevel() >= 12)
    +			{
    +				final L2Skill enchant12Skill = ((Weapon) it).getEnchant12Skill();
    +				if (enchant12Skill != null)
    +				{
    +					player.removeSkill(enchant12Skill.getId(), false, enchant12Skill.isPassive() || enchant12Skill.isToggle());
    +					update = true;
    +				}
    +			}

     


    The solution is what the guy before me said. You need to either place the higher value before the smaller value or limit the range.

    Ex. 1: 
     

    if (item.getEnchantLevel() >= 12)
    {
         // do whatever
    }
    else if (item.getEnchantLevel() >= 8)
    {
         // do whatever
    }
    else if (item.getEnchantLevel() >= 4)
    {
         // do whatever
    }


    Ex. 2:
     

    if (item.getEnchantLevel() >= 4 && item.getEnchantLevel() <= 7)
    {
         // do whatever
    }
    else if (item.getEnchantLevel() >= 8 && item.getEnchantLevel() <= 11)
    {
         // do whatever
    }
    else if (item.getEnchantLevel() >= 12)
    {
         // do whatever
    }

     

×
×
  • Create New...