Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Releases

Custom Script Releases This forum is where you can release your custom scripts for other users to use.

Please note: By releasing your scripts here you are submitting them to the public and as such agree to publish them under the GPL licensing terms. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO.

Reply
 
Thread Tools Display Modes
Old 01-02-2007, 01:57 PM   #1 (permalink)
Forum Novice
 
Join Date: Nov 2004
Location: Southeast Missouri USA
Age: 36
Posts: 283
Arrow Item storage revisited... CSS-Custom Storage Solution

First i want to express my thanks to Sparkin for finding a Major bug during testing on his Shard.

This is a RunUO 2.0 script due to the use of the HasGump Bool.

Custom Storage Solution ( CSS ) is a storage item.
Players can store literally ANY item that exists other than another CSS.

Players choose the withdrawamount for each of the 100 storage slots.
Most non-stackables store as if they stacked in this item.
Items with uses remaining store the uses remaining instead of the number of items.

If the CSS does not know how to store an item within it's code, it stores the item internally
and adds the type of the item to a log for upgrading the code.

Players are able to customize the appearance of the item, the gumps and the hue of the gumptext of their own CSS.

My wife wanted it to do more, so the following are optional:
Custom Storage Solution ( CSS ) :
is a vendor of the stored items.
can summon a temporary animal trainer for stable functions.
is a banker for verbal commands.
is a anvil.
is a forge.
is a loom.
is a spinning wheel.
is a corpse stone.
can resurrect pets.
can resurrect players.
can be a heat source.
can be an oven.

There is probably more, but i cant think of them at the moment.
This probably seems way too powerful for most shards, so i have tried to add in easy
ways to turn these functions on or off:

Code:
    [Server.Engines.Craft.Anvil]//Comment this line in or out to disable/enable
    [Server.Engines.Craft.Forge]//Comment this line in or out to disable/enable
 
/**/mustBeLockedDown = false;       //Does the item have to be loced down to use it?
/**/allowVending = true;            //Can players sell the items being stored?
/**/allowStable = true;             //Can this item summon a AnimalTrainer for 30 sec?
/**/allowBank = true;               //Does this item accept spoken bank commands?
/**/allowInternalStorage = true;    //Is storing non-handled items on the internal map acceptable?
/**/internalStoreHasCost = false;   //Does storing items on the internal map have a cost to the player?
/**/internalStorageCost = 1000;     //Cost per item that is stored on the internal map. (If it is a bag, only the contents of the bag are tabulated)
/**/internalStoreCostType = "Gold"; //typeof Item Type that is taken for payment when storing internaly.
/**/typeofLog = true;               //Generate Missing typeof Log in root folder?
/**/canResurrect = true;            //Can this item resurrect players? ( costs 250 Tithing Points - Owner recieves Gold payment )
/**/canResPets = true;              //Can this item resurrect pets?
/**/canRetrieveCorpses = true;      //Can this item retrieve corpses? ( costs 500 Tithing Points - Owner recieves Gold payment )
Loom and Spinning Wheel abilities can be commented out in the code:
Code:
public class CustomStorageSolution : Container, IDyable, ISpinningWheel, ILoom
and:
Code:
#region SpinningWheel, Loom
    #region SpinningWheel
              //Code here
    #endregion
    #region Loom
             //Code here
     #endregion
#endregion
This script does work as is, however, there is much more that can be done with it.
Code cleanup, code reduction, better handling of item types, etc.

I am releasing it because,
1 it does work fine,
2 i am tired of it
If anyone wants to take over.... I would be happy to help.

if no-one takes over, but people want more done with this code.... err, give me a few weeks
break ok?
I have serveral other things i am working on and want to spend some time with them right
now.

This script has so much going on with it that i could probably write a small book explaining
it and still miss things.
But for now.... can we try the method that i just answer questions?

Installation:
UnZip (already in a folder)
Add to your Custom script section
Restart the server.
[add CustomStorageSolution

Have fun!

P.S. You all have no idea how close i came to accidentally releasing this as a wb lol.
Attached Files
File Type: zip CSS beta 5.zip (30.5 KB, 193 views)

Last edited by Ashlar; 01-02-2007 at 02:22 PM.
Ashlar is offline   Reply With Quote
Old 01-02-2007, 04:18 PM   #2 (permalink)
Newbie
 
Join Date: May 2005
Posts: 27
Default I knew it was comming but ...

Dang looks like you have done it again! I cant wait to try it out. I will let you know how this amazing new toy is , but I already know that it will be awesome if you did it.
Thank you for the time you spend on all of this .
__________________
There is alot I don't know but there is nothing I cannot learn.
PDakis is offline   Reply With Quote
Old 01-02-2007, 05:41 PM   #3 (permalink)
Forum Novice
 
Sparkin's Avatar
 
Join Date: Dec 2005
Location: Missouri , USA
Age: 39
Posts: 256
Default

Woot, we made this item craftable and players LOVE it!

Good Job Ashlar

P.S it works Great as a .wb also keke
__________________
Quote:
Originally Posted by Ryan View Post
You are a moron.
Sparkin is offline   Reply With Quote
Old 02-09-2007, 07:06 PM   #4 (permalink)
Newbie
 
Join Date: Oct 2006
Location: Indiana
Age: 46
Posts: 55
Default This item is wonderful, but will only withdraw 5 at a time

So far we all love this very much, and thank you!

But....
whent the custom storage solution is first used and items are placed in it, it appears to work perfectly withdrawing what the user asks to have withdrawn. but... after CSS has been used it will only withdraw 5.

also when morphing CSS to some items, the drag and drop feature will no longer work, such as when CSS was morphed into a pillow. items could still be added through the gump, but the items could not be dropped into the CSS.
Aurboda is offline   Reply With Quote
Old 02-10-2007, 02:14 AM   #5 (permalink)
Forum Expert
 
Join Date: Dec 2003
Location: Sitting in a chair fulfilling my life's goal
Age: 23
Posts: 2,643
Send a message via AIM to Killamus Send a message via MSN to Killamus
Default

I am VERY much impressed with this.
Quote:
Originally Posted by Evil Karma Machine
You must spread around more reputation before giving it to Ashlar again.
Screw you evil karma machine.
__________________
Procrastinators unite!
Tomorrow.
Saying that Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders.
Killamus is offline   Reply With Quote
Old 02-10-2007, 02:06 PM   #6 (permalink)
Forum Novice
 
Join Date: Nov 2004
Location: Southeast Missouri USA
Age: 36
Posts: 283
Default

Quote:
Originally Posted by Aurboda View Post
So far we all love this very much, and thank you!

But....
whent the custom storage solution is first used and items are placed in it, it appears to work perfectly withdrawing what the user asks to have withdrawn. but... after CSS has been used it will only withdraw 5.

also when morphing CSS to some items, the drag and drop feature will no longer work, such as when CSS was morphed into a pillow. items could still be added through the gump, but the items could not be dropped into the CSS.
Hrm, should have mentioned this before, but actually you can withdraw any amount you want of stackable or uses remaining items.

The trick is.... that number 5 you see is the default that is auto set, but you can change it, it is a text entry! The CSS does save the withdrawamount of every item you store, so the next time the css is opened, it will display (and use) the number that was placed in the textentry.

Also, that number is used for te sell feature also, so if the player has the textentry withdraw set to 20 the price in the sell gump is for 20 of the item! the buyer cannot change this number, so the seller is safe to put 10000 of the item there and know that the player buyer is only buying 20 at a time for the price they set ( I like that feature )


There are alot of things like this about the css and i am sorry that i havent made a manual, but..... it didnt seem like many people liked it, so i gave it up as a bad job.

If you have any other complaints or suggestions, i will do my dangedest to try to check the boards more often... SORRY!!!!



Killamus:
Thank you greatly for your remark about being impressed!!
That kind of feedback makes me start thinking about finishing the transit system and other projects i have laying around...

Some of them have hit roadblock i dont know how to solve, others, ( like transit ), I know exactly how to script, so there isnt any reason to script it, since i wont learn much from the project, and with there seeming to be little interest in my larger projects, learning form the script is the only reason to write them!

I have been getting pretty bummed about the slow pace of feedback and had pretty much stopped scripting because i didnt see that my recent submissions were apparently needed or wanted.



Anyways sorry for the confusion Aurboda and Thank You for replying!
Really glad you like it too *Blush* *Big Grin*

I will try to be more available, but my interest in scripting for UO seems to be proportional to feeling like i am contributing something of value, and i just havent felt that lately.

I love the people here at RunUO, and i thank the Developers of RunUO from the bottom of my heart for helping me to realize that i actually can write code.... who woulda thought it!

If for some reason i dont reply in a time scale that you think is fast enough, feel free to email me at taben42@yahoo.com ! I do and will support my scripts and further i wish more people would modify and expand, fix and etc any of my scripts... i think of them as code fodder and tools, and hope they are considered worthy of additional effort to make them even better!
Ashlar is offline   Reply With Quote
Old 02-10-2007, 07:55 PM   #7 (permalink)
Forum Expert
 
Join Date: Dec 2003
Location: Sitting in a chair fulfilling my life's goal
Age: 23
Posts: 2,643
Send a message via AIM to Killamus Send a message via MSN to Killamus
Default

You should post em in script help, I always love myself a good challenge.
__________________
Procrastinators unite!
Tomorrow.
Saying that Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders.
Killamus is offline   Reply With Quote
Old 02-10-2007, 08:27 PM   #8 (permalink)
Forum Expert
 
Broadside's Avatar
 
Join Date: Jul 2004
Location: Minnesota
Age: 33
Posts: 1,488
Send a message via ICQ to Broadside Send a message via MSN to Broadside Send a message via Yahoo to Broadside
Default

Yes it sounds excellent i will have to add it to test shard as soon as i finish fixing my current adds. I know how it is with large projects i have more than one going on at a time and it sucks but in the end it will pay off.
__________________
Broadside ~AkA~ Bad Karma
Broadside is offline   Reply With Quote
Old 02-12-2007, 12:35 AM   #9 (permalink)
Newbie
 
Join Date: Oct 2006
Location: Indiana
Age: 46
Posts: 55
Default Server Crashed

Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 2/11/2007 8:46:28 PM
Mobiles: 6268
Items: 161358
Clients:
- Count: 2
+ 71.127.71.239: (account = xxxxx) (mobile = 0x1097 'xxxxx')
+ 76.5.114.59: (account = xxxxx) (mobile = 0x35F7 'xxxxx')

Exception:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Server.Ashlar.CSS.CustomStorageSolution.DoOnDragDr op(Mobile from, Item dropped, Int32 id)
at Server.Ashlar.CSS.CustomStorageSolution.OnDragDrop (Mobile from, Item dropped)
at Server.Item.OnDroppedOnto(Mobile from, Item target)
at Server.Item.DropToItem(Mobile from, Item target, Point3D p)
at Server.Mobile.Drop(Item to, Point3D loc)
at Server.Network.PacketHandlers.DropReq(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
Aurboda is offline   Reply With Quote
Old 02-12-2007, 12:40 AM   #10 (permalink)
Forum Expert
 
mordero's Avatar
 
Join Date: Nov 2003
Location: Illinois, USA
Age: 23
Posts: 2,911
Default

Quote:
Originally Posted by Ashlar View Post
I know exactly how to script, so there isnt any reason to script it, since i wont learn much from the project
I know exactly how you feel. And I havent used the script, but it sounds like a really cool idea. Nice job

Quote:
Originally Posted by Killamus View Post
You should post em in script help, I always love myself a good challenge.
Agreed, I learn a lot by helping people with problems they are having (when I first started helping people out, I usually had no clue about what was going on, but would search for the answer so I could figure it out, and I now i think I am pretty good lol)
mordero is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5