Partially GodMode Fix

Posts 1–11 of 11 · Page 1 of 1
Partially GodMode Fix
1. go to server/wserver/networking/handlers/PlayerHitHander.cs and remove this line
Code:
client.Player.Damage(proj.Damage, proj.ProjectileOwner.Self);
2. go to server/wserver/realm/Entity.cs
and find this
Code:
public virtual bool HitByProjectile(Projectile projectile, RealmTime time)
        {
            //Console.WriteLine("[" + DateTime.Now.ToString("h:mm:ss tt") + "] " + "HIT! " + Id);
            if (ObjectDesc == null)
                return true;
            return ObjectDesc.OccupySquare || ObjectDesc.EnemyOccupySquare || ObjectDesc.FullOccupy;
        }
and replace to
Code:
public virtual bool HitByProjectile(Projectile projectile, RealmTime time)
        {
            //Console.WriteLine("[" + DateTime.Now.ToString("h:mm:ss tt") + "] " + "HIT! " + Id);
            if (ObjectDesc == null)
                return true;
            return ObjectDesc.OccupySquare || ObjectDesc.EnemyOccupySquare || ObjectDesc.FullOccupy || ObjectDesc.Player;
        }
3. go to server/wserver/realm/entities/Projectile.cs
under this
Code:
if (objId != 0 &&
                Manager.GameData.ObjectDescs[objId].OccupySquare &&
                !penetrateObsta)
            {
                Destroy(true);
                return false;
            }
add this
Code:
double nearestRadius = double.MaxValue;
            Entity entity = null;
            foreach (var i in collisionMap.HitTest(pos.X, pos.Y, 2))
            {
                if (i == ProjectileOwner.Self) continue;
                if (i is Container) continue;
                if (hitted.Contains(i)) continue;
                double xSide = (i.X - pos.X) * (i.X - pos.X);
                double ySide = (i.Y - pos.Y) * (i.Y - pos.Y);
                if (xSide <= 0.5 * 0.5 && ySide <= 0.5 * 0.5 && xSide + ySide <= nearestRadius)
                {
                    nearestRadius = xSide + ySide;
                    entity = i;
                }
            }
            if (entity != null && entity.HitByProjectile(this, time))
            {
                if ((entity is Enemy && penetrateEnemy) ||
	
                    (entity is StaticObject && (entity as StaticObject).Static && !(entity is Wall) && penetrateObsta))
                    hitted.Add(entity);
                else
                {
                    Destroy(true);
                    return false;
                }
                ProjectileOwner.Self.ProjectileHit(this, entity);
            }
4. go to server/wserver/realm/entities/player/Player.cs
find this
Code:
public override bool HitByProjectile(Projectile projectile, RealmTime time)
        {
            if (projectile.ProjectileOwner is Player ||
                HasConditionEffect(ConditionEffectIndex.Paused) ||
                HasConditionEffect(ConditionEffectIndex.Stasis) ||
                HasConditionEffect(ConditionEffectIndex.Invincible))
                return false;
            return base.HitByProjectile(projectile, time);
        }
and replace to
Code:
public override bool HitByProjectile(Projectile projectile, RealmTime time)
        {
            try
            {
                if (projectile.ProjectileOwner is Player ||
	
                    HasConditionEffect(ConditionEffectIndex.Paused) ||
                    HasConditionEffect(ConditionEffectIndex.Stasis) ||
                    HasConditionEffect(ConditionEffectIndex.Invincible))
                    return false;
                var dmg = (int)StatsManager.GetDefenseDamage(projectile.Damage, false);
                if (!HasConditionEffect(ConditionEffectIndex.Invulnerable))
                    HP -= dmg;
                UpdateCount++;
                Owner.BroadcastPacket(new DamagePacket
                {
                    TargetId = Id,
                    Effects = HasConditionEffect(ConditionEffectIndex.Invincible) ? 0 : projectile.ConditionEffects,
                    Damage = (ushort)dmg,
                    Killed = HP <= 0,
                    BulletId = projectile.ProjectileId,
                    ObjectId = projectile.ProjectileOwner.Self.Id
                }, this);
                SaveToCharacter();
                if (HP <= 0)
                    Death(projectile.ProjectileOwner.Self.ObjectDesc.DisplayId ?? projectile.ProjectileOwner.Self.ObjectDesc.ObjectId);
            }
            catch (Exception e)
            {
                log.Error("Error while processing playerDamage: ", e);
            }
            return base.HitByProjectile(projectile, time);
        }
Credits:
-Me for made tutorial
EDIT: I hate you haha. Nice one
This doesn't work xD, infact, it gives you godmode instead
This fixed my server completely. All issues with hacks, crashes, etc are gone. I also won the lottery thanks to this neat patch. Thank you so much
I added it and it works good
Wow Ghost you just ruined godmode bragging rights..
Quote Originally Posted by Demon View Post
Wow Ghost you just ruined godmode bragging rights..
anyone with any skill would be able to make a bypass Lol.
Quote Originally Posted by bog624 View Post


anyone with any skill would be able to make a bypass Lol.
apply this to your server, and have a laugh. Its real funny.
Quote Originally Posted by bog624 View Post


anyone with any skill would be able to make a bypass Lol.
Do it. You can't make a "bypass" for this. Whilst this way isn't the best, if you're desperate for a god mode patch, this does it 100% even though it might be pretty dodgy at times (invis-bullets)
Quote Originally Posted by sgrawsreghawrhgwrhgr View Post
Do it. You can't make a "bypass" for this. Whilst this way isn't the best, if you're desperate for a god mode patch, this does it 100% even though it might be pretty dodgy at times (invis-bullets)
there is one made. but i dont use copy and paste server shit.
Quote Originally Posted by bog624 View Post


anyone with any skill would be able to make a bypass Lol.
You can find other ways to spoil parts of the client that allows the player to take damage, from either groundamage or bullets. Now for the most people who make theese lousy godmode hacks with 123.5.1 clients by removing the visibullet packet, this will patch it and ruin it for them. Though with enough knowledge you can possibly find another way around.
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?