Register for your free account! | Forgot your password?

You last visited: Today at 04:12

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



C# loadmonster packet

Discussion on C# loadmonster packet within the SRO Private Server forum part of the Silkroad Online category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2008
Posts: 339
Received Thanks: 72
C# loadmonster packet

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
pushipu is offline  
Old 10/28/2016, 03:42   #2

 
AceSpace's Avatar
 
elite*gold: 71
Join Date: Mar 2011
Posts: 1,594
Received Thanks: 1,099
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.
AceSpace is offline  
Thanks
1 User
Old 10/28/2016, 04:30   #3
 
elite*gold: 0
Join Date: Feb 2008
Posts: 339
Received Thanks: 72
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
pushipu is offline  
Closed Thread


Similar Threads Similar Threads
warp and loadmonster
02/19/2015 - SRO Coding Corner - 2 Replies
Packet packet = new Packet((ushort)WorldServerOpcodes.CLIENT_OPCODES.C LIENT_WARP); packet.WriteUInt8(0x10); //static packet.WriteUInt8(0); //static packet.WriteInt16(24744); //regionID packet.WriteSingle(978); //x packet.WriteSingle(-30.226059); //Y packet.WriteSingle(1100); //Z packet.WriteInt8(1); //worldid packet.WriteUInt8(0); //static ...



All times are GMT +2. The time now is 04:12.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.