|
You last visited: Today at 03:00
Advertisement
[Help] Triple Attack
Discussion on [Help] Triple Attack within the CO2 Private Server forum part of the Conquer Online 2 category.
01/11/2014, 23:18
|
#1
|
elite*gold: 0
Join Date: Nov 2011
Posts: 150
Received Thanks: 11
|
[Help] Triple Attack
How should I do to work perfectly Triple Attack? any ideas? any examples?
This is my current code:
Code:
case 10490:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1)
{
if (attackedsob != null)
{
if (CanAttack(attacker, attackedsob, spell))
{
PrepareSpell(spell, attacker.Owner);
for (int count = 0; count < 4; count++)
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Math.Max(1, Calculate.Melee(attacker, attackedsob, ref attack) / 3);
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.AddTarget(attackedsob.UID, damage, attack);
attacker.Owner.SendScreen(suse, true);
}
}
}
else
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
PrepareSpell(spell, attacker.Owner);
for (int count = 0; count < 4; count++)
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Math.Max(1, Calculate.Melee(attacker, attackedsob, ref attack) / 3);
suse.Effect1 = attack.Effect1;
ReceiveAttack(attacker, attacked, attack, damage, spell);
suse.AddTarget(attacked.UID, damage, attack);
attacker.Owner.SendScreen(suse, true);
if (attacked.Dead) break;
}
}
}
attacker.AttackPacket = null;
}
else
{
attacker.AttackPacket = null;
}
}
attacker.AttackPacket = null;
break;
}
|
|
|
01/13/2014, 16:38
|
#2
|
elite*gold: 0
Join Date: Feb 2008
Posts: 322
Received Thanks: 121
|
you're defining it 3 times, while what you have to do is to make sure Damage dealt to enemy is done 3 times, aswell as packet send 3 times.
From what I can see, I can see, you're not including the whole thing here. Referring to "attacker.AttackPAcket = null;" you'll have to see below it, and the whole thing has to be looped if you want it to calculate individually. Or else you can just create a "AttackCount" loop where the packet is sent.
|
|
|
|
Similar Threads
|
Monk: Triple Attack Bug
07/01/2013 - CO2 Private Server - 6 Replies
I'm having issues with this Monk skill, when it attacks a Monster, whatever the drop is.. It gets it x2 or 4. And when you Kill another player and triple attack goes off. It show's you killed the player 4 times..
Any ideas? Thanks
Here is the Code:
#region TripleAttack
case 10490:
{
|
skill Triple attack
04/19/2013 - CO2 Private Server - 0 Replies
i have problem in skill Triple attack monk and Pirate when i kill monster by skill triple attack monster drop cps 3x
example i make drop = 250
when monster kill by triple attack drop = 750
|
(Monk Skill) Triple Attack Problem
09/19/2011 - CO2 Private Server - 8 Replies
I am having problem with Triple Attack whenever activates it counts as 3 kills, not just 1, so if my pheasant drops 5 cps, and this skill activates it gives me 15 cps by one hit instead of 5 cps...does anyone see something wrong into this code?
I think the problem is at those 2 red lines I just highlighted...
case 10490:
{
if (CanUseSpell(spell, attacker.Owner))
{
...
|
Triple attack ?
08/16/2011 - CO2 Private Server - 2 Replies
Anyone knows how the Calc works for it?, like Missing or not to miss, i know Agility has a big Part in it. but what else and how?
Oh And Also does anyone have the Spawn packet Offset for the New Appearance Options ?
|
All times are GMT +2. The time now is 03:00.
|
|