C# loadmonster packet

10/28/2016 03:16 pushipu#1
Hi, I'm not really sure if I understand all this packets stuff, loadmonster packet, I wish to force spawn just 1 mob when using command
/loadmonster MOB_CH_MANGYANG 100

PHP Code:
[-> S][7010]
06 00
8D 07 00 00
01
00 
0x7010 - is packet
06 00 - is command loadmonster
8D 07 00 00 - is monster ID
01 - number of monsters
00 - Regular mob, 01 will spawn Champion

PHP Code:
if (packet.Opcode == 0x7010) {
  
uint Command packet.ReadUInt16();
         if (
CommandID == 6) { 
                                         
           
uint unknown packet.ReadUInt8();
           
uint monsterID packet.ReadUInt32();

                   
Packet p = new Packet(0x7010); //packet
                      
p.WriteUInt16(6);           // command ID
                      
p.WriteUInt32(monsterID);   // monster ID
                      
p.WriteUInt8(1);            // forcing to spawn just 1 mob 
                      
p.WriteUInt8(unknown);      // mob type

                   
Agent.Send(p);                                        
                                    } 
                                } 
thx :)
10/28/2016 03:42 AceSpace#2
Quote:
Originally Posted by pushipu View Post
Hi, I'm not really sure if I understand all this packets stuff, loadmonster packet, I wish to force spawn just 1 mob when using command
/loadmonster MOB_CH_MANGYANG 100

PHP Code:
[-> S][7010]
06 00
8D 07 00 00
01
00 
0x7010 - is packet
06 00 - is command loadmonster
8D 07 00 00 - is monster ID
01 - number of monsters
00 - Regular mob, 01 will spawn Champion

PHP Code:
if (packet.Opcode == 0x7010) {
  
uint Command packet.ReadUInt16();
         if (
CommandID == 6) { 
                                         
           
uint unknown packet.ReadUInt8();
           
uint monsterID packet.ReadUInt32();

                   
Packet p = new Packet(0x7010); //packet
                      
p.WriteUInt16(6);           // command ID
                      
p.WriteUInt32(monsterID);   // monster ID
                      
p.WriteUInt8(1);            // forcing to spawn just 1 mob 
                      
p.WriteUInt8(unknown);      // mob type

                   
Agent.Send(p);                                        
                                    } 
                                } 
thx :)
Code:
            if (packet.Opcode == 0x7010)
            {
                ushort CommandType = packet.ReadUInt16();
                if (CommandType == 6)
                {
                    uint monsterID = packet.ReadUInt32();
                    byte monsterCount = packet.ReadUInt8();
                    byte monsterType = packet.ReadUInt8();

                    Packet spawnMonster = new Packet(0x7010);
                    spawnMonster.WriteUInt16(6);
                    spawnMonster.WriteUInt32(monsterID);
                    spawnMonster.WriteUInt8(1);
                    spawnMonster.WriteUInt8(monsterType);
                    Agent.Send(spawnMonster);
                    ClientTransfer();

                    continue;
                }
            }
This should do the job.
10/28/2016 04:30 pushipu#3
Quote:
Originally Posted by Locklyon View Post
Code:
            if (packet.Opcode == 0x7010)
            {
                ushort CommandType = packet.ReadUInt16();
                if (CommandType == 6)
                {
                    uint monsterID = packet.ReadUInt32();
                    byte monsterCount = packet.ReadUInt8();
                    byte monsterType = packet.ReadUInt8();

                    Packet spawnMonster = new Packet(0x7010);
                    spawnMonster.WriteUInt16(6);
                    spawnMonster.WriteUInt32(monsterID);
                    spawnMonster.WriteUInt8(1);
                    spawnMonster.WriteUInt8(monsterType);
                    Agent.Send(spawnMonster);
                    ClientTransfer();

                    continue;
                }
            }
This should do the job.
Thanks, it is ;)