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
User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: Rock5's Mail Mods

#141 Post by gloover » Tue Mar 29, 2011 3:25 am

UMM has such function

Code: Select all

UMMSettings:NewMail()
in UltimateMailMod.lua depends on the ~=nil or >0 value, but I'm not a lua expert like U or some other guys here, so my efforts to use this function always causes compilation errors :cry:

Maybe another one find the solution.. I'm just trying to use the AdvanceAuctionHouse - similar to your UMM-addon- to get my bot adding auction automatically, or are there already any scripts posted?

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

Re: Rock5's Mail Mods

#142 Post by rock5 » Tue Mar 29, 2011 6:49 am

That command worked fine for me. Try,

Code: Select all

if RoMScript("UMMSettings:NewMail()") == 1 then
    -- load return path
end
It always seems to return 1 when you have any number of new mails and 0 or nil if you don't have new mail.
  • 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
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: Rock5's Mail Mods

#143 Post by gloover » Tue Mar 29, 2011 8:30 am

Damn rookie mistake, I've tried the same function and forgot the second "=" that caused the compilation failure.

thx rock!

Auto Pilot
Posts: 24
Joined: Tue Mar 01, 2011 3:23 am

Re: Rock5's Mail Mods

#144 Post by Auto Pilot » Thu Apr 07, 2011 9:25 pm

How hard would be it to manually retrieve mails (to get specific items and maybe a specific amount of each) instead of using UMM's "Take All" button ?

Mainly thinking about auto-transmuting on alts with a lot of charges and limited inventory space (if I need to send 60 belts & 60 fusion stones on a char and it fills inventory with one of those, it will end up stuck with nothing to transmute and no way to get the other item)

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

Re: Rock5's Mail Mods

#145 Post by rock5 » Thu Apr 07, 2011 9:34 pm

The obvious answer is to send the items in smaller groups or even alternate single items. eg. 1 belt, 1 fusion stone, 1 belt, 1 fusion stone, etc.
  • 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

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Rock5's Mail Mods

#146 Post by kanta » Mon Apr 11, 2011 7:04 am

Ok, I don't know how possible such an idea would be but I figured I'd throw it out there.

Sometimes when I'm out farming mobs I get multiple item types that I'd like to mail to a mule alt. Instead of specifying each type of item is there a possibility to add the functionality of auto selecting everything on a certain page in UMM? Maybe adding that function so the bot can pick up on it? Something like UMM_SendByPage (first page to send, second page to send, etc)

Something like this, as I see it, could be helpful in such a way as to have a universal send that could be added into any waypoint script without having to specify items to send for each one. This could also avoid the need of storing items of like type located in other bag pages into your bank or chests by using the UMM_SendAdvanced(_recipient, _nameorid, _quality, _reqlevel, _worth, _objtype) function. What I mean by this is like if I want it to send level 61 and above of green or higher quality items it will not attempt to mail the items I have on page 6. It's kind of disturbing that it keeps trying to mail my Rhinoceros Blood and War Insignias or other similar equipment types that I want to keep on the originating character when I'm farming for T4 items.
Scout/Knight/Rogue 70/66/66

Germangold
Posts: 276
Joined: Thu Oct 22, 2009 3:58 am

Re: Rock5's Mail Mods

#147 Post by Germangold » Sat Apr 23, 2011 8:51 am

I have a problem with sending multiple items by ID with the latest version of this addon


OnLeavecombat

Code: Select all

if (meincounter == true) then
		meincounter = false;
	       sendMacro("OpenMail()");  
		yrest(390); 
		UMM_SendByNameOrId("Atrekfohe",{207438,207437});
		yrest(330); 
sendMacro("CloseAllWindows()");
end

Code: Select all

E:/micromacro/scripts/rom/classes/player.lua:1254: Fehler im Profile bei der Zei
tpunktverarbeiten: onLeaveCombat error ...ts/rom/userfunctions/addon_Rock5s_Mail
_Functions.lua:214: 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

#148 Post by rock5 » Sat Apr 23, 2011 9:20 am

There are 2 'lower' commands on that line, string.lower(slotitem.Name) and string.lower(nam).

'nam' is the items given by the user. If you used

Code: Select all

UMM_SendByNameOrId("Atrekfohe",{207438,207437});
then 'nam' will equal 207438 and then 207437. Neither are tables.

'slotitem.Name' is the item name in the inventory. That should never equal a table unless you used some code somewhere that messes with inventory item names.

Edit: Wait, I think I see a mistake. I'm surprised no one has mentioned it before. Line 194

Code: Select all

	if type(_itemTable) ~= "number" or type(_itemTable) ~= "string" then
Should be

Code: Select all

	if type(_itemTable) == "number" or type(_itemTable) == "string" then
I don't know how I made that mistake.
  • 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

dewster
Posts: 1
Joined: Fri Apr 29, 2011 4:40 pm

Re: Rock5's Mail Mods

#149 Post by dewster » Fri Apr 29, 2011 4:48 pm

I have been struggling with this addon, i keep trying to mail stuff, and it doesnt seem to work, it usually crashes out when the mailbox is open and it tries to send stuff...
"scripts\rom\bot.lua:760: filed to compile and run Lua code for waypoint # 3"

the line it screws up on is this
<!-- # 1 --><waypoint x="-5831" z="3239" y="566"> </waypoint>
<!-- # 2 --><waypoint x="-5851" z="3256" y="570">
sendMacro("OpenMail()");
UMM_SendByNameOrId ("NAMEHERE",{Link Rune,activate rune,purify rune,frost rune,disenchant rune,guild rune,oak wood,moxa}); yrest(390);
sendMacro("CloseAllWindows()");
</waypoint>

<!-- # 3 --><waypoint x="-5840" z="3242" y="567"> </waypoint>
<!-- # 4 --><waypoint x="-5827" z="3230" y="564"> </waypoint>

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

Re: Rock5's Mail Mods

#150 Post by rock5 » Fri Apr 29, 2011 7:35 pm

The list of items to be sent need to be strings eg.

Code: Select all

UMM_SendByNameOrId ("NAMEHERE",{"Link Rune","activate rune","purify rune","frost rune","disenchant rune","guild rune","oak wood","moxa"});
Try 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

bumbum
Posts: 3
Joined: Wed Jun 01, 2011 10:25 am

Re: Rock5's Mail Mods

#151 Post by bumbum » Mon Jun 06, 2011 2:37 pm

Hi there.

I have problem sending items from bag1 slot 1-30 using UMMSendBelow.
Basically my bot only sends some random stuff no matter what I changed.

I was wondering if anyone could guide me around how to send every item in bag 1 regardless of quality and level requirement?

Thank you in advance!

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

Re: Rock5's Mail Mods

#152 Post by rock5 » Mon Jun 06, 2011 8:11 pm

What's UMMSendBelow? That's not one of mine.

There is no function to send items from particular slots. There shouldn't really be any need for one.

What exactly do you want to send or not send. Maybe I can help your formulate a command using UMMSendAdvanced if the other functions are not appropriate.
  • 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

bumbum
Posts: 3
Joined: Wed Jun 01, 2011 10:25 am

Re: Rock5's Mail Mods

#153 Post by bumbum » Tue Jun 07, 2011 4:23 am

Hi Rock5, thank you for your attention.

I am farming Cyclopes Lair for items but I dont want to wait until all 6 bags are full and run back to sell them.
I want my character to send everything in bag 1 to my other character. I tried using UMM_SendAdvance but no luck.


Thanks :)

ps: check this link and you will know what I mean with the umm_SendBelow
rompros.com/rom-general/2307-gold-farming-cyclops-lair.html

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

Re: Rock5's Mail Mods

#154 Post by rock5 » Tue Jun 07, 2011 4:59 am

I'm not a member of rompros so can see that file.

So do you want code to use to decide when your bag 1 is full and go mail them?

Code: Select all

if inventory:itemTotalCount(0,"bag1") == 0 then -- bag 1 is full
    -- load mailer waypoint file
end
If you want a command to mail all the items you collected? Looks like UMM_SendAdvanced wont let you send without using one of the options.
I would just use the "type" setting but it looks like I haven't updated this function since I updated the item types system in rombot.

I think the easiest solution would be to change lines 284-285,

Code: Select all

	elseif _recipient == nil or (_nameorid == nil and _quality == nil and _reqlevel == nil and _worth == nil and _objtype == nil) then
		error("You must specify a recipient and at least 1 of the search serms to use UMM_SendAdvanced()")
to

Code: Select all

	elseif _recipient == nil then
		error("You must specify a recipient to use UMM_SendAdvanced()")
You can then just use

Code: Select all

UMM_SendAdvanced("recipient")
to send everything.

If you really have a need to just send all items in bag 1 it can still be done.

Code: Select all

for i = 61,90 do
    UMM_SendInventoryItem("recipient", i)
end
  • 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

bumbum
Posts: 3
Joined: Wed Jun 01, 2011 10:25 am

Re: Rock5's Mail Mods

#155 Post by bumbum » Tue Jun 07, 2011 10:57 am

The last code is working except it tries to send one item at a time and going through bag 1 even if there is nothing in the bag :) but with no errors though.
It would be nice to just open the mail and mass send the items.

Here is the code from the other script that is supposed to be doing the job but isnt, what did I do wrong?

Code: Select all

function UMM_SendBelow(_recipient, _quality, _reqlevel)
	----------------------------------
	-- Sends if all search terms match

	-- 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_SendMoney() function.")
	elseif _quality ~= nil and type(_quality) ~= "number" then
		error("Argument #2 to UMM_SendAdvanced(): Expected type 'number', got '" .. type(_quality) .. "'")
	elseif _reqlevel ~= nil and type(_reqlevel) ~= "number" then
		error("Argument #3 to UMM_SendAdvanced(): Expected type 'number', got '" .. type(_reqlevel) .. "'")
	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 
	for item = 1, 30, 1 do -- for each inventory
		local slotitem = inventory.BagSlot[item];
		local slotNumber = slotitem.SlotNumber

		-- Check all search terms
		if  (_quality == nil or slotitem.Quality <= _quality) and
			(_reqlevel == nil or slotitem.RequiredLvl <= _reqlevel) 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)
		end
	end

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

Re: Rock5's Mail Mods

#156 Post by rock5 » Tue Jun 07, 2011 9:30 pm

If my code worked then the problem with yours is you forgot to minus 60 from the slot number.

Code: Select all

      local slotNumber = slotitem.SlotNumber
should be

Code: Select all

      local slotNumber = slotitem.SlotNumber - 60
like mine.
  • 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

Chemico
Posts: 6
Joined: Fri Jun 17, 2011 8:24 am

Re: Rock5's Mail Mods

#157 Post by Chemico » Fri Jul 08, 2011 5:12 am

Hey Rock5, what happened to your Curse- Outpost regarding UMM? It suddenly disappeared, UMM is not downloadable from Curse anymore and the project page also doesnt exist :o

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

Re: Rock5's Mail Mods

#158 Post by rock5 » Fri Jul 08, 2011 6:59 am

I don't know. Maybe the developer decided to close it. I think it was still working so I don't know why.

My edited version is still available here, though.
http://www.solarstrike.net/phpBB3/viewt ... =27&t=1561
  • 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

C3PO
Posts: 109
Joined: Sun Jul 10, 2011 2:45 pm

Re: Rock5's Mail Mods

#159 Post by C3PO » Tue Jul 12, 2011 5:30 pm

Hey Rock5,

I have already seen, that there was a discussion about the sending gold, but the solution was linked to curse.com where it isn't available anymore.

could you post it here.

thx in advance

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

Re: Rock5's Mail Mods

#160 Post by rock5 » Tue Jul 12, 2011 9:39 pm

C3PO wrote:I have already seen, that there was a discussion about the sending gold, but the solution was linked to curse.com where it isn't available anymore.
I'm not sure what you are talking about. My mail userfunctions and my edited version of UltimateMailMod is on the first post of this thread. One of the userfunctions is for sending gold.
  • 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: Ahrefs [Bot] and 1 guest