Page 1 of 1

Mail Functions

Posted: Wed Jun 22, 2011 2:39 am
by MiesterMan
I wasn't planning to post this until I had finished perfecting mailCraft function but some seem to be having trouble with UMM (still works for me but I never used it to send mail with the bot). I actually emulate sending a UMM mail with this so you do need it installed.

Since I had the descriptions in the file I removed the meat of the functions and am posting them here with their descriptions. Download the file for the working functions:

Code: Select all

	-----------------------------------------------------------
	------------- MiesterMan's Mailing Functions --------------
	-----------------------------------------------------------

-- Version 1.0

-- This function sends one bag slot worth and/or gold to the recipient.
-- It will only send one mail at a time. This function will NOT send spam mail.
function botSendMail(_charname,_bagslot,_money)  


-- This function will quickly gather all mail from your mailbox until it is completely empty.
-- WARNING:  I've only ever tested this with 120 items.  If your game is slow this might
-- cause you to lose items.  Use the argument (in miliseconds) to slow the pace (default 100 ms).
function botGetMail(_wait)


-- This function will mail all of an item by name or specified craft materials.
-- It also defaults to "all" so it will send all crafting mats if no item is
-- specified.  You can also use "mining", "herbalism", "woodcutting", and "cook"
-- to send all mats of their kind.
function mailCraft(_charname,_craft)
Note: Cooking is again limited to mats you get from the guild fields.

Needs improvement -
  • mailCraft() is slow. I've been trying to figure out a faster way to match but I haven't been able to do it yet so this is what I have.
  • These functions don't support item IDs (now that I think of it that would probably make it faster...)
  • These functions don't support mailing by color.
  • These functions don't support mailing by type.
I'm not sure when I'll finish the intended improvements but it's working now so here ya go.