Rock5's Mail Mods

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.
Message
Author
weirdo69
Posts: 7
Joined: Fri Jul 22, 2011 11:39 am

Re: Rock5's Mail Mods

#181 Post by weirdo69 » Fri Aug 05, 2011 9:14 pm

I am also getting an error at line 214 with the string vs. table....

Code: Select all

<!-- # 13 --><waypoint x="5220" z="-2178" y="103">		
	for i = 1, 17 do
         sendMacro("EquipItem("..i..")");
		 yrest(1000)
        end
	player:target_Object("Mailbox",2000);
		yrest(1000)
		if player.Name == "toon1" then
		UMM_SendByNameOrId("toon2", {"Flannel Gloves","Double Welt Soft Boots","Staff of Witchery"}); yrest (2000);
		end
		yrest(5000);
	sendMacro("}LoginNextToon=true;a={");
				sendMacro("Logout();"); yrest(60*1000);
				player = CPlayer.new();
				settings.load();
				yrest (4000)
				loadPaths("CoOStart");
	</waypoint>
When I ran this code:

Code: Select all

<!-- # 13 --><waypoint x="5220" z="-2178" y="103">		
	for i = 1, 17 do
         sendMacro("EquipItem("..i..")");
		 yrest(1000)
        end
	player:target_Object("Mailbox",2000);
		yrest(1000)
		if player.Name == "toon1" then
		UMM_SendByStatNumber("toon2", 4); yrest (2000);
		end
		yrest(5000);
	sendMacro("}LoginNextToon=true;a={");
				sendMacro("Logout();"); yrest(60*1000);
				player = CPlayer.new();
				settings.load();
				yrest (4000)
				loadPaths("CoOStart");
	</waypoint>

I always got an error saying "please close the mailbox interface...", toon1 sends first bag slot item or gives bound error if it is bound. Then it logs off swaps characters and next character "toon2" logs on but mailbox won't open get "Please close mailbox interface..." WTF?
It worked fine when I clean booted in other words if I had accessed the mailbox with "toon1" and got mailbox error couldn't open it with "toon2" but if I restarted ROM and MM the "toon1" would send items correctly. I think this indicates 2 problems one is the mail box interface error and the other is the UMM_SendByNameOrId line 214 error. Hope this helps with the problem, just rolling manually for now :)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#182 Post by rock5 » Fri Aug 05, 2011 10:02 pm

There is a bug in the game that if you change character without closing the mailbox then the next character will think it's still open. When this happens the only way I've found to open the mailbox is to use the following command,

Code: Select all

/script MailFrame:Show()
The old mail interface will open. Close that, then you will be able to click the mailbox to open the UMM interface.

This could be avoided if you close the UMM interface before relogging.

Code: Select all

RoMScript("UMMFrame:Hide()")
So just add that to your script before relogging and it should work.

The reason I never added it to my mail userfunctions is so that, if you want to use more than one of the functions, you don't need to open the mail box between each one.

Maybe I could add a "CloseAllWindows()" command to the player:logout() function? Of course a lot of people don't use that function but instead use the ingame logout function instead like yourself.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

nokirk
Posts: 73
Joined: Sat Jul 03, 2010 2:26 pm

Re: Rock5's Mail Mods

#183 Post by nokirk » Sun Aug 07, 2011 2:31 am

rock5 wrote: I guess we could redo the first test but this time properly. Maybe it will shed some light on the matter. This time insert these lines.

Code: Select all

if type(nam) == "table" then print("nam equals") table.print(nam)
elseif typee(slotitem.Name) == "table" then print("slotitem.Name equals") table.print(slotitem) end
I've got the same problem with line 214,

Code: Select all

UMM_SendByNameOrId ("xxx", {202917,202916,203033,203450,206697,206695,206696});
doesn' t work so I tried to insert those 2 lines.

They are supposed to go into the addon file, right? I tried to insert it after

Code: Select all

-- place item in table if not already
	if type(_itemTable) ~= "number" or type(_itemTable) ~= "string" then
		_itemTable = {_itemTable}
	end
in line 197 but error was
[string " ..."]:6: attempt to index global 'slotitem' (a nil value
)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#184 Post by rock5 » Sun Aug 07, 2011 3:28 am

Does your waypoint file open the mailbox, do stuff, change character then try to open the mailbox again?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

nokirk
Posts: 73
Joined: Sat Jul 03, 2010 2:26 pm

Re: Rock5's Mail Mods

#185 Post by nokirk » Sun Aug 07, 2011 3:55 am

rock5 wrote:Does your waypoint file open the mailbox, do stuff, change character then try to open the mailbox again?
no, no character changing envolved

the whole script looks like this, it's for collecting guild runes:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
	for i, skill in pairs(settings.profile.skills) do
		if skill.Type == STYPE_BUFF then
			settings.profile.skills[i].AutoUse = false
		end
	end
	
	local platz = player:findNearestNameOrId(110726)
	if platz then player:target_NPC(110726);  sendMacro("ChoiceOption(4);"); waitForLoadingScreen(); end
	
	__WPL:setWaypointIndex(15);
</onLoad> 

<!-- #  1 -->	<waypoint x="2748" z="934" y="71">		
	</waypoint>
<!-- #  2 -->	<waypoint x="2917" z="628" y="89">	</waypoint>
<!-- #  3 -->	<waypoint x="3286" z="74" y="60">	</waypoint>
<!-- #  4 -->	<waypoint x="3748" z="-569" y="60">	</waypoint>
<!-- #  5 -->	<waypoint x="3856" z="-720" y="61">		
		player:rest(10);
		player:target_NPC(115810);
		sendMacro("ChoiceOption(1);");
	</waypoint>
<!-- #  6 -->	<waypoint x="3856" z="-720" y="61">	
		player:target_NPC(116067);  sendMacro("ChoiceOption(1);"); yrest(100);
		player:target_NPC(116067);  sendMacro("ChoiceOption(1);"); yrest(100);
		player:target_NPC(116067);  sendMacro("ChoiceOption(1);"); yrest(100);
	</waypoint>
<!-- #  7 -->	<waypoint x="3821" z="-670" y="60">	
		while ( inventory:itemTotalCount(206774) ~= 0 ) do inventory:useItem(206774); end -- oeffnen
		</waypoint>
<!-- #  8 -->	<waypoint x="3675" z="-456" y="60">	</waypoint>
<!-- #  9 -->	<waypoint x="3436" z="-134" y="61">	</waypoint>
<!-- # 10 -->	<waypoint x="3245" z="132" y="62">	</waypoint>
<!-- # 11 -->	<waypoint x="3063" z="389" y="72">	</waypoint>
<!-- # 12 -->	<waypoint x="2789" z="927" y="58">	
		player:target_NPC("Lieve");
		sendMacro("ChoiceOption(2);");
		waitForLoadingScreen();
		</waypoint>
<!-- # 13 -->	<waypoint x="4673" z="-2005" y="109">	</waypoint>
<!-- # 14 -->	<waypoint x="4620" z="-2034" y="103">	</waypoint>
<!-- # 15 -->	<waypoint x="4598" z="-2065" y="103">	</waypoint>
<!-- # 16 -->	<waypoint x="4566" z="-2182" y="103">		
			player:target_Object(110538);yrest(50);sendMacro("ChoiceOption(1);");player:rest(2);
			UMM_TakeMail();		
			yrest(500);
			UMM_SendByNameOrId ("xxx", {202917,202916,203033,203450,206697,206695,206696});yrest(500); -- gildenstein, gilderune, rubin, pferdemiet,kraeuteressen, er essen, hol essen
			RoMScript("CloseAllWindows()");
	</waypoint>
<!-- # 17 -->	<waypoint x="4582" z="-2140" y="103">	</waypoint>
<!-- # 18 -->	<waypoint x="4606" z="-2065" y="103">	</waypoint>
<!-- # 19 -->	<waypoint x="4638" z="-1976" y="103">	</waypoint>
<!-- # 20 -->	<waypoint x="4670" z="-1948" y="103">	</waypoint>
<!-- # 21 -->	<waypoint x="4750" z="-1903" y="106">	</waypoint>
<!-- # 22 -->	<waypoint x="4798" z="-1888" y="104">			
		sendMacro("Logout();"); error("Bot finished", 0);
	</waypoint>
</waypoints>

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#186 Post by rock5 » Sun Aug 07, 2011 4:19 am

nokirk wrote: I tried to insert those 2 lines.

They are supposed to go into the addon file, right? I tried to insert it after

Code: Select all

-- place item in table if not already
	if type(_itemTable) ~= "number" or type(_itemTable) ~= "string" then
		_itemTable = {_itemTable}
	end
in line 197 but error was
[string " ..."]:6: attempt to index global 'slotitem' (a nil value
)
No, put them where I said to put them, between line 213 and 214 so it looks like this,

Code: Select all

			for __, nam in pairs(_itemTable) do
if type(nam) == "table" then print("nam equals") table.print(nam)
elseif typee(slotitem.Name) == "table" then print("slotitem.Name equals") table.print(slotitem) end
				if string.find(string.lower(slotitem.Name),string.lower(nam)) or (slotitem.Id == nam) then -- mark to send
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

nokirk
Posts: 73
Joined: Sat Jul 03, 2010 2:26 pm

Re: Rock5's Mail Mods

#187 Post by nokirk » Sun Aug 07, 2011 4:26 am

output was
nam equals
table: 0245ECA0
1: 202917
2: 202916
3: 203033
4: 203450
5: 206697
6: 206695
7: 206696
...ts/rom/userfunctions/addon_Rock5s_Mail_Functions.lua:217: bad argument #1 to
'lower' (string expected, got table)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#188 Post by rock5 » Sun Aug 07, 2011 4:43 am

I just had a look ad that bit of code you posted.

Code: Select all

   -- place item in table if not already
   if type(_itemTable) ~= "number" or type(_itemTable) ~= "string" then
      _itemTable = {_itemTable}
   end
They are supposed to be == not ~=. I must have fixed it on my computer but never got around to posting it.

I'll double check it and post it.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

nokirk
Posts: 73
Joined: Sat Jul 03, 2010 2:26 pm

Re: Rock5's Mail Mods

#189 Post by nokirk » Sun Aug 07, 2011 4:49 am

working perfectly now =) Thanks a lot !

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#190 Post by rock5 » Sun Aug 07, 2011 5:02 am

I updated it with just that small change to version 1.62.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

weirdo69
Posts: 7
Joined: Fri Jul 22, 2011 11:39 am

Re: Rock5's Mail Mods

#191 Post by weirdo69 » Sun Aug 07, 2011 3:46 pm

Still having a slight problem...Here is my current code:

Code: Select all

<!-- #  5 --><waypoint x="2759" z="968" y="53">		
	player:target_NPC("Lieve");
		sendMacro("ChoiceOption(2);");yrest(1000);
		sendMacro("ChoiceOption(2);");
		waitForLoadingScreen(15)
	</waypoint>
	<!-- #  9 --><waypoint x="4916" z="-1994" y="115">	</waypoint>
	<!-- # 10 --><waypoint x="4959" z="-2014" y="113">		
	player:target_NPC("Kerby");
		sendMacro("ChoiceOption(1);");
		RoMScript("CloseAllWindows()");
	</waypoint>
	<!-- # 13 --><waypoint x="5220" z="-2178" y="103">		
	for i = 1, 17 do
         sendMacro("EquipItem("..i..")");
		 yrest(1000);
      end
	  RoMScript("CloseAllWindows()");
	</waypoint>
	<!-- # 14 --><waypoint x="5220" z="-2178" y="103">
player:target_Object("Mailbox",2000);
		if player.Name == "toon1" then
		 UMM_SendByNameOrId ("toon2", {221306,221305,220098});yrest(500); 
       	end
		RoMScript("UMMFrame:Hide()")
		yrest(2000);
	sendMacro("}LoginNextToon=true;a={");
				sendMacro("Logout();"); yrest(60*1000);
				player = CPlayer.new();
				settings.load();
				yrest (4000)
				loadPaths("NextStart");
	</waypoint>
</waypoints>
Opens vendor window and repairs then walks to mailbox and removes all equipment then opens mailbox says it is sending mail but sends nothing. If I restart the script with the gear in the bag it accurately sends everything... I re-equiped everything and boom same problem nothing gets sent. Is there some function I need to use to analyze the bags following equipment removal. I noticed when it is scanning bags it always stops at last item before recently removed gear almost as if it doesn't recognize those bag slots are full now.

Posted too soon found the

Code: Select all

inventory:update()
inserted it and now everything works great.

sdude13
Posts: 76
Joined: Thu Aug 19, 2010 9:36 am

Re: Rock5's Mail Mods

#192 Post by sdude13 » Sun Aug 14, 2011 4:24 am

Is there a way to use the umm function to select all mail in inbox and hit the "send them back" button ?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#193 Post by rock5 » Sun Aug 14, 2011 5:46 am

Under what circumstance would you want to do that?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

sdude13
Posts: 76
Joined: Thu Aug 19, 2010 9:36 am

Re: Rock5's Mail Mods

#194 Post by sdude13 » Sun Aug 14, 2011 6:51 am

Assume i have some characters for fusion.

I send a bunch t4 to the first. It then creates t8. If the character runs out of charges, i want to return
all t4 to the original sender, so he can send it to next character...

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#195 Post by rock5 » Sun Aug 14, 2011 8:34 am

Wouldn't it make more sense to collect the stones and pass them on to the next character instead of having to login to the first one again to send it to the third?

Anyway, there is no "Select All" button but if one of the existing buttons works, you can use its underlying function.

Example, if the "char" option works then this should work from the bot after opening the mailbox

Code: Select all

RoMScript("UMMMailManager:MassTagMails('chars')")
RoMScript("UMMFrameTab1Tools:ButtonClick('return')")
You would also have to add a wait time for it to finish.

If this doesn't work we would need to get more elements from the UMM_TakeMail() function.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

sdude13
Posts: 76
Joined: Thu Aug 19, 2010 9:36 am

Re: Rock5's Mail Mods

#196 Post by sdude13 » Sun Aug 14, 2011 9:47 am

sending to next character would be nice, BUT that way i have to do
a check which char is active and then for each char one "if char...", and hardcode
the names in.

Plus if i send many stones directly, the mail funtion breaks up. returning mail however does
not breake.

i'll try it tomorrow ;)

thank you for the hint.

User avatar
Bot_romka
Posts: 96
Joined: Tue Apr 05, 2011 2:59 am
Location: Russia

Re: Rock5's Mail Mods

#197 Post by Bot_romka » Thu Aug 25, 2011 5:26 pm

UMM_SendAmountByNameOrId(_recipient, _item, _amount)

I create function for sends amount bag item by name or id. Attention stackable items in BagSlot sent like one item, split theirs first.

example: UMM_SendAmountByNameOrId ("Botromka", "Excellent Belt", 9);

_sory for my bad inglish. i am from Russia

Code: Select all

function UMM_SendAmountByNameOrId(_recipient, _item, _amount)
	---------------------------------
	-- Sends Amount bag items by name or id.

	-- Error checks
	repeat UMMOpen = RoMScript("UMMFrame:IsVisible()") until UMMOpen ~= nil
	if UMMOpen ~= true then
		error("The UMM mail interface needs to be open first before using the UMM_SendAmountByNameOrId() function.")
	elseif _recipient == nil or _item == nil then
		error("You must specify a recipient and item table when using UMM_SendAmountByNameOrId()")
	elseif type(_item) == "table" and type(_item) ~= "number" and type(_item) ~= "string" then
		error("Argument #2 to UMM_SendAmountByNameOrId(): Expected type 'string' or 'number', got '" .. type(_item) .. "'")
	elseif type(_amount) ~= "number" then
		error("Argument #3 to UMM_SendAmountByNameOrId(): Expected type 'number', got '" .. type(_amount) .. "'")
	end

	-- place item in table if not already
	if type(_item) == "number" or type(_item) == "string" then
		_item = {_item}
	end

	printf("Sending amount items to ".._recipient.."...\n")

	-- Open correct tab
	RoMScript("UMMFrameTab1:Hide()") yrest(50)
	RoMScript("UMMFrameTab2:Hide()") yrest(50)
	RoMScript("UMMFrameTab3:Show();") yrest(50)
	yrest(1000)

	-- Selecting items
	local counter = 0
	for item = UMM_FromSlot, UMM_ToSlot, 1 do -- for each inventory
		local amount = _amount
		local slotitem = inventory.BagSlot[item];
		local slotNumber = slotitem.SlotNumber - 60

		if slotitem.Available and not slotitem.Empty and (amount > counter) then
			-- Check the name or id
			for __, nam in pairs(_item) do
				if string.find(string.lower(slotitem.Name),string.lower(nam)) or (slotitem.Id == nam) then -- mark to send
					bagid = math.floor((slotNumber-1)/30+1)
					slotid = slotNumber - (bagid * 30 - 30)
					RoMScript("UMMMassSendItemsSlotTemplate_OnClick(_G['UMMFrameTab3BagsBag"..bagid.."Slot"..slotid.."'])")
					yrest(250)
					counter = counter + 1
					break
				end
			end
		end
	end
	yrest(1000)

	-- Enter recipients name
	RoMScript("UMMFrameTab3RecipientRecipient:SetText('".._recipient.."');")

	-- Sending
	RoMScript("UMMFrameTab3Action:Send()")

	-- Waiting until finished
	repeat
		yrest(2000)
	until RoMScript("UMMFrameTab3Status:IsVisible()") == false

	printf("Items sent.\n")
end 
Last edited by Bot_romka on Fri Aug 26, 2011 12:34 am, edited 1 time in total.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#198 Post by rock5 » Thu Aug 25, 2011 10:23 pm

At first I thought this wasn't really necessary but as I looked at my functions I realised there was a need for it. The current sendbynameorid sends all matching items. I can see there might be a need to send a set number.

That said, I have 2 observations to make.
1. Making a "send by ammount" function that can't handle stacked items is only doing half the job.
2. When you really come down to it, there's really no need for another function. Sending a specific amount should be an option for UMM_SendByNameOrId.

Otherwise, good idea.

If you can't make those changes, let me know. I'll do it.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Bot_romka
Posts: 96
Joined: Tue Apr 05, 2011 2:59 am
Location: Russia

Re: Rock5's Mail Mods

#199 Post by Bot_romka » Fri Aug 26, 2011 12:33 am

UMM_SendByNameOrId(_recipient, _itemTable, _amount)

I modifed UMM_SendByNameOrId() function. Now you can sends amount bag items if you need it.
You can sent amount only 1 item of specific names or ids not a Table items. Attention stackable items in BagSlot sent like one item, split theirs first.

If you not specify a number of amount then UMM_SendByNameOrId() function sent all available items by Name or ID.

example: UMM_SendByNameOrId ("Botromka", "Excellent Belt", 9); --- 9 is number of amount item you want to sent.

_sory for my bad inglish. i am from Russia

Code: Select all

function UMM_SendByNameOrId(_recipient, _itemTable, _amount)
	---------------------------------
	-- Sends bag items or by name or id. Sends Amount bag items by name or id.

	-- Error checks
	repeat UMMOpen = RoMScript("UMMFrame:IsVisible()") until UMMOpen ~= nil
	if UMMOpen ~= true then
		error("The UMM mail interface needs to be open first before using the UMM_SendByNameOrId() function.")
	elseif _recipient == nil or _itemTable == nil then
		error("You must specify a recipient and item table when using UMM_SendByNameOrId()")
	elseif type(_amount) == "number" and type(_itemTable) == "table" then
		error("You must specify only one item for sends amount bag items when using UMM_SendByNameOrId()")
	elseif type(_itemTable) ~= "table" and type(_itemTable) ~= "number" and type(_itemTable) ~= "string" then
		error("Argument #2 to UMM_SendByNameOrId(): Expected type 'table' or 'string' or 'number', got '" .. type(_itemTable) .. "'")
	elseif type(_amount) == "table" or type(_amount) == "string" then
		error("Argument #3 to UMM_SendAmountByNameOrId(): Expected type 'number', got '" .. type(_amount) .. "'")
	end
	
	-- for backward compatibility. Amount set to all.
	if type(_amount) == "nil" then
		_amount = 240
	end

	-- place item in table if not already
	if type(_itemTable) == "number" or type(_itemTable) == "string" then
		_itemTable = {_itemTable}
	end

	printf("Sending items to ".._recipient.."...\n")

	-- Open correct tab
	RoMScript("UMMFrameTab1:Hide()") yrest(50)
	RoMScript("UMMFrameTab2:Hide()") yrest(50)
	RoMScript("UMMFrameTab3:Show();") yrest(50)
	yrest(1000)

	-- Selecting items
	local counter = 0
	for item = UMM_FromSlot, UMM_ToSlot, 1 do -- for each inventory
		local slotitem = inventory.BagSlot[item];
		local slotNumber = slotitem.SlotNumber - 60

		if slotitem.Available and not slotitem.Empty and (_amount > counter) then -- Check amount of item
			-- Check the name or id
			for __, nam in pairs(_itemTable) do
				if string.find(string.lower(slotitem.Name),string.lower(nam)) or (slotitem.Id == nam) then -- mark to send
					bagid = math.floor((slotNumber-1)/30+1)
					slotid = slotNumber - (bagid * 30 - 30)
					RoMScript("UMMMassSendItemsSlotTemplate_OnClick(_G['UMMFrameTab3BagsBag"..bagid.."Slot"..slotid.."'])")
					yrest(250)
					counter = counter + 1
					break
				end
			end
		end
	end
	yrest(1000)

	-- Enter recipients name
	RoMScript("UMMFrameTab3RecipientRecipient:SetText('".._recipient.."');")

	-- Sending
	RoMScript("UMMFrameTab3Action:Send()")

	-- Waiting until finished
	repeat
		yrest(2000)
	until RoMScript("UMMFrameTab3Status:IsVisible()") == false

	printf("Items sent.\n")
end
Last edited by Bot_romka on Fri Aug 26, 2011 1:21 am, edited 1 time in total.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#200 Post by rock5 » Fri Aug 26, 2011 1:13 am

Hm.... I've been thinking about stacks and how to handle them. I think I might have to do a whole rewrite. Sorry if I'm hijacking this from you.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 7 guests