I have a situation where I want to use my crafted items (on a good character) for diety sacrifice on my evil character. So, I have to send the items via mail.
So, this script basically allows me to open the mail window, open the send tab, and type something like:
and it will send 'Amadeus' all of the opaline arcane studs in my inventory via the mail system as attachments.
Read the script for more information...
So, this script basically allows me to open the mail window, open the send tab, and type something like:
Code:
Run MailItems "Pristine Fashioned Opaline Arcane Stud" Amadeus
Read the script for more information...
Code:
variable bool Continue
atom(script) EQ2_onSendMailComplete()
{
Continue:Set[TRUE]
}
function main(string ItemName, string To, int Quantity)
{
echo "[MailItems] Script Active. This script requires that your Mail window be open and that the "Send" tab be clicked and exposed."
variable int i = 1
Continue:Set[TRUE]
if (${Quantity} == 0)
{
Quantity:Set[1]
}
if !${ItemName.Length}
{
echo "Syntax: 'run MailItems <itemname> <recipient> [Quantity]"
echo "(NOTE: [Quantity] refers to the amount sent per mail. Default is 1)"
return
}
if !${To.Length}
{
echo "Syntax: 'run MailItems <itemname> <recipient> [Quantity]"
echo "(NOTE: [Quantity] refers to the amount sent per mail. Default is 1)"
return
}
Event[EQ2_onSendMailComplete]:AttachAtom[EQ2_onSendMailComplete]
if (!${Me.Inventory[${ItemName}](exists)})
{
echo "Sorry, that item does not appear to exist in your inventory."
return
}
Me:CreateCustomInventoryArray[nonbankonly]
wait 2
do
{
if (${Me.CustomInventory[${i}].Name.Equal[${ItemName}]})
{
if (${EQ2Mail[composing].Recipient.Length} == 0)
{
EQ2Mail[composing]:AppendRecipient[${To}]
}
wait 7
Me.CustomInventory[${i}]:SendAsGift[${Quantity}]
wait 7
EQ2Mail[composing]:Send
Continue:Set[FALSE]
do
{
waitframe
}
while !${Continue}
wait 5
}
}
while ${i:Inc}<=${Me.CustomInventoryArraySize}
Event[EQ2_onSendMailComplete]:DetachAtom[EQ2_onSendMailComplete]
echo "Script ended."
}