Ok so i have done some tinkering with the script and came up with this:
The Script buys 10 Excellent Belts and runs over to the mailbox but errors out at who it is sending the belts to.
Cant seem to add a picture of the error??
Anyways it says:
Fri Jan 25 14:42:16 2013 : ...ts/rom/userfunctions/addon_Rock5s_Mail_Functions.lua:399: You must specify a recipient to use UMM_SendAdvanced()
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
-- Buy Belts script - V1.0 - written by Jandrana
-- Edited by Eggman1414
recipient = SetCharList({
{account=2 , chars= {2,3,4,5,6,7,8}},
{account=54 , chars= {1,2,3,4,5,7,8}},
{account=55 , chars= {1,2,3,4,5,6,7,8}},
});
-- the char that should receiver the belts.
itemName = "Excellent Belt";
function buyBelts()
player:openStore("Nebular Grey-Eye")
store:buyItem(itemName, 10);
yrest(1000)
end
function sendBelts()
local armor=MGbuildItemTableOfType("Armor");
armor=selectItemsByName(armor, itemName);
UMM_SendAdvanced(recipient,getIdsFrom(armor), nil, nil, nil, nil, nil, nil, nil, nil, nil);
end
</onLoad>
<!-- # 1 --><waypoint x="2467" z="48296" y="136">
buyBelts();
</waypoint>
<!-- # 2 --><waypoint x="2603" z="48202" y="136"> </waypoint>
<!-- # 3 --><waypoint x="2812" z="48230" y="136">
sendBelts();
</waypoint>
<!-- # 5 --><waypoint x="2576" z="48212" y="136"> </waypoint>
<!-- # 6 --><waypoint x="2471" z="48302" y="136">
</waypoint>
</waypoints>
Now my question is, does the UMM_SendAdvanced command accept a set char list for the recipient variable? Like below?
Code: Select all
recipient = SetCharList({
{account=2 , chars= {2,3,4,5,6,7,8}},
{account=54 , chars= {1,2,3,4,5,7,8}},
{account=55 , chars= {1,2,3,4,5,6,7,8}},
});
*Edit* I was just thinking, is it becasue SetCharList is already in the onload section? And if so is there a command to call the next character's name, or do I have to make a name table of every alt and do it that way?