Resource icon

Ehanced Stealing Mod 1.0

Author
Kamras
Downloads
47
Views
1,535
First release
Last update
Rating
0.00 star(s) 0 ratings
No permission to download Join the discussion

More resources from Kamras

Requirements
XMLSpawner2
Description:
This is a system that evolved from the idea's of 'Frosttiger' as he developed the core modded version of this system. This is the XML Attachment version, no core mods required and is easily expanded. I will be adding expansions as time goes on to see what else I can do with this.

So what this does as of right now.. This attaches an XML Att to any item *any* that is stolen, then when *any* vendor that is setup using BaseVendor.cs tries to buy from you, they will ignore any item that has that attachment, bringing upon the idea you cannot sell stolen loot (using the steal command) to a vendor.

Plans for Change:
I will be adding a special vendor to 'fence' items at that have this attachment, and they will only buy items with this attachment. They will pay good money for this. These vendors are probably best put in hard to reach places to give value to stealing and selling on the 'black market'. (sounds a little RPISH =p)

Also to note, of course any stolen items can still be sold on player vendors like normal, a system to add penalties to those items or bonuses depending on the item might be put into place.

Current Known Issues:

1) If you add an item to a stack that has the attachment, the full stack will have the attachment so nothing of that stack can be sold. So issue only exist with stacked items, I'm working on a way to separate this properly, maybe make the stolen item not stackable. If you take apart the stack, the item with the attachment also gets separated, thus the stack can be sold again.

Instructions.
1) Open BaseVendor.CS
Locate This Line: public virtual void VendorSell(Mobile from)
Scroll down and locate the code snippet that looks like this.
Code:
                    foreach (Item item in items)
                    {
                        if (item is Container && (item).Items.Count != 0)
                        {
                            continue;
                        }
And below that snippet Add this
Code:
                        //advanced stealing
                        StolenAtt stolen = (StolenAtt)XmlAttach.FindAttachment(item, typeof(StolenAtt));
                        if (stolen != null)
                        {
                            continue;
                        }
Save it...
2) Open stealing.cs
Locate this snippet of code
Code:
                        if (stolen != null)
                        {
                            m_Thief.SendLocalizedMessage(502724); // You succesfully steal the item.

                            ItemFlags.SetTaken(stolen, true);
                            ItemFlags.SetStealable(stolen, false);
                            stolen.Movable = true;
Just below stolen.Movable = true; add XmlAttach.AttachTo(stolen, new StolenAtt());
So that it looks like this
Code:
                        if (stolen != null)
                        {
                            m_Thief.SendLocalizedMessage(502724); // You succesfully steal the item.

                            ItemFlags.SetTaken(stolen, true);
                            ItemFlags.SetStealable(stolen, false);
                            stolen.Movable = true;
                            XmlAttach.AttachTo(stolen, new StolenAtt());
save it...
Then you will want to download StolenAtt.cs to your customs folder.

Restart the server and go steal something. Can check the attachment on the stolen item with [getatt command.

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back