[Point Blank] Help me please UDP3 EVENT Opcode 3 and 4 - Форум администраторов игровых серверов
Форум администраторов игровых серверов StormWall - Защита от DDos атак
Регистрация Мнения Справка Пользователи Календарь Все разделы прочитаны
Вернуться   Форум администраторов игровых серверов > MMO > Point Blank (Piercing Blow)

Point Blank (Piercing Blow)
Общие вопросы по написанию эмулятора. General questions on developing emulator. При поддержке: Lucera 2 - разработка Java Interlude

Ответ
Опции темы
Непрочитано 13.02.2018, 12:10   #1
Пользователь

Автор темы (Топик Стартер) Help me please UDP3 EVENT Opcode 3 and 4

case 3:
            {
                if (room != null)
                {
                onlyDecrypt(originalbuffer, this.length);
                    sub_opcode = originalbuffer.readByte();
                    slot = originalbuffer.readShort();
                    sub_length = originalbuffer.readShort();
                    EventType = 0;
                    if (sub_opcode != 2)
                    {
                        EventType = originalbuffer.readInt();
                    }
                    if ((EventType & 0x04) > 0)
                    {
                    	this.x = originalbuffer.readShort();
                        this.y = originalbuffer.readShort();
                        this.z = originalbuffer.readShort();
                        this.camX = originalbuffer.readShort();
                        this.camZ = originalbuffer.readShort();
                        this.Area = originalbuffer.readShort();                       System.out.println("====================================================");
                        System.out.println("X : " + x);     
                        System.out.println("Y : " + y);  
                        System.out.println("Z : " + z);  
                        System.out.println("camX : " + camX);  
                        System.out.println("camZ : " + camZ);  
                        System.out.println("Area : " + Area);                        
                       }
                        ByteBuf _buf = Unpooled.buffer(0, this.length).order(ByteOrder.LITTLE_ENDIAN);   
                        _buf.writeByte(4); // OPCODE 4
                        _buf.writeByte(-1); // SLOT -1
                        _buf.writeFloat(this.time); // TIME
                        _buf.writeByte(1); // SESSION
                        _buf.writeShort(this.length); // LENGTH this.length
                        _buf.writeShort(0); // EVENT 1
                        _buf.writeShort(0); // EVENT 2
                        _buf.writeBytes(this.InternalPacket.copy());                 
                        System.out.println(NetworkUtil.printData("Buffer OutPut 3", _buf));
                        ctx.writeAndFlush(new DatagramPacket(_buf.copy(), p.net));                      
                    }
                }
                break;
        }
            case 4:
            {                       
                if (room != null)
                {
                    for (Player p : room.getPlayers().values())
                    {
                        ByteBuf _buf = Unpooled.buffer(0, this.length).order(ByteOrder.LITTLE_ENDIAN);
                        _buf.writeByte(4); // OPCODE
                        _buf.writeByte(-1); // SLOT
                        _buf.writeFloat(this.time); // TIME
                        _buf.writeByte(1); // SESSION
                        _buf.writeShort(this.length); // LENGTH
                        _buf.writeShort(0); // EVENT 1
                        _buf.writeShort(0); // EVENT 2
                        _buf.writeBytes(this.InternalPacket.copy());
                        System.out.println(NetworkUtil.printData("Buffer OutPut 4", _buf));
                        ctx.writeAndFlush(new DatagramPacket(_buf, p.net));
                    }
                }
                break;
            }
Code: Java
When i get
this.x = originalbuffer.readShort();
                        this.y = originalbuffer.readShort();
                        this.z = originalbuffer.readShort();
                        this.camX = originalbuffer.readShort();
                        this.camZ = originalbuffer.readShort();
                        this.Area = originalbuffer.readShort();        
Code: Java
I have to do with Opcode4.
Or i made the wrong structure
bmzproject вне форума Ответить с цитированием
Непрочитано 13.02.2018, 14:43   #2
Аватар для PROGRAMMATOR
Администратор

По умолчанию Re: Help me please UDP3 EVENT Opcode 3 and 4

3 and 4 is a same. https://forum.zone-game.info/showpos...18&postcount=6
__________________
composer require laravel/framework
yarn add vue
PROGRAMMATOR вне форума Отправить сообщение для PROGRAMMATOR с помощью ICQ Отправить сообщение для PROGRAMMATOR с помощью Skype™ Ответить с цитированием
Непрочитано 13.02.2018, 19:25   #3
Пользователь

Автор темы (Топик Стартер) Re: Help me please UDP3 EVENT Opcode 3 and 4

Цитата:
Сообщение от PROGRAMMATOR Посмотреть сообщение
When I get posX, posY, posZ, what do I need to do next?
I have no structure
bmzproject вне форума Ответить с цитированием
Непрочитано 13.02.2018, 21:52   #4
Аватар для PROGRAMMATOR
Администратор

По умолчанию Re: Help me please UDP3 EVENT Opcode 3 and 4

Send to all clients for them to see the actual position of a player.

P.S. Before this you need to check player's position data and speed of movement to switch off possibility of teleportation and speedhack and for lag compensation.
__________________
composer require laravel/framework
yarn add vue
PROGRAMMATOR вне форума Отправить сообщение для PROGRAMMATOR с помощью ICQ Отправить сообщение для PROGRAMMATOR с помощью Skype™ Ответить с цитированием
Непрочитано 14.02.2018, 00:49   #5
Пользователь

Автор темы (Топик Стартер) Re: Help me please UDP3 EVENT Opcode 3 and 4

Цитата:
Сообщение от PROGRAMMATOR Посмотреть сообщение
Send to all clients for them to see the actual position of a player.

P.S. Before this you need to check player's position data and speed of movement to switch off possibility of teleportation and speedhack and for lag compensation.
I do not know how to send.

I need a structured way to send value to the client.
bmzproject вне форума Ответить с цитированием
Непрочитано 15.02.2018, 03:05   #6
Пользователь

Автор темы (Топик Стартер) Re: Help me please UDP3 EVENT Opcode 3 and 4

Цитата:
Сообщение от PROGRAMMATOR Посмотреть сообщение
Send to all clients for them to see the actual position of a player.

P.S. Before this you need to check player's position data and speed of movement to switch off possibility of teleportation and speedhack and for lag compensation.
@PROGRAMMATOR Send to all clients where Opcode ?
help me please
bmzproject вне форума Ответить с цитированием
Непрочитано 15.02.2018, 10:05   #7
Аватар для Awiion

По умолчанию Re: Help me please UDP3 EVENT Opcode 3 and 4

bmzproject,

Link
__________________
Разработка Emu: PiercingBlow 90%, APB Reloaded 100%.
Самый действенный инструмент для самообучения - грабли.
Awiion вне форума Отправить сообщение для Awiion с помощью Skype™ Ответить с цитированием
Непрочитано 15.02.2018, 11:30   #8
Пользователь

Автор темы (Топик Стартер) Re: Help me please UDP3 EVENT Opcode 3 and 4

Цитата:
Сообщение от Awiion Посмотреть сообщение
bmzproject,

Link
When I get x, y, z, camX, camZ, Area
Opcode 3
case 3:
            {
                log.info("Packet Replication Opcode 3 Slot :" + slotID);
                if (room != null)
                {
                	onlyDecrypt(originalbuffer, this.length);
                    sub_opcode = originalbuffer.readByte();
                    slot = originalbuffer.readShort();
                    sub_length = originalbuffer.readShort();
                    EventType = 0;
                    if (sub_opcode != 2)
                    {
                        EventType = originalbuffer.readInt();
                    }
                    System.out.println("============================================================================================");
                    System.out.println("| Sub-Opcode: " + sub_opcode + " | Slot: " + slot + "| Length: " + sub_length + " | EventType: " + EventType + " |");
                    System.out.println("============================================================================================");                   
                    if ((EventType & 0x01) > 0)
                    {
                        System.out.println("====================================================");
                        System.out.println("Action State");
                        System.out.println(" Condition 1 " + originalbuffer.readShort());
                        System.out.println(" Condition 2 " + originalbuffer.readShort());
                        System.out.println("====================================================");
                        remainvalue += 0x01;
                    }
                    if ((EventType & 0x02) > 0)
                    {
                        System.out.println("====================================================");
                        System.out.println("Animation : " + originalbuffer.readShort());
                        System.out.println("====================================================");
                        remainvalue += 0x02;
                    }
                    if ((EventType & 0x04) > 0)
                    {
                    	this.x = originalbuffer.readShort();
                        this.y = originalbuffer.readShort();
                        this.z = originalbuffer.readShort();
                        this.camX = originalbuffer.readShort();
                        this.camZ = originalbuffer.readShort();
                        this.Area = originalbuffer.readShort();
                        System.out.println("====================================================");
                        System.out.println("X : " + x);     
                        System.out.println("Y : " + y);  
                        System.out.println("Z : " + z);  
                        System.out.println("camX : " + camX);  
                        System.out.println("camZ : " + camZ);  
                        System.out.println("Area : " + Area);                        
                        System.out.println("====================================================");
                        remainvalue += 0x04;
 
                    }                                
                    for (Player p : room.getPlayers().values())
                    {    
                    	log.info("====================================================");
                        log.info("| Sub-Opcode: " + sub_opcode + " | Slot: " + slot + "| length: " + sub_length + " | EventType: " + EventType + " |");
                        log.info("====================================================");
                        ByteBuf _buf = Unpooled.buffer(0, this.length).order(ByteOrder.LITTLE_ENDIAN);   
                        _buf.writeByte(4); // OPCODE 4
                        _buf.writeByte(-1); // SLOT -1
                        _buf.writeFloat(this.time); // TIME
                        _buf.writeByte(1); // SESSION
                        _buf.writeShort(this.length); // LENGTH this.length
                        _buf.writeShort(0); // EVENT 1
                        _buf.writeShort(0); // EVENT 2
                        _buf.writeBytes(this.InternalPacket.copy());                 
                        ctx.writeAndFlush(new DatagramPacket(_buf.copy(), p.net));
                    }
                }
                break;
        }
Code: Java
What do I do next?
I need an example of how to send values to a client.

Opcode 4
case 4:
            {                           
                if (room != null)
                {
                	if ((EventType & 0x04) > 0)
                    {
                    	this.x = originalbuffer.readShort();
                        this.y = originalbuffer.readShort();
                        this.z = originalbuffer.readShort();
                        this.camX = originalbuffer.readShort();
                        this.camZ = originalbuffer.readShort();
                        this.Area = originalbuffer.readShort();
                        System.out.println("====================================================");
                        System.out.println("X : " + x);     
                        System.out.println("Y : " + y);  
                        System.out.println("Z : " + z);  
                        System.out.println("camX : " + camX);  
                        System.out.println("camZ : " + camZ);  
                        System.out.println("Area : " + Area);                        
                        System.out.println("====================================================");
                        remainvalue += 0x04;
 
                    }
                    for (Player p : room.getPlayers().values())
                    {
                        ByteBuf _buf = Unpooled.buffer(0, this.length).order(ByteOrder.LITTLE_ENDIAN);
                        _buf.writeByte(4); // OPCODE
                        _buf.writeByte(-1); // SLOT
                        _buf.writeFloat(this.time); // TIME
                        _buf.writeByte(1); // SESSION
                        _buf.writeShort(this.length); // LENGTH
                        _buf.writeShort(0); // EVENT 1
                        _buf.writeShort(0); // EVENT 2
                        _buf.writeBytes(this.InternalPacket.copy());
                        ctx.writeAndFlush(new DatagramPacket(_buf, p.net));
                    }
                }
                break;
            }
Code: Java
bmzproject вне форума Ответить с цитированием
Ответ


Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 
Опции темы

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход

Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
[Point Blank] UDP3 Help me Host & Player not look bmzproject Point Blank (Piercing Blow) 12 16.12.2017 13:57
[Piercing Blow] UDP3 Урон Boris2105 Point Blank (Piercing Blow) 12 25.08.2017 18:10
[Point Blank] What does that mean? (UDP3) TheBestGuy Point Blank (Piercing Blow) 6 10.05.2017 23:28
OPCODE Boris2105 Point Blank (Piercing Blow) 7 08.03.2016 00:11
Opcode/Id Aluucard Point Blank (Piercing Blow) 1 07.03.2016 00:54


© 2007–2024 «Форум администраторов игровых серверов»
Защита сайта от DDoS атак — StormWall
Работает на Булке неизвестной версии с переводом от zCarot
Текущее время: 19:37. Часовой пояс GMT +3.

Вверх