MailMats function

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Post Reply
Message
Author
User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

MailMats function

#1 Post by beanybabe » Thu Jul 23, 2015 12:21 pm

I made this but I need to expand it to handle all crafting mats in bag.
just give it a chars name and it mails all mats in the bag to them.
If anyone has done this or has simple idea before I spend weeks trying to figure it out.
I looked at the mail belts from fusion controls and this may also need a list of people to send to in case the mailbox fills.
YGather from Curse looks like it has code to load a table with all the mats but its to hard for me to figure out.

This is what I use now to mail just 1 mat at a time.

Code: Select all

function mailgoods()
	GotoGuild("Guild Mailbox")
	player:target_NPC("Guild Mailbox") -- Mailbox
	UMM_SendByNameOrId(nametosendto,numberofitemtosend, inventory:itemTotalCount(itemname));
	yrest(500);
	RoMScript("UMMFrame:Hide()")
end	

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: MailMats function

#2 Post by noobbotter » Thu Jul 23, 2015 1:11 pm

If you were to look in the itemtypestable.lua file, it lists types of items that you can use with the function. If you use "Materials" in your mail function, it would send all Wood, Herbs, Ores, Raw Materials, Production Runes, Prepared Materials, and Ore:

Code: Select all

function mailgoods()
   GotoGuild("Guild Mailbox")
   player:target_NPC("Guild Mailbox") -- Mailbox
   UMM_SendAdvanced(nametosendto,nil,nil,nil,nil,"Materials") --look in rom/cache/itemtypestable.lua for exact name of "Materials"
   yrest(500);
   RoMScript("UMMFrame:Hide()")
end   
That would send all Materials to the named character.

If you want to send only, for example, wood, herbs and ore, you could use this line:

Code: Select all

UMM_SendAdvanced(nametosendto,nil,nil,nil,nil,{"Wood", "Herbs", "Ore"}) --look in rom/cache/itemtypestable.lua for exact name of "Materials"

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: MailMats function

#3 Post by beanybabe » Thu Jul 23, 2015 10:59 pm

I needed way to have multiple wp call one and have it return. I found post by rock saying it cannot be done. I was going to have multiple dailys being called by several main. So now I am rewriting all the dailys into functions I can call.

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: MailMats function

#4 Post by beanybabe » Wed Feb 03, 2016 3:57 am

UMM_SendAdvanced(nametosendto,nil,nil,nil,nil,{"Wood", "Herbs", "Ore"})

I tried to use this to send just these 3 items but it did not work, Any ideas?

I tried just one mat at a time also.
The only way it worked is the word "Materials"

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: MailMats function

#5 Post by noobbotter » Wed Feb 03, 2016 8:36 am

It should work. I know I used to use this line in one of my scripts:

UMM_SendAdvanced("CharNameToSendTo",nil,nil,nil,nil,{"Herbs","Ores","Raw Materials","Prepared Materials"})

Only difference I can see is the spaces you have between the {"Wood", "Herbs", "Ore"}. Try it like this: {"Wood","Herbs","Ore"}. Maybe that will do it?

lovemelongtime
Posts: 6
Joined: Fri Dec 25, 2015 3:04 am

Re: MailMats function

#6 Post by lovemelongtime » Fri Mar 18, 2016 9:53 pm

Is there a way I could get it to send items only when backpack is full?

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: MailMats function

#7 Post by beanybabe » Sat Mar 19, 2016 5:38 pm

You would need a path to a mail box or have mail tickets. Then check when bag near full you could call a mail function.

I made a mail function that runs to some mail box and sends mail. Each zone is little different so unless you use mail tickets you need to custom make them.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest