RedBeard
Member
Using latest ServUo:
Trying to make a shovel uncover the entrance to my custom dungeon by having players randomly look for it targeting the land tiles in the area.
One method sort of works(LandTile) I tried only allows me to target playermobile not the ground, but for some reason also allows targeting any static tile. If I use LandTarget it will not target anything.
Trying to make a shovel uncover the entrance to my custom dungeon by having players randomly look for it targeting the land tiles in the area.
One method sort of works(LandTile) I tried only allows me to target playermobile not the ground, but for some reason also allows targeting any static tile. If I use LandTarget it will not target anything.
Code:
protected override void OnTarget(Mobile from, object targeted)
{
Map map = from.Map;
LandTile lt = map.Tiles.GetLandTile(from.X, from.Y);
// LandTarget land = targeted as LandTarget;
if (targeted is LandTarget && ((LandTarget)targeted).TileID >= 22 && ((LandTarget)targeted).TileID <= 62)
// if (IsSandTile(lt.ID) && lt.Z == from.Z)
{