Register for your free account! | Forgot your password?

You last visited: Today at 10:31

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HELP]CounterKill

Discussion on [HELP]CounterKill within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old   #1
 
QuickCo's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 139
Received Thanks: 45
[HELP]CounterKill

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?


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();
                            }
                        }
                    }
characters.cs

Quote:
public bool CounterKillOn = false;
public DateTime LastCounterKill;
public int CounterKillRate = 0;
public int CounterKillTime =0;
Chat.cs

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);
}
}
Quote:
case 37:
{
PacketHandling.CounterKill.CounterKillSwitch(GC, Data);
break;
}
new Class CounterKill

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
}
}
}
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;
}
Credits -Shunsui-

Thanks Epvp*
QuickCo is offline  
Old 05/12/2010, 18:16   #2
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
ScapeGoat
~Yuki~ is offline  
Old 05/12/2010, 18:35   #3
 
QuickCo's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 139
Received Thanks: 45
What? What does what you say with my thread?
QuickCo is offline  
Old 05/12/2010, 18:37   #4
 
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
console:
/skilladder

2nd tab
CounterKill
(edit)
then 1st tab, there u can find more info.. maybe u can see something there.

[edit]
he means:
search for ScapeGoat in youre source xd
pintser is offline  
Old 05/12/2010, 19:12   #5


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
ScapeGoat is the internal name for Counter-Kill
Korvacs is offline  
Old 05/12/2010, 21:43   #6
 
QuickCo's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 139
Received Thanks: 45
oh srry ~Yuki I knew that..
QuickCo is offline  
Old 05/12/2010, 21:59   #7
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
this is mines.. works fine
Code:
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;
                                }
-Shunsui- is offline  
Thanks
1 User
Old 05/12/2010, 22:36   #8
 
QuickCo's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 139
Received Thanks: 45
error at CounterKillSwitch and C.Client.

thanks bro

#title MakingCounterKill 5165 Source !
QuickCo is offline  
Old 05/13/2010, 01:51   #9
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
whats the error ?
-Shunsui- is offline  
Old 05/13/2010, 04:00   #10
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Wait so they gave you the answers, so you change this into a release thread?
Arcо is offline  
Old 05/13/2010, 13:58   #11
 
QuickCo's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 139
Received Thanks: 45
yes ! because I add in characters.cs
Quote:
CounterKillSwich = true;
and no more errors ! but now I don't know how to finish that skill Counter-Kill ! can you help me?
QuickCo is offline  
Old 05/14/2010, 04:43   #12
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
... u cant be serius man >.> so there u have it turning on and off go into every part where he gets Attacked by mobs/players and so and make it check if (CounterKillSwich == true) add a chance my source its alot different so i have a .cs where i handle all damges

heres the code fix it up to use it wit the normal 5165
Code:
#region Scapegoat
                if (AC.Char.BuffOf(SkillsClass.ExtraEffect.Scapegoat).Eff == SkillsClass.ExtraEffect.Scapegoat && MyMath.ChanceSuccess(5))
                {
                    Buff B = AC.Char.BuffOf(SkillsClass.ExtraEffect.Scapegoat);
                    uint Dmg = (uint)(CalculateDamage(2, false, AC) * B.Value);
                    TargetDamage(GC, AC, Dmg, AttackType.Scapegoat, false);
                    return;
                }
                #endregion
-Shunsui- is offline  
Thanks
2 Users
Old 05/16/2010, 10:48   #13
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Well I coded in counterkill.
But whats wrong is when the counterkill attacks the target, your char bugs and acts as if its still in those same coords.
Arcо is offline  
Old 05/16/2010, 15:29   #14
 
QuickCo's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 139
Received Thanks: 45
you can post here you counterkill ?
QuickCo is offline  
Old 05/17/2010, 02:27   #15
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by -Shunsui- View Post
... u cant be serius man >.> so there u have it turning on and off go into every part where he gets Attacked by mobs/players and so and make it check if (CounterKillSwich == true) add a chance my source its alot different so i have a .cs where i handle all damges

heres the code fix it up to use it wit the normal 5165
Code:
#region Scapegoat
                if (AC.Char.BuffOf(SkillsClass.ExtraEffect.Scapegoat).Eff == SkillsClass.ExtraEffect.Scapegoat && MyMath.ChanceSuccess(5))
                {
                    Buff B = AC.Char.BuffOf(SkillsClass.ExtraEffect.Scapegoat);
                    uint Dmg = (uint)(CalculateDamage(2, false, AC) * B.Value);
                    TargetDamage(GC, AC, Dmg, AttackType.Scapegoat, false);
                    return;
                }
                #endregion


Umm don't you also need a check to see when the last counter kill was used? it has a limit on how often it can activate...



but yes, once you have everything activated you will need to run checks and if they all pass execute the attack similar to this.

If you want some other form of reference, I did release a basic version of counter kill for 5095 coemu a while back.
pro4never is offline  
Thanks
1 User
Closed Thread


Similar Threads Similar Threads
Lvling CounterKill>Phoenix Sword skill !Easyway
08/04/2010 - CO2 Guides & Templates - 26 Replies
Hello evryone, before i start.. i just wanna tell evryone For those who know this.. and wanna say: old... evryone know.. bla bla.. Trust me.. evrybody dont know. and all i want to do.. is to help they who dont know.. so stop been rude! Ok Lets start
[PROBLEM]CounterKill/ScapeGoat!
06/20/2010 - CO2 Private Server - 2 Replies
Idk why my counter-kill not working good ! when I use it not work CounterKill Swich ON/OFF ! Look on that Photo ! Who can help make reply what is wrong here ! http://img819.imageshack.us/img819/569/counterkil l.jpg



All times are GMT +1. The time now is 10:32.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.