public GetStat ( string stat, bool bas = false ) : ushort | ||
stat | string | |
bas | bool | |
return | ushort |
public int Proc(Player player, script.monster.Monster mob, Player play = null) { int take = 0; Point2D targetLoc = (play != null) ? play.Loc : mob.m_Loc; if (Util.Dice(1, 100, 0) <= ((Stage < 7) ? 7 : 11)) { take += Util.Dice(((player.GetStat("str") + player.GetStat("dex")) / 1000), 50, (player.GetStat("str") + player.GetStat("dex")) / 32); int mobile = Serial.NewMobile; World.SendToAll(new QueDele(player.Map, new CreateMagicEffect(mobile, 1, (short)targetLoc.X, (short)targetLoc.Y, new byte[] { 4, 0, 0, 0, 0, 0, 0, 0, 0, 16 }, 0).Compile())); var tmp = new QueDele(LKCamelot.Server.tickcount.ElapsedMilliseconds + 1300, player.m_Map, new DeleteObject(mobile).Compile()); tmp.tempser = mobile; World.TickQue.Add(tmp); } return take; }
public int Proc(Player player, script.monster.Monster mob, Player play = null) { int take = 0; Point2D targetLoc = (play != null) ? play.Loc : mob.m_Loc; if (Util.Dice(1, 100, 0) <= (Stage < 7 ? 10 : 14)) { take += Util.Dice((player.GetStat("str") / 1000), 50, player.GetStat("str") / 16); int mobile = Serial.NewMobile; World.SendToAll(new QueDele(player.Map, new CreateMagicEffect(mobile, 1, (short)targetLoc.X, (short)targetLoc.Y, new byte[] { 4, 0, 0, 0, 0, 0, 0, 0, 0, 110 }, 0).Compile())); var tmp = new QueDele(System.Environment.TickCount + 1300, player.m_Map, new DeleteObject(mobile).Compile()); tmp.tempser = mobile; World.TickQue.Add(tmp); } return take; }
public UpdateCharStats(Player player) : base(0x14) { m_Stream.Write(Util.checkUShort((uint)player.HPCur)); m_Stream.Write(Util.checkUShort((uint)player.HP)); m_Stream.Write(Util.checkUShort((uint)player.MPCur)); m_Stream.Write(Util.checkUShort((uint)player.MP)); m_Stream.Write(Util.checkUShort(player.GetStat("str", true))); m_Stream.Write(Util.checkUShort(player.GetStat("men", true))); m_Stream.Write(Util.checkUShort(player.GetStat("dex", true))); m_Stream.Write(Util.checkUShort(player.GetStat("vit", true))); m_Stream.Write(Util.checkUShort(player.GetStat("str"))); m_Stream.Write(Util.checkUShort(player.GetStat("men"))); m_Stream.Write(Util.checkUShort(player.GetStat("dex"))); m_Stream.Write(Util.checkUShort(player.GetStat("vit"))); m_Stream.Write(Util.checkUShort((uint)player.AC)); m_Stream.Write(Util.checkUShort((uint)player.Hit)); m_Stream.Write(Util.checkUShort((uint)player.Dam)); m_Stream.Write(Util.checkUShort(player.Extra)); }
public virtual void TakeDamage(Player player, script.spells.Spell spell) { float h = ((float)player.Hit / ((float)player.Hit + (float)Hit)) * 200; if (h >= 100 || new Random().Next(0, 100) < (int)h) { int take = spell.DamBase + (spell.DamPl * spell.Level);// + (spell.DamPl * spell.SLevel2); if (spell.ManaCostPl != 0) take += (player.GetStat("men") / spell.menCoff); if (spell is script.spells.DemonDeath) take = Convert.ToInt32(player.HP * 0.5) + player.GetStat("dex"); HPCur -= (take - AC); World.SendToAll(new QueDele(m_Map, new HitAnimation(m_Serial, Convert.ToByte(((((float)m_HPCur / (float)HP) * 100) * 1))).Compile())); if (HPCur <= 0) { if (player.Promo > 0) { var temp = XP; int y = player.Promo >= 7 ? 2 : 1; for (int x = 0; x < y; x++) temp = (int)(temp * 0.1); player.XP += temp * XPMulti; } else player.XP += XP * XPMulti; DropLoot(player); m_Loc.X = m_SpawnLoc.X; m_Loc.Y = m_SpawnLoc.Y; } } }
public void TakeDamage(Player caster, Player target, script.spells.Spell spell) { float h = ((float)caster.Hit / ((float)caster.Hit + (float)target.Hit)) * 200; if (h >= 100 || new Random().Next(0, 100) < (int)h) { int take = spell.DamBase + (spell.DamPl * spell.Level);// +(spell.DamPl * spell.SLevel2); if (spell.ManaCostPl != 0) { take += (caster.GetStat("men") / spell.menCoff); take += (caster.GetStat("str") / spell.strCoff); take += (caster.GetStat("dex") / spell.dexCoff); } if (spell is script.spells.DemonDeath) take = Convert.ToInt32(caster.HP * 0.5) + caster.GetStat("dex"); if (target.Color == 0) caster.pkpinkktime = Server.tickcount.ElapsedMilliseconds; target.HPCur -= (take - target.AC); if (target.Map == "Rest" && target.Color != 1) { caster.pklastpk.Add(Server.tickcount.ElapsedMilliseconds); caster.pklastred = Server.tickcount.ElapsedMilliseconds; } World.SendToAll(new QueDele(caster.m_Map, new HitAnimation(target.Serial, Convert.ToByte(((((float)target.m_HPCur / (float)target.HP) * 100) * 1))).Compile())); } }