Jump to content

TreVor

Premium Member
  • Posts

    311
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by TreVor

  1. Hello all i have a problem on critical error.

    After use npc custom or not custom have crt error.

     

    History: FMallocWindows::Malloc <- NCHtmlFrame::CreateTableFrame <- NCHtmlFrame::LoadHtml <- NCHtmlTable::CreateFrame <- NCHtmlTable::LoadHtml <- NCHtmlFrame::CreateTableFrame <- NCHtmlFrame::LoadHtml <- NCHtmlViewer::AnalyzeHtml <- NCHtmlViewer::LoadHtmlFormString <- NCNPCHtmlViewer::LoadHtml <- NConsoleWnd::ReceiveHtmlMessage <- UGameEngine::OnNpcHtmlMessage <- UNetworkHandler::Tick <- Function Name=NpcHtmlMessageP <- UGameEngine::Tick <- UpdateWorld <- MainLoop

  2. Hello all i make a code for auto flag on attack mob rb etc... and this work only on attack melee , and my question how to make a code for give flag on all attack melee skill summon etc?

          // custom pvp flag
          if (target instanceof L2MonsterInstance &&((L2MonsterInstance) target).getNpcId() == 202020) 
          {
             setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);
             if (getPvpFlag() == 0)
            {
               startPvPFlag();
             }
             return;
          }
  3. Hello all i make a code for auto flag on attack mob rb etc... and this work only on attack melee , and my question how to make a code for give flag on all attack melee skill summon etc?

          // custom pvp flag
          if (target instanceof L2MonsterInstance &&((L2MonsterInstance) target).getNpcId() == 202020) 
          {
             setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_NORMAL_TIME);
             if (getPvpFlag() == 0)
            {
               startPvPFlag();
             }
             return;
          }

     

  4. package com.l2jfrozen.gameserver.handler.itemhandlers;
    
    import com.l2jfrozen.gameserver.handler.IItemHandler;
    import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
    import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
    import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
    import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;
    
    public class PremiumBuff implements IItemHandler
    {
    
        public PremiumBuff()
        {
        //null
        }
    
        @Override
        public void useItem(L2PlayableInstance playable, L2ItemInstance item)
        {
                if(!(playable instanceof L2PcInstance))
                    return;
    
                L2PcInstance activeChar = (L2PcInstance) playable;
    
                if(activeChar.isInOlympiadMode())
                {
                    activeChar.sendMessage("This item can not be used on olympiad");
                }
    
                if(activeChar.isDonator())
                {
                    activeChar.sendMessage("You are already the donator member");
                }
                else
                {
                    activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 16));
                    activeChar.setAccessLevel(10);;
                    activeChar.sendMessage("Now you can use a premium buffer!");
                    activeChar.broadcastUserInfo();
                    playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
                }
                activeChar = null;
        }
    
        @Override
        public int[] getItemIds()
        {
            return ITEM_IDS;
        }
    
        private static final int ITEM_IDS[] =
        {
            9996
        };
    
    }

    i make this and dont work no consume and dont give access

  5.     private void showMainPage(final L2PcInstance activeChar)
        {
            AdminHelpPage.showHelpPage(activeChar, "charmanage.htm");
        }
        
        private void setAccountAccessLevel(final String player, final L2PcInstance activeChar, final int banLevel)
        {
            Connection con = null;
            
            try
            {
                con = L2DatabaseFactory.getInstance().getConnection(false);
                String stmt = "SELECT account_name FROM characters WHERE char_name = ?";
                PreparedStatement statement = con.prepareStatement(stmt);
                statement.setString(1, player);
                ResultSet result = statement.executeQuery();
                
                if (result.next())
                {
                    String acc_name = result.getString(1);
                    SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
                    
                    if (acc_name.length() > 0)
                    {
                        LoginServerThread.getInstance().sendAccessLevel(acc_name, banLevel);
                        sm.addString("Account Access Level for " + player + " set to " + banLevel + ".");
                    }
                    else
                    {
                        sm.addString("Couldn't find player: " + player + ".");
                    }
                    
                    activeChar.sendPacket(sm);
                    sm = null;
                    acc_name = null;
                }
                else

    This is ? and my question how to make to item?

×
×
  • Create New...