|
You last visited: Today at 16:01
Advertisement
Mob kill capture
Discussion on Mob kill capture within the SRO Private Server forum part of the Silkroad Online category.
05/25/2017, 17:24
|
#1
|
elite*gold: 0
Join Date: May 2017
Posts: 108
Received Thanks: 17
|
Mob kill capture
Just like Uniques Kills are noticed in the GS(then captured by filter or whatever) .. could certain mobs be captured ?
tried changing the mob to unique but not working.!
|
|
|
05/25/2017, 23:57
|
#2
|
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,184
|
here's how i did it
1. i created a custom class for nearby monsters (ID,Model) and i called it Monster
2. a Dictionary for continuous<ContinuousID uint,UID uint> damage (skills,burn etc) and i called it _continuousdmg
3. i created another custom class for each player & the damage he done to a specific monster (PlayerID (UniqueID) uint,Damage uint) and called it PDmg
4. a custom class (Mob) & list for each nearby monster (Monster mob,List<PDmg> players) called it _dmg
- mob1 spawns
- player1 attacks mob1
- filter checks if mob1 is in the list of nearby monsters
- filter checks if player1 has attacked mob1 before
- filter adds player1 to the Players list if not exists
- filter adds damage done to mob1 to player1 in the PDmg list
- filter checks if mob1 is dead (if yes i used linq to get the highest dmg done to it along with the playerID and save it in the database)
Packet (0xB070) (Alot of actions but we're using it for Basic attacks,and skill damage):
Code:
if(pck.readbyte() == 1 && pck.readbyte() == 2 && pck.readbyte() == 0x30)
{
uint SID = pck.readuint(); // Skill ID... probably
uint uID = pck.readuint(); // Player UniqueID
uint CID = pck.readuint(); // Continuous skill ID (random)
uint Target = pck.readuint(); // Target monster / player
if(Target == 0)
return;
if(!_dmg.Any(i=>i.Monster.ID == Target)) // Monster doesn't exist in the list
_dmg.Add(new Mob() {
Monster = _nearbyMobs.FirstOrDefault(i=>i.ID==Target), // Monster from the nearby monsters list (use groupspawn & single spawn and parse them to get a list of mobs)
players = new List<PDmg>(),
});
/* Continue Parsing */
byte isSkill = pck.readbyte(); // Player is casting a skill
if(isSkill == 0) // idk why but 0 == casting a skill LOL
{
_continuousdmg.Add(CID,uID);
return;
}
byte numofattacks = pck.readbyte(); // for multi hits skills (salamanderblow, bow's knockback etc)
byte targets = pck.readbyte(); // targets hit by this skill
bool dead = false; // mob bb?
Dictionary<uint,bool> _targets = new Dictionary<uint,bool>();
for(int i = 1; i<=targets;++i){
uint targetID = pck.readuint();
byte status = pck.readbyte(); // Status 128 = dead, 133 = demolished (not sure)
_targets.Add(targetID,status == 128 || status == 133);
dead = _targets[targetID];
if(!_dmg.Any(i=>i.Monster.ID == targetID)) // Monster doesn't exist in the list (copied hh)
_dmg.Add(new Mob() {
Monster = _nearbyMobs.FirstOrDefault(i=>i.ID==targetID), // Monster from the nearby monsters list (use groupspawn & single spawn and parse them to get a list of mobs)
players = new List<PDmg>(),
});
for (byte z = 1; z <= numofattacks; z++)
{
if (pck.Remain > 1) // idk but sometimes it's empty doesn't hurt to do a lil check
{
byte crit = pck.ReadByte(); // crit hit (hh)
uint dmg = pck.ReadUInt(); // damage done
pck.ReadByte(); // idk
pck.ReadUShort(); // i still dont know
_dmg.First(i=>i.Monster.ID==targetID)?.players?.Add(new PDmg(){
PlayerID = uID,
Damage = 0
});
_dmg.First(i=>i.Monster.ID==targetID)?.players.Find(i=>i.PlayerID==uID).Damage += dmg;
}
}
}
}
NOTE: missing the 0xB071 packet for continuous damage. i'll add it later
i used to play grindroad (Emulator server) back in 2011-2012
they had a system that i liked ever since.
it goes like this
1- unique spawns
2- a bunch of players attack the unique
3- unique dies
4- a message that contains top 4 players (order by damage desc) is sent to all nearby players (same region) in academy chat
|
|
|
05/28/2017, 15:12
|
#3
|
elite*gold: 0
Join Date: May 2017
Posts: 108
Received Thanks: 17
|
Quote:
Originally Posted by B1QB0SS :3
here's how i did it
1. i created a custom class for nearby monsters (ID,Model) and i called it Monster
2. a Dictionary for continuous<ContinuousID uint,UID uint> damage (skills,burn etc) and i called it _continuousdmg
3. i created another custom class for each player & the damage he done to a specific monster (PlayerID (UniqueID) uint,Damage uint) and called it PDmg
4. a custom class (Mob) & list for each nearby monster (Monster mob,List<PDmg> players) called it _dmg
- mob1 spawns
- player1 attacks mob1
- filter checks if mob1 is in the list of nearby monsters
- filter checks if player1 has attacked mob1 before
- filter adds player1 to the Players list if not exists
- filter adds damage done to mob1 to player1 in the PDmg list
- filter checks if mob1 is dead (if yes i used linq to get the highest dmg done to it along with the playerID and save it in the database)
Packet (0xB070) (Alot of actions but we're using it for Basic attacks,and skill damage):
Code:
if(pck.readbyte() == 1 && pck.readbyte() == 2 && pck.readbyte() == 0x30)
{
uint SID = pck.readuint(); // Skill ID... probably
uint uID = pck.readuint(); // Player UniqueID
uint CID = pck.readuint(); // Continuous skill ID (random)
uint Target = pck.readuint(); // Target monster / player
if(Target == 0)
return;
if(!_dmg.Any(i=>i.Monster.ID == Target)) // Monster doesn't exist in the list
_dmg.Add(new Mob() {
Monster = _nearbyMobs.FirstOrDefault(i=>i.ID==Target), // Monster from the nearby monsters list (use groupspawn & single spawn and parse them to get a list of mobs)
players = new List<PDmg>(),
});
/* Continue Parsing */
byte isSkill = pck.readbyte(); // Player is casting a skill
if(isSkill == 0) // idk why but 0 == casting a skill LOL
{
_continuousdmg.Add(CID,uID);
return;
}
byte numofattacks = pck.readbyte(); // for multi hits skills (salamanderblow, bow's knockback etc)
byte targets = pck.readbyte(); // targets hit by this skill
bool dead = false; // mob bb?
Dictionary<uint,bool> _targets = new Dictionary<uint,bool>();
for(int i = 1; i<=targets;++i){
uint targetID = pck.readuint();
byte status = pck.readbyte(); // Status 128 = dead, 133 = demolished (not sure)
_targets.Add(targetID,status == 128 || status == 133);
dead = _targets[targetID];
if(!_dmg.Any(i=>i.Monster.ID == targetID)) // Monster doesn't exist in the list (copied hh)
_dmg.Add(new Mob() {
Monster = _nearbyMobs.FirstOrDefault(i=>i.ID==targetID), // Monster from the nearby monsters list (use groupspawn & single spawn and parse them to get a list of mobs)
players = new List<PDmg>(),
});
for (byte z = 1; z <= numofattacks; z++)
{
if (pck.Remain > 1) // idk but sometimes it's empty doesn't hurt to do a lil check
{
byte crit = pck.ReadByte(); // crit hit (hh)
uint dmg = pck.ReadUInt(); // damage done
pck.ReadByte(); // idk
pck.ReadUShort(); // i still dont know
_dmg.First(i=>i.Monster.ID==targetID)?.players?.Add(new PDmg(){
PlayerID = uID,
Damage = 0
});
_dmg.First(i=>i.Monster.ID==targetID)?.players.Find(i=>i.PlayerID==uID).Damage += dmg;
}
}
}
}
NOTE: missing the 0xB071 packet for continuous damage. i'll add it later
i used to play grindroad (Emulator server) back in 2011-2012
they had a system that i liked ever since.
it goes like this
1- unique spawns
2- a bunch of players attack the unique
3- unique dies
4- a message that contains top 4 players (order by damage desc) is sent to all nearby players (same region) in academy chat
|
okay i got that .. still i need the packet opcode of monster spawn ?
if there is xD
EDIT : Looks like there isn't .. tested with EDX auto-parser .. appears no packet for mob spawn(Client to Server)
but there is a packet from (SERVER to CLIENT) >> 0x3015 OR 0x300C .. both appears ..
the Question now ? .. how can i make the filter capture the packet from the SERVER not the CLIENT ?
|
|
|
05/28/2017, 20:15
|
#4
|
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,184
|
Quote:
Originally Posted by -Prestige..
okay i got that .. still i need the packet opcode of monster spawn ?
if there is xD
EDIT : Looks like there isn't .. tested with EDX auto-parser .. appears no packet for mob spawn(Client to Server)
but there is a packet from (SERVER to CLIENT) >> 0x3015 OR 0x300C .. both appears ..
the Question now ? .. how can i make the filter capture the packet from the SERVER not the CLIENT ?
|
3015 is used for all game objects. (not sure but i parsed it a long time ago and it is used for mobs npcs players and pets)
you could check the 4 types (TypeID1~4) in _RefObjCommon using the ModelID and if it's a mob add it to the mobs list
and which filter you're using?
|
|
|
05/29/2017, 01:53
|
#5
|
elite*gold: 0
Join Date: May 2017
Posts: 108
Received Thanks: 17
|
Quote:
Originally Posted by B1QB0SS :3
3015 is used for all game objects. (not sure but i parsed it a long time ago and it is used for mobs npcs players and pets)
you could check the 4 types (TypeID1~4) in _RefObjCommon using the ModelID and if it's a mob add it to the mobs list
and which filter you're using?
|
SUPERMIKE SRC ..
|
|
|
05/29/2017, 01:58
|
#6
|
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,184
|
look for a void called OnReceive_FromServer
|
|
|
05/29/2017, 02:57
|
#7
|
elite*gold: 0
Join Date: May 2017
Posts: 108
Received Thanks: 17
|
Quote:
Originally Posted by B1QB0SS :3
look for a void called OnReceive_FromServer
|
thankyou .. done :* :* :*
#close
|
|
|
05/29/2017, 13:07
|
#8
|
elite*gold: 1
Join Date: Oct 2012
Posts: 8,423
Received Thanks: 3,239
|
#Case closed
|
|
|
|
Similar Threads
|
[HOW TO] Mob proto.xml Mob Names - Mob Proto.txt Help me
03/25/2015 - Metin2 Private Server - 2 Replies
Hi Metin2 Dev
Mob proto.xml How to Mob Names.txt - Mob Proto.txt Converts ?
Help Me :(
How Mob Names.txt - Mob Proto.txt ? help me :(
<Mob vnum="34012" name="¾Æ±â ÆÒ´õ" locale_name="¾Æ±â ÆÒ´õ" type="1" rank="5" battle_type="0" level="1" size="0" gold_min="0" gold_max="0" exp="10" max_hp="120" regen_cycle="3" regen_percent="1" def="4" ai_flag="0" setRaceFlag="0" setImmuneFlag="43" st="0" dx="0" ht="0" iq="0" damage_min="0" damage_max="0" attack_speed="100" move_speed="100"...
|
Mob 20082 - GM Mob does not work
04/26/2011 - Metin2 Private Server - 9 Replies
/m 20082 does not work. How to work?
|
[Frage] Aus totem Mob ein neuer Mob ?
12/16/2010 - Metin2 Private Server - 5 Replies
Hi Com.
Nunja ich hab mal eine Frage.
Ihr kennt doch diesen einen Boss aus dem Tempel.
Mir fällt der Name grade nicht ein aber auf jedenfall ist es bei diesem Boss ja so das man erst einen schwächeren Mob ( Level 60 glaub ich ) töten muss und dann kommt dierekt ein stärkerer ( "aus" dem ersten Mob )
Naja weiß einer wie man so ein Mob auch z.B mit Wildhund und Wolf machen kann ?
Ich wusste nicht was ich in der SuFu eingeben sollte.
|
Betteln an die lock mob götter S 15 lock mob
02/04/2009 - Metin2 - 1 Replies
dieser thread geht vor allen dingen an banjo aber wers sonst noch kann kann den lock mob ja auch mal updaten
also pls lock mob für s15/16
|
All times are GMT +2. The time now is 16:01.
|
|