Nuk79,
I'm not exactly sure what you were asking, but here's an example of how I send my fusion stones to my bots. I will send 6 belts (or other high level equipment I find) to each bot in a different waypoint file, then I load this one to get fusion stones and send those to the bots. Maybe you can look at this one and figure out what you need.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
<!-- This file will buy 6 random fusion stones for each of the characters in the friendsTable list and then mail them off to them. -->
<!-- If using this, you need to make sure you have enough backpack space available because I didn't put a check in here for that. -->
<!-- table list of my accounts to send to -->
friendsTable =
{
"AAAAAA",
"Bbbbbbbbbbb"",
"Cccccccc",
"Dddddddd",
"Eeeeeeeee",
"Ffffffff",
"GGGGGGGG",
"HHHHHHHH",
"IIIIIIIIII",
"Jjjjjjjjjjj",
"Kkkkkkkkkkkk",
"LLLLLLLLLL",
"MMMMMMMMMMM",
"NNNNNNNNNNN",
"OOooooooOoo",
"PPPPPPPPPPPP"
}
<!-- function to buy right amount of fusion stones: -->
<!-- I send 6 to each character which will have them use 8 charges per day. -->
<!-- And leaves them extra charges to make higher level stones when they have enough lower stones. -->
function buyfusions()
local numeach = 6 <!-- I set number to send to each character here and on line 44.-->
local npcname = 110576 -- "Odeley Prole"
local stonename = "Random Fusion Stone"
local curstones = inventory:itemTotalCount(stonename,"bags")
local stonestobuy = (table.maxn(friendsTable)*numeach)-curstones
printf("Going to buy %s stones.\n",stonestobuy)
player:openStore(npcname);
inventory:storeBuyItem(stonename, stonestobuy)
yrest(1000)
end
<!-- Function to send the stones to each character -->
function mailstones()
local numeach = 6 <!-- I set number to send to each character here -->
local beltcount = 0
UMM_SetSlotRange(61,180)
for k,v in pairs(friendsTable) do
UMM_SendByNameOrId(v,"Random Fusion Stone",numeach)
beltcount = beltcount + numeach
if beltcount >= 55 then
doMyRelog()
beltcount = 0
end
yrest(1000)
end
repeat RoMScript("MailFrame:Hide()") until not RoMScript ("MailFrame:IsVisible()")
end
<!-- function to try relogging when sending too many items -->
function doMyRelog()
printf("\n")
cprintf(cli.red,"Approaching 60 item limit... relogging...\n")
repeat RoMScript("MailFrame:Hide()") until not RoMScript ("MailFrame:IsVisible()")
RoMScript("ChangeChar(CHARACTER_SELECT.selectedIndex)")
waitForLoadingScreen() yrest(3000)
player:update()
end
<!-- START of waypoint actions -->
<!-- Disable skills so I don't self buff like a bot -->
for k,v in pairs(settings.profile.skills) do
printf("skill %s disabled.\n",v.Name)
v.AutoUse = false
end
<!-- if near stone vendor go to proper waypoint. Otherwise, start at a teleporter. -->
myitem = player:findNearestNameOrId("Odeley Prole")
if myitem then
if 220 > distance(myitem, player) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("at_shop"))
else
travelTo("VaranasWest")
__WPL:setForcedWaypointType("NORMAL")
__WPL:setWaypointIndex(1)
end
else
travelTo("VaranasWest")
__WPL:setForcedWaypointType("NORMAL")
__WPL:setWaypointIndex(1)
end
</onload>
<!-- # 5 --><waypoint x="2908" z="-798" y="56"> </waypoint>
<!-- # 6 --><waypoint x="2870" z="-865" y="55"> </waypoint>
<!-- # 7 --><waypoint x="2711" z="-976" y="53"> </waypoint>
<!-- # 8 --><waypoint x="2552" z="-1090" y="53"> </waypoint>
<!-- # 9 --><waypoint x="2454" z="-1160" y="53"> </waypoint>
<!-- # 10 --><waypoint x="2520" z="-1278" y="53"> </waypoint>
<!-- # 11 --><waypoint x="2623" z="-1423" y="53"> </waypoint>
<!-- # 12 --><waypoint x="2710" z="-1546" y="53"> </waypoint>
<!-- # 13 --><waypoint x="2762" z="-1620" y="53"> </waypoint>
<!-- # 14 --><waypoint x="2752" z="-1631" y="53" tag="at_shop">
buyfusions()
</waypoint>
<!-- # 15 --><waypoint x="2478" z="-1242" y="53"> </waypoint>
<!-- # 16 --><waypoint x="2475" z="-1153" y="53"> </waypoint>
<!-- # 17 --><waypoint x="2897" z="-825" y="56">
travelTo("VaranasCentral")
yrest(2000)
</waypoint>
<!-- # 18 --><waypoint x="4592" z="-2040" y="103" tag="gotomail"> </waypoint>
<!-- # 19 --><waypoint x="4557" z="-2169" y="103">
-- now run the function to mail the items
mailstones()
</waypoint>
<!-- # 20 --><waypoint x="4557" z="-2169" y="103"> </waypoint>
<!-- # 21 --><waypoint x="4592" z="-2040" y="103">
error("complete")
</waypoint>
</waypoints>
** Edit:
While I was at it, I figured I'd post the file I use for buying belts and sending those as well. I usually run this one (below) which once done, will then load the above file. One note on this that I have found, is that for some reason yet to be determined, the client commonly crashes while travelling from Sarlo Snoop to the belt vendor and I don't know why. This one below can be started either at any transporter, or right at the belt vendor. Just like the one above can be started at any teleporter or at the fusion vendor in West Varanas.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
<!-- This file will buy 6 Recall Belts for each of the characters in the friendsTable list and then mail them off to them. -->
<!-- If using this, you need to make sure you have enough backpack space available because I didn't put a check in here for that. -->
<!--Insert each character you want to buy belts for for, separated by commas and inside quotes ex: "Bob","Jim",.... -->
nameTable =
{
"AAAAAA",
"Bbbbbbbbbbb"",
"Cccccccc",
"Dddddddd",
"Eeeeeeeee",
"Ffffffff",
"GGGGGGGG",
"HHHHHHHH",
"IIIIIIIIII",
"Jjjjjjjjjjj",
"Kkkkkkkkkkkk",
"LLLLLLLLLL",
"MMMMMMMMMMM",
"NNNNNNNNNNN",
"OOooooooOoo",
"PPPPPPPPPPPP"
}
<!-- Item to Buy -->
itemName = "Recall Belt";
<!-- count how many to buy taking into account how many items i currently have -->
<!-- for this I make sure I don't have any high level items that would make a T4. -->
<!-- I generally will keep lvl 78 or higher items to send out. -->
equipmentcount = 0
equipmentneeded = 0
tobuy = 0
function countequip()
local numeach = 6 <!-- I set number to send to each character here and on line 72.-->
equipmentcount = 0
inventory:update()
for slot = 61, 180 do
local item = inventory.BagSlot[slot]
-- Note: Boundstatus is: 0 = bind on pick up, 1 = not bound, 2 = currently bound 3 = bind on equip
-- I can send items that are 1 or 3.
if (item:isType("Armor") or item:isType("Weapons")) and 3 > item.Quality and item.RequiredLvl > 77 and (item.BoundStatus == 1 or item.BoundStatus == 3) then
equipmentcount = equipmentcount + 1
end
end
equipmentneeded = table.maxn(nameTable)*numeach
printf("Need total of %s equipment. We currenlty have %s.\n",equipmentneeded, equipmentcount)
tobuy = equipmentneeded - equipmentcount
printf("Need to purchase %s belts.\n",tobuy)
end
<!-- Function to Buy Belts -->
function buyBelts()
printf("Now going to purchase %s belts.\n",tobuy)
yrest(5000)
player:openStore("Cholman Hooktail")
store:buyItem(itemName, tobuy);
yrest(1000);
sendMacro("CloseAllWindows()");
end
<!-- Function to Send Belts -->
function sendBelts()
local numeach = 6 <!-- I set number to send to each character here -->
local beltcount = 0
local sendtypes = {
"Armor",
"Weapons"
}
UMM_SetSlotRange(61,180)
for k,v in pairs(nameTable) do
UMM_SendAdvanced(v, nil, 0, 78, nil, sendtypes, nil, nil, numeach)
beltcount = beltcount + numeach
if beltcount >= 55 then
doMyRelog()
beltcount = 0
end
yrest(1000)
end
repeat RoMScript("MailFrame:Hide()") until not RoMScript ("MailFrame:IsVisible()")
end
<!-- function to try relogging when sending too many items -->
function doMyRelog()
printf("\n")
cprintf(cli.red,"Approaching 60 item limit... relogging...\n")
repeat RoMScript("MailFrame:Hide()") until not RoMScript ("MailFrame:IsVisible()")
RoMScript("ChangeChar(CHARACTER_SELECT.selectedIndex)")
waitForLoadingScreen() yrest(3000)
player:update()
end
<!-- Mounting Function -->
function doMount()
if not player.Mounted then
if (useGoodie) then
useGoodie("riding")
end
player:mount()
end
end
<!-- Sets character to Sarlo -->
countequip()
myitem = player:findNearestNameOrId("Cholman Hooktail")
if myitem then
if 220 > distance(myitem, player) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("at_shop"))
else
travelTo("Sarlo")
doMount()
__WPL:setWaypointIndex(__WPL:findWaypointTag("To_Shop"))
end
else
travelTo("Sarlo")
doMount()
__WPL:setWaypointIndex(__WPL:findWaypointTag("To_Shop"))
end
</onLoad>
<!-- Path from Snoop to Shop -->
<!-- # 34 --><waypoint x="-17885" z="-3342" y="803" tag = "To_Shop"> </waypoint>
<!-- # 35 --><waypoint x="-17944" z="-3368" y="817"> </waypoint>
<!-- # 36 --><waypoint x="-18015" z="-3386" y="803"> </waypoint>
<!-- # 37 --><waypoint x="-18092" z="-3420" y="795"> </waypoint>
<!-- # 38 --><waypoint x="-18169" z="-3454" y="792"> </waypoint>
<!-- # 39 --><waypoint x="-18265" z="-3496" y="784"> </waypoint>
<!-- # 40 --><waypoint x="-18345" z="-3532" y="777"> </waypoint>
<!-- # 41 --><waypoint x="-18429" z="-3569" y="784"> </waypoint>
<!-- # 42 --><waypoint x="-18488" z="-3617" y="785"> </waypoint>
<!-- # 43 --><waypoint x="-18535" z="-3701" y="777"> </waypoint>
<!-- # 44 --><waypoint x="-18579" z="-3779" y="763"> </waypoint>
<!-- # 45 --><waypoint x="-18634" z="-3859" y="741"> </waypoint>
<!-- # 46 --><waypoint x="-18664" z="-3871" y="741"> </waypoint>
<!-- # 47 --><waypoint x="-18810" z="-3942" y="682"> </waypoint>
<!-- # 48 --><waypoint x="-18875" z="-3940" y="666"> </waypoint>
<!-- # 49 --><waypoint x="-18961" z="-3919" y="644"> </waypoint>
<!-- # 50 --><waypoint x="-19054" z="-3898" y="632"> </waypoint>
<!-- # 51 --><waypoint x="-19140" z="-3870" y="629"> </waypoint>
<!-- # 52 --><waypoint x="-19232" z="-3835" y="609"> </waypoint>
<!-- # 53 --><waypoint x="-19312" z="-3804" y="601"> </waypoint>
<!-- # 54 --><waypoint x="-19387" z="-3758" y="574"> </waypoint>
<!-- # 55 --><waypoint x="-19488" z="-3688" y="577"> </waypoint>
<!-- # 56 --><waypoint x="-19570" z="-3643" y="559"> </waypoint>
<!-- # 57 --><waypoint x="-19642" z="-3603" y="534"> </waypoint>
<!-- # 58 --><waypoint x="-19695" z="-3572" y="530"> </waypoint>
<!-- # 59 --><waypoint x="-19778" z="-3525" y="523"> </waypoint>
<!-- # 60 --><waypoint x="-19894" z="-3458" y="518"> </waypoint>
<!-- # 61 --><waypoint x="-20027" z="-3382" y="494"> </waypoint>
<!-- # 62 --><waypoint x="-20156" z="-3309" y="471"> </waypoint>
<!-- # 63 --><waypoint x="-20212" z="-3258" y="459"> </waypoint>
<!-- # 64 --><waypoint x="-20326" z="-3124" y="463"> </waypoint>
<!-- # 65 --><waypoint x="-20465" z="-2960" y="461"> </waypoint>
<!-- # 66 --><waypoint x="-20533" z="-2879" y="467"> </waypoint>
<!-- # 67 --><waypoint x="-20603" z="-2795" y="488"> </waypoint>
<!-- # 68 --><waypoint x="-20686" z="-2743" y="498"> </waypoint>
<!-- # 69 --><waypoint x="-20789" z="-2724" y="511"> </waypoint>
<!-- # 70 --><waypoint x="-20916" z="-2702" y="532"> </waypoint>
<!-- # 71 --><waypoint x="-21021" z="-2691" y="529"> </waypoint>
<!-- # 72 --><waypoint x="-21098" z="-2710" y="531"> </waypoint>
<!-- # 73 --><waypoint x="-21149" z="-2738" y="531"> </waypoint>
<!-- # 74 --><waypoint x="-21183" z="-2796" y="533"> </waypoint>
<!-- # 75 --><waypoint x="-21226" z="-2857" y="540"> </waypoint>
<!-- # 76 --><waypoint x="-21265" z="-2868" y="540"> </waypoint>
<!-- # 77 --><waypoint x="-21333" z="-2857" y="537"> </waypoint>
<!-- # 78 --><waypoint x="-21383" z="-2855" y="534" tag="at_shop">
buyBelts()
__WPL:setWaypointIndex(__WPL:findWaypointTag("To_Mailbox"))
</waypoint>
<!-- Waypoints to Mailbox -->
<!-- # 1 --><waypoint x="-21383" z="-2855" y="534" tag = "To_Mailbox"> </waypoint>
<!-- # 2 --><waypoint x="-21383" z="-2855" y="534"> </waypoint>
<!-- # 3 --><waypoint x="-21235" z="-2835" y="538"> </waypoint>
<!-- # 4 --><waypoint x="-21156" z="-2788" y="536"> </waypoint>
<!-- # 5 --><waypoint x="-21068" z="-2679" y="527"> </waypoint>
<!-- # 6 --><waypoint x="-20817" z="-2625" y="510"> </waypoint>
<!-- # 7 --><waypoint x="-20642" z="-2752" y="496"> </waypoint>
<!-- # 8 --><waypoint x="-20425" z="-2943" y="458"> </waypoint>
<!-- # 9 --><waypoint x="-20374" z="-3090" y="464"> </waypoint>
<!-- # 10 --><waypoint x="-20220" z="-3203" y="457"> </waypoint>
<!-- # 11 --><waypoint x="-20118" z="-3264" y="489"> </waypoint>
<!-- # 12 --><waypoint x="-19937" z="-3372" y="522"> </waypoint>
<!-- # 13 --><waypoint x="-19811" z="-3408" y="540"> </waypoint>
<!-- # 14 --><waypoint x="-19689" z="-3427" y="558"> </waypoint>
<!-- # 15 --><waypoint x="-19590" z="-3506" y="558"> </waypoint>
<!-- # 16 --><waypoint x="-19449" z="-3617" y="582"> </waypoint>
<!-- # 17 --><waypoint x="-19304" z="-3723" y="603"> </waypoint>
<!-- # 18 --><waypoint x="-19169" z="-3809" y="621"> </waypoint>
<!-- # 19 --><waypoint x="-18971" z="-3922" y="638"> </waypoint>
<!-- # 20 --><waypoint x="-18844" z="-3958" y="671"> </waypoint>
<!-- # 21 --><waypoint x="-18647" z="-3966" y="712"> </waypoint>
<!-- # 22 --><waypoint x="-18562" z="-3852" y="750"> </waypoint>
<!-- # 23 --><waypoint x="-18477" z="-3615" y="785"> </waypoint>
<!-- # 24 --><waypoint x="-18391" z="-3396" y="801"> </waypoint>
<!-- # 25 --><waypoint x="-18328" z="-3229" y="786"> </waypoint>
<!-- # 26 --><waypoint x="-18276" z="-3091" y="796"> </waypoint>
<!-- # 27 --><waypoint x="-18233" z="-2948" y="797"> </waypoint>
<!-- # 28 --><waypoint x="-18223" z="-2870" y="808"> </waypoint>
<!-- # 29 --><waypoint x="-18209" z="-2813" y="817"> </waypoint>
<!-- # 30 --><waypoint x="-18197" z="-2762" y="816"> </waypoint>
<!-- # 31 --><waypoint x="-18156" z="-2649" y="817"> </waypoint>
<!-- # 32 --><waypoint x="-18097" z="-2572" y="827"> </waypoint>
<!-- # 33 --><waypoint x="-18134" z="-2477" y="822">
sendBelts()
print("Done mailing.")
__WPL:setWaypointIndex(__WPL:findWaypointTag("snoop"))
</waypoint>
<!-- Path from Mailbox to Snoop -->
<!-- # 19 --><waypoint x="-18045" z="-2703" tag="snoop"> </waypoint>
<!-- # 20 --><waypoint x="-18326" z="-2650"> </waypoint>
<!-- # 21 --><waypoint x="-18348" z="-2639" y="806"> </waypoint>
<!-- # 22 --><waypoint x="-18373" z="-2861" y="786"> </waypoint>
<!-- # 23 --><waypoint x="-18335" z="-3113" y="781"> </waypoint>
<!-- # 24 --><waypoint x="-18199" z="-3252" y="791"> </waypoint>
<!-- # 25 --><waypoint x="-18035" z="-3391" y="772"> </waypoint>
<!-- # 26 --><waypoint x="-17896" z="-3340" y="801">
travelTo("VaranasWest")
loadPaths("buystones")
</waypoint>
</waypoints>
These are loosely based on Eggman1414's Mana Stone Production Script but I don't have the functions for recovering if you crash during the script.