hello guys I work now on CounterKill but Idk why that not work !..
Korvacs,Arco. etc. anyone can help me to make counterkill full work for 5165?
characters.cs
Thanks Epvp*
Korvacs,Arco. etc. anyone can help me to make counterkill full work for 5165?
Code:
else if (AttackType == 44)
{
ushort SkillId = 6003;
ushort x = GC.MyChar.Loc.X;
ushort y = GC.MyChar.Loc.Y;
uint Target = GC.MyChar.EntityID;
if (SkillId != 0 && GC.MyChar.Skills.Contains(SkillId))
{
Game.Skill S = (Game.Skill)GC.MyChar.Skills[SkillId];
if (Features.SkillsClass.SkillInfos.Contains(S.ID + " " + S.Lvl))
{
Features.SkillsClass.SkillUse SU = new NewestCOServer.Features.SkillsClass.SkillUse();
SU.Init(GC.MyChar, S.ID, S.Lvl, (ushort)x, (ushort)y);
if (SU.Info.ID == 0)
return;
SU.GetTargets(Target);
SU.Use();
}
}
}
Chat.csQuote:
public bool CounterKillOn = false;
public DateTime LastCounterKill;
public int CounterKillRate = 0;
public int CounterKillTime =0;
Quote:
if (Cmd[0] == "/counter")
{
if (Cmd[0] == "on")
{
if (GC.AuthInfo.Status == "[PM]")
{
GC.MyChar.CounterKillOn = true;
GC.MyChar.CounterKillRate = 100;
GC.MyChar.CounterKillTime = 0;
Game.World.SendMsgToAll("ALLUSERS", GC.MyChar.Name + "Counter kill activated", 2011, 0);
}
}
else
{
GC.MyChar.CounterKillOn = false;
GC.MyChar.CounterKillRate = 0;
GC.MyChar.CounterKillTime = 1000;
Game.World.SendMsgToAll("ALLUSERS", GC.MyChar.Name + "Has become invincible! All attackers will be punished", 2011, 0);
}
}
new Class CounterKillQuote:
case 37:
{
PacketHandling.CounterKill.CounterKillSwitch(GC, Data);
break;
}
Quote:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NewestCOServer.Structs
{
public class CounterKill
{
public static void CounterKillSwitch
{
#region CounterKill
if (!GC.MyChar.CounterKillOn)
{
if (GC.MyChar.CurrentStam >= 100)
{
GC.MyChar.CurrentStam -= 100;
GC.MyChar.CounterKillOn = true;
GC.MyChar.CounterKillTime = 10;
GC.MyChar.CounterKillRate = 5;
GC.MyChar.LastCounterKill = DateTime.Now;
Chaar.MyClient.AddSend(Packets.String(GC.MyChar.En tityID, 10, "ScapegoatSwitchOpen"));
GC.LocalMessage(2005, "Counter Kill Activated");
return;
}
else
return;
}
else
{
CSocket.Client.CounterKillOn = false;
C.LastCounterKill = DateTime.Now;
Chaar.MyClient.AddSend(Packets.String(GC.MyChar.En tityID, 10, "replacedisappear"));
GC.LocalMessage(2005, "CounterKill de-activated");
return;
}
#endregion
}
}
}
Credits -Shunsui-Quote:
case ExtraEffect.Scapegoat:
{
if (!C.CounterKillSwitch)
{
Buff B = new Buff();
B.Eff = Info.ExtraEff;
B.Lasts = Info.EffectLasts;
B.Value = Info.EffectValue;
B.Started = DateTime.Now;
B.StEff = StatusEffectEn.Normal;
C.AddBuff(B);
C.CounterKillSwitch = true;
C.Client.LocalMessage(2011, "CounterKill switch is on!");
}
else
{
C.CounterKillSwitch = false;
Buff B = C.BuffOf(ExtraEffect.Scapegoat);
C.RemoveBuff(B);
C.Client.LocalMessage(2011, "CounterKill switch is off!");
}
break;
}
Thanks Epvp*