Jump to content
  • 0

Help Allow dyes for all classes?


Shadin
 Share

Question

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!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
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

Link to comment
Share on other sites

  • 0
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;
    }
}
 

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Posts

    • We're interested in hearing your thoughts and what you want to see next! Tell us via ticket or any contact method so we can implement services/features that you want!   Feel free to request a trial as always, or deposit via PayPal, Crypto, Perfect Money, Payeer, Bank Transfer or Revolut!
    • Seems interesting and low price indeed, good luck with your sales sir HostSlick!!!!! 🙏
    • I did, when i joined, i played for 5 mins and then bb multeria... Didn't have fun because while i was trying to farm everyone came from nowhere and gets pk for no reason.... As of balance(No Comment....) as of economy?(No comment) the only part that was cool it was only the way you've builded the npcs and the shop that was giving stuff free.... Nevermind, Good luck. 🙏🏻
    • Hey guys, the "designer" of epicfail speaking here 😄   I am not a designer. I came up with this stupid name 😄 It was our first time creating a server and we did not know if it actually wont be an epic fail, thats why we decided to call it this way. If we failed, we could just say - "we told you, it is in the name" 😄  I guess I have some "frontend feeling" and I have been playing L2 for years (so I have seen countless L2 websites), so I tried to make the web as I (a player) would expect it to look. A lot (or most) of the L2 sites nowadays have much better design, I agree, but seems like it is being designed by some external designer who has zero ideas about L2, so usually the whole features section sucks (or is a part of a forum, wink wink RU servers) etc. I am not planning to sell this website (or make more for money). I am working as a fullstack dev engineer in my real life, so I am living pretty well out of my earnings and I dont want to do more coding (for money) in my spare time, I mostly do it only to try out new technologies. Side note - the whole web is a fullstack web app, written in Typescript, Next.js + React as the main framework behind this. All deployed to Vercel. All out of the PHP world that most of the community here is used to I guess. PS: Pardon my stupid name here on MXC 😄 Weve all been young once.
    • HostSlick is having a major special offer for MaxCheaters!. All servers new in stock and ready to go! We are very serious in this offer, no jokes, no hidden costs.       SPECIAL Dual Intel XEON E5-2660v3 20cores, 40 threads @ 3,40Ghz 128GB DDR4 ECC RAM 2x1 TB SSD 50TB Bandwidth 1Gbit Dedicated Port 1x IPv4 and IPv6 ONLY 125€/ MONTH! -- WOW! ORDER HERE       SOME MORE SPECIAL ABOUT THIS DEAL Up to 16x IPv4 is FREE of charge. ONLY if you can justify usage for each IP. If you do NOT use it or do nonsense with it, dont request it!! We will only hand out this FREE IPs for people who will need them and are planning to do long-term business with us!! If you need additional v6, you can have any amount without justification!! Announcements of your own RIPE IP Ranges with PRIVATE VLAN is FREE! You can take multiple Servers and use your subnet between them for example VPS Hosting Business! All is no problem!!!   MORE DEDICATED SERVER DEALS HERE   Need more reasons to choose us? - Wide range of Payment methods accepted - Own Hardware and Network in The Netherlands. - No Re-selling - Only Premium Hardware. HP, Juniper, Cisco and Supermicro. - Support On-Site for Emergencies 24x7 - 24x7 Monitored - Friendly Sales/Support Staff. - Long-Term running business. We will not leave the market anytime soon (Guaranteed!) - No hidden extra costs. No Bandwidth over charges. Once reached, we will contact you to upgrade. - NO SETUP FEE's!     Every Dedicated Server includes - BlazingFast SSDs - 1Gbit Uplink. 50 TB Non-overbooked Traffic. More can be configured upon Order! - Permanent KVM-over-IP (HP ILO4 Advanced) - Bandwidth Graph - Sexy Control Panel with API to control your Server (Besides ILO4) - Additional traffic can be added for cheap! - Layer3/4 2Tbit Anti-DDoS Protection - FREE BYOIP - Bring your own RIPE IPv4 (or IPv6 of course!) Subnet to us - we will announce it on our ASN for free with your own private VLAN etc.!     Privacy Protected We will never provide your details to anyone     What is not allowed CP DDoS Malware Phishing Spam Spoofing     We dont care what you are doing with this server, use it as a hardcore seedbox, or a torrent server. Its allowed!!     Ping test IP: 193.142.146.186 Testfile: 193.142.146.186/100MB.bin Datacenter/Network: HostSlick, AS208046     Payment Methods Bitcoin and many other altcoins (via Coinify) Giropay (via Skrill) SofortBanking/SofortÜberweisung (via Skrill) PayPal Credit Card (via 2checkout) SEPA Bank Transfer (Open Ticket for Bankd etails) PerfectMoney AliPay Unionpay Attach Poll
  • Topics

×
×
  • Create New...

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