|
You last visited: Today at 22:32
Advertisement
Disabling archer pk
Discussion on Disabling archer pk within the CO2 Private Server forum part of the Conquer Online 2 category.
09/15/2010, 07:15
|
#1
|
elite*gold: 0
Join Date: Apr 2008
Posts: 275
Received Thanks: 43
|
Disabling archer pk
Can anyone give me code that archer cant pk any char?
like this: this is just a sample
if (GC.MyChar.Job == 40 && GC.MyChar.Job == 41 && GC.MyChar.Job == 42 && GC.MyChar.Job == 44 GC.MyChar.Job == 45)
{
blah blah blah...
return;
}
any can help me?
|
|
|
09/15/2010, 07:16
|
#2
|
elite*gold: 4
Join Date: Jun 2010
Posts: 2,444
Received Thanks: 2,357
|
??
-please write it again ...i cant understand this
|
|
|
09/15/2010, 07:22
|
#3
|
elite*gold: 106
Join Date: Oct 2006
Posts: 6,047
Received Thanks: 1,164
|
He/She want to disable the feature for archers to PK.
Fixed the name to something a bit more understandable.
|
|
|
09/15/2010, 09:23
|
#4
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Just put what you have written at the beginning of the attack handler for archers...
|
|
|
09/15/2010, 11:46
|
#5
|
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
|
in character.cs find:
Code:
public void TakeAttack(Character Attacker, uint Damage, AttackType AT, bool IsSkill)
replace the whole code with:
Code:
public void TakeAttack(Character Attacker, uint Damage, AttackType AT, bool IsSkill)
{
if (Attacker.Job >= 40 && Attacker.Job <= 45)
{
return;
}
if (Alive)
{
if (Protection) Damage = 0;
if (AT == AttackType.Melee && !IsSkill)
if (AT == AttackType.Melee || AT == AttackType.Ranged || AT == AttackType.FatalStrike || AT == AttackType.Magic && IsSkill)
if (BuffOf(SkillsClass.ExtraEffect.Fly).Eff == SkillsClass.ExtraEffect.Fly)
return;
if (BuffOf(SkillsClass.ExtraEffect.Scapegoat).Eff == SkillsClass.ExtraEffect.Scapegoat && MyMath.ChanceSuccess(30))
{
Buff B = BuffOf(SkillsClass.ExtraEffect.Scapegoat);
RemoveBuff(B);
uint Dmg = (uint)(PrepareAttack(2, false) * B.Value);
Attacker.TakeAttack(this, Dmg, AttackType.Scapegoat, false);
return;//Will not be damaged
}
if (World.NoPKMaps.Contains(Loc.Map))
Damage = 0;
if (this != Attacker)
{
if (!BlueName && PKPoints < 30 && !World.FreePKMaps.Contains(Loc.Map))
{
Attacker.BlueName = true;
if (Attacker.BlueNameLasts < 15)
Attacker.BlueNameLasts = 15;
}
}
if (AT != AttackType.Magic && Attacker.BuffOf(SkillsClass.ExtraEffect.Superman).Eff == SkillsClass.ExtraEffect.Superman)
Damage *= 2;
if (AT != AttackType.Magic && !IsSkill)
{
ushort _Agi = (ushort)(Attacker.Agi + Attacker.EqStats.ExtraDex);
Buff Accuracy = Attacker.BuffOf(SkillsClass.ExtraEffect.Accuracy);
if (Accuracy.Eff == SkillsClass.ExtraEffect.Accuracy)
_Agi = (ushort)(_Agi * Accuracy.Value);
double MissValue = Rnd.Next(_Agi - 25, _Agi + 25);
if (MissValue <= EqStats.Dodge)
Damage = 0;
}
if (AT != AttackType.Magic && Action == 250)
{
if (Stamina > 30)
Stamina -= 30;
else
Stamina = 0;
}
Action = 100;
if (Damage != 0 && !IsSkill)
{
if (AT == AttackType.Melee)
{
ushort Def = EqStats.defense;
Buff Shield = BuffOf(SkillsClass.ExtraEffect.MagicShield);
if (Shield.Eff == SkillsClass.ExtraEffect.MagicShield)
Def = (ushort)(Def * Shield.Value);
if (Def >= Damage)
Damage = 1;
else
Damage -= Def;
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 100);
Damage += Attacker.EqStats.MeleeDamageIncrease;
if (EqStats.MeleeDamageDecrease >= Damage)
Damage = 1;
else
Damage -= EqStats.MeleeDamageDecrease;
}
else if (AT == AttackType.Ranged)
{
Damage = (uint)((double)Damage * (((double)(110 - EqStats.Dodge) / 100)));
if (EqStats.Dodge >= Damage)
Damage = 1;
else
Damage -= EqStats.Dodge;
Damage = Damage * 2 / 3;
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 100);
Damage += Attacker.EqStats.MeleeDamageIncrease;
if (EqStats.MeleeDamageDecrease >= Damage)
Damage = 1;
else
Damage -= EqStats.MeleeDamageDecrease;
}
else
{
Damage = (uint)((double)Damage * (((double)(100 - EqStats.MDef1) / 100)));
if (EqStats.MDef2 >= Damage)
Damage = 1;
else
Damage -= EqStats.MDef2;
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 100);
Damage += Attacker.EqStats.MagicDamageIncrease;
if (EqStats.MagicDamageIncrease >= Damage)
Damage = 1;
else
Damage -= EqStats.MagicDamageIncrease;
}
}
if (BuffOf(SkillsClass.ExtraEffect.ShurikenVortex).Eff == SkillsClass.ExtraEffect.ShurikenVortex)
Damage = 1;
if (Damage < CurHP)
{
CurHP -= (ushort)Damage;
if (AT != AttackType.Magic && !IsSkill)
World.Action(this, Packets.AttackPacket(Attacker.EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AT).Get);
}
else
{
InitAngry(true);
Attacker.AtkMem.Attacking = false;
Attacker.AtkMem.Target = 0;
AtkMem.Attacking = false;
AtkMem.Target = 0;
if (!World.FreePKMaps.Contains(Loc.Map))
{
LoseInvItemsAndSilvers();
if (PKPoints >= 30)
LoseEquips();
if (!BlueName)
{
Attacker.BlueNameLasts += 45;
if (Attacker.Enemies.Contains(EntityID))
Attacker.PKPoints += 5;
else
Attacker.PKPoints += 10;
}
if (!Enemies.Contains(Attacker.EntityID))
{
Enemies.Add(Attacker.EntityID, new Enemy() { UID = Attacker.EntityID, Name = Attacker.Name });
MyClient.AddSend(Packets.FriendEnemyPacket(Attacker.EntityID, Attacker.Name, 19, 1));
}
}
Alive = false;
CurHP = 0;
if (AT != AttackType.Magic && !IsSkill)
World.Action(this, Packets.AttackPacket(Attacker.EntityID, EntityID, Loc.X, Loc.Y, Damage, (byte)AT).Get);
World.Action(this, Packets.AttackPacket(Attacker.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;
if (PKPoints >= 100)
World.SendMsgToAll("SYSTEM", Attacker.Name + " has captured " + Name + " and sent him to jail.", 2000, 0);
}
}
}
|
|
|
09/15/2010, 11:53
|
#6
|
elite*gold: 0
Join Date: Apr 2008
Posts: 275
Received Thanks: 43
|
THanks hopes this works
|
|
|
09/15/2010, 16:15
|
#7
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
|
actually just remove bow attack type and archer attack skills. That way archers can still attack with a sword or w/e if they wanted to for some reason.
|
|
|
09/15/2010, 22:11
|
#8
|
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
|
or remove archers, hell ye
|
|
|
09/15/2010, 22:32
|
#9
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
|
well I ASSUME this is for some sort of an event vs just not letting archers attack on the server... cause that would make little/no sense...
If you are talking about for an event.. just do something in the attack packet handler such as..
if(GC.MyClient.Map == X && Type = 28)
return;
(assuming bow = type 28 now? I forget)
|
|
|
09/15/2010, 23:27
|
#10
|
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
|
Quote:
Originally Posted by pro4never
well I ASSUME this is for some sort of an event vs just not letting archers attack on the server... cause that would make little/no sense...
If you are talking about for an event.. just do something in the attack packet handler such as..
if(GC.MyClient.Map == X && Type = 28)
return;
(assuming bow = type 28 now? I forget)
|
just use GC.MyChar.Equips.RightHand.ID
:P
|
|
|
|
Similar Threads
|
[HELP]Disabling Pk.
12/17/2009 - EO PServer Hosting - 14 Replies
Hey everyone i was wondering how can i disable pking in certain maps? For example i got Old market and i would like to disable pking in there...or even make it like new market so when players compose when they click evolve they don't have to summon their eudemon it would do it automatically like in cronus...so if anyone knows please let me know. Thanks.
|
Disabling Gameguard
03/04/2009 - Cabal Online - 2 Replies
Hi,
I need a tool which disables Gameguard. my problem ist that the Rootkit-technology (which is used by GG) fights against my firewall and the result is a BSOD. And NO, it's not a hardware-prob.
What I need is a Bypass or a disabling tool without a bot (Bots are boring), I want to get back t game.
thx for help
|
[help] disabling a hack
07/22/2008 - Dekaron - 6 Replies
How do you disable that hack when you click it moves you to middle of the map
(256:256) I can't kill monsters like this and it always moves me to the middle of the map >_>
What do I delete from my USA Folder?
|
Disabling almost all graphics
12/03/2007 - Conquer Online 2 - 5 Replies
Anyone know of anyway to disable almost all the graphics so that all you see is the terrain? I know about deleting everything inside of 3deffet.ini; but this not enough. Where would one go about trying to strip down CO to it's basic form so much that you can't even see anybody or npcs and all animations? I'm trying to get CO to use as little as possible cpu usage. I don't need to see anything but the terrain for what I'm trying to do. Any feedback is greatly appreciated.
|
Disabling GameGuard
10/18/2006 - General Coding - 19 Replies
I know there was a way to disable game/nprotect but i forgot which way it was. so if any of u know and wana tell me let me kno rite here
|
All times are GMT +2. The time now is 22:32.
|
|