Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Russian client 2016 server. Need HELP.
#41
zOne62 Написал:Спс бро получилось Smile

как открыть два клиента в одной системе Sad

0x40888D (nop) 0x90\0x90
Ответ
#42
Awiion Написал:
Код:
Write<byte>(player.Skill_1);
                Write<byte>(player.Skill_2);
                Write<byte>(player.Skill_3);
            }
        }


it's effect title?
Ответ
#43
zOne62, yes.
Ответ
#44
[Изображение: l1Yl8E.jpg]

Programmator > Help me : myProblem : End battle, always Draw

i use a Java Server

Where is the mistake?

Код:
@Override
    public void writeImpl() {

        // TODO переделать
        LevelUpInfo levelUpInfo = LevelUpDaoService.getInstance().getLevelInfoForRank((byte) (player.getRank() + 1));
        RoomSlot slotByPlayer = room.getRoomSlotByPlayer(player);
        player.setExp(player.getExp() + slotByPlayer.getAllExp());
        player.setGp(player.getGp() + slotByPlayer.getAllGp());

        if(player.getRank() <= 52) {
        if(levelUpInfo.getAllExp() < player.getExp()) {
        player.setRank((short) (player.getRank() + 1));
        player.setGp(player.getGp() + levelUpInfo.getRewardGp());
            }
        }
        //

       [B][COLOR="Red"] if (room.getType() == 1)
        {
            if (room.getBlueKills() > room.getRedKills()){writeC(1);}
            if (room.getRedKills() > room.getBlueKills()){writeC(0);}
            if (room.getRedKills() == room.getBlueKills()){writeC(2);}
        }
        if (room.getType() == 2)
        {
            if (room.getBlueWinRounds() > room.getRedWinRounds()){writeC(1);}
            if (room.getRedWinRounds() > room.getBlueWinRounds()){writeC(0);}
            if (room.getRedWinRounds() == room.getBlueWinRounds()){writeC(2);}
        }
        if (room.getType() == 4)
        {
            if (room.getBlueWinRounds() > room.getRedWinRounds()){writeC(1);}
            if (room.getRedWinRounds() > room.getBlueWinRounds()){writeC(0);}
            if (room.getRedWinRounds() == room.getBlueWinRounds()){writeC(2);}
        }
        writeH(383); // что это???
        writeH(266); // что это???[/COLOR]
[/B]
        // Опыт
        for(int i = 0; i < 16; i++) {
            RoomSlot slot = room.getRoomSlot(i);
            writeH(slot.getAllExp());
        }
        // Очки
        for(int i = 0; i < 16; i++) {
            RoomSlot slot = room.getRoomSlot(i);
            writeH(slot.getAllGp());
        }
        // Очки за ботов
        for(int i = 0; i < 16; i++) {
            if(room.getSpecial() == 6) {
                RoomSlot slot = room.getRoomSlot(i);
                int score = slot.getBotScore();
                writeH(score);
            } else
                writeH(0);
        }

        writeB(new byte[] {
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
            0x00, 0x00,//
            // и тут ХЗ
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
            0x00, 0x00, 0x00, 0x00
        //
        });

        writeS(player.getName(), Player.MAX_NAME_SIZE); // Имя перса
        writeD(player.getExp()); // опыт
        writeD(player.getRank()); // ранк (0-54)
        writeD(player.getRank()); // Пока не понятно за чего отвечают пустые байты...
        writeD(player.getGp()); // ГП
        writeD(con.getAccount().getMoney()); // Рублики

        writeD(0); // ClanID
        writeD(0); // ClanNameColor
        writeD(0); // Unk
        writeD(0); // Unk
        writeH(player.getPcCafe());
        writeC(player.getColor()); // 0-9 Color name

        if(player.getClan() == null) {
            writeS("", 16);
            writeC(0);
            writeH(0);
            writeC(255);
            writeC(255);
            writeC(255);
            writeC(255);
            writeH(0);
        } else {
            writeS(player.getClan().getName(), 16);
            writeC(0); // unk - Видимо разделитель
            writeH(player.getClan().getRank());
            writeC(player.getClan().getLogo1());
            writeC(player.getClan().getLogo2());
            writeC(player.getClan().getLogo3());
            writeC(player.getClan().getLogo4());
            writeH(player.getClan().getColor());
        }

        writeD(0); // Непонятно чо

        writeB(new byte[9]);

        writeD(player.getStats().getFights());
        writeD(player.getStats().getWins());
        writeD(player.getStats().getLosts());
        writeD(0); // unk
        writeD(player.getStats().getKills());
        writeD(player.getStats().getSeriaWins());
        writeD(player.getStats().getDeaths());
        writeD(0); // unk
        writeD(player.getStats().getKpd());
        writeD(player.getStats().getEscapes());
        writeD(player.getStats().getSeasonFights());
        writeD(player.getStats().getSeasonWins());
        writeD(player.getStats().getSeasonLosts());
        writeD(0); // unk
        writeD(player.getStats().getSeasonKills());
        writeD(player.getStats().getSeasonSeriaWins());
        writeD(player.getStats().getSeasonDeaths());
        writeD(0); // unk
        writeD(player.getStats().getSeasonKpd());
        writeD(player.getStats().getSeasonEscapes());
        
        [B][COLOR="Red"]writeH((short)room.getRedWinRounds());
                writeH((short)room.getBlueWinRounds());[/COLOR][/B]
        
        writeB(new byte[49]);
    }
Ответ
#45
The Types 2 and 4 are the same. You see that the codes are the same.
Check in debugger which conditions are fulfilled and way.
Ответ
#46
PROGRAMMATOR Написал:The Types 2 and 4 are the same. You see that the codes are the same.
Check in debugger which conditions are fulfilled and way.


I replace with this code results are the blue team always wins

Код:
writeC(room.getRedKills() > room.getBlueKills() ? 0 : 1);
writeH(383);
writeH(266);
Ответ
#47
[SRC="csharp"]enum WinningTeamType
{
Red,
Blue,
Draw
}
[/SRC]


0 - red, 1 - blue, 2 - draw
Ответ
#48
PROGRAMMATOR Написал:[SRC="csharp"]enum WinningTeamType
{
Red,
Blue,
Draw
}
[/SRC]


0 - red, 1 - blue, 2 - draw

sorry, if you do not mind please answer the direct result ....... do not answer with a formula or code.
I could not think anymore to solve this problem

Sad

:mol:

Thanks before Smile
Ответ
#49
PROGRAMMATOR Написал:zOne62, yes.

PROGRAMMATOR and Awwion please help. items 0 hours problem.



https://www.youtube.com/watch?v=jbpz7cIaLH8

SM_INVENTORY_ITEM_EQUIP
Код:
public class SM_INVENTORY_ITEM_EQUIP : SendBaseGamePacket
    {
        private int _objId;

        private int item_id;

        private int _type;

        private Account _p;

        public SM_INVENTORY_ITEM_EQUIP(int id, int type, Account player)
        {
            makeme();
            _objId = id;
            _type = type;
            _p = player;
        }

        protected internal override void write()
        {
            DateTime now;
            writeH(535);
            if (_type != 2)
            {
                writeD(1);
                now = DateTime.Now;
                string s = now.ToString("yyMMddHHmm");
                writeD(Convert.ToInt32(now.ToString("yyMMddHHmm")));
                writeD(1);
                writeD(0);
                writeD(0);
                writeC(1);
                writeD(0);
            }
            else
            {
                if (DAOM.getInstance().getItem(_objId) == null)
                {
                    item_id = 0;
                }
                else
                {
                    item_id = DAOM.getInstance().getItem(_objId).id;
                }
                writeD(1);
                now = DateTime.Now;
                writeD(Convert.ToInt32(now.ToString("yyMMddHHmm")));
                writeQ(_objId);
                if ((item_id >= 1301510000 ? true : item_id <= 1300002000))
                {
                    writeD(item_id);
                    writeC(2);
                    int count = 86400;
                    if (DAOM.getInstance().getItem(_objId) != null)
                    {
                        count = DAOM.getInstance().getItem(_objId).count;
                    }
                    int days = count / 86400;
                    DateTime data = new DateTime();
                    data.AddDays(days);
                    int tFinal = Convert.ToInt32(data.ToString("yyMMddHHmm"));
                    writeD(tFinal);
                }
                else
                {
                    writeD(item_id);
                    writeC(1);
                    writeD(1);
                }
            }
        }
    }
}

CM_INVENTORY_ITEM_EQUIP

Код:
public class CM_INVENTORY_ITEM_EQUIP : ReceiveBaseGamePacket
    {
        private int obj_id;

        public CM_INVENTORY_ITEM_EQUIP(GameClient Client, byte[] data)
        {
            makeme(Client, data);
        }

        protected internal override void read()
        {
            readH();
            obj_id = readD();
        }

        protected internal override void run()
        {
            if (getClient() != null)
            {
                try
                {
                    Account player = getClient().getPlayer();
                    AccountManager.getInstance().updateStatusItem(obj_id);
                    foreach (ItemsModel items in player.getInventory().getItemsAll())
                    {
                        if (items.object_id == obj_id)
                        {
                            items.equip_type = 2;
                        }
                    }
                    if (DAOM.getInstance().getItem(obj_id) != null)
                    {
                        DAOM.getInstance().getItem(obj_id).equip_type = 2;
                    }
                    player.sendPacket(new SM_INVENTORY_ITEM_EQUIP(obj_id, 2, player));
                }
                catch (Exception exception)
                {
                    CLogger.getInstance().info(exception.ToString());
                }
            }
        }
    }
}

OPCODE PACKET

Код:
[CM]received data size: 14
[CM]received size: 10
[CM]received key: 128
[CM]received opcode: 534
00000000   16 02 1B 26 CA C2 5D 01  00 00 00 00               ···&&amp;amp;amp;amp;#202;Â]·····    

[SM]received data size: 29
[SM]received size: 25
[SM]received opcode: 535
00000000   19 00 17 02 01 00 00 00  3B 6D AD 5F CA C2 5D 01   ········;m-_ÊÂ]·
00000010   00 00 00 00 17 90 D2 23  02 4C 94 AD 5F            ·····Ò#·L”-_  

Останавливаем! Network adapter 'Realtek PCIe GBE Family Controller' on local host
Ответ
#50
Please Code DAOM getItem Smile
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  POINT BLANK V3 16 SERVER ekobaff 3 2,071 10-04-2024, 09:44 AM
Последний пост: ioentergame
  Search Client 3.24.1801.1 and Launcher for Server v3.24 xXSicilyXx 1 2,308 11-01-2023, 03:06 PM
Последний пост: sanglovepb22
  Private Server wrngdeath 0 1,483 12-07-2022, 01:23 AM
Последний пост: wrngdeath
  Мне нужен Piercing Blow Client версии 3.32 Pyotr 0 3,041 02-26-2020, 08:43 AM
Последний пост: Pyotr
  Russian 3.16 хочу писать сервер zOne62 2 3,705 02-12-2020, 09:54 AM
Последний пост: zOne62
  How to Fix WeaponSync Client Evolution 100 % pongsiri 1 3,584 11-25-2019, 07:46 PM
Последний пост: alipth
  I have a problem with WeaponSync Client Evolution BallDev 4 3,302 11-07-2019, 07:24 PM
Последний пост: Missyoustamp
  Language Client help yesterDv 0 1,392 05-30-2019, 08:53 PM
Последний пост: yesterDv
  i need structure file .Pef client last version bmzproject 0 1,361 04-18-2019, 08:27 PM
Последний пост: bmzproject
  how to descrypt packet pb client version current bmzproject 6 2,082 03-04-2019, 04:17 AM
Последний пост: bmzproject

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


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