RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Alphas Gold Ledger 2.0 rc1

prplbeast

Sorceror
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.
 

Attachments

  • Alpha Gold Ledger 2.0.rar
    186.6 KB · Views: 753

prplbeast

Sorceror
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
 

Byteme

Wanderer
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?
 

prplbeast

Sorceror
Byteme;724411 said:
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?

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
 

Aurboda

Sorceror
Email sent to me from a player:

If you lock down a pile of gold in your home. And someone walks over it .. The ledger will over ride the sercured or locked down command of the gold and grab it placing it in your ledger. figured I would let you know.
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:

Just found out that when the Gold Ledger is locked down or secured in a house, it does not display the popup details that show how much is in it anymore...

To combat this, I suggest making a small modification to AlphaGoldLedger.cs as outlined below:

Just above the [Constructable] on line 54, simply add (on it's own line naturally):
public override bool ForceShowProperties{ get{ return ObjectPropertyList.Enabled; } }

This single line will force the ledger to ALWAYS display the popup when the mouse is over it ;P

Best yet, it *should* not cause any issues with any ledgers currently in the game.

I was going to lock down my ledger that is filled to capacity, along with a single gold coin (to make the complete billion heh) but this one missing line of code stopped me from showing off

As always, Your servant,
Giric The Grey

-=-=-=-=-=-=-=-=-=-=-=-=-

- "Vegetables are not food. Vegetables are what food eats."

- "If we aren't supposed to eat animals, then why are they made from meat?"

- veg·e·tar·i·an - Ancient word meaning 'Lousy Hunter'.
 
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.
 

Attachments

  • Alpha Gold Ledger 2.0.rar
    178.2 KB · Views: 318

prplbeast

Sorceror
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
 
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.
 

dagan1545

Wanderer
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
 

cjpainter1

Sorceror
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?:)
 

cjpainter1

Sorceror
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
 

test444

Wanderer
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!
 
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 :(
 

prplbeast

Sorceror
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
 
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;
                }
            }
 

prplbeast

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

Attachments

  • Gold Ledger.cs
    39.2 KB · Views: 127
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 :)
 
Top