karolbelski
Member
I try to make some area where you cant damage another player pet's
i got something like this bu this doesnt work.
i got something like this bu this doesnt work.
Code:
if (from is BaseCreature && m is BaseCreature && m.Region.Name == "XXXXXX")
{
BaseCreature bc = from as BaseCreature;
PlayerMobile master = bc.ControlMaster as PlayerMobile;
BaseCreature bc2 = m as BaseCreature;
PlayerMobile master2 = bc2.ControlMaster as PlayerMobile;
if (bc.ControlMaster != null && bc2.ControlMaster != null)
{
if (bc.Controlled && bc2.Controlled)
{
if (totalDamage > 0)
{
totalDamage = 0;
master.SendMessage("You cannot damage pets here");
}
}
}
}