Quote:
Originally Posted by thebigbody
i think in silkroad it's not based on the last hit kill but the most caused damage to the unique so i guess your question is already answered by sro 
|
genius.
Quote:
Originally Posted by vietnguyen09
I plan to open an event kill unique, so as normal which player who make the UNIQUE most HP percentage than that player will recognize as UNIQUE killer (his name will notice).
But now there is any way to make that which player is the people who are the last people hit on UNIQUE can be recognized as UNIQUE killer?
Thanks for help
|
i would parse the attack packet & check if the UniqueID is the same as my unique's
example:
Code:
uint ohp = 50000; // Original HP from (RefObjChar)
uint chp = 50000; // current HP
uint uid = 12039012; // unique id (parse spawn packet & change this val)
Dictionary<uint,uint> _followups = new Dictionary<uint,uint>();
if(opcode == B070) // data opcode
{
byte hi1 = hi.readbyte();
byte hi2 = hi.readbyte();
byte hi3 = hi.readbyte();
if(hi1==1&&hi2==2&&hi3==30)
{
uint atktype = hi.readuint(); // attack type :3
uint uniqid = hi.readuint(); // attacker unique id
uint skillcast = hi.readuint(); // idk
uint mobid = hi.readuint(); // mob unique id
if(mobid != uid) continue; // bb
byte basicatk = hi.readbyte(); // the real attack type haha
if(basicatk == 0){
_followups.add(skillcast,uniqid);
continue;
}
byte hits = hi.readbyte(); // hit count (not sure)
hi.readbyte(); // idk what is this but 1 static
hi.readuint(); // unique id again -_-
if(hits > 0)
{
for(int i = 0; i<hits;i++)
{
byte uded = hi.readbyte(); // status 0 = alive, 80 (128 decimal) = dead
byte crit = hi.readbyte(); // crit? 1 = false, 2 = true
uint dmg = hi.readuint(); // damage done to this object
hi.readbyte(); // idk
hi.readushort(); // idk either
if(uded > 0)
{
string playername = getnamebyid(uniqid); // save surrounding players in a list & get name by unique id
sendpm(playername,"You killed me hh");
}
else
{
chp -= dmg;
if(chp <=0){
// mob was killed :3
}
}
}
}
else
byte block = hi.readbyte(); // skill/attack is blocked (tested on niya general)
}
}
if(opcode == B071) // skill opcode
{
byte hi1 = hi.readbyte();
if(hi1==1)
{
uint castid = hi.readuint();
if(_followups.keys.contains(castid))
{
uint targetmob = hi.readuint();
hi.readbyte();
hi.readbyte();
hi.readbyte();
hi.readuint(); // again target mob id :3
byte uded = hi.readbyte(); // status 0 = alive, 80 (128 decimal) = dead
byte crit = hi.readbyte(); // crit? 1 = false, 2 = true
uint dmg = hi.readuint(); // damage done to this object
hi.readbyte(); // idk
hi.readushort(); // idk either
uint uniqid = _followups[castid]; // unique id of attacker :3
if(uded > 0)
{
string playername = getnamebyid(uniqid); // save surrounding players in a list & get name by unique id
sendpm(playername,"You killed me hh");
}
else
{
chp -= dmg;
if(chp <=0){
// mob was killed :3
}
}
_followups.remove(castid);
}
}
}
formatt this yourself ROFL was too lazy to open vs (angel)
hope this helps.
NOTE: this isn't a tested code :3 + you could use this in a filter or a bot
filter is the best way to do it because you will have to send the uniq killed notice (himan has killed me in btnjan)
THIS IS FOR THE NORMAL ATTACKS ONLY THE SKILL PACKET IS B071 OR SMTH i'll modify this code later :3 but you could check if the
atktype variable is not a base skill (in _RefSkill) and return