Beispiel #1
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            if (dropped is MysticalTreeSap)
            {
                int    TreeSap  = dropped.Amount;
                string sMessage = "";

                if (TreeSap > 19)
                {
                    sMessage = "Ahhh...this is generous of you. Here...have this as a token of the guild's gratitude.";
                    PackBeastItem ball = new PackBeastItem();
                    ball.PorterOwner = from.Serial;
                    from.AddToBackpack(ball);
                }
                else
                {
                    sMessage = "Thank you for these. Mystical tree sap is something we often look for.";
                }

                this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sMessage, from.NetState);
                dropped.Delete();
            }
            else if (dropped is PackBeastItem)
            {
                string sMessage = "";

                PackBeastItem ball = (PackBeastItem)dropped;

                if (ball.PorterType == 291)
                {
                    ball.ItemID = 0x2127; ball.PorterType = 292; ball.Hue = 0; sMessage = "You may like a pack llama instead.";
                }
                else if (ball.PorterType == 292)
                {
                    ball.ItemID = 0x20DB; ball.PorterType = 34; ball.Hue = 0; sMessage = "You may like a pack brown bear instead.";
                }
                else if (ball.PorterType == 34)
                {
                    ball.ItemID = 0x20CF; ball.PorterType = 177; ball.Hue = 0; sMessage = "You may like a pack black bear instead.";
                }
                else if (ball.PorterType == 177)
                {
                    ball.ItemID = 0x20E1; ball.PorterType = 179; ball.Hue = 0; sMessage = "You may like a pack polar bear instead.";
                }
                else if (ball.PorterType == 179)
                {
                    ball.ItemID = 0x2126; ball.PorterType = 291; ball.Hue = 0; sMessage = "You may like a pack horse instead.";
                }

                sMessage = "You would perhaps like a different pack animal? " + sMessage;
                from.AddToBackpack(ball);

                this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sMessage, from.NetState);
            }
            return(base.OnDragDrop(from, dropped));
        }
Beispiel #2
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is PackBeastItem && from.Backpack != null)
                {
                    PackBeastItem ball = targeted as PackBeastItem;
                    Container     pack = from.Backpack;

                    int toConsume = 0;

                    if (ball.Charges < 50)
                    {
                        toConsume = 1000;

                        if (BeggingPose(from) > 0)                           // LET US SEE IF THEY ARE BEGGING - WIZARD
                        {
                            toConsume = toConsume - (int)((from.Skills[SkillName.Begging].Value * 0.005) * toConsume);
                        }
                    }
                    else
                    {
                        m_Druid.SayTo(from, "You pack animal has been tended to enough.");
                    }

                    if (toConsume == 0)
                    {
                        return;
                    }

                    if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        if (BeggingPose(from) > 0)
                        {
                            Titles.AwardKarma(from, -BeggingKarma(from), true);
                        }                                                                                                               // DO ANY KARMA LOSS
                        m_Druid.SayTo(from, "Your pack animal is properly tended to.");
                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                        Effects.PlaySound(from.Location, from.Map, 0x5C1);
                        ball.Charges = ball.Charges + 5;
                    }
                    else
                    {
                        m_Druid.SayTo(from, "It would cost you {0} gold to have that pack animal tended to.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                else
                {
                    m_Druid.SayTo(from, "That does not need my services.");
                }
            }