[Help]FB & Reborn Defence

02/14/2009 23:13 damianpesta#1
Well Its a new Qustion So I will bump thread.

I discovered that When Someone Has locked skill on PTarget , and the PTarget moves its not breaking.I have tried several ways of making it break whenever charr moves or dies.Anyone got an Idea what do I suppose to do? Hints are All right.Same to other skills, I just want charr to stop Locking the skill after Target is dead.

Thanks In advance.
02/14/2009 23:16 tao4229#2
Uhhm, if it's not being taken into account wherever skills calculate damage (which is Other.CalculateDamage I think, if not, look at the actual code in Character.UseSkill), then it's not gunna work. Look in Character.UseSkill...
02/14/2009 23:37 μZane#3
So it's only working for melee? If so just look at the attack handler for spells and do the proper calculations there. (Basically what tao said.)
02/14/2009 23:40 damianpesta#4
#Edit Thanks for Help tao , got it now =] #Request close.
02/15/2009 16:05 damianpesta#5
#bump , New Question.Im not going to flood this section with my threads.So I just bumped this one.
02/15/2009 19:02 tao4229#6
Well, you could track the characters location when attacking is initiated, and then just check if they're not on the same location. If they aren't then null out PTarget, same thing if they're dead.
02/15/2009 20:20 damianpesta#7
Quote:
Originally Posted by tao4229 View Post
Well, you could track the characters location when attacking is initiated, and then just check if they're not on the same location. If they aren't then null out PTarget, same thing if they're dead.
Got it Thanks :P
02/16/2009 15:19 damianpesta#8
#Bump , nvm having problems with Coord's Checking X_X Never Really tried it before.Any help?


Btw It stops attacking once the target is dead.But Once you start to be locking skill at ghost it keeps attacking it till you rev's.Hmm any help about this one too? Thats my SkillLooping Part.

else if (AtkType == 21)
{
if (SkillLooping != 0)
{
if (SkillLoopingTarget != 0)
{
if (SkillLoopingTarget > 400000 && SkillLoopingTarget < 500000)
{
SingleMob Targ = (SingleMob)Mobs.AllMobs[SkillLoopingTarget];
if (Targ == null || !Targ.Alive)
return;
else
UseSkill(SkillLooping, (ushort)Targ.PosX, (ushort)Targ.PosY, SkillLoopingTarget);
if (!Alive)
{
UseSkill(SkillLooping, (ushort)Targ.PosX, (ushort)Targ.PosY, SkillLoopingTarget);
}
else
{
SkillLoopingTarget = 0;
Attacking = false;
}

}
else if (SkillLoopingTarget < 7000 && SkillLoopingTarget >= 5000)
{
SingleNPC Targ = (SingleNPC)NPCs.AllNPCs[SkillLoopingTarget];
if (Targ == null)
return;
else
UseSkill(SkillLooping, (ushort)Targ.X, (ushort)Targ.Y, SkillLoopingTarget);
if (!Alive)
{
UseSkill(SkillLooping, (ushort)Targ.X, (ushort)Targ.Y, SkillLoopingTarget);
}
else
{
SkillLoopingTarget = 0;
Attacking = false;

}

}
else
{
Character Targ = (Character)World.AllChars[SkillLoopingTarget];
if (Targ == null || !Targ.Alive)
return;
else
UseSkill(SkillLooping, Targ.LocX, Targ.LocY, SkillLoopingTarget);
if (!Alive)
{
UseSkill(SkillLooping, Targ.LocX, Targ.LocY, SkillLoopingTarget);
}
else
{
SkillLoopingTarget = 0;
Attacking = false;
}
}
}
else
{
UseSkill(SkillLooping, SkillLoopingX, SkillLoopingY, 0);
}
}
else
{
SkillLooping = 0;
}
}
Ready = true;

}
catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
}