Jump to content
  • 0

Hero Aura When Equip Armor Set


Question

Posted (edited)

I want to make a code for when you equip a set, appear the hero aura.

I see a post about that but now im search it and cant be found

 

The code consist in edit the CharInfo.java and UserInfo.java

writeC(_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) ? 1 : 0); // Hero Aura

I dont remember how to make the code exactly but i remember need add it, but need to put the id of each item set (i dont know how to make the code for that)

 

+ L2ItemInstance chestItem = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST);
L2ItemInstance legsItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS);
L2ItemInstance headItem = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD);
L2ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES);
+ L2ItemInstance feetItem = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET);

 

My question is, how i can reform the code to put the CHEST,LEGS,HEAD,GLOVES and FEET ID.

 

How i can make to put 2 or more sets?

 

Thx

Edited by Hyo

Recommended Posts

  • 0
Posted

isnt a client mod...

 

I need to edit this line

writeC(_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) ? 1 : 0); // Hero Aura

and add a check for player item sets but i dont know how to create it...

i mean you can make it via client too to a specific armor set but let me try once more 

  • 0
Posted

Red, theres no abnormal with hero aura, i kindly request to you: die

Is the second time doing the smartass. Reply with valid examples please

  • 0
Posted

you need to make the hero aura on an unused abnormal effect and then call it from core with specific ids, i cant think something better

  • 0
Posted (edited)

Omg, you still can't do it :o

I gave you the code and you can't simply put an "if"...

Create an array and put the armor set's chest id.. you don't need to check all parts, only the chest...Put the chest ID of the armor set you want, and you will get a hero aura when all parts are equipped.

Edited by Tessa
  • 0
Posted (edited)

Omg guys, specially Tessa. Since you give him the code ready and you still see he can't do it, just tell him how, not just 'add an if'.

 

Ok, so there are many ways you can do that, i'll point out one based on Tessa's code:

 

Create an armor set in armorsets.xml with the parts of your armor. Then add this code (Replace YOUR_CHEST_ID with your armor's chest id):

Index: java/net/sf/l2j/gameserver/model/Inventory.java
===================================================================
--- java/net/sf/l2j/gameserver/model/Inventory.java    (revision 453)
+++ java/net/sf/l2j/gameserver/model/Inventory.java    (working copy)
@@ -337,6 +337,7 @@
        {
            if(armorSet.containAll(player))
            {
+                 if (armorSet.getSetItemsId()[0] == YOUR_CHEST_ID)
+                 { 
+                         player.setIsFullArmor(true);
+                 }
             L2Skill skill = SkillTable.getInstance().getInfo(armorSet.getSkillId(),1);
             if(skill != null)
             {
@@ -438,6 +439,7 @@
        
        if(remove)
        {
+             player.setIsFullArmor(false);
            if(removeSkillId1 != 0)
            {
            L2Skill skill = SkillTable.getInstance().getInfo(removeSkillId1,1);
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (revision 453)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
@@ -481,6 +481,7 @@
    private boolean _noble = false;
    private boolean _hero = false;

+    private boolean _isFullSet = false;
    /** The L2FolkInstance corresponding to the last Folk wich one the player talked. */
    private L2FolkInstance _lastFolkNpc = null;

@@ -8506,6 +8507,16 @@
        return _duelState;
    }

+    public void setIsFullArmor(boolean status)
+    {
+        _isFullSet = status;
+    }
+
+    public boolean isFullArmor()
+    {
+        return _isFullSet;
+    }
+
    /**
     * Sets up the duel state using a non 0 duelId.
     * @param duelId 0=not in a duel
Index: java/net/sf/l2j/gameserver/serverpackets/UserInfo.java
===================================================================
--- java/net/sf/l2j/gameserver/serverpackets/UserInfo.java    (revision 453)
+++ java/net/sf/l2j/gameserver/serverpackets/UserInfo.java    (working copy)
@@ -294,7 +294,7 @@

writeD(_activeChar.getClanCrestLargeId());
writeC(_activeChar.isNoble() ? 1 : 0); //0x01: symbol on char menu ctrl+I
- writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); //0x01: Hero Aura
+ writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) || _activeChar.isFullArmor()) ? 1 : 0); //0x01: Hero Aura

writeC(_activeChar.isFishing() ? 1 : 0); //Fishing Mode
writeD(_activeChar.getFishx()); //fishing x

You should also add the check || _activeChar.isFullArmor() in CharInfo, so that other players can see the aura too.

Edited by An4rchy
  • 0
Posted

Thanks Anarchy, but you know.. it's not working like that, else someone is kind enough (like you) to do the whole code for someone :D

  • 0
Posted

Thx anarchy for try to help me...

 

Now the problem is that this code is for interlude , and I use high five .

Try searching the inventory.java but this does not exist  :okey:

  • 0
Posted

Well, I showed how this can be done. It's not my problem if someone can't put an additional IF statement... because if that is the case, you getting more and more "Write a code for me" requests and the help section becomes a shares section.

  • 0
Posted

Not exactly , I showed you an example of how it worked had thought the code I'm looking for ..

But you instead of helping , showed another code which is useless for my help ... because it is for other chronicle and not exactly what I was asking .

If a lot of java and not well ask for help , I never do reluctantly .. And not for a project (just a hobby) not rush to find what I want .

Refute my post with your interlude code did not help me at all, thank you very much Tessa  :happyforever:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • Introducing: Cloud Hosting and Stream Rewards!   Hey everyone, I'm excited to share something big on top of the recent NimeraCP V2 update I announced a few days ago. We're introducing Cloud Hosting and Stream Rewards!   Starting at 30 euros per month, subscribing to NimeraCP will give you access to deploy your own instance directly through your dashboard on nimeracp.com. This is a huge upgrade for our ecosystem, offering a much more affordable option than self-hosting and simplifying the entire installation process. No more wasting hours setting things up, buying separate dedicated hosts or VPSs, just deploy on our infrastructure and relax.     Currently these packs are available for Cloud Hosting:   aCis r382 aCis r401 aCis r409 L2Scripts Vanguard   More are coming soon as development progresses. If you need your pack to be added, please reach out to us.   On top of that, we've rolled out an update that introduces Stream Rewards. Now, players can link their Kick, Twitch or Trovo accounts to NimeraCP, stream, and earn rewards. Admins can create reward campaigns, set a required streaming time, and when a streamer meets the requirements, they can instantly transfer the reward to their game character.     As I mentioned in our last update, big things are coming, and this is just the beginning.   Best, Splicho
    • There were a few minor hiccups along the way, but the problem was eventually resolved. Overall, he is a very experienced, skilled, and trustworthy developer, and I will definitely continue to use his services in the future. thank yuo .   this topic can be locked please . thank you  
    • 99.99% of the people you 'sell' this to will not see any meaning on any sort of code, as simple or complicated as it may be, so i suggest the video. would be much better for practical reasons. good luck though
    • I've completely decompiled, replicated, and devirtualized the Gamear DLL file. You can see it there; otherwise, wait a day or two and I'll make a video myself. Best regards. static int __fastcall hkAEmitter_Tick_Impl(void* this_, void* /*edx*/, float dt, int levelTick) {     // Ares: if (IsA(this, AEmitter))     if (this_ && g_UClass_Emitter && GX_IsA(this_, g_UClass_Emitter))     {         // Ares: v7 = sub_1300CAA0()         void* v7 = g_localPawn;         if (v7)         {             // Ares: if IsA(v7, APawn) && lvl in (0,8)             if (g_UClass_APawn && GX_IsA(v7, g_UClass_APawn))             {                 const int lvl = (int)InterlockedCompareExchange((volatile LONG*)&g_skipLevel, 0, 0);                 if (lvl > 0 && lvl < 😎                 {                     // Ares: v6 = sub_13026800(this, v7)                     const float v6 = GX_Distance3D(this_, v7);                     // Live-tuning (debug): aplica overrides en runtime                     GX_LiveApply_Tick(this_, v6); Today I'll see how the classic client works on the Eris server. If it works well, I'll proceed to decompile the dll for classic as well. GG.. 🙂
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..