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!

Admin script - AddToBank

davidmohara

Sorceror
Admin script - AddToBank

This is my first script.

Summary:
It allows you to add item(s) to all players bank boxes for various shard-wide rewards, etc.

Description:
This script is a modified version of another script who's author is unknown (if this is yours, please let me know so that I can give you proper credit).
I've added the ability to recurse containers so that you can add items to a bag and then simple distribute the bag.

Security is set to GM by default, please change if you require something different (follow the comment).

Also allows for multiples to be added using additional parameter (count).

Updates:
2.2: Fixed duplication issue with pre-filled containers.

2.1: Fixed issue with accounts that have no characters.

2.0: No longer is command line - has gump interface. Can distribute item(s) based on AccessLevel or on a per account/character basis. Also, allows items to be selected by "type" rather than targeting (to allow for random variances).

Installation:
Just drop it in your custom scripts folder and go!!
 

Attachments

  • AddToBank-2.2.zip
    3.4 KB · Views: 1,035
S

Savaal

Guest
This script is nice, but it sends the item you choose to every character on the account say i had 3 characters on the account all of them would get it, i want it so one of my 3 characters on my account would get it i looked over this script and dunno how to make that happen any suggestions?
 

davidmohara

Sorceror
Sure, you'd just loop thru the accounts rather than the mobiles. I'll throw together a sample when I have a minute this evening.
 

Alari

Wanderer
It'd be nice if it could accept a parameter too rather than targetting an item, for things like the holiday gift packages where the item has random properties like hues, etc. (So if you just typed [addtobank it would ask for a target, but if you typed [addtobank giftbox it would add that typeof, if that's possible)
 
S

Savaal

Guest
Sure, you'd just loop thru the accounts rather than the mobiles. I'll throw together a sample when I have a minute this evening.

Ok thanks David. :D

It'd be nice if it could accept a parameter too rather than targetting an item, for things like the holiday gift packages where the item has random properties like hues, etc. (So if you just typed [addtobank it would ask for a target, but if you typed [addtobank giftbox it would add that typeof, if that's possible)

I also agree with Alari. :D
 

Guadah

Wanderer
Interesting, so you will be able to send it, One Reward to Each Account, and not to each Character?

That is what we are looking for on our server, without having to go from account to account droping items into who we think is the main character.

I was looking for a way to issue out a RewardBox (HolidayGiftPackage2004), Where a player logs in on his account, and it will issue it out, iwth a little statement, but only once, to the first character he logs into.

Alaria has a great idea with the parameter.
 

davidmohara

Sorceror
Ok so to do the accounts instead of mobiles you need to use this:
Code:
ArrayList accts = new ArrayList( Accounts.Table.Values )
instead of
Code:
ArrayList mobs = new ArrayList( World.Mobiles.Values )
Then just give it to the first mobile on the account.

Alari: I'll see about adding this. I hadn't considered random hues.

Guadah: Sorry but that sounds like something outside of the scope of my humble little script. You could always use this in conjunction with one of those "Message of the Day" scripts or something like that for notification.
 

Calbracht

Wanderer
I really like this command saves alot of time, now you don't have to use [bank and clikc on the person =P Thanks! :D
 

JadeFist

Wanderer
Would be cool if a small gump, or something, came up that allowed you to choose between "All characters in the world" or "One character on an account with the most hours played" when distributing the item. Thanks for sharing :)
 

nineismine

Wanderer
davidmohara said:
Ok so to do the accounts instead of mobiles you need to use this:
Code:
ArrayList accts = new ArrayList( Accounts.Table.Values )
instead of
Code:
ArrayList mobs = new ArrayList( World.Mobiles.Values )
Then just give it to the first mobile on the account.

Alari: I'll see about adding this. I hadn't considered random hues.

Guadah: Sorry but that sounds like something outside of the scope of my humble little script. You could always use this in conjunction with one of those "Message of the Day" scripts or something like that for notification.

How do I acomplish the last part here? How can I only give it to the first mobile?
 

davidmohara

Sorceror
You give it to the accts.Mobiles[0]

Due to the great ideas, I'm going to put a simple gump on this script. Give me a couple of days and I'll have something for you all.
 

Kesia

Wanderer
Mice script, and if you want it to go to just the first charector,that is something you need to change in CharectorCreation.cs, though I can't remember the line off the top of my head, but I can look into it if anyone wants me to.
 

InOverMyHead

Sorceror
The changes didn't work for me either. Every time I used the command and targeted the container my shard crashed. I ended up placing the containers in the accounts one by one.

If there is a fix for this I sure would like to know. I've tried everything to get the script to work.
 

davidmohara

Sorceror
Ok, I've updated the script with a new gump (I'll try to add a screenshot when I have a chance). You can now distribute item(s) per account, per character, or based on AccessLevel (good for giving out staff items). I also added the ability to add by type rather than targeting.

Let me know if you have any problems.
 
S

Savaal

Guest
FOOOOOOOOOKING AWSOME.... AwSoMe t0 T3H MaX! :cool: Great Job :) *Presses Rep Button* Rep Given Where Rep Is Do :p
 
Top