lol that not work for me idk why there is no erros nothing i just put the command /skill and the id and 0 but it doesnt work T,T some1 can help me
public void GetReflect(ref uint Damage, AttackType AT)
{
if (Damage < CurrentHP)
{
if (Damage > 2000)
CurrentHP -= 2000
else
CurrentHP -= Damage;
World.Action(this, Packets.AttackPacket(EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AT).Get);
}
else
{
Alive = false;
uint Benefit = CurrentHP;
CurrentHP = 0;
PoisonedInfo = null;
Died = DateTime.Now;
World.Action(this, Packets.AttackPacket(EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AttackType.Kill).Get);
World.Action(this, Packets.Status(EntityID, Status.Effect, 2080).Get);
}
}
public void GetReflect(uint Damage, AttackType AT)
{
if (Damage < CurHP)
{
if (Damage > 2000)
CurHP -= 2000
else
CurHP -= Damage;
World.Action(this, Packets.AttackPacket(EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AT).Get);
}
else
{
InitAngry(true);
AtkMem.Attacking = false;
AtkMem.Target = 0;
AtkMem.Attacking = false;
AtkMem.Target = 0;
if (!World.FreePKMaps.Contains(Loc.Map))
{
LoseInvItemsAndSilvers();
if (PKPoints >= 30)
LoseEquips();
}
Alive = false;
CurHP = 0;
World.Action(this, Packets.AttackPacket(EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AttackType.Kill).Get);
StatEff.Remove(StatusEffectEn.Cyclone);
StatEff.Remove(StatusEffectEn.FatalStrike);
StatEff.Remove(StatusEffectEn.BlueName);
StatEff.Remove(StatusEffectEn.Flashy);
StatEff.Remove(StatusEffectEn.ShurikenVortex);
BlueName = false;
StatEff.Remove(StatusEffectEn.SuperMan);
StatEff.Remove(StatusEffectEn.XPStart);
StatEff.Remove(StatusEffectEn.Ride);
StatEff.Add(StatusEffectEn.Dead);
DeathHit = DateTime.Now;
}
}
Quote:
Maybe isn't very right but it works....
at Character.cs more ore less at line 1711 add this:
Now you have to make a check for the CanReflect become true....Code:public bool CanReflect = false;
go to LoadCharacter void at database.cs and add this after the load for skills:
mine one has become like this... but i use mysql database : D so i can't post it because shoudn't work for some people.... : XCode:if(Skill.ID == 3060) C.CanReflect = true;
Reflect for Mobs:Code:Game.Skill Skill = new Game.Skill(); Skill.ID = Convert.ToUInt16(DR["id"]); Skill.Lvl = Convert.ToByte(DR["level"]); Skill.Exp = Convert.ToUInt32(DR["experience"]); if (!C.Skills.ContainsKey(Skill.ID)) { C.Skills.Add(Skill.ID, Skill); } >> if (Skill.ID == 3060) >> { >> C.CanReflect = true;// by the way you need to use only this last 3 lines!! >> }
Reflect for Players:
if u get a problem feel free to post or add me at msn.... : D
Because this is only the skill, this isn't receiving the skill when you reborn, to do that you need the correct reborn combination, which I released.Quote:
I have followed all the steps but why is it that only 1 character got this skill the other dont have I dont know whats happening or did I make it wrong, his char is Troj-War-Nin and I also followed and nothing happen no reflect
You forgot the things market in red.Quote:
Reflect is max damaging 2k, so it should actually look like this:
But goodjob :)
Code:public void GetReflect(ref uint Damage, AttackType AT) { if (Damage < CurrentHP) { if (Damage > 2000) CurrentHP -= 2000[COLOR="Red"];[/COLOR] else CurrentHP -= [COLOR="red"](ushort)[/COLOR]Damage; World.Action(this, Packets.AttackPacket(EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AT).Get); } else { Alive = false; uint Benefit = CurrentHP; CurrentHP = 0; PoisonedInfo = null; Died = DateTime.Now; World.Action(this, Packets.AttackPacket(EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AttackType.Kill).Get); World.Action(this, Packets.Status(EntityID, Status.Effect, 2080).Get); } }Code:public void GetReflect(uint Damage, AttackType AT) { if (Damage < CurHP) { if (Damage > 2000) CurHP -= 2000 else CurHP -= Damage; World.Action(this, Packets.AttackPacket(EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AT).Get); } else { InitAngry(true); AtkMem.Attacking = false; AtkMem.Target = 0; AtkMem.Attacking = false; AtkMem.Target = 0; if (!World.FreePKMaps.Contains(Loc.Map)) { LoseInvItemsAndSilvers(); if (PKPoints >= 30) LoseEquips(); } Alive = false; CurHP = 0; World.Action(this, Packets.AttackPacket(EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AttackType.Kill).Get); StatEff.Remove(StatusEffectEn.Cyclone); StatEff.Remove(StatusEffectEn.FatalStrike); StatEff.Remove(StatusEffectEn.BlueName); StatEff.Remove(StatusEffectEn.Flashy); StatEff.Remove(StatusEffectEn.ShurikenVortex); BlueName = false; [COLOR="red"]PoisonedInfo = null;[/COLOR] [COLOR="red"]StatEff.Remove(StatusEffectEn.Poisoned);[/COLOR] StatEff.Remove(StatusEffectEn.SuperMan); StatEff.Remove(StatusEffectEn.XPStart); StatEff.Remove(StatusEffectEn.Ride); StatEff.Add(StatusEffectEn.Dead); DeathHit = DateTime.Now; } }
Quote:
good job but it reflects the whole attack i mean
if u hit ur opposite for 1k it should hurt u with 1k but it kills u
i have the same problem and i don't under stand what do you mean by putted at wrong place ,i hope any one tell me the right way or solution for that problem thanks tails .Quote:
yes... because reflect is putted at the wrong place : D