I want to change the Daat99 Masterlooter to allow players to use [loot around their party members without receiving the "You are too close to another player to do that!" message. I'm just not sure how to go about it. I figure it needs

Code:
using Server.Engines.PartySystem;
at the top, but I don't know what to add in the
Code:
if ( player != other && !other.Hidden && other.AccessLevel == AccessLevel.Player )
to make it work.

Here's the full area in which this behavior is determined.

Code:
foreach ( Mobile other in player.GetMobilesInRange( 5 ) )
            {
                if ( ! ( other is PlayerMobile ) )
                    continue;
                if ( player != other && !other.Hidden && other.AccessLevel == AccessLevel.Player )
                {
                    //player.PlaySound(1069); //hey
                    player.SendMessage("You are too close to another player to do that!");
                    return false; //ignore self, staff and hidden
                }
            }
 
I want to change the Daat99 Masterlooter to allow players to use [loot around their party members without receiving the "You are too close to another player to do that!" message. I'm just not sure how to go about it. I figure it needs

Code:
using Server.Engines.PartySystem;
at the top, but I don't know what to add in the
Code:
if ( player != other && !other.Hidden && other.AccessLevel == AccessLevel.Player )
to make it work.

Here's the full area in which this behavior is determined.

Code:
foreach ( Mobile other in player.GetMobilesInRange( 5 ) )
            {
                if ( ! ( other is PlayerMobile ) )
                    continue;
                if ( player != other && !other.Hidden && other.AccessLevel == AccessLevel.Player )
                {
                    //player.PlaySound(1069); //hey
                    player.SendMessage("You are too close to another player to do that!");
                    return false; //ignore self, staff and hidden
                }
            }


Well you could look at the Party system and then add a check to the if or make a separat one
Code:
           Party p = (Party)((PlayerMobile)player).Party;
            foreach ( Mobile other in player.GetMobilesInRange( 5 ) )
            {
                if ( ! ( other is PlayerMobile && p != null && !p.Contains(other)) )
                    continue;
                if ( player != other && !other.Hidden && other.AccessLevel == AccessLevel.Player )
                {
                    //player.PlaySound(1069); //hey
                    player.SendMessage("You are too close to another player to do that!");
                    return false; //ignore self, staff and hidden
                }
            }

I didnt test it, should work though. Also I wasnt sure if player is a Mobile or actually PlayerMobile, if it is you can change
Code:
Party p = (Party)((PlayerMobile)player).Party;
to
Code:
Party p = (Party)player.Party;
 
Back