raisor
Wanderer
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:
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:
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:
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:
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
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