Jump to content
  • 0

Question

Posted

hello again.....

 

i have a hero coin in my server (l2j interlude)

 

and when i press it i become a hero but the coin doesn't disappear!

 

how do i fix it?

 

if you have a working code just give it to me

8 answers to this question

Recommended Posts

  • 0
Posted

hello again.....

 

i have a hero coin in my server (l2j interlude)

 

and when i press it i become a hero but the coin doesn't disappear!

 

how do i fix it?

 

if you have a working code just give it to me

how about you post the code you are using here so we can configure out what's the problem?

  • 0
Posted

how about you post the code you are using here so we can configure out what's the problem?

as he told me he is using interpid's code

 

/*
* This program 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.
*
* This program 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 net.sf.l2j.gameserver.handler.itemhandlers;

import net.sf.l2j.gameserver.handler.IItemHandler;
import net.sf.l2j.gameserver.model.L2ItemInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;


/**
*
* @author  HanWik
*/
public class HeroItem implements IItemHandler
{
   private static final int[] ITEM_IDS = { YOUR ITEM ID - replace here };

   public void useItem(L2PlayableInstance playable, L2ItemInstance item)
   {
      if (!(playable instanceof L2PcInstance))
         return;
      L2PcInstance activeChar = (L2PcInstance)playable;
       int itemId = item.getItemId();
      
       if (itemId == YOUR ITEM ID - replace here) // Item to become hero
       {
          activeChar.setHero(true);
          activeChar.broadcastUserInfo();
       }
   }
   
   /**
    * @see net.sf.l2j.gameserver.handler.IItemHandler#getItemIds()
    */
   public int[] getItemIds()
   {
      return ITEM_IDS;
   }
}

go to GameServer.java and add these...

Quote
import net.sf.l2j.gameserver.handler.itemhandlers.Harvester;
import net.sf.l2j.gameserver.handler.itemhandlers.HeroItem;
import net.sf.l2j.gameserver.handler.itemhandlers.Maps;

Quote
      _itemHandler.registerItemHandler(new BeastSpice());
      _itemHandler.registerItemHandler(new HeroItem());

Guest
This topic is now closed to further replies.


  • Posts

    • It’s been a while since this situation started. As I’ve mentioned before, you are no longer kids you’re grown adults. Please resolve your disagreements through DMs, not forum threads.   I understand that you are competitors, but the rest of the community isn’t interested in your disputes. Stop publicly accusing each other and focus on handling issues privately.   The reputation system is not to be abused. Hearing complaints like “he downvoted me” every day is not productive. This thread will remain locked. Please grow up and handle your problems through private messages.
    • It's owned by a person from down under. Nikita is not even a CEO.     Another honorable mention of who does actually hold a sort of authority: Troyz.     The project itself is - or, at least, used to be TERRIBLY corrupt and is known for having multiple alts on maxcheaters selling fabricated items in the past.        P.S. Their staff split up and the leftovers formed a new project called "darkdragon", utilizing old database of Reborn they had for marketing purposes.
    • They indeed moved from aCis to Lucera back in 2020 - he was running under the name p0w3rf1y over my forums (he shared some fixes under that name). I had access to their timeline, got kicked and ignored overnight. From what I know they also struggled using Lucera, but I got no contact since then.
    • What private thing? Post the evidence here, and let the community know what you are. It also explains the manipulation of this thread; is that why you want privileges here? https://maxcheaters.com/topic/253997-sourceservercliente-l2devs-files-l2devscom/page/2/ This thread perfectly demonstrates how you use your forum privileges. No need to say anything, just look at it. Don't explain it to me, explain it to the community or the people who believed you.  
    • What other proof do you need from someone who has been banned and has multiple accounts on the forum? Anyway, I'll send you what you're requesting privately, no problem. I thought that in the last chat we had made clear the points where we allowed this person to continue in the forum, one of them being that they didn't mention me anymore, but it didn't last long.
  • 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..