Alphas Gold Ledger 2.0 rc1

Discussion in 'Custom Script Releases [ARCHIVE]' started by prplbeast, Nov 12, 2007.

  1. prplbeast

    prplbeast Sorceror

    Messages:
    885
    Alphas Gold Ledger 2.0 rc1

    This is all "Joeku" AKA "Demortris"
    all we did was update it to work wit 2.0
    all credit goes to him for a great script
    we just wanted it for our 2.0 shards so we did what we needed to get it to work
    thanks Joeku

    Was updated by Callandor2k & my self

    *edit* ok everyone who has not got this working please redownload it & give this a try. i guess there was an issue with the claim.cs & claimconfig.cs where it was either throughing errors or would not use the [cl or [gr.

    Attached Files:

  2. AutomatedPOM

    AutomatedPOM Page

    Messages:
    1,088
    Im sorry, whats it do?

    TY
  3. prplbeast

    prplbeast Sorceror

    Messages:
    885
    well it holds gold
    it also will pick up gold piles off the ground for u when u walk over them & it also auto loots when u kill a monster
    when u walk over a pile or kill something it takes the gold & adds it to the ledger im also curently trying to get it to add the gold when u use the [claim or [grab commands to make it work better & help clean the shards faster
    sorry was half a sleep when i posted & forgot to tell what it does
  4. Byteme

    Byteme Wanderer

    Messages:
    132
    The gold ledger book is not auto picking up the gold or looting from monters. I can do it manually. It is set for gold sweeper enabled and gold looting automatic. Any ideas why it isn't working?
  5. prplbeast

    prplbeast Sorceror

    Messages:
    885
    did u make all the distro mods couse i have it working on 3 differant 2.0 rc1 shards
    for it to auto loot u need to mod the basecreature.cs
    if u look in the scripts it shows where the mods have been made & where to put them also if u did make the mods make sure u put them in the right spot cause if they r off they wont work
  6. Aurboda

    Aurboda Sorceror

    Messages:
    175
    This is wonderful thank you very much. Many players greatly appreciate this.!
  7. Aurboda

    Aurboda Sorceror

    Messages:
    175
    Email sent to me from a player:

    octavian

    To fix this glitch:

    find this line:
    Code:
                if (!ledger.GoldSweeper || !GoldLedger.GoldSweeperAvailable )
                    return;
    and replace with:
    Code:
                if (!ledger.GoldSweeper || !GoldLedger.GoldSweeperAvailable || !gold.Movable)
                    return;
    Another comment recieved on shard forum:

  8. Callandor2k

    Callandor2k Sorceror

    Messages:
    1,871
    Update for the ledger.

    Beast is unable to respond at this time so I updated the files to incorporate these modifications.

    Thanks for the info on the exploits and buggs. If ya find anymore just let us know and we will fix them.

    Attached Files:

  9. prplbeast

    prplbeast Sorceror

    Messages:
    885
    thanks for the updates
    very sorry that i could not get to it & get it fixed
    as we here in aberdeen washington got hit very hard by the storm on monday
    & took out power to the area
  10. Mystical Sorceress

    Mystical Sorceress Wanderer

    Messages:
    15
    Errors after installing

    okay, I over wrote the files that were needed and restarted my shard, however I got these errors and warnings:

    Scripts: Compiling C# scripts...failed (1 errors, 1 warnings)
    Warnings:
    + ME Custom/Quests/Tony's Pet Leash/Tony.cs:
    CS0105: Line 10: The using directive for 'Server.ContextMenus' appeared prev
    iously in this namespace
    Errors:
    + ME Custom/Daat99s/Scripts/Custom/Daat99OWLTR/Mule.cs:
    CS0115: Line 84: 'Server.Mobiles.Mule.OnBeforeTame()': no suitable method fo
    und to override

    if I take out the quest for Tony's Pet Leash, I only get the one error which is the Mule.cs error. I prefer to keep Tony's Pet Leash. I know how to correct some errors in scripts, but I have never seen this one before. I am new to this so I don't really understand what all to do to correct this. Any and all help would be greatly appreciated.
  11. dagan1545

    dagan1545 Wanderer

    Messages:
    322
    This is a very nice script !!! But is there anyway to drop the weight of the gold to players ledger and to up the amount the ledger can hold
  12. cjpainter1

    cjpainter1 Sorceror

    Messages:
    285
    How to modify the grabcommand for it to in Gold Ledger

    :confused: ok I have the [grab command and now I want the gold to go in the gold ledger and see nothing that I would could change. But of course Im far from a scipt writer, not even close. Could 1 of you master minds help?:)
  13. cjpainter1

    cjpainter1 Sorceror

    Messages:
    285
    I feal really stupid now........

    :eek: Now I feel really inexperienced, It does loot and go into gold ledger. I was fighting Lord Oaks, my bad again. sorry for useless post guys
  14. test444

    test444 Wanderer

    Messages:
    1,416
    Man thank you, and Demortris for your contribution, this is the one of bests addons here on runuo... very nice and friendly and powerful interface... i just changed the base to strongbox, i like it more, but anyway, cool contribution!
  15. TattooedLioness

    TattooedLioness Sorceror

    Messages:
    438
    I am having the BIGGEST issuse with this ledgar. If people are overweight they can extract a check and keep doing it and in seconds they have Millions in gold. So i removed the fact no one can extract checks well now they can do it with gold they can be over weight and next thing they keep withdrawing and in seconds they have millions and millions of gold pilled in there backpacks. please help Im so bout to pull this from ym shard :(
  16. prplbeast

    prplbeast Sorceror

    Messages:
    885
    did u edit this in anyway?
    i have been using this for years now & have no issues like this at all. if my players try to do way ur talking about it wont let them if they are heavy
    plz post the files ur using from ur server also what version of runuo are u using.
    i made the mods with help for this to work on runuo rc1 & im using it on my server which is the newest SVN
  17. TattooedLioness

    TattooedLioness Sorceror

    Messages:
    438
    Im using RC2. I think i ddi the edits right. I did however change the wieght it reduces Could that be it?

    Code:
    /**************************************
    *Script Name: Alpha Gold Ledger       *
    *Author: Joeku AKA Demortris          *
    *For use with RunUO 1.0.0             *
    *Client Tested with: 5.0.2b           *
    *Version: 1.6                         *
    *Initial Release: 01/30/06            *
    *Revision Date: 06/04/06              *
    **************************************/
    
    using System;
    using System.Collections;
    using Server;
    using Server.Targeting;
    using Server.Mobiles;
    using Server.Gumps;
    using Server.Misc;
    using Server.Network;
    
    namespace Server.Items
    {
        public class GoldLedger : Item
        {
            public const double GoldWeight = 0.02;
            public const bool GoldAutoLootAvailable = true;
            public const bool GoldSweeperAvailable = true;
            public double d_WeightScale = 0.00001;
            public bool b_open = false;
            private int i_Gold;
            private bool b_GoldAutoLoot = true;
            private bool b_GoldSweeper = true;
            public int i_Selection = 0;
    
            [CommandProperty(AccessLevel.GameMaster)]
            public int Gold
            {
                get { return i_Gold; }
                set
                {
                    if (value > 999999999)
                        i_Gold = 999999999;
                    else if (value < 0)
                        i_Gold = 0;
                    else
                        i_Gold = value;
                    //TotalGold = i_Gold;
                    this.AppendWeight();
                    InvalidateProperties();
                }
            }
            [CommandProperty(AccessLevel.GameMaster)]
            public bool GoldAutoLoot { get { return b_GoldAutoLoot; } set { b_GoldAutoLoot = value; InvalidateProperties(); } }
            [CommandProperty(AccessLevel.GameMaster)]
            public bool GoldSweeper { get { return b_GoldSweeper; } set { b_GoldSweeper = value; InvalidateProperties(); } }
            [CommandProperty(AccessLevel.GameMaster)]
            public double WeightScale { get { return d_WeightScale; } set { d_WeightScale = value; this.AppendWeight(); } }
    
            public override bool ForceShowProperties { get { return ObjectPropertyList.Enabled; } }
    
            [Constructable]
            public GoldLedger()
                : base(7714)
            {
                Name = "a gold ledger";
                Hue = 2125;
                Weight = 1;
                LootType = LootType.Blessed;
            }
    
            public override void UpdateTotals()
            {
                base.UpdateTotals();
    
                //SetTotalGold(this.Gold);
            }
    
            public override void OnDoubleClick(Mobile from)
            {
                if (this.IsChildOf(from.Backpack))
                {
                    from.CloseGump(typeof(GoldLedgerGump));
                    from.SendGump(new GoldLedgerGump(this));
                    from.SendMessage(2125, "You open your gold ledger.");
                    this.b_open = true;
                }
                else
                    from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
            }
    
            public void BeginAddGold(Mobile from)
            {
                if (this.Gold >= 999999999)
                {
                    from.SendGump(new GoldLedgerGump(this));
                    from.SendMessage(2125, "You cannot deposit any more gold into this gold ledger.");
                    return;
                }
                from.Target = new AddGoldTarget(this);
                from.SendMessage(2125, "What do you wish to deposit? (ESC to cancel)");
            }
    
            public class AddGoldTarget : Target
            {
                private GoldLedger m_TL;
    
                public AddGoldTarget(GoldLedger tl)
                    : base(18, false, TargetFlags.None)
                {
                    m_TL = tl;
                }
    
                protected override void OnTarget(Mobile from, object targeted)
                {
                    if (m_TL.Deleted)
                        return;
                    m_TL.EndAddGold(from, targeted);
                }
            }
    
            public void EndAddGold(Mobile from, object obj)
            {
                from.CloseGump(typeof(GoldLedgerGump));
    
                if (obj is Item)
                {
                    Item item = obj as Item;
                    double maxWeight = (WeightOverloading.GetMaxWeight(from));
                    int golda = 0;
    
                    if (!this.IsChildOf(from.Backpack))
                    {
                        from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
                        return;
                    }
                    if (!item.IsAccessibleTo(from))
                    {
                        from.SendGump(new GoldLedgerGump(this));
                        from.SendLocalizedMessage(3000270); // That is not accessible.
                        return;
                    }
    
                    if (obj is Gold)
                    {
                        Gold gold = obj as Gold;
    
                        golda = gold.Amount;
                        if ((gold.Amount + this.Gold) > 999999999)
                            golda = (999999999 - this.Gold);
                        double maxgold = golda;
                        if (this.d_WeightScale > 0 && gold.RootParent != from)
                            maxgold = ((maxWeight - ((double)Mobile.BodyWeight + (double)from.TotalWeight)) / this.d_WeightScale);
                        if (golda > maxgold)
                            golda = (int)maxgold;
                        if (golda < gold.Amount)
                            gold.Amount -= golda;
                        else
                            gold.Delete();
    
                        this.Gold += golda;
    
                        from.SendGump(new GoldLedgerGump(this));
                        from.SendMessage(2125, String.Format("You deposit {0} gold into your gold ledger.", golda.ToString("#,0")));
                        from.PlaySound(0x249);
                    }
                    
                    else if (obj is GoldLedger && obj != this)
                    {
                        GoldLedger gledger = obj as GoldLedger;
    
                        golda = gledger.Gold;
                        if ((gledger.Gold + this.Gold) > 999999999)
                            golda = (999999999 - this.Gold);
                        double maxgold = golda;
                        if (this.d_WeightScale > 0)
                            maxgold = ((maxWeight - ((double)Mobile.BodyWeight + (double)from.TotalWeight)) / this.d_WeightScale);
                        if (golda > maxgold)
                            golda = (int)maxgold;
                        gledger.Gold -= golda;
    
                        this.Gold += golda;
    
                        from.SendGump(new GoldLedgerGump(this));
                        from.SendMessage(2125, String.Format("You transfer {0} gold into your gold ledger.", golda.ToString("#,0")));
                        from.PlaySound(0x249);
                    }
                    else
                    {
                        from.SendGump(new GoldLedgerGump(this));
                        from.SendMessage(2125, "You can only deposit gold into your gold ledger.");
                    }
                }
                else
                {
                    from.SendGump(new GoldLedgerGump(this));
                    from.SendMessage(2125, "You can only deposit gold into your gold ledger.");
                }
    
                from.SendMessage(2125, "Do you want to deposit anything else? (ESC to cancel)");
                from.Target = new AddGoldTarget(this);
            }
    
            public GoldLedger(Serial serial)
                : base(serial)
            {
            }
    
            public override void GetProperties(ObjectPropertyList list)
            {
                string weight = "" + (int)this.Weight;
    
                base.AddNameProperties(list);
    
                list.Add(1060738, this.Gold.ToString("#,0") + " Gold"); //value: ~1_val~
                if (this.GoldSweeper && GoldLedger.GoldSweeperAvailable)
                    list.Add(1060661, "Gold Sweeper\tEnabled");
                else if (!this.GoldSweeper && GoldLedger.GoldSweeperAvailable)
                    list.Add(1060661, "Gold Sweeper\tDisabled");
                if (this.GoldAutoLoot && GoldLedger.GoldAutoLootAvailable)
                    list.Add(1060660, "Gold Looting\tAutomatic");
                else if (!this.GoldAutoLoot && GoldLedger.GoldAutoLootAvailable)
                    list.Add(1060660, "Gold Looting\tManual");
                if (this.d_WeightScale > 0)
                {
                    if (this.Weight < 2 && this.Weight >= 1)
                        list.Add(1072788, weight);	//Weight: ~1_WEIGHT~ stone
                    else if (this.Weight >= 2)
                        list.Add(1072789, weight);	//Weight: ~1_WEIGHT~ stones
                }
            }
    
            public void AppendWeight()
            {
                double newweight = (this.Gold * this.d_WeightScale);
                this.Weight = newweight + 1;
            }
    
            public override bool OnDroppedToMobile(Mobile from, Mobile target)
            {
                Item item = target.Backpack.FindItemByType(typeof(GoldLedger));
    
                if (item != null)
                {
                    if (target == from)
                        from.SendMessage(2125, "You can only carry one gold ledger!");
                    else
                        from.SendMessage(2125, "That player can only carry one gold ledger!");
                    return false;
                }
    
                return true;
            }
    
            public override bool OnDroppedInto(Mobile from, Container target, Point3D p)
            {
                if (target == from.Backpack)
                {
                    Item item = from.Backpack.FindItemByType(typeof(GoldLedger));
    
                    if (item != null)
                    {
                        from.SendMessage(2125, "You can only carry one gold ledger!");
                        return false;
                    }
                }
    
                else if (target.IsChildOf(from.Backpack))
                {
                    Item item = from.Backpack.FindItemByType(typeof(GoldLedger));
    
                    if (item != null)
                    {
                        from.SendMessage(2125, "You can only carry one gold ledger!");
                        return false;
                    }
                }
    
                return target.OnDragDropInto(from, this, p);
            }
    
            public override bool OnDroppedOnto(Mobile from, Item target)
            {
                if (target == from.Backpack)
                {
                    Item item = from.Backpack.FindItemByType(typeof(GoldLedger));
    
                    if (item != null)
                    {
                        from.SendMessage(2125, "You can only carry one gold ledger!");
                        return false;
                    }
                }
    
  18. prplbeast

    prplbeast Sorceror

    Messages:
    885
    here try this one. not sure what happened in that one but it was way differant then the one i am using

    Attached Files:

  19. TattooedLioness

    TattooedLioness Sorceror

    Messages:
    438
    Thank you I really Appricate it.. i think that one I downlaoded thro another link amybe someone modded for RC2 but I appreciate it and thank you all fixed now :)
  20. prplbeast

    prplbeast Sorceror

    Messages:
    885
    np im glad its fixed & working right

    glad to help;)

Share This Page