Jump to content
  • 0

Allow dyes for all classes?


Question

Posted

Hello, could anyone please tell me how can I allow all classes to use all dyes?, I run a Hi5 multiskill server.

 

For example, I want a warrior to use a INT dye.

 

Thanks in advancae!

3 answers to this question

Recommended Posts

  • 0
Posted
10 hours ago, Shadin said:

Hello, could anyone please tell me how can I allow all classes to use all dyes?, I run a Hi5 multiskill server.

 

For example, I want a warrior to use a INT dye.

 

Thanks in advancae!

 

RequestHennaEquip.java

  • 0
Posted
On 7/10/2021 at 5:51 AM, Kara said:

 

RequestHennaEquip.java

Now I know a bit more, but still can't change it... would you mind telling me what change should I make?, I erased the fragment that says "AllowedClass" but with no success in-game...

 

/*
 * Copyright © 2004-2020 L2J Server
 * 
 * This file is part of L2J Server.
 * 
 * L2J Server is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * L2J Server is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package com.l2jserver.gameserver.network.clientpackets;

import com.l2jserver.gameserver.data.xml.impl.HennaData;
import com.l2jserver.gameserver.model.PcCondOverride;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.items.L2Henna;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.InventoryUpdate;
import com.l2jserver.gameserver.util.Util;

/**
 * @author Zoey76
 */
public final class RequestHennaEquip extends L2GameClientPacket {
    private static final String _C__6F_REQUESTHENNAEQUIP = "[C] 6F RequestHennaEquip";
    private int _symbolId;
    
    @Override
    protected void readImpl() {
        _symbolId = readD();
    }
    
    @Override
    protected void runImpl() {
        final L2PcInstance activeChar = getActiveChar();
        if (activeChar == null) {
            return;
        }
        
        if (!getClient().getFloodProtectors().getTransaction().tryPerformAction("HennaEquip")) {
            return;
        }
        
        if (activeChar.getHennaEmptySlots() == 0) {
            activeChar.sendPacket(SystemMessageId.SYMBOLS_FULL);
            sendActionFailed();
            return;
        }
        
        final L2Henna henna = HennaData.getInstance().getHenna(_symbolId);
        if (henna == null) {
            _log.warning(getClass().getName() + ": Invalid Henna Id: " + _symbolId + " from player " + activeChar);
            sendActionFailed();
            return;
        }
        
        final long _count = activeChar.getInventory().getInventoryItemCount(henna.getDyeItemId(), -1);
        if (henna.isAllowedClass(activeChar.getClassId()) && (_count >= henna.getWearCount()) && (activeChar.getAdena() >= henna.getWearFee()) && activeChar.addHenna(henna)) {
            activeChar.destroyItemByItemId("Henna", henna.getDyeItemId(), henna.getWearCount(), activeChar, true);
            activeChar.getInventory().reduceAdena("Henna", henna.getWearFee(), activeChar, activeChar.getLastFolkNPC());
            final InventoryUpdate iu = new InventoryUpdate();
            iu.addModifiedItem(activeChar.getInventory().getAdenaInstance());
            activeChar.sendPacket(iu);
            activeChar.sendPacket(SystemMessageId.SYMBOL_ADDED);
        } else {
            activeChar.sendPacket(SystemMessageId.CANT_DRAW_SYMBOL);
            if (!activeChar.canOverrideCond(PcCondOverride.ITEM_CONDITIONS) && !henna.isAllowedClass(activeChar.getClassId())) {
                Util.handleIllegalPlayerAction(activeChar, "Exploit attempt: Character " + activeChar.getName() + " of account " + activeChar.getAccountName() + " tried to add a forbidden henna.");
            }
            sendActionFailed();
        }
    }
    
    @Override
    public String getType() {
        return _C__6F_REQUESTHENNAEQUIP;
    }
}
 

  • 0
Posted

data/xml/henna.xml

    <henna symbol_id="1" dye_id="4445" price="37000" INT="0" STR="1" CON="-3" MEN="0" DEX="0" WIT="0" classes="1,4,7,11,15,19,22,26,29,32,35,39,42,45,47,50,54,56,"/>

 

if you want to make all classes be able use all hennas , you should add all classes id there

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

    • You invent yourself a life - bad for you, one of the inner core dev, fernandopm, which worked hard over aCis quests from 2011 to 2016 is argentinian. I teached him back in time to work and make proper quests. My dev team comes from 10+ countries and I'm myself french. "Racist/nationalist" card ? Not working bro.   Not sure why I should thank you to send me questions, and regarding bug reports, so far, I got none of yours in either discord, gitlab, or forums. I'm sorry if you feel "ignored", but that's more a psychanalyst you need to speak with if you put emotions towards someones' appreciation over a forum. I never ignore a bug report, and if so (like skills reports), it's because I got a bigger plan (skills refactor, in that case). In any case, I delivered cookies for the bug report/fix, even if it dated of months, with proper credits over changesets. "Victim card" ? Not really working, but ok, maybe you're "emotional".   I barely make money out of aCis, for the spent time - simply selling my services, or even coding/administrating a minecraft/L2J server would make far more money. Breaking intentionally things would be stupid. If you don't understand I'm not the only one working on that pack, I can't help you. Also, the scale of edits is sometimes extreme - AI L2OFF ? 1800 files added. How do you want everything works in a single shot ? "Exploiting noobz for money" card ? Still not working, or I'm a terrible businessman.   Meanwhile - you shadow advertise your project, L2JOne (since 2017 btw) - you should maybe start by the beginning saying you're a competitor and aCis is actually a spike in your foot. That also explains why you act like that. RusAcis got the exact same strategy, speaking bad of me, saying they got unique fixes (you speak about I break things, they break and recode things 4 times sometimes, btw), but successfully reselling latest revision with poorly executed stuff. "aCis is good, Tryskell is ok, but I solve all issues in extreme low time so I can piss over him" card ? Mmmmhhhh.   Our conversation ends here if you want, I don't force ppl to speak with me if they don't want - hopefully, people would understand I'm not the arrogant one and the one who doesn't want to talk, or even collaborate. :). I understand you got your own project and got no will to improve aCis.   NOTE : I'm extremely happy for your call of ExShowServerPrimitive with getValidGeoLocation, extremely impressive. Arrogant, no. Sarcastic ? Maybe.   Good night everyone.
    • Hi. @GX-Ext, svn does not work. is there anywhere else where we can get source code? Thank you so much.
    • new synchronized movement with neoengine obstacle correction I reported bugs to you and you completely ignored me because of my nationality. Yes, you were arrogant towards me. I sent you many questions on your forum and you didn't even thank me or say anything about it. I stopped using your updates a long time ago and focused on fixing my own aCis because you intentionally break the code. Just buy versions 401 to 409; you intentionally broke a lot of things for "IDIOTS" to buy from you. Anyway, our conversation ends here. Good luck with renaming and organizing; that probably makes you more money than fixing the basics. With this debug I created valid notes for monsters and NPCs, fixing the maxZ that you broke, and also corrected fly/water movements, making them more efficient. I only spent 2 months and I'm using Geoengine l2.j   NOTE: I'm not selling my GeoEngine, don't waste your time sending messages!
  • 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..

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock