sahisahi
Member
So im trying to add a mod to OnMoveOver method (PlayerMobile)
What it does it check if both players are holding X items
and if they are it reveals and attach an xmlattachment to both, not working so far.
The console ''debug'' message is not even showing up
Can someone take a look? thanks
What it does it check if both players are holding X items
and if they are it reveals and attach an xmlattachment to both, not working so far.
The console ''debug'' message is not even showing up
Can someone take a look? thanks
Code:
public override bool OnMoveOver( Mobile m )
{
#region Region21
if (m is PlayerMobile && m.Region.Name == "MyRegion21" && !HiddenWithSpell && Hidden); //checking if players are in MyRegion21 and are hidden.
{
PlayerMobile player1 = this as PlayerMobile; //checking if players are playersmobile wtf?
PlayerMobile player2 = this as PlayerMobile; //checking if players are playersmobile wtf?
if (player1 is PlayerMobile && player2 is PlayerMobile) //unnecesary check?
{
Item[] raraa = new Item[2];
Item[] roroo = new Item[2];
raraa[0] = player1.Backpack.FindItemByType(typeof(item22)); //item22
roroo[0] = player1.Backpack.FindItemByType(typeof(item21)); //item21
raraa[1] = player2.Backpack.FindItemByType(typeof(item22)); //item22
roroo[1] = player2.Backpack.FindItemByType(typeof(item21)); //item21
if((raraa[0] != null && roroo[1] != null) || (roroo[0] != null && raraa[1] != null) )//player1 and player2 are holding different object types.
Console.WriteLine("/Debug/ HOLDING DIFFERENT ITEMS;");
XmlAttach.AttachTo(player1, new Xmlreve("reve" ,1, 8)); //we attach something to them
XmlAttach.AttachTo(player2, new Xmlreve("reve" ,1, 8)); //we attach something to them
player1.Hidden = false; //no hidden
player2.Hidden = false; //no hidden
RevealingAction(); //revealaction
}
}
#endregion
Last edited: