Exemplo n.º 1
0
        public override bool OnMoveOver(Mobile from)
        {
            PlayerMobile player = from as PlayerMobile;

            if (null != player)
            {
                if (player.FindItemOnLayer(Layer.OneHanded) is JailHammer)
                {
                    player.Emote("*Seems somewhat more convinced that mining {0} is a good idea*", JailConfig.JailRockName);
                }
                else
                {
                    Jail.FreeThem(player);
                    return(false);
                }
            }
            return(true);
        }
Exemplo n.º 2
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            if (dropped is JailRock)
            {
                PlayerMobile player = from as PlayerMobile;

                if (null != player)
                {
                    JailHammer hammer = player.FindItemOnLayer(Layer.OneHanded) as JailHammer;

                    if (null == hammer)
                    {
                        Say("How nice of you to volunteer {0}; get busy mining {1}!", player.Name, JailConfig.JailRockName);
                        Jail.JailThem(player, Jail.JailOption.None);
                    }
                    else
                    {
                        if ((hammer.UsesRemaining -= dropped.Amount) <= 0)
                        {
                            Jail.FreeThem(player);
                        }
                        else
                        {
                            this.Say(hammer.UsesRemaining + " to go, Keep working scoundrel!");
                        }
                    }
                }
                return(true);
            }
            else
            {
                Say("I dont want that junk! Get me some {0}!", JailConfig.JailRockName);
            }

            return(false);
        }