[Command] [FSOD] Vanish Command

Posts 1–15 of 45 · Page 1 of 3
[Command] [FSOD] Vanish Command
Hello Friends!

i Have make Vanish Command for FSOD



1 - Go To wServer/Realm/Commands/AdminCommands
2 - Copy This Command Bellow and Paste in AdminCommands
Code:
    internal class VanishCommand : Command
    {
        public VanishCommand()
        : base("vanish", 1)
        {
        }

        protected override bool Process(Player player, RealmTime time, string[] args)
        {
            if (!player.isNotVisible)
            {
                player.isNotVisible = true;
                player.Owner.PlayersCollision.Remove(player);
                if (player.Pet != null)
                    player.Owner.LeaveWorld(player.Pet);
                player.SendInfo("You're now hidden from all players!");
                return true;
            }
            player.isNotVisible = false;

            player.SendInfo("You're now visible to all players!");
            return true;
        }
    }
3 - Go To wServer/Realm/Entities/Player/Player.cs
4 - Copy And Paste This Code Bellow "private bool resurrecting;"

Code:
        public bool PvP { get; set; }
        public bool isNotVisible = false;
5 - In wServer/Realm/Entities/Player/Player.cs
6 - Copy And Paste This Code Bellow "public void GivePet(PetItem petInfo)"

Code:
        public void Damage(int dmg, Entity chr, bool noDef, bool toSelf = false, float pvpReduction = 0.20f)
        {
            try
            {
                if (HasConditionEffect(ConditionEffects.Paused) ||
                    HasConditionEffect(ConditionEffects.Stasis) ||
                    HasConditionEffect(ConditionEffects.Invincible))
                    return;

                dmg = (int)StatsManager.GetDefenseDamage(dmg, noDef);
                if (chr is Player)
                    dmg = Math.Max(1, (int)(dmg * pvpReduction));
                if (!HasConditionEffect(ConditionEffects.Invulnerable))
                    HP -= dmg;
                UpdateCount++;
                Owner.BroadcastPacket(new DamagePacket
                {
                    TargetId = Id,
                    Effects = 0,
                    Damage = (ushort)dmg,
                    Killed = HP <= 0,
                    BulletId = 0,
                    ObjectId = chr != null ? chr.Id : -1
                }, toSelf ? null : this);
                SaveToCharacter();

                string killerName = chr is Player
                    ? chr.Name
                    : chr != null ? (chr.ObjectDesc.DisplayId ?? chr.ObjectDesc.ObjectId) : "Unknown";

                if (HP <= 0)
                    Death(killerName);
            }
            catch (Exception e)
            {
                log.Error("Error while processing playerDamage: ", e);
            }
        }
7 - In wServer/Realm/Entities/Player/Player.cs
8 - Find "public void Teleport(RealmTime time, TeleportPacket packet)"
9 - Bellow "Color = new ARGB(0xFFFFFFFF)" Copy and Paste

Code:
            }, null);
            if (!isNotVisible)
                Owner.BroadcastPacket(new ShowEffectPacket
                {
                    EffectType = EffectType.Teleport,
                    TargetId = Id,
                    PosA = new Position
                    {
                        X = X,
                        Y = Y
                    },
                    Color = new ARGB(0xFFFFFFFF)
                }, null);
        }
10 - Go to wServer/Realm/Entities/Player/Player.Update.cs
11 - In Any Line, Copy and Paste This Code

Code:
             private IEnumerable<int> GetRemovedEntities()
        {
            foreach (Entity i in clientEntities.Where(i => i is Player))
            {
                    if ((i as Player).isNotVisible && i != this && !PvP)
                {
                    yield return i.Id;
                }
                if (i is Player && i.Owner != null) continue;
                if (MathsUtils.DistSqr(i.X, i.Y, X, Y) > SIGHTRADIUS * SIGHTRADIUS &&
                    !(i is StaticObject && (i as StaticObject).Static) &&
                    i != Quest)
                {
                    if (i is Pet) continue;
                    yield return i.Id;
                }
                else if (i.Owner == null)
                    yield return i.Id;

                if ((i as Player).isNotVisible && i != this && !PvP)
                    yield return i.Id;
            }
        }
            }
        }
 
"than this serve?" Gifs



 
Credits
Serap's Domain Source, this is coded by SD, but i have converted to FSOD!
I can't test if this is correct but I am going to believe in you lol I just got to my computer and I was about to convert it but gg you got to it faster then me
This was ripped from Seraphs Dominion source... seriously all your posts are autistic
Quote Originally Posted by DimitriSavage View Post
I can't test if this is correct but I am going to believe in you lol I just got to my computer and I was about to convert it but gg you got to it faster then me
thanks <3, and i have now added gifs to people see of that work


- - - Updated - - -

Quote Originally Posted by YouAreTheLeecher View Post
This was ripped from Seraphs Dominion source... seriously all your posts are autistic
you fool, see this help request

http://www.mpgh.net/forum/showthread.php?t=1115316
Quote Originally Posted by YouAreTheLeecher View Post
This was ripped from Seraphs Dominion source... seriously all your posts are autistic
Sigh...Leecher what did I say about using the word autistic XD please use the word slow there is real kids out there with that problem and the word autistic is offensive so please use the word slow or challenged

and @Daemonmann if you did use SDs coding then please say that this is SDs work but I edited it or I brought it back to answer a question.

I know you posted this to help a fellow user but if you didn't create it then please ensure that you give credit to who made it and if you edited it then make sure you give credit to who made it and say that you edited it to make it better or cooler
Quote Originally Posted by DimitriSavage View Post


Sigh...Leecher what did I say about using the word autistic XD please use the word slow there is real kids out there with that problem and the word autistic is offensive so please use the word slow or challenged

and @Daemonmann if you did use SDs coding then please say that this is SDs work but I edited it or I brought it back to answer a question.

I know you posted this to help a fellow user but if you didn't create it then please ensure that you give credit to who made it and if you edited it then make sure you give credit to who made it and say that you edited it to make it better or cooler
see the credits @DimitriSavage
i have an error with

private IEnumerable<int> GetRemovedEntities()
{
foreach (var i in clientEntities.Where(i => !(i is Player) || i.Owner == null))
{
if (MathsUtils.DistSqr(i.X, i.Y, X, Y) > SIGHTRADIUS * SIGHTRADIUS &&
!(i is StaticObject && (i as StaticObject).Static) &&
i != Quest)
{
if (i is Pet) continue;
yield return i.Id;
}
else if (i.Owner == null)
yield return i.Id;

if (!(i is Player)) continue;
if (i != this)
yield return i.Id;
}
}

GetRemovedEntities Causes an error
Quote Originally Posted by MrchickenWingz View Post
i have an error with

private IEnumerable<int> GetRemovedEntities()
{
foreach (var i in clientEntities.Where(i => !(i is Player) || i.Owner == null))
{
if (MathsUtils.DistSqr(i.X, i.Y, X, Y) > SIGHTRADIUS * SIGHTRADIUS &&
!(i is StaticObject && (i as StaticObject).Static) &&
i != Quest)
{
if (i is Pet) continue;
yield return i.Id;
}
else if (i.Owner == null)
yield return i.Id;

if (!(i is Player)) continue;
if (i != this)
yield return i.Id;
}
}

GetRemovedEntities Causes an error
A description of the error would be good
Quote Originally Posted by Lxys View Post
A description of the error would be good
He means this:

Code:
        private IEnumerable<int> GetRemovedEntities()
        {
            foreach (Entity i in clientEntities.Where(i => i is Player))
            {
                if ((i as Player).isNotVisible && i != this && !PvP)
                {
                    yield return i.Id;
                }
            }
            foreach (Entity i in clientEntities)
            {
                if (i is Player && i.Owner != null) continue;
                if (MathsUtils.DistSqr(i.X, i.Y, X, Y) > SIGHTRADIUS * SIGHTRADIUS &&
                    !(i is StaticObject && (i as StaticObject).Static) &&
                    i != Quest)
                    yield return i.Id;
                else if (i.Owner == null)
                    yield return i.Id;
                if (i is Player)
                    if ((i as Player).isNotVisible && i != this && !PvP)
                        yield return i.Id;
            }
        }
You Already Have this parameter, only search for "GetRemoveEntities" and delete this that you have, and paste this above

Why did you leave the PVP code in there.
Quote Originally Posted by BlackRayquaza View Post
Why did you leave the PVP code in there.
lmfao//10char
when u add the code in Player.Update.cs, then join Pet Yard, pets looks like a potion :>
Quote Originally Posted by Razor Sharp v2 View Post
when u add the code in Player.Update.cs, then join Pet Yard, pets looks like a potion :>
if you added @Matrix1101 blocksight in player.update.cs that may be why since his replaced ALL of player.update and adding this in might have to have the code altered a tiny bit to be compatible with his blocksight since idk its in the same file or something
Posts 1–15 of 45 · Page 1 of 3

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us