Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
.class
#1
Как из java (после декомпиляции и дописки того что мне надо)
сделать .class
(нашел вот такое
D:\compile>javac -classpath l2jserver.jar -Xlint:unchecked GameServer.java
Но создает какуюто javac и все. Даже без расширения.
Помогите кто знает плз)

Добавлено через 1 час 28 минут
Код:
http://forum.zone-game.info/showthread.php?t=8451
Тема не помогла
Т_т

Скрин:
[Изображение: 1ef74f5672b9t.jpg]

содержание java:
Код:
// Decompiled by DJ v3.11.11.95 Copyright 2009 Atanas Neshkov  Date: 27.02.2011 18:52:55
// Home Page: http://members.fortunecity.com/neshkov/dj.html  http://www.neshkov.com/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name:   RequestActionUse.java

package l2p.gameserver.network.clientpackets;

import java.util.Map;
import java.util.logging.Logger;
import l2p.Config;
import l2p.gameserver.ai.CtrlIntention;
import l2p.gameserver.ai.L2CharacterAI;
import l2p.gameserver.datatables.SkillTable;
import l2p.gameserver.instancemanager.CastleManager;
import l2p.gameserver.model.*;
import l2p.gameserver.model.actor.instance.*;
import l2p.gameserver.network.L2GameClient;
import l2p.gameserver.network.SystemMessageId;
import l2p.gameserver.network.serverpackets.*;
import l2p.gameserver.templates.L2NpcTemplate;

// Referenced classes of package l2p.gameserver.network.clientpackets:
//            L2GameClientPacket

public final class RequestActionUse extends L2GameClientPacket
{

    public RequestActionUse()
    {
    }

    protected void readImpl()
    {
        _actionId = readD();
        _ctrlPressed = readD() == 1;
        _shiftPressed = readC() == 1;
    }

    protected void runImpl()
    {
        L2PcInstance activeChar = ((L2GameClient)getClient()).getActiveChar();
        if(activeChar == null)
            return;
        if(Config.DEBUG)
            _log.finest((new StringBuilder()).append(activeChar.getName()).append(" request Action use: id ").append(_actionId).append(" 2:").append(_ctrlPressed).append(" 3:").append(_shiftPressed).toString());
        if(activeChar.isAlikeDead())
        {
            ((L2GameClient)getClient()).sendPacket(new ActionFailed());
            return;
        }
        if(activeChar.isOutOfControl())
        {
            ((L2GameClient)getClient()).sendPacket(new ActionFailed());
            return;
        }
        if(activeChar.isCastingNow())
        {
            ((L2GameClient)getClient()).sendPacket(new ActionFailed());
            return;
        }
        L2Summon pet = activeChar.getPet();
        L2Object target = activeChar.getTarget();
        if(Config.DEBUG)
            _log.info((new StringBuilder()).append("Requested Action ID: ").append(String.valueOf(_actionId)).toString());
        switch(_actionId)
        {
        case 0: // '\0'
            if(activeChar.getMountType() != 0)
                break;
            if(target != null && !activeChar.isSitting() && (target instanceof L2StaticObjectInstance) && ((L2StaticObjectInstance)target).getType() == 1 && CastleManager.getInstance().getCastle(target) != null && activeChar.isInsideRadius(target, 150, false, false))
            {
                ChairSit cs = new ChairSit(activeChar, ((L2StaticObjectInstance)target).getStaticObjectId());
                activeChar.sendPacket(cs);
                activeChar.sitDown();
                activeChar.broadcastPacket(cs);
                break;
            }
            if(activeChar.isSitting())
                activeChar.standUp();
            else
                activeChar.sitDown();
            if(Config.DEBUG)
                _log.fine((new StringBuilder()).append("new wait type: ").append(activeChar.isSitting() ? "SITTING" : "STANDING").toString());
            break;

        case 1001:
            break;

        case 1: // '\001'
            if(activeChar.isRunning())
                activeChar.setWalking();
            else
                activeChar.setRunning();
            if(Config.DEBUG)
                _log.fine((new StringBuilder()).append("new move type: ").append(activeChar.isRunning() ? "RUNNING" : "WALKIN").toString());
            break;

        case 15: // '\017'
        case 21: // '\025'
            if(pet != null && !pet.isMovementDisabled() && !activeChar.isBetrayed())
                pet.setFollowStatus(!pet.getFollowStatus());
            break;

        case 16: // '\020'
        case 22: // '\026'
            if(target == null || pet == null || pet == target || pet.isAttackingDisabled() || activeChar.isBetrayed())
                break;
            if(activeChar.isInOlympiadMode() && !activeChar.isOlympiadStart())
            {
                activeChar.sendPacket(new ActionFailed());
                return;
            }
            if(activeChar.getAccessLevel() < Config.GM_PEACEATTACK && activeChar.isInsidePeaceZone(pet, target))
            {
                activeChar.sendPacket(new SystemMessage(SystemMessageId.TARGET_IN_PEACEZONE));
                return;
            }
            if(!target.isAutoAttackable(activeChar) && !_ctrlPressed)
                break;
            if(target instanceof L2DoorInstance)
            {
                if(((L2DoorInstance)target).isAttackable(activeChar) && pet.getNpcId() != 14839)
                    pet.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
                break;
            }
            if(pet.getNpcId() != 14737)
                pet.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
            break;

        case 17: // '\021'
        case 23: // '\027'
            if(pet != null && !pet.isMovementDisabled() && !activeChar.isBetrayed())
                pet.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null);
            break;

        case 19: // '\023'
            if(pet == null || activeChar.isBetrayed())
                break;
            if(pet.isDead())
            {
                activeChar.sendPacket(new SystemMessage(SystemMessageId.DEAD_PET_CANNOT_BE_RETURNED));
                break;
            }
            if(pet.isAttackingNow() || pet.isRooted())
            {
                activeChar.sendPacket(new SystemMessage(SystemMessageId.PET_CANNOT_SENT_BACK_DURING_BATTLE));
                break;
            }
            if(!(pet instanceof L2PetInstance))
                break;
            L2PetInstance petInst = (L2PetInstance)pet;
            if((double)petInst.getCurrentFed() > (double)petInst.getMaxFed() * 0.40000000000000002D)
                pet.unSummon(activeChar);
            else
                activeChar.sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_RESTORE_HUNGRY_PETS));
            break;

        case 38: // '&'
            if(pet != null && pet.isMountable() && !activeChar.isMounted() && !activeChar.isBetrayed())
            {
                if(activeChar.isDead())
                {
                    SystemMessage msg = new SystemMessage(SystemMessageId.STRIDER_CANT_BE_RIDDEN_WHILE_DEAD);
                    activeChar.sendPacket(msg);
                    msg = null;
                    break;
                }
                if(pet.isDead())
                {
                    SystemMessage msg = new SystemMessage(SystemMessageId.DEAD_STRIDER_CANT_BE_RIDDEN);
                    activeChar.sendPacket(msg);
                    msg = null;
                    break;
                }
                if(pet.isInCombat() || pet.isRooted())
                {
                    SystemMessage msg = new SystemMessage(SystemMessageId.STRIDER_IN_BATLLE_CANT_BE_RIDDEN);
                    activeChar.sendPacket(msg);
                    msg = null;
                    break;
                }
                if(activeChar.isInCombat())
                {
                    SystemMessage msg = new SystemMessage(SystemMessageId.STRIDER_CANT_BE_RIDDEN_WHILE_IN_BATTLE);
                    activeChar.sendPacket(msg);
                    msg = null;
                    break;
                }
                if(activeChar.isSitting() || activeChar.isMoving())
                {
                    SystemMessage msg = new SystemMessage(SystemMessageId.STRIDER_CAN_BE_RIDDEN_ONLY_WHILE_STANDING);
                    activeChar.sendPacket(msg);
                    msg = null;
                    break;
                }
                if(activeChar.isFishing())
                {
                    SystemMessage msg = new SystemMessage(SystemMessageId.CANNOT_DO_WHILE_FISHING_2);
                    activeChar.sendPacket(msg);
                    msg = null;
                    break;
                }
                if(activeChar.isCursedWeaponEquiped())
                {
                    SystemMessage msg = new SystemMessage(SystemMessageId.STRIDER_CANT_BE_RIDDEN_WHILE_IN_BATTLE);
                    activeChar.sendPacket(msg);
                    break;
                }
                if(pet.isDead() || activeChar.isMounted())
                    break;
                if(!activeChar.disarmWeapons())
                    return;
                Ride mount = new Ride(activeChar.getObjectId(), 1, pet.getTemplate().npcId);
                activeChar.broadcastPacket(mount);
                activeChar.setMountType(mount.getMountType());
                activeChar.setMountObjectID(pet.getControlItemId());
                pet.unSummon(activeChar);
                break;
            }
            if(activeChar.isRentedPet())
            {
                activeChar.stopRentPet();
                break;
            }
            if(!activeChar.isMounted() || !activeChar.setMountType(0))
                break;
            if(activeChar.isFlying())
                activeChar.removeSkill(SkillTable.getInstance().getInfo(4289, 1));
            Ride dismount = new Ride(activeChar.getObjectId(), 0, 0);
            activeChar.broadcastPacket(dismount);
            activeChar.setMountObjectID(0);
            break;

        case 32: // ' '
            useSkill(4230);
            break;

        case 36: // '$'
            useSkill(4259);
            break;

        case 37: // '%'
            if(activeChar.isAlikeDead())
            {
                ((L2GameClient)getClient()).sendPacket(new ActionFailed());
                return;
            }
            if(activeChar.getPrivateStoreType() != 0)
            {
                activeChar.setPrivateStoreType(0);
                activeChar.broadcastUserInfo();
            }
            if(activeChar.isSitting())
                activeChar.standUp();
            if(activeChar.getCreateList() == null)
                activeChar.setCreateList(new L2ManufactureList());
            activeChar.sendPacket(new RecipeShopManageList(activeChar, true));
            break;

        case 39: // '\''
            useSkill(4138);
            break;

        case 41: // ')'
            useSkill(4230);
            break;

        case 42: // '*'
            useSkill(4378, activeChar);
            break;

        case 43: // '+'
            useSkill(4137);
            break;

        case 44: // ','
            useSkill(4139);
            break;

        case 45: // '-'
            useSkill(4025, activeChar);
            break;

        case 46: // '.'
            useSkill(4261);
            break;

        case 47: // '/'
            useSkill(4260);
            break;

        case 48: // '0'
            useSkill(4068);
            break;

        case 51: // '3'
            if(activeChar.isAlikeDead())
            {
                ((L2GameClient)getClient()).sendPacket(new ActionFailed());
                return;
            }
            if(activeChar.getPrivateStoreType() != 0)
            {
                activeChar.setPrivateStoreType(0);
                activeChar.broadcastUserInfo();
            }
            if(activeChar.isSitting())
                activeChar.standUp();
            if(activeChar.getCreateList() == null)
                activeChar.setCreateList(new L2ManufactureList());
            activeChar.sendPacket(new RecipeShopManageList(activeChar, false));
            break;

        case 52: // '4'
            if(pet != null && (pet instanceof L2SummonInstance))
                pet.unSummon(activeChar);
            break;

        case 53: // '5'
            if(target != null && pet != null && pet != target && !pet.isMovementDisabled())
                pet.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(target.getX(), target.getY(), target.getZ(), 0));
            break;

        case 54: // '6'
            if(target != null && pet != null && pet != target && !pet.isMovementDisabled())
                pet.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(target.getX(), target.getY(), target.getZ(), 0));
            break;

        case 96: // '`'
            _log.info("98 Accessed");
            break;

        case 97: // 'a'
            _log.info("97 Accessed");
            break;

        case 1000:
            if(target instanceof L2DoorInstance)
                useSkill(4079);
            break;

        case 1003:
            useSkill(4710);
            break;

        case 1004:
            useSkill(4711, activeChar);
            break;

        case 1005:
            useSkill(4712);
            break;

        case 1006:
            useSkill(4713, activeChar);
            break;

        case 1007:
            useSkill(4699, activeChar);
            break;

        case 1008:
            useSkill(4700, activeChar);
            break;

        case 1009:
            useSkill(4701);
            break;

        case 1010:
            useSkill(4702, activeChar);
            break;

        case 1011:
            useSkill(4703, activeChar);
            break;

        case 1012:
            useSkill(4704);
            break;

        case 1013:
            useSkill(4705);
            break;

        case 1014:
            useSkill(4706, activeChar);
            break;

        case 1015:
            useSkill(4707);
            break;

        case 1016:
            useSkill(4709);
            break;

        case 1017:
            useSkill(4708);
            break;

        case 1031:
            useSkill(5135);
            break;

        case 1032:
            useSkill(5136);
            break;

        case 1033:
            useSkill(5137);
            break;

        case 1034:
            useSkill(5138);
            break;

        case 1035:
            useSkill(5139);
            break;

        case 1036:
            useSkill(5142);
            break;

        case 1037:
            useSkill(5141);
            break;

        case 1038:
            useSkill(5140);
            break;

        case 1039:
            if(!(target instanceof L2DoorInstance))
                useSkill(5110);
            break;

        case 1040:
            if(!(target instanceof L2DoorInstance))
                useSkill(5111);
            break;

        case 1050:
            useSkill(4706, activeChar);
            break;

        default:
            _log.warning((new StringBuilder()).append(activeChar.getName()).append(": unhandled action type ").append(_actionId).toString());
            break;
        }
    }

    private void useSkill(int skillId, L2Object target)
    {
        L2PcInstance activeChar = ((L2GameClient)getClient()).getActiveChar();
        if(activeChar == null)
            return;
        L2Summon activeSummon = activeChar.getPet();
        if(activeChar.getPrivateStoreType() != 0)
        {
            activeChar.sendMessage("Cannot use skills while trading");
            return;
        }
        if(activeSummon != null && !activeChar.isBetrayed())
        {
            Map _skills = activeSummon.getTemplate().getSkills();
            if(_skills == null)
                return;
            if(_skills.size() == 0)
            {
                activeChar.sendPacket(new SystemMessage(SystemMessageId.SKILL_NOT_AVAILABLE));
                return;
            }
            L2Skill skill = (L2Skill)_skills.get(Integer.valueOf(skillId));
            if(skill == null)
            {
                if(Config.DEBUG)
                    _log.warning((new StringBuilder()).append("Skill ").append(skillId).append(" missing from npcskills.sql for a summon id ").append(activeSummon.getNpcId()).toString());
                return;
            }
            activeSummon.setTarget(target);
            activeSummon.useMagic(skill, _ctrlPressed, _shiftPressed);
        }
    }

    private void useSkill(int skillId)
    {
        L2PcInstance activeChar = ((L2GameClient)getClient()).getActiveChar();
        if(activeChar == null)
        {
            return;
        } else
        {
            useSkill(skillId, activeChar.getTarget());
            return;
        }
    }

    public String getType()
    {
        return "[C] 45 RequestActionUse";
    }

    private static final String _C__45_REQUESTACTIONUSE = "[C] 45 RequestActionUse";
    private static Logger _log = Logger.getLogger(l2p/gameserver/network/clientpackets/RequestActionUse.getName());
    private int _actionId;
    private boolean _ctrlPressed;
    private boolean _shiftPressed;

}
Надо из него .class сделать и в ядро запхать.
(ActionRequestUse.class надо)

Добавлено через 2 часа 4 минуты
Все разобрался.
Спс за Помощ ОМГ.
Сперва открыл через jd-gui
скопировал от туда все в файл с расшырением java Декомпильнул
D:\compile>javac -classpath l2jserver.jar -Xlint:unchecked GameServer.java
0 ошибок и все пошло. Кому надо хелп с этим пишите в скайп ufodriverr
Ответ
#2
private static Logger _log = Logger.getLogger(l2p/gameserver/network/clientpackets/RequestActionUse.getName());

ты уверен, что там должны быть слеши?
Ответ
#3
Тема Закрыта...
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Java в Class virusoflove 1 1,738 10-17-2016, 09:04 AM
Последний пост: Rolfer
  Error: Could not find or load main class TosyBosy 25 11,572 07-07-2013, 05:11 PM
Последний пост: TosyBosy
  Error: Could not find or load main class com.l2open.gameserver.util.BootManager Nasdomlan 6 2,361 03-25-2013, 05:59 PM
Последний пост: Nasdomlan
  Sub-Class Тормоза GRAFOON 23 4,957 01-26-2013, 05:23 PM
Последний пост: Dеmon
  Class Master в Comunity Board Deron 10 3,214 11-06-2012, 03:57 PM
Последний пост: coldy
  Static Class mego4el 2 1,410 08-21-2012, 12:05 PM
Последний пост: mego4el
  class L2Territory IwantPOJL 3 1,702 07-04-2012, 02:00 PM
Последний пост: VISTALL
  Class master Trololoshka 6 2,865 07-29-2011, 08:04 PM
Последний пост: Trololoshka
  из .java в .class krisadr 4 3,150 06-08-2010, 09:25 AM
Последний пост: Paranormal
  Class-файлы tymboss 6 3,949 04-30-2010, 06:43 PM
Последний пост: tymboss

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)