[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
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;"
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)"
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
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
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!
lol I just got to my computer and I was about to convert it but gg you got to it faster then me 



