Beispiel #1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                int nCost = 50;

                if (BeggingPose(from) > 0)                   // LET US SEE IF THEY ARE BEGGING - WIZARD
                {
                    nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); if (nCost < 1)
                    {
                        nCost = 1;
                    }
                }

                if (targeted is UnknownScroll && from.Backpack != null)
                {
                    Container pack      = from.Backpack;
                    int       toConsume = nCost;

                    if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        if (BeggingPose(from) > 0)
                        {
                            Titles.AwardKarma(from, -BeggingKarma(from), true);
                        }                                                                                                               // DO ANY KARMA LOSS

                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));

                        m_Scribe.PlaySound(0x249);
                        UnknownScroll rolls = (UnknownScroll)targeted;

                        int paperType = 1;

                        if (rolls.ScrollType == 1)                           // MAGERY
                        {
                            if (rolls.ScrollLevel == 2)
                            {
                                paperType = Utility.RandomMinMax(13, 24);
                            }
                            else if (rolls.ScrollLevel == 3)
                            {
                                paperType = Utility.RandomMinMax(25, 36);
                            }
                            else if (rolls.ScrollLevel == 4)
                            {
                                paperType = Utility.RandomMinMax(37, 48);
                            }
                            else if (rolls.ScrollLevel == 5)
                            {
                                paperType = Utility.RandomMinMax(49, 60);
                            }
                            else if (rolls.ScrollLevel == 6)
                            {
                                paperType = Utility.RandomMinMax(57, 64);
                            }
                            else
                            {
                                paperType = Utility.RandomMinMax(1, 12);
                            }
                        }
                        else if (rolls.ScrollType == 3)                           // BARD
                        {
                            paperType = Utility.RandomMinMax(82, 97);
                        }
                        else
                        {
                            if (rolls.ScrollLevel == 2)
                            {
                                paperType = Utility.RandomMinMax(68, 70);
                            }
                            else if (rolls.ScrollLevel == 3)
                            {
                                paperType = Utility.RandomMinMax(71, 73);
                            }
                            else if (rolls.ScrollLevel == 4)
                            {
                                paperType = Utility.RandomMinMax(74, 76);
                            }
                            else if (rolls.ScrollLevel == 5)
                            {
                                paperType = Utility.RandomMinMax(77, 79);
                            }
                            else if (rolls.ScrollLevel == 6)
                            {
                                paperType = Utility.RandomMinMax(80, 81);
                            }
                            else
                            {
                                paperType = Utility.RandomMinMax(65, 67);
                            }
                        }

                        string paperName = "";

                        if (Utility.RandomMinMax(1, 100) > 10)
                        {
                            if (paperType == 1)
                            {
                                from.AddToBackpack(new ReactiveArmorScroll()); paperName = "reactive armor";
                            }
                            else if (paperType == 2)
                            {
                                from.AddToBackpack(new ClumsyScroll()); paperName = "clumsy";
                            }
                            else if (paperType == 3)
                            {
                                from.AddToBackpack(new CreateFoodScroll()); paperName = "create food";
                            }
                            else if (paperType == 4)
                            {
                                from.AddToBackpack(new FeeblemindScroll()); paperName = "feeblemind";
                            }
                            else if (paperType == 5)
                            {
                                from.AddToBackpack(new HealScroll()); paperName = "heal";
                            }
                            else if (paperType == 6)
                            {
                                from.AddToBackpack(new MagicArrowScroll()); paperName = "magic arrow";
                            }
                            else if (paperType == 7)
                            {
                                from.AddToBackpack(new NightSightScroll()); paperName = "night sight";
                            }
                            else if (paperType == 8)
                            {
                                from.AddToBackpack(new WeakenScroll()); paperName = "weaken";
                            }
                            else if (paperType == 9)
                            {
                                from.AddToBackpack(new AgilityScroll()); paperName = "agility";
                            }
                            else if (paperType == 10)
                            {
                                from.AddToBackpack(new CunningScroll()); paperName = "cunning";
                            }
                            else if (paperType == 11)
                            {
                                from.AddToBackpack(new CureScroll()); paperName = "cure";
                            }
                            else if (paperType == 12)
                            {
                                from.AddToBackpack(new HarmScroll()); paperName = "harm";
                            }
                            else if (paperType == 13)
                            {
                                from.AddToBackpack(new MagicTrapScroll()); paperName = "magic trap";
                            }
                            else if (paperType == 14)
                            {
                                from.AddToBackpack(new MagicUnTrapScroll()); paperName = "magic untrap";
                            }
                            else if (paperType == 15)
                            {
                                from.AddToBackpack(new ProtectionScroll()); paperName = "protection";
                            }
                            else if (paperType == 16)
                            {
                                from.AddToBackpack(new StrengthScroll()); paperName = "strength";
                            }
                            else if (paperType == 17)
                            {
                                from.AddToBackpack(new BlessScroll()); paperName = "bless";
                            }
                            else if (paperType == 18)
                            {
                                from.AddToBackpack(new FireballScroll()); paperName = "fireball";
                            }
                            else if (paperType == 19)
                            {
                                from.AddToBackpack(new MagicLockScroll()); paperName = "magic lock";
                            }
                            else if (paperType == 20)
                            {
                                from.AddToBackpack(new PoisonScroll()); paperName = "poison";
                            }
                            else if (paperType == 21)
                            {
                                from.AddToBackpack(new TelekinisisScroll()); paperName = "telekinesis";
                            }
                            else if (paperType == 22)
                            {
                                from.AddToBackpack(new TeleportScroll()); paperName = "teleport";
                            }
                            else if (paperType == 23)
                            {
                                from.AddToBackpack(new UnlockScroll()); paperName = "unlock";
                            }
                            else if (paperType == 24)
                            {
                                from.AddToBackpack(new WallOfStoneScroll()); paperName = "wall of stone";
                            }
                            else if (paperType == 25)
                            {
                                from.AddToBackpack(new ArchCureScroll()); paperName = "arch cure";
                            }
                            else if (paperType == 26)
                            {
                                from.AddToBackpack(new ArchProtectionScroll()); paperName = "arch protection";
                            }
                            else if (paperType == 27)
                            {
                                from.AddToBackpack(new CurseScroll()); paperName = "curse";
                            }
                            else if (paperType == 28)
                            {
                                from.AddToBackpack(new FireFieldScroll()); paperName = "fire field";
                            }
                            else if (paperType == 29)
                            {
                                from.AddToBackpack(new GreaterHealScroll()); paperName = "greater heal";
                            }
                            else if (paperType == 30)
                            {
                                from.AddToBackpack(new LightningScroll()); paperName = "lightning";
                            }
                            else if (paperType == 31)
                            {
                                from.AddToBackpack(new ManaDrainScroll()); paperName = "mana drain";
                            }
                            else if (paperType == 32)
                            {
                                from.AddToBackpack(new RecallScroll()); paperName = "recall";
                            }
                            else if (paperType == 33)
                            {
                                from.AddToBackpack(new BladeSpiritsScroll()); paperName = "blade spirits";
                            }
                            else if (paperType == 34)
                            {
                                from.AddToBackpack(new DispelFieldScroll()); paperName = "dispel field";
                            }
                            else if (paperType == 35)
                            {
                                from.AddToBackpack(new IncognitoScroll()); paperName = "incognito";
                            }
                            else if (paperType == 36)
                            {
                                from.AddToBackpack(new MagicReflectScroll()); paperName = "magic reflect";
                            }
                            else if (paperType == 37)
                            {
                                from.AddToBackpack(new MindBlastScroll()); paperName = "mind blast";
                            }
                            else if (paperType == 38)
                            {
                                from.AddToBackpack(new ParalyzeScroll()); paperName = "paralyze";
                            }
                            else if (paperType == 39)
                            {
                                from.AddToBackpack(new PoisonFieldScroll()); paperName = "poison field";
                            }
                            else if (paperType == 40)
                            {
                                from.AddToBackpack(new SummonCreatureScroll()); paperName = "summon creature";
                            }
                            else if (paperType == 41)
                            {
                                from.AddToBackpack(new DispelScroll()); paperName = "dispel";
                            }
                            else if (paperType == 42)
                            {
                                from.AddToBackpack(new EnergyBoltScroll()); paperName = "energy bolt";
                            }
                            else if (paperType == 43)
                            {
                                from.AddToBackpack(new ExplosionScroll()); paperName = "explosion";
                            }
                            else if (paperType == 44)
                            {
                                from.AddToBackpack(new InvisibilityScroll()); paperName = "invisibility";
                            }
                            else if (paperType == 45)
                            {
                                from.AddToBackpack(new MarkScroll()); paperName = "mark";
                            }
                            else if (paperType == 46)
                            {
                                from.AddToBackpack(new MassCurseScroll()); paperName = "mass curse";
                            }
                            else if (paperType == 47)
                            {
                                from.AddToBackpack(new ParalyzeFieldScroll()); paperName = "paralyze field";
                            }
                            else if (paperType == 48)
                            {
                                from.AddToBackpack(new RevealScroll()); paperName = "reveal";
                            }
                            else if (paperType == 49)
                            {
                                from.AddToBackpack(new ChainLightningScroll()); paperName = "chain lightning";
                            }
                            else if (paperType == 50)
                            {
                                from.AddToBackpack(new EnergyFieldScroll()); paperName = "energy field";
                            }
                            else if (paperType == 51)
                            {
                                from.AddToBackpack(new FlamestrikeScroll()); paperName = "flamestrike";
                            }
                            else if (paperType == 52)
                            {
                                from.AddToBackpack(new GateTravelScroll()); paperName = "gate travel";
                            }
                            else if (paperType == 53)
                            {
                                from.AddToBackpack(new ManaVampireScroll()); paperName = "mana vampire";
                            }
                            else if (paperType == 54)
                            {
                                from.AddToBackpack(new MassDispelScroll()); paperName = "mass dispel";
                            }
                            else if (paperType == 55)
                            {
                                from.AddToBackpack(new MeteorSwarmScroll()); paperName = "meteor swarm";
                            }
                            else if (paperType == 56)
                            {
                                from.AddToBackpack(new PolymorphScroll()); paperName = "polymorph";
                            }
                            else if (paperType == 57)
                            {
                                from.AddToBackpack(new EarthquakeScroll()); paperName = "earthquake";
                            }
                            else if (paperType == 58)
                            {
                                from.AddToBackpack(new EnergyVortexScroll()); paperName = "energy vortex";
                            }
                            else if (paperType == 59)
                            {
                                from.AddToBackpack(new ResurrectionScroll()); paperName = "resurrection";
                            }
                            else if (paperType == 60)
                            {
                                from.AddToBackpack(new SummonAirElementalScroll()); paperName = "summon air elemental";
                            }
                            else if (paperType == 61)
                            {
                                from.AddToBackpack(new SummonDaemonScroll()); paperName = "summon daemon";
                            }
                            else if (paperType == 62)
                            {
                                from.AddToBackpack(new SummonEarthElementalScroll()); paperName = "summon earth elemental";
                            }
                            else if (paperType == 63)
                            {
                                from.AddToBackpack(new SummonFireElementalScroll()); paperName = "summon fire elemental";
                            }
                            else if (paperType == 64)
                            {
                                from.AddToBackpack(new SummonWaterElementalScroll()); paperName = "summon water elemental";
                            }
                            else if (paperType == 65)
                            {
                                from.AddToBackpack(new CurseWeaponScroll()); paperName = "curse weapon";
                            }
                            else if (paperType == 66)
                            {
                                from.AddToBackpack(new BloodOathScroll()); paperName = "blood oath";
                            }
                            else if (paperType == 67)
                            {
                                from.AddToBackpack(new CorpseSkinScroll()); paperName = "corpse skin";
                            }
                            else if (paperType == 68)
                            {
                                from.AddToBackpack(new EvilOmenScroll()); paperName = "evil omen";
                            }
                            else if (paperType == 69)
                            {
                                from.AddToBackpack(new PainSpikeScroll()); paperName = "pain spike";
                            }
                            else if (paperType == 70)
                            {
                                from.AddToBackpack(new WraithFormScroll()); paperName = "wraith form";
                            }
                            else if (paperType == 71)
                            {
                                from.AddToBackpack(new MindRotScroll()); paperName = "mind rot";
                            }
                            else if (paperType == 72)
                            {
                                from.AddToBackpack(new SummonFamiliarScroll()); paperName = "summon familiar";
                            }
                            else if (paperType == 73)
                            {
                                from.AddToBackpack(new AnimateDeadScroll()); paperName = "animate dead";
                            }
                            else if (paperType == 74)
                            {
                                from.AddToBackpack(new HorrificBeastScroll()); paperName = "horrific beast";
                            }
                            else if (paperType == 75)
                            {
                                from.AddToBackpack(new PoisonStrikeScroll()); paperName = "poison strike";
                            }
                            else if (paperType == 76)
                            {
                                from.AddToBackpack(new WitherScroll()); paperName = "wither";
                            }
                            else if (paperType == 77)
                            {
                                from.AddToBackpack(new StrangleScroll()); paperName = "strangle";
                            }
                            else if (paperType == 78)
                            {
                                from.AddToBackpack(new LichFormScroll()); paperName = "lich form";
                            }
                            else if (paperType == 79)
                            {
                                from.AddToBackpack(new ExorcismScroll()); paperName = "exorcism";
                            }
                            else if (paperType == 80)
                            {
                                from.AddToBackpack(new VengefulSpiritScroll()); paperName = "vengeful spirit";
                            }
                            else if (paperType == 81)
                            {
                                from.AddToBackpack(new VampiricEmbraceScroll()); paperName = "vampiric embrace";
                            }
                            else if (paperType == 82)
                            {
                                from.AddToBackpack(new ArmysPaeonScroll()); paperName = "army's paeon sheet music";
                            }
                            else if (paperType == 83)
                            {
                                from.AddToBackpack(new EnchantingEtudeScroll()); paperName = "enchanting etude sheet music";
                            }
                            else if (paperType == 84)
                            {
                                from.AddToBackpack(new EnergyCarolScroll()); paperName = "energy carol sheet music";
                            }
                            else if (paperType == 85)
                            {
                                from.AddToBackpack(new EnergyThrenodyScroll()); paperName = "energy threnody sheet music";
                            }
                            else if (paperType == 86)
                            {
                                from.AddToBackpack(new FireCarolScroll()); paperName = "fire carol sheet music";
                            }
                            else if (paperType == 87)
                            {
                                from.AddToBackpack(new FireThrenodyScroll()); paperName = "fire threnody sheet music";
                            }
                            else if (paperType == 88)
                            {
                                from.AddToBackpack(new FoeRequiemScroll()); paperName = "foe requiem sheet music";
                            }
                            else if (paperType == 89)
                            {
                                from.AddToBackpack(new IceCarolScroll()); paperName = "ice carol sheet music";
                            }
                            else if (paperType == 90)
                            {
                                from.AddToBackpack(new IceThrenodyScroll()); paperName = "ice threnody sheet music";
                            }
                            else if (paperType == 91)
                            {
                                from.AddToBackpack(new KnightsMinneScroll()); paperName = "knight's minne sheet music";
                            }
                            else if (paperType == 92)
                            {
                                from.AddToBackpack(new MagesBalladScroll()); paperName = "mage's ballad sheet music";
                            }
                            else if (paperType == 93)
                            {
                                from.AddToBackpack(new MagicFinaleScroll()); paperName = "magic finale sheet music";
                            }
                            else if (paperType == 94)
                            {
                                from.AddToBackpack(new PoisonCarolScroll()); paperName = "poison carol sheet music";
                            }
                            else if (paperType == 95)
                            {
                                from.AddToBackpack(new PoisonThrenodyScroll()); paperName = "poison threnody sheet music";
                            }
                            else if (paperType == 96)
                            {
                                from.AddToBackpack(new SheepfoeMamboScroll()); paperName = "shepherd's dance sheet music";
                            }
                            else
                            {
                                from.AddToBackpack(new SinewyEtudeScroll()); paperName = "sinewy etude sheet music";
                            }

                            m_Scribe.SayTo(from, "This seems to be a scroll of " + paperName + ".");
                        }
                        else
                        {
                            int nJunk = Utility.RandomMinMax(1, 6);

                            switch (nJunk)
                            {
                            case 1: paperName = "useless scribbles"; break;

                            case 2: paperName = "a useless recipe"; break;

                            case 3: paperName = "a useless list of monsters"; break;

                            case 4: paperName = "useless writings"; break;

                            case 5: paperName = "a useless drawing"; break;

                            case 6: paperName = "a useless map"; break;
                            }
                            m_Scribe.SayTo(from, "This seems to be " + paperName + ".");
                        }

                        rolls.Delete();
                    }
                    else
                    {
                        m_Scribe.SayTo(from, "It would cost you {0} gold to have that identified.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                else if (targeted is ScrollClue)
                {
                    Container packs = from.Backpack;
                    nCost = 100;
                    ScrollClue WhatIsIt = (ScrollClue)targeted;

                    if (BeggingPose(from) > 0)                       // LET US SEE IF THEY ARE BEGGING - WIZARD
                    {
                        nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); if (nCost < 1)
                        {
                            nCost = 1;
                        }
                    }
                    int toConsume = nCost;

                    if (WhatIsIt.ScrollIntelligence == 0)
                    {
                        m_Scribe.SayTo(from, "That was already deciphered by someone.");
                    }
                    else if (packs.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        if (WhatIsIt.ScrollIntelligence >= 80)
                        {
                            WhatIsIt.Name = "diabolically coded parchment";
                        }
                        else if (WhatIsIt.ScrollIntelligence >= 70)
                        {
                            WhatIsIt.Name = "ingeniously coded parchment";
                        }
                        else if (WhatIsIt.ScrollIntelligence >= 60)
                        {
                            WhatIsIt.Name = "deviously coded parchment";
                        }
                        else if (WhatIsIt.ScrollIntelligence >= 50)
                        {
                            WhatIsIt.Name = "cleverly coded parchment";
                        }
                        else if (WhatIsIt.ScrollIntelligence >= 40)
                        {
                            WhatIsIt.Name = "adeptly coded parchment";
                        }
                        else if (WhatIsIt.ScrollIntelligence >= 30)
                        {
                            WhatIsIt.Name = "expertly coded parchment";
                        }
                        else
                        {
                            WhatIsIt.Name = "plainly coded parchment";
                        }

                        WhatIsIt.ScrollIntelligence = 0;
                        WhatIsIt.InvalidateProperties();
                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                        m_Scribe.SayTo(from, "Let me show you what this reads...");
                        WhatIsIt.ScrollSolved = "Deciphered by " + m_Scribe.Name + " the Scribe";
                        from.PlaySound(0x249);
                        WhatIsIt.InvalidateProperties();
                    }
                    else
                    {
                        m_Scribe.SayTo(from, "It would cost you {0} gold to have that deciphered.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                else
                {
                    m_Scribe.SayTo(from, "That does not need my services.");
                }
            }
Beispiel #2
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                bool consume = false;

                if (targeted is ScrollClue)
                {
                    ScrollClue scroll = (ScrollClue)targeted;
                    consume = true;
                    from.PlaySound(0xF9);

                    if (scroll.ScrollIntelligence > 0)
                    {
                        from.SendMessage("That parchment hasn't been deciphered yet.");
                    }
                    else
                    {
                        string WillSay = "";

                        switch (Utility.RandomMinMax(0, 3))
                        {
                        case 0: WillSay = "The spirits tell you that this parchment is"; break;

                        case 1: WillSay = "Your mind is showing you that this parchment is"; break;

                        case 2: WillSay = "The voices all speak that this parchment is"; break;

                        case 3: WillSay = "You can see beyond that this parchment is"; break;
                        }

                        if (scroll.ScrollTrue == 1)
                        {
                            from.SendMessage(WillSay + " truthfully written.");
                        }
                        else
                        {
                            from.SendMessage(WillSay + " falsely written.");
                        }
                    }
                }
                ///////////////////////////////////////////////////////////////////////////////////
                else if (targeted is SearchPage)
                {
                    SearchPage scroll = (SearchPage)targeted;
                    consume = true;
                    from.PlaySound(0xF9);

                    string WillSay = "";

                    switch (Utility.RandomMinMax(0, 3))
                    {
                    case 0: WillSay = "The spirits tell you that this legend "; break;

                    case 1: WillSay = "Your mind is showing you that this legend "; break;

                    case 2: WillSay = "The voices all speak that this legend "; break;

                    case 3: WillSay = "You can see beyond that this legend "; break;
                    }

                    if (scroll.LegendReal == 1)
                    {
                        from.SendMessage(WillSay + " really happened.");
                    }
                    else
                    {
                        from.SendMessage(WillSay + " never happened.");
                    }
                }
                ///////////////////////////////////////////////////////////////////////////////////
                else if (targeted is DynamicBook)
                {
                    DynamicBook scroll = (DynamicBook)targeted;
                    consume = true;
                    from.PlaySound(0xF9);

                    string WillSay = "";

                    switch (Utility.RandomMinMax(0, 3))
                    {
                    case 0: WillSay = "The spirits tell you that this book "; break;

                    case 1: WillSay = "Your mind is showing you that this book "; break;

                    case 2: WillSay = "The voices all speak that this book "; break;

                    case 3: WillSay = "You can see beyond that this book "; break;
                    }

                    if (scroll.BookTrue > 0)
                    {
                        from.SendMessage(WillSay + " contains the truth.");
                    }
                    else
                    {
                        from.SendMessage(WillSay + " contains falsehoods.");
                    }
                }
                ///////////////////////////////////////////////////////////////////////////////////
                else if (targeted is SomeRandomNote)
                {
                    SomeRandomNote scroll = (SomeRandomNote)targeted;
                    consume = true;
                    from.PlaySound(0xF9);

                    string WillSay = "";

                    switch (Utility.RandomMinMax(0, 3))
                    {
                    case 0: WillSay = "The spirits tell you that this parchment is"; break;

                    case 1: WillSay = "Your mind is showing you that this parchment is"; break;

                    case 2: WillSay = "The voices all speak that this parchment is"; break;

                    case 3: WillSay = "You can see beyond that this parchment is"; break;
                    }

                    if (scroll.ScrollTrue == 1)
                    {
                        from.SendMessage(WillSay + " truthfully written.");
                    }
                    else
                    {
                        from.SendMessage(WillSay + " falsely written.");
                    }
                }
                ///////////////////////////////////////////////////////////////////////////////////
                else if (targeted is DataPad)
                {
                    consume = true;
                    from.PlaySound(0xF9);
                    string WillSay = "";

                    switch (Utility.RandomMinMax(0, 3))
                    {
                    case 0: WillSay = "The spirits tell you that this glowing book is"; break;

                    case 1: WillSay = "Your mind is showing you that this glowing book is"; break;

                    case 2: WillSay = "The voices all speak that this glowing book is"; break;

                    case 3: WillSay = "You can see beyond that this glowing book is"; break;
                    }

                    from.SendMessage(WillSay + " truthfully written.");
                }
                ///////////////////////////////////////////////////////////////////////////////////
                else
                {
                    from.SendMessage("That is not a book or parchment.");
                }

                if (consume)
                {
                    Server.Misc.Research.ConsumeScroll(from, true, m_SpellIndex, false);
                }
                m_Owner.FinishSequence();
            }
Beispiel #3
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                Container pack = from.Backpack;

                int nCost  = 500;
                int nCost2 = 5000;

                if (BeggingPose(from) > 0)                   // LET US SEE IF THEY ARE BEGGING - WIZARD
                {
                    nCost  = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost);
                    nCost2 = nCost2 - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost2);
                }

                if (targeted is UnknownWand && from.Backpack != null)
                {
                    int toConsume = nCost;

                    if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));

                        if (Utility.RandomMinMax(1, 100) > 10)
                        {
                            Server.Items.UnknownWand.WandType((Item)targeted, from, m_Sage);
                        }
                        else
                        {
                            int    nJunk     = Utility.RandomMinMax(1, 5);
                            string stickName = "";
                            switch (nJunk)
                            {
                            case 1: stickName = "a useless stick"; break;

                            case 2: stickName = "a wand that was never enchanted"; break;

                            case 3: stickName = "a fake wand"; break;

                            case 4: stickName = "nothing magical at all"; break;

                            case 5: stickName = "a simple metal rod"; break;
                            }
                            m_Sage.SayTo(from, "This seems to be " + stickName + ".");
                        }
                        ((Item)targeted).Delete();
                    }
                    else
                    {
                        m_Sage.SayTo(from, "It would cost you {0} gold to have that identified.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                else if (targeted is UnidentifiedArtifact)
                {
                    Container packs = from.Backpack;
                    nCost2 = 5000;
                    UnidentifiedArtifact WhatIsIt = (UnidentifiedArtifact)targeted;

                    if (BeggingPose(from) > 0)                       // LET US SEE IF THEY ARE BEGGING - WIZARD
                    {
                        nCost2 = nCost2 - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost2); if (nCost2 < 1)
                        {
                            nCost2 = 1;
                        }
                    }
                    int toConsume = nCost2;

                    if (packs.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        Container   bpack = (Container)targeted;
                        List <Item> items = new List <Item>();
                        foreach (Item item in bpack.Items)
                        {
                            items.Add(item);
                        }
                        foreach (Item item in items)
                        {
                            from.AddToBackpack(item);
                        }
                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                        m_Sage.SayTo(from, "Let me tell you about this artifact...");
                        WhatIsIt.Delete();
                    }
                    else
                    {
                        m_Sage.SayTo(from, "It would cost you {0} gold to have that identified.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                else if (targeted is UnidentifiedItem)
                {
                    Container packs = from.Backpack;
                    nCost = 200;
                    UnidentifiedItem WhatIsIt = (UnidentifiedItem)targeted;

                    if (BeggingPose(from) > 0)                       // LET US SEE IF THEY ARE BEGGING - WIZARD
                    {
                        nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); if (nCost < 1)
                        {
                            nCost = 1;
                        }
                    }
                    int toConsume = nCost;

                    if (WhatIsIt.VendorCanID != "Sage")
                    {
                        m_Sage.SayTo(from, "Sorry, I cannot tell what that is.");
                    }
                    else if (packs.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        Container   bpack = (Container)targeted;
                        List <Item> items = new List <Item>();
                        foreach (Item item in bpack.Items)
                        {
                            items.Add(item);
                        }
                        foreach (Item item in items)
                        {
                            from.AddToBackpack(item);
                        }
                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                        m_Sage.SayTo(from, "Let me tell you about this item...");
                        WhatIsIt.Delete();
                    }
                    else
                    {
                        m_Sage.SayTo(from, "It would cost you {0} gold to have that identified.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                else if (targeted is ScrollClue)
                {
                    Container packs = from.Backpack;
                    nCost = 100;
                    ScrollClue WhatIsIt = (ScrollClue)targeted;

                    if (BeggingPose(from) > 0)                       // LET US SEE IF THEY ARE BEGGING - WIZARD
                    {
                        nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); if (nCost < 1)
                        {
                            nCost = 1;
                        }
                    }
                    int toConsume = nCost;

                    if (WhatIsIt.ScrollIntelligence == 0)
                    {
                        m_Sage.SayTo(from, "That was already deciphered by someone.");
                    }
                    else if (packs.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        if (WhatIsIt.ScrollIntelligence >= 80)
                        {
                            WhatIsIt.Name = "diabolically coded parchment";
                        }
                        else if (WhatIsIt.ScrollIntelligence >= 70)
                        {
                            WhatIsIt.Name = "ingeniously coded parchment";
                        }
                        else if (WhatIsIt.ScrollIntelligence >= 60)
                        {
                            WhatIsIt.Name = "deviously coded parchment";
                        }
                        else if (WhatIsIt.ScrollIntelligence >= 50)
                        {
                            WhatIsIt.Name = "cleverly coded parchment";
                        }
                        else if (WhatIsIt.ScrollIntelligence >= 40)
                        {
                            WhatIsIt.Name = "adeptly coded parchment";
                        }
                        else if (WhatIsIt.ScrollIntelligence >= 30)
                        {
                            WhatIsIt.Name = "expertly coded parchment";
                        }
                        else
                        {
                            WhatIsIt.Name = "plainly coded parchment";
                        }

                        WhatIsIt.ScrollIntelligence = 0;
                        WhatIsIt.InvalidateProperties();
                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                        m_Sage.SayTo(from, "Let me show you what this reads...");
                        WhatIsIt.ScrollSolved = "Deciphered by " + m_Sage.Name + " the Librarian";
                        from.PlaySound(0x249);
                        WhatIsIt.InvalidateProperties();
                    }
                    else
                    {
                        m_Sage.SayTo(from, "It would cost you {0} gold to have that deciphered.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                else
                {
                    m_Sage.SayTo(from, "That does not need my services.");
                }
            }
Beispiel #4
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                Container pack = from.Backpack;

                if (targeted is ScrollClue)
                {
                    ScrollClue scroll = (ScrollClue)targeted;

                    int nCost = scroll.ScrollLevel * 100;

                    if (BaseVendor.BeggingPose(from) > 0)                       // LET US SEE IF THEY ARE BEGGING - WIZARD
                    {
                        nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost);
                    }

                    int toConsume = nCost;

                    if (scroll.ScrollIntelligence > 0)
                    {
                        m_GypsyLady.SayTo(from, "That parchment hasn't been deciphered yet.");
                    }
                    else if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        string WillSay = "";

                        switch (Utility.RandomMinMax(0, 3))
                        {
                        case 0: WillSay = "The spirits tell me that this parchment is"; break;

                        case 1: WillSay = "My mind is showing me that this parchment is"; break;

                        case 2: WillSay = "The voices all speak that this parchment is"; break;

                        case 3: WillSay = "I can see beyond that this parchment is"; break;
                        }

                        if (scroll.ScrollTrue == 1)
                        {
                            m_GypsyLady.SayTo(from, WillSay + " truthfully written.");
                        }
                        else
                        {
                            m_GypsyLady.SayTo(from, WillSay + " falsely written.");
                        }

                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                    }
                    else
                    {
                        m_GypsyLady.SayTo(from, "I require {0} gold for my visions.", toConsume);
                    }
                }
                ///////////////////////////////////////////////////////////////////////////////////
                else if (targeted is SearchPage)
                {
                    SearchPage scroll = (SearchPage)targeted;

                    int nCost = (100 - scroll.LegendPercent) * 50;

                    if (BaseVendor.BeggingPose(from) > 0)                       // LET US SEE IF THEY ARE BEGGING - WIZARD
                    {
                        nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost);
                    }

                    int toConsume = nCost;

                    if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        string WillSay = "";

                        switch (Utility.RandomMinMax(0, 3))
                        {
                        case 0: WillSay = "The spirits tell me that this legend "; break;

                        case 1: WillSay = "My mind is showing me that this legend "; break;

                        case 2: WillSay = "The voices all speak that this legend "; break;

                        case 3: WillSay = "I can see beyond that this legend "; break;
                        }

                        if (scroll.LegendReal == 1)
                        {
                            m_GypsyLady.SayTo(from, WillSay + " really happened.");
                        }
                        else
                        {
                            m_GypsyLady.SayTo(from, WillSay + " never happened.");
                        }

                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                    }
                    else
                    {
                        m_GypsyLady.SayTo(from, "I require {0} gold for my visions.", toConsume);
                    }
                }
                ///////////////////////////////////////////////////////////////////////////////////
                else if (targeted is DynamicBook)
                {
                    DynamicBook scroll = (DynamicBook)targeted;

                    int nCost = (scroll.BookPower + 1) * 50;

                    if (BaseVendor.BeggingPose(from) > 0)                       // LET US SEE IF THEY ARE BEGGING - WIZARD
                    {
                        nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost);
                    }

                    int toConsume = nCost;

                    if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        string WillSay = "";

                        switch (Utility.RandomMinMax(0, 3))
                        {
                        case 0: WillSay = "The spirits tell me that this book "; break;

                        case 1: WillSay = "My mind is showing me that this book "; break;

                        case 2: WillSay = "The voices all speak that this book "; break;

                        case 3: WillSay = "I can see beyond that this book "; break;
                        }

                        if (scroll.BookTrue > 0)
                        {
                            m_GypsyLady.SayTo(from, WillSay + " contains the truth.");
                        }
                        else
                        {
                            m_GypsyLady.SayTo(from, WillSay + " contains falsehoods.");
                        }

                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                    }
                    else
                    {
                        m_GypsyLady.SayTo(from, "I require {0} gold for my visions.", toConsume);
                    }
                }
                ///////////////////////////////////////////////////////////////////////////////////
                else if (targeted is SomeRandomNote)
                {
                    SomeRandomNote scroll = (SomeRandomNote)targeted;

                    int nCost = 100;

                    if (BaseVendor.BeggingPose(from) > 0)                       // LET US SEE IF THEY ARE BEGGING - WIZARD
                    {
                        nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost);
                    }

                    int toConsume = nCost;

                    if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        string WillSay = "";

                        switch (Utility.RandomMinMax(0, 3))
                        {
                        case 0: WillSay = "The spirits tell me that this parchment is"; break;

                        case 1: WillSay = "My mind is showing me that this parchment is"; break;

                        case 2: WillSay = "The voices all speak that this parchment is"; break;

                        case 3: WillSay = "I can see beyond that this parchment is"; break;
                        }

                        if (scroll.ScrollTrue == 1)
                        {
                            m_GypsyLady.SayTo(from, WillSay + " truthfully written.");
                        }
                        else
                        {
                            m_GypsyLady.SayTo(from, WillSay + " falsely written.");
                        }

                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                    }
                    else
                    {
                        m_GypsyLady.SayTo(from, "I require {0} gold for my visions.", toConsume);
                    }
                }
                ///////////////////////////////////////////////////////////////////////////////////
                else if (targeted is DataPad)
                {
                    int nCost = 100;

                    if (BaseVendor.BeggingPose(from) > 0)                       // LET US SEE IF THEY ARE BEGGING - WIZARD
                    {
                        nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost);
                    }

                    int toConsume = nCost;

                    if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        string WillSay = "";

                        switch (Utility.RandomMinMax(0, 3))
                        {
                        case 0: WillSay = "The spirits tell me that this glowing book is"; break;

                        case 1: WillSay = "My mind is showing me that this glowing book is"; break;

                        case 2: WillSay = "The voices all speak that this glowing book is"; break;

                        case 3: WillSay = "I can see beyond that this glowing book is"; break;
                        }

                        m_GypsyLady.SayTo(from, WillSay + " truthfully written.");

                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                    }
                    else
                    {
                        m_GypsyLady.SayTo(from, "I require {0} gold for my visions.", toConsume);
                    }
                }
                ///////////////////////////////////////////////////////////////////////////////////
                else
                {
                    m_GypsyLady.SayTo(from, "That is not a parchment.");
                }
            }