Snippet: CheckMail

Amadeus

The Maestro
Staff member
Problem: My main and my new alt are not on the same faction, so to send items back and forth, I have to use the mailbox.

Solution: This snippet simply goes through my inbox, recieves the attached item for each message, and then deletes the message. This script assumes that you have nothing else in your inbox except messages that contain only items (ie, no real 'message' emails.)

Notes: Again, this script will delete all of the messages in your inbox. So, it's really only useful if you go to one character, send all of the items you want, then go to your recipient character...clean out the mailbox of 'real' mail ..then wait for all the items to arrive. Since it's impossible to delete an email that contains an attachment ...it's a pretty safe script otherwise.

That being said, I'm sure some creative someone can make this a bit more fancy and useful. However, it does the one task I need, and shows a bit about the mail system with lavishscript.

(NOTE: You will have to have your inbox open before running the script.)
Code:
function main()
{
    variable int i = 1
    
    do
    {
        echo Checking Message ... ${EQ2.InboxMailCount} messages remaining.
        EQ2Mail[1]:ReceiveGifts
        wait 5
        EQ2Mail[1]:Delete
        wait 5
    }
    while ${EQ2.InboxMailCount} > 0
    
    echo CheckMail finished.
}
 
Top Bottom