|
||
|
|
#1 (permalink) |
|
Master of Insanity
|
This is the full Post Office system that I have written. It includes a PostOfficeStone, AddressBook, MailBox, Letter, PostalWorker, PostOfficeEAddon, and PostOfficeSAddon.
The Post Office Stone requires an Addressbook be present in your backpack and a mailbox be present in your bank to work properly. The Letter is just a neat little item that can be used to send messages to other players. The Addons are pre-built buildings that can be placed and the signs name set to post office. The postal worker sells letters and allows players to open their mailboxs when not near a bank. Installation: Unzip the *.cs files to your Scripts folder. Usage: [ADD PostOfficeStone [ADD AddressBook [ADD Letter [ADD MailBox [ADD PostalWorker [ADD PostOfficeSAddon [ADD PostOfficeSAddonDeed [ADD PostOfficeEAddon [ADD PostOfficeEAddonDeed Updates: 11-27-2004 1:30PM MST - Fixed issue with the LetterReadGump.cs causing a problem of duplication of letters when trying to close it and no recipient or message is entered. 10-27-04 12:00PM MST - Cleaned up post office code and fixed possible bug with letter script. 10-14-04 5:50PM MST - Added my version of the Postal Worker. He Sells letters for 5gp and if you left click on him he has a context menu entry for opening your mail box! Also added in some pre-built buildings that can be used as post offices. See above for usage. If you use the PostOffice addon buildings then be sure to set the brass signs name to post office! 10-13-04 11:00PM MST - Fixed problem with address book not staying blessed. 10-06-04 12:02AM MST - Also, I forgot that you will have to add the following code to the beginning of your LoginStats.cs: Code:
using Server.Gumps; 10-04-04 7:38PM MST - Forgot to mention that you have to add the following code to the begining of your LoginStats.cs: Code:
using Server.Items; 10-03-04 8:53PM MST ? Added Mailbox for items to be delivered to. Place the following code in your CharacterCreation.cs file under the EventSink_CharacterCreated area: Code:
newChar.BankBox.DropItem( new MailBox() ); Code:
MailBox mailbox = m.BankBox.FindItemByType( typeof( MailBox ) ) as MailBox;
if ( mailbox != null )
{
if ( mailbox.NewMail == "true" )
m.SendGump( new NewMailGump( m, mailbox ) );
}
09-15-04 8:38AM MST - Made addressbook blessed by default and added script to block adding yourself. 09-14-04 5:52AM MST - Fixed Gump wording in the letter to stop confusion about how to use it. Also fixed wording on PostOfficeGump to point out button added so name can be chosen. 09-13-04 9:11PM MST - Added Serialize and Deserialize methods for addressbook and letter. This should fix issues with lost information on server reboot. *** WARNING *** You will HAVE to delete all letters and address books that currently exist in your world in order to install this upgrade. 09-12-04 8:03PM MST - Got the post office stone to work with the Address book. Post Office Stone now requires the address book to work. Added a few bug fixes with not getting gold back and such. Added Post Office Stone, Address Book, and Letters all in to the same ZIP file. 09-11-04 8:56PM MST - Added code to block containers from being sent. Added code to only delete items if the name specified exists on the shard. 09-11-04 4:39PM MST - Added a message for players that are online to notify them that they have received a new item. Also added the new PostOfficeGump.cs to the zip file. 09-10-04 8:08AM MST - Added the ability to send items from the backpack or the bankbox. Please feel free to PM me or respond to this thread with any questions, comments, or help with my todo list! *** CREDITS *** Thanks to atticus589 for creating an AWESOME gump. I look forward to more of your work! Thanks to Cmajor for providing the code to block sending containers. Works like a charm! Thanks, Tom Sapp
__________________
Thanks, Tom Sapp My Shard - http://www.sappsworld.com/raisorsshard All of my scripts are officially supported at: http://www.sappsworld.com Go there for latest updates. *** RunUO forum posts will be updated as well *** |
|
|
|
|
|
#3 (permalink) |
|
Account Terminated
Join Date: Apr 2004
Location: Titusville PA
Age: 26
Posts: 975
|
Well to deal with the name problem why dont you just make it so that players send items to a specific character on a specific account by having the player that is sending the item type in a gump <accountname><charactername> then hit a send button and target the item to be sent. Also i would make items sendable from bank boxes due to some items being heavy but make it so you can only send items from your bankbox or backpack. Well that is just one idea that might work i hope it helps some.
|
|
|
|
|
|
#5 (permalink) | |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
|
Quote:
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
|
|
#11 (permalink) |
|
Forum Novice
Join Date: Jun 2004
Location: Texas
Age: 19
Posts: 206
|
Looooks a whole lot better than the first gump.... Not saying anything against Raisor but he asked me to make it and i did... he said it is awesome.... which means alot coming from an experienced scriptor... it just replaces the old gump...
|
|
|
|
|
|
#14 (permalink) |
|
Join Date: Feb 2004
Location: Charleston, SC
Age: 37
Posts: 174
|
Nice idea, but what happens if the name specified does not exist?
Well, that is really a loaded question, the item is deleted and noone gets it. Possible solutions: Create an array of all players that match the name typed, might want to use .ToLower() when creating the array as to catch any capitalization errors. This will not help with multiple players issue but if there is more than one players with the same name, you will atleast be given a choice of who to send it to. As far as the container issue u mentioned above, create u could create an array with all items in the container. If u wanted to allow multiple items to be sent, send the container then add all of the items in the array to the container. But, if u wanted to allow the post office to send only one item, check the array for the number of items and if there is anything in the box, dont send it stop the script from sending anything. Thanks for sharing, i look forward to any mods and if i come up with anything ill post here too. |
|
|
|
|
|
#16 (permalink) | |
|
Guest
Posts: n/a
|
Quote:
Add this code before the check for item in the PostOfficeGump.cs, ln 82 Code:
if ( o is Container )
{
from.SendMessage( "You can't send Container's" );
}
|
|
|
|
|
#20 (permalink) | ||
|
Master of Insanity
|
Quote:
![]() Quote:
By the way, the zip is updated with a few changes so ya'll may wanna re-download. Check first post for changes. ![]() |
||
|
|
|
|
|
#22 (permalink) |
|
Soul of Darkness
|
1st... I must say, This idea is awsome I will def use it on my shard
2nd... I did notice one thing however, That the letters message disappears after you close it. Personally I think it should stay, so that if a player harasses another player they would be able to report it or something.. or maybe just save the letter for the hell of it. 3rd... Not sure if anyone suggested this or not. But I think there should be a reserved Mail Box or something Inside the Bank box that is not movable or anything that the letters and such are sent to. Just a thought ![]() |
|
|
|
|
|
#23 (permalink) | |
|
Master of Insanity
|
Quote:
![]() |
|
|
|
|
|
|
#25 (permalink) |
|
Newbie
Join Date: Sep 2004
Age: 22
Posts: 35
|
ok this is a great script i think it has the ability to go very far its already on my server so i know other people love it but theres only a few problems well one major one realy my shard uses a custom gump for the login screen as do many other and it tends to make the original gumps look realy trashy not cus of you guys but cuz the custom login gump anyways i was wandering if somone could make a new one i downloaded that one guys but it had alot of errors when compiling
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |