[Help] UnMount the steeds

02/02/2010 19:28 .RainBow.#1
How could i unmount the steed when i attack to players (pk)? and when i use all skills? because steeds ruining the pvp.

btw source is 5165
02/03/2010 18:56 .Kob#2
In skill.cs search for:

case ExtraEffect.Fly:
{
Buff B = new Buff();
B.Eff = Info.ExtraEff;
B.Lasts = Info.EffectLasts;
B.Value = Info.EffectValue;
B.Started = DateTime.Now;
B.StEff = StatusEffectEn.Fly;
C.AddBuff(B);

}
break;

Just need to add this code:

if (C.StatEff.Contains(StatusEffectEn.Ride))
{
C.StatEff.Remove(StatusEffectEn.Ride);
}

finally code is :

Code:
case ExtraEffect.Fly:
                                {
                                    Buff B = new Buff();
                                    B.Eff = Info.ExtraEff;
                                    B.Lasts = Info.EffectLasts;
                                    B.Value = Info.EffectValue;
                                    B.Started = DateTime.Now;
                                      B.StEff = StatusEffectEn.Fly;
                                    C.AddBuff(B);
                                    if (C.StatEff.Contains(StatusEffectEn.Ride))
                                    {
                                        C.StatEff.Remove(StatusEffectEn.Ride);
                                    }
                                    break;
Edit: You find more skills in the skills.cs >.<'
02/03/2010 21:57 [GM]#3
so this is about skills what about normal attack?
02/03/2010 22:26 pro4never#4
Quote:
Originally Posted by [GM] View Post
so this is about skills what about normal attack?
obviously add

Code:
if (C.StatEff.Contains(StatusEffectEn.Ride))
                                    {
                                        C.StatEff.Remove(StatusEffectEn.Ride);
                                    }
to the attack code. That's the section of the code actually removing the horse from the little I glanced at it. Go to where your attack code is and on attack do the exact same thing.
02/03/2010 22:38 .RainBow.#5
Quote:
Originally Posted by cakobu View Post
In skill.cs search for:

case ExtraEffect.Fly:
{
Buff B = new Buff();
B.Eff = Info.ExtraEff;
B.Lasts = Info.EffectLasts;
B.Value = Info.EffectValue;
B.Started = DateTime.Now;
B.StEff = StatusEffectEn.Fly;
C.AddBuff(B);

}
break;

Just need to add this code:

if (C.StatEff.Contains(StatusEffectEn.Ride))
{
C.StatEff.Remove(StatusEffectEn.Ride);
}

finally code is :

Code:
case ExtraEffect.Fly:
                                {
                                    Buff B = new Buff();
                                    B.Eff = Info.ExtraEff;
                                    B.Lasts = Info.EffectLasts;
                                    B.Value = Info.EffectValue;
                                    B.Started = DateTime.Now;
                                      B.StEff = StatusEffectEn.Fly;
                                    C.AddBuff(B);
                                    if (C.StatEff.Contains(StatusEffectEn.Ride))
                                    {
                                        C.StatEff.Remove(StatusEffectEn.Ride);
                                    }
                                    break;
Edit: You find more skills in the skills.cs >.<'
Ok i did that and now it works good for skills but what about when attacking a player? i meant how do i dismount the steed when attacking a player?
02/03/2010 22:46 .Kob#6
Just put it in Atack.cs :S :S
02/03/2010 22:52 [GM]#7
Quote:
Originally Posted by cakobu View Post
Just put it in Atack.cs :S :S
under Which line ? :confused:
02/03/2010 22:52 .RainBow.#8
already tried and i get error messages

Quote:
Error 1 The name 'C' does not exist in the current context C:\JusticeCo\Beta\PacketHandling\Attack.cs 69 29 NewestCOServer
Error 2 The name 'StatusEffectEn' does not exist in the current context C:\JusticeCo\Beta\PacketHandling\Attack.cs 69 48 NewestCOServer
Error 3 The name 'C' does not exist in the current context C:\JusticeCo\Beta\PacketHandling\Attack.cs 71 29 NewestCOServer
Error 4 The name 'StatusEffectEn' does not exist in the current context C:\JusticeCo\Beta\PacketHandling\Attack.cs 71 46 NewestCOServer
02/04/2010 01:56 Arcо#9
Quote:
Originally Posted by .RainBow. View Post
already tried and i get error messages
Must add a reference.
I believe it is
using NewestCOServer.Game;

#EDIT
Here's what I use for the skill ride
Code:
                            case ExtraEffect.Ride:
                                {
                                    if ((C.StatEff.Contains(StatusEffectEn.ShurikenVortex)) || (C.StatEff.Contains(StatusEffectEn.FatalStrike)) || (C.StatEff.Contains(StatusEffectEn.Fly)))
                                    {
                                        C.Stamina -= 0;
                                        return;
                                    }
                                    if (!User.StatEff.Contains(StatusEffectEn.Ride))
                                        User.StatEff.Add(StatusEffectEn.Ride);
                                    else
                                        User.StatEff.Remove(StatusEffectEn.Ride);
                                    User.Vigor = User.MaxVigor;
                                    break;
                                }
02/04/2010 13:55 ramix#10
i have a little problem in vigor -.-

i have a mount +12 but the vigor is 30 :S but horse +12 vigor is 4030