Help needed with mailing items & coin

mycroft

Script Author: MyPrices
Working on a small addon for vgcraftbot to mail a storage alt the powders / shards etc..when the bags are full...

Starting small and working backwards so to speak...started on the actual mailbox routine...

Code:
function main()
{
	Pawn[Mailbox]:DoubleClick
	VGUI[recipient_name]:SetText[storage]
	VGUI[subject_text]:SetText[Work Order storage]
	Me.Inventory[Crystal]:AttachToMail
	VGUI[_mail_offer_copper]:SetText[10]
	Mail:Send
}
opens the mailbox
sets the to
Sets the subject
adds the text.
Doesn't add the item as an attachment
Adds 10 copper to the mail
Doesn't send the mail

Not sure where I'm going wrong , used the commands listed in the sticky up above
but cant get it to work...anyone any ideas?
 
Last edited by a moderator:

Amadeus

The Maestro
Staff member
Hmm.....I did all of these commands in the console individually, and they worked just fine.

Try doing that once, just open your console and type in each of those lines and see if it works if you do it that way.

If that works, then it means you're issuing commands too fast. Just put a "wait 10" inbetween each command so that you don't send the commands so quickly to the server.

Lavishscript moves VERY fast, and many times you have to hardcode in 'waits' in order to let the client/server catchup.
 
Top Bottom