Go Back   RunUO - Ultima Online Emulation > RunUO > RunUO Post Archive

RunUO Post Archive The Archvie

Reply
 
Thread Tools Display Modes
Old 09-10-2004, 02:13 AM   #1 (permalink)
Master of Insanity
 
raisor's Avatar
 
Join Date: Sep 2004
Location: Mesa, Az
Age: 32
Posts: 220
Send a message via ICQ to raisor Send a message via AIM to raisor Send a message via MSN to raisor Send a message via Yahoo to raisor
Arrow Post Office Stone

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;
Thanks again to Negaduck for pointing this out.
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;
Thanks to Negaduck for pointing this out!
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() );
Also, in order for the NewMailGump to be shown on player login, you will need to add this code to the LoginStats.cs under the EventSink_Login area:
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 9:18AM MST - Fixed bug with letters. Will no longer blank letter after trying to change it.
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
Attached Files
File Type: zip PostOffice.2.5.zip (21.2 KB, 688 views)
__________________
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 ***
raisor is offline   Reply With Quote
Old 09-10-2004, 03:37 AM   #2 (permalink)
Forum Expert
 
Join Date: Nov 2003
Posts: 252
Default

awsome idea man! cant wait to try it out=Þ
AutomatedPOM is offline   Reply With Quote
Old 09-10-2004, 05:48 AM   #3 (permalink)
Account Terminated
 
Join Date: Apr 2004
Location: Titusville PA
Age: 26
Posts: 975
Default Just an idea

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.
evil lord kirby is offline   Reply With Quote
Old 09-10-2004, 06:58 AM   #4 (permalink)
 
Join Date: Jul 2004
Location: Denmark
Age: 19
Posts: 90
Send a message via MSN to Broze The Newb
Talking

holy s*** nice
very good work
thanks

-Broze-
Broze The Newb is offline   Reply With Quote
Old 09-10-2004, 11:48 AM   #5 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

Quote:
Invalid Attachment specified. If you followed a valid link, please notify the webmaster
Tru is offline   Reply With Quote
Old 09-10-2004, 11:52 AM   #6 (permalink)
Master of Insanity
 
raisor's Avatar
 
Join Date: Sep 2004
Location: Mesa, Az
Age: 32
Posts: 220
Send a message via ICQ to raisor Send a message via AIM to raisor Send a message via MSN to raisor Send a message via Yahoo to raisor
Default

Try it again, you probably click the link while I was updating the attachment.
raisor is offline   Reply With Quote
Old 09-10-2004, 02:07 PM   #7 (permalink)
Forum Expert
 
DraconisDesBois's Avatar
 
Join Date: Oct 2003
Location: California
Age: 27
Posts: 284
Send a message via ICQ to DraconisDesBois Send a message via AIM to DraconisDesBois Send a message via Yahoo to DraconisDesBois
Thumbs up

Thanks, this really opens up RP more
__________________
Sonoma Veteran zDARIALz
1998 - 2006

DraconisDesBois is offline   Reply With Quote
Old 09-10-2004, 02:49 PM   #8 (permalink)
Forum Novice
 
Join Date: Jun 2004
Location: Texas
Age: 19
Posts: 206
Thumbs up Gumps...

I can make you a gump.... if you wish...
btw badass script.... good job
atticus589 is offline   Reply With Quote
Old 09-10-2004, 07:15 PM   #9 (permalink)
Forum Novice
 
Join Date: Jun 2004
Location: Texas
Age: 19
Posts: 206
Talking Gump

Raisor Did ask me to make him a gump if you want to use it here it is just replace the old one with this new one...
Attached Files
File Type: cs PostOfficeGump.cs (4.4 KB, 146 views)
atticus589 is offline   Reply With Quote
Old 09-10-2004, 09:28 PM   #10 (permalink)
 
Join Date: Jan 2004
Location: Huntsville, Alabama
Age: 32
Posts: 195
Send a message via ICQ to Kesia Send a message via AIM to Kesia Send a message via MSN to Kesia Send a message via Yahoo to Kesia
Default

Wow this sounds great, but what is the second gump for?
Kesia is offline   Reply With Quote
Old 09-10-2004, 09:37 PM   #11 (permalink)
Forum Novice
 
Join Date: Jun 2004
Location: Texas
Age: 19
Posts: 206
Default 2nd gump

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...
atticus589 is offline   Reply With Quote
Old 09-10-2004, 09:39 PM   #12 (permalink)
 
Join Date: Jan 2004
Location: Huntsville, Alabama
Age: 32
Posts: 195
Send a message via ICQ to Kesia Send a message via AIM to Kesia Send a message via MSN to Kesia Send a message via Yahoo to Kesia
Talking

AHH okay :0 then I will download it now
Kesia is offline   Reply With Quote
Old 09-10-2004, 11:27 PM   #13 (permalink)
 
Join Date: Oct 2003
Location: Ankara / Turkey
Age: 42
Posts: 125
Default

Its very good, also new gump, thanks for sharing.
WebSiter is offline   Reply With Quote
Old 09-11-2004, 12:45 AM   #14 (permalink)
 
Join Date: Feb 2004
Location: Charleston, SC
Age: 37
Posts: 174
Default

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.
Igon is offline   Reply With Quote
Old 09-11-2004, 12:56 AM   #15 (permalink)
 
Join Date: Feb 2003
Posts: 269
Default

Another possible idea would be blocking the ability to accidently send containers altogether. I know you can't send containers using a Bag of Sending...
thegrandmystic is offline   Reply With Quote
Old 09-11-2004, 01:55 AM   #16 (permalink)
Cmajor
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by thegrandmystic
Another possible idea would be blocking the ability to accidently send containers altogether. I know you can't send containers using a Bag of Sending...

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" ); 
       }
  Reply With Quote
Old 09-11-2004, 07:54 AM   #17 (permalink)
Forum Expert
 
Join Date: Jan 2003
Posts: 564
Default

to be more like a post oficce, you can make the price proportional to the weight of what you are sending...
__________________
UO Central: O Mistério do Oculto
(Free Shard Brasileiro)

brodock is offline   Reply With Quote
Old 09-11-2004, 09:28 PM   #18 (permalink)
Forum Novice
 
Join Date: Jun 2004
Posts: 133
Default

Did you make an NPC postman too?
Taffer is offline   Reply With Quote
Old 09-11-2004, 11:13 PM   #19 (permalink)
Forum Expert
 
flowerbudd's Avatar
 
Join Date: Jul 2003
Location: Missouri
Age: 31
Posts: 701
Send a message via ICQ to flowerbudd Send a message via AIM to flowerbudd Send a message via MSN to flowerbudd Send a message via Yahoo to flowerbudd
Default

Wow, this is Fabtastic!
__________________
Med-Surg Nurse, Full time Pittsburg State Univ Sophmore, and FT Mother to 5 kids
flowerbudd is offline   Reply With Quote
Old 09-12-2004, 01:22 AM   #20 (permalink)
Master of Insanity
 
raisor's Avatar
 
Join Date: Sep 2004
Location: Mesa, Az
Age: 32
Posts: 220
Send a message via ICQ to raisor Send a message via AIM to raisor Send a message via MSN to raisor Send a message via Yahoo to raisor
Default

Quote:
Originally Posted by Taffer
Did you make an NPC postman too?
Nope, kessia is working on that!

Quote:
Originally Posted by flowerbudd :eek:
Wow, this is Fabtastic!
__________________
Housewife and Mother
Owner of The Garden
Thanks!

By the way, the zip is updated with a few changes so ya'll may wanna re-download. Check first post for changes.
raisor is offline   Reply With Quote
Old 09-12-2004, 11:44 PM   #21 (permalink)
Master of Insanity
 
raisor's Avatar
 
Join Date: Sep 2004
Location: Mesa, Az
Age: 32
Posts: 220
Send a message via ICQ to raisor Send a message via AIM to raisor Send a message via MSN to raisor Send a message via Yahoo to raisor
Default

Sorry for the bump, but I got this all working together now. See the first post for the updates. Let me know if any problems arise!

Thanks,
Tom Sapp
raisor is offline   Reply With Quote
Old 09-13-2004, 12:28 AM   #22 (permalink)
Soul of Darkness
 
Draxus's Avatar
 
Join Date: Feb 2004
Location: In The Shadow of your mind!
Age: 22
Posts: 201
Send a message via AIM to Draxus Send a message via MSN to Draxus
Thumbs up

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
Draxus is offline   Reply With Quote
Old 09-13-2004, 12:47 AM   #23 (permalink)
Master of Insanity
 
raisor's Avatar
 
Join Date: Sep 2004
Location: Mesa, Az
Age: 32
Posts: 220
Send a message via ICQ to raisor Send a message via AIM to raisor Send a message via MSN to raisor Send a message via Yahoo to raisor
Default

Quote:
Originally Posted by Draxus
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
I'm not sure what you mean by the message disappears after you close it. I've tested it several times and even after resending the item and it keeps the message. Can you elaborate a little further on this? As for your Mail box idea, I may work that in. Got a couple other things I wanna work on too.
raisor is offline   Reply With Quote
Old 09-13-2004, 12:51 AM   #24 (permalink)
Soul of Darkness
 
Draxus's Avatar
 
Join Date: Feb 2004
Location: In The Shadow of your mind!
Age: 22
Posts: 201
Send a message via AIM to Draxus Send a message via MSN to Draxus
Question

Well, after I right-click out of the letter, after its been read.. and I reopen it. Its Empty. Totally blank
I even tried sending it with the Post stone then reopening it.. and it still goes blank after I try to read it a second time
Draxus is offline   Reply With Quote
Old 09-13-2004, 05:26 PM   #25 (permalink)
Newbie
 
Join Date: Sep 2004
Age: 22
Posts: 35
Default

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
Ignius is offline   Reply With Quote
Reply

Bookmarks


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