Page 6 of 39

Re: Rock5's Mail Mods

Posted: Mon Dec 20, 2010 12:36 pm
by dx876234
The main bag loops in the mailmod must be updated with something like below as offsets are 60 now. The example works for bag1.

Code: Select all

	-- Selecting items
	for item = 61, 90, 1 do -- for each inventory
		local slotitem = inventory.BagSlot[item];
		local slotNumber = slotitem.SlotNumber

		-- Check all search terms
		-- printf("Slot %d => quality %d, level %d (%s)\n", slotNumber, slotitem.Quality, slotitem.Quality, slotitem.Name)
		if  (_quality == nil or slotitem.Quality <= _quality) and
			(_reqlevel == nil or slotitem.Quality <= _reqlevel) then

			-- mark to send
			bagid = math.floor((slotNumber-61)/30+1)
			slotid = (slotNumber - 60) - (bagid * 30 - 30)
			
			-- printf("Bag %d, slot %d\n", bagid, slotid)
			RoMScript("UMMMassSendItemsSlotTemplate_OnClick(_G['UMMFrameTab3BagsBag"..bagid.."Slot"..slotid.."'])")
			yrest(250)
		end
	end

Re: Rock5's Mail Mods

Posted: Mon Dec 20, 2010 4:39 pm
by Germangold
I tried to watch closely: afaik the probleme right now is just that "highlightingor selecting" item is not working as it used to work.


any progress on this so far?

Re: Rock5's Mail Mods

Posted: Mon Dec 20, 2010 5:25 pm
by rock5
Ok. It's fixed now in version 1.5.

Along with a few improvements to efficiency, I also increased the range to include all bags.

Please note, this is untested as I'm currently suffering from the 67% stuck problem.

Edit: Occurred to me that some of you will have issues with it selling from all bags so I added 2 values at the top of the file so you can specify the range of slots to send by.

Code: Select all

UMM_FromSlot = 61 -- Default 61, first slot
Umm_ToSlot = 240 -- Default 240, last slot of bag 6

Re: Rock5's Mail Mods

Posted: Mon Dec 20, 2010 5:49 pm
by Germangold
Thanks for the update

but function UMM_SendByNameOrId(_recipient, _itemTable) wont work for me....

Code: Select all

player:target_Object("Briefkasten von Logar",2000); yrest(300); --targets mailbox in logar german client
sendMacro("ChoiceOption(1);"); yrest(300); neccessary to open the mailbox
UMM_SendByNameOrId("Exakalibuhr",{204792});yrest(330); -- function to send "golden Eggs" to character
first and second point works fine as usuall
the script starts to find those golden egg in the inventory, dosent highlight them, enters the recipients name into UMM Target list and clicks on "send item" with none item selected...

Re: Rock5's Mail Mods

Posted: Mon Dec 20, 2010 6:30 pm
by Rickster
The header of "addon_Rock5s_Mail_Functions.lua", from the first post download, still tells about v. 1.4:

Code: Select all

--==<<          Rock5's mail related functions            >>==--
--==<<           By Rock5        Version 1.4              >>==--
Which file contains the following code?
rock5 wrote:

Code: Select all

UMM_FromSlot = 61 -- Default 61, first slot
Umm_ToSlot = 240 -- Default 240, last slot of bag 6

Re: Rock5's Mail Mods

Posted: Mon Dec 20, 2010 6:49 pm
by rock5
Germangold wrote:the script starts to find those golden egg in the inventory, dosent highlight them, enters the recipients name into UMM Target list and clicks on "send item" with none item selected...
The fix was straight forward and should have worked. I can't see why it didn't.
Rickster wrote:The header of "addon_Rock5s_Mail_Functions.lua", from the first post download, still tells about v. 1.4
Good pickup.

It took me awhile to figure out why it wouldn't upload the right version. Turns out I somehow navigated to a backup folder that looked very, very similar. LOL

Anyway the correct 1.51 version is now uploaded. Enjoy.

Re: Rock5's Mail Mods

Posted: Mon Dec 20, 2010 7:22 pm
by ratzuk
Slight error in this. I think it should read:

Code: Select all

local UMM_FromSlot = 61 -- Default 61, first slot
local UMM_ToSlot = 240 -- Default 240, last slot of bag 6
(note the case)

Re: Rock5's Mail Mods

Posted: Mon Dec 20, 2010 7:30 pm
by Germangold
new error occured

Code: Select all

Sending items to Exakalibuhr...
...ts/rom/userfunctions/addon_Rock5s_Mail_Functions.lua:202: 'for' limit must be
 a number
Line 202 in 1.51 Rockmail Functions

for item = UMM_FromSlot, UMM_ToSlot, 1 do -- for each inventory

Re: Rock5's Mail Mods

Posted: Mon Dec 20, 2010 7:38 pm
by rock5
ratzuk wrote:Slight error in this. I think it should read:

Code: Select all

local UMM_FromSlot = 61 -- Default 61, first slot
local UMM_ToSlot = 240 -- Default 240, last slot of bag 6
(note the case)
Typo fixed in version 1.52

Re: Rock5's Mail Mods

Posted: Mon Dec 20, 2010 8:13 pm
by Germangold
thx! it works

really appriciated!

Re: Rock5's Mail Mods

Posted: Thu Dec 23, 2010 4:13 pm
by swietlowka
im keep getting an error on line 204 attempt to index local 'slotitem' <a nil value>
its after opening umm screen and tag the items to sent, then bot crashes...

Re: Rock5's Mail Mods

Posted: Thu Dec 23, 2010 10:09 pm
by rock5
swietlowka wrote:im keep getting an error on line 204 attempt to index local 'slotitem' <a nil value>
its after opening umm screen and tag the items to sent, then bot crashes...
Try doing an inventory:update() first.

Re: Rock5's Mail Mods

Posted: Tue Dec 28, 2010 12:55 pm
by Personalausweis
hey there,

when i send lots of items to my chars, mail won't be send anymore after arnd 60 items, then i need to relog and can (again) send just arnd 60 items.
i have a script sending items automatically to many chars, but it gets stuck after this "60-item-barrier".

is there any way to break this barrier?

perhaps there is an easy way to make this, otherwise i thought about a 5-10 minute delay after serving one char, but this will cause 5-10 HOURS waiting time for the bot -.-

Re: Rock5's Mail Mods

Posted: Tue Dec 28, 2010 7:27 pm
by rock5
Personalausweis wrote:hey there,

when i send lots of items to my chars, mail won't be send anymore after arnd 60 items, then i need to relog and can (again) send just arnd 60 items.
i have a script sending items automatically to many chars, but it gets stuck after this "60-item-barrier".

is there any way to break this barrier?

perhaps there is an easy way to make this, otherwise i thought about a 5-10 minute delay after serving one char, but this will cause 5-10 HOURS waiting time for the bot -.-
So you are not saying that it only sends the first 60 slot items, you are saying it actually only lets you send 60 items?

That sounds like it's a security feature implemented by the game. It's the first I've heard of it. Can anyone else confirm this?

Re: Rock5's Mail Mods

Posted: Wed Dec 29, 2010 2:40 am
by Personalausweis
yeah right, i had the same with RoMail2, every 60 items (approximately) the queue gets stuck and doesn't send any item anymore.

Re: Rock5's Mail Mods

Posted: Wed Dec 29, 2010 2:50 am
by rock5
If it's a security feature then we wont be able to do anything.

Re: Rock5's Mail Mods

Posted: Sat Jan 01, 2011 12:31 am
by kanta
The most I've been able to send during one RoM session is 73 items then the game prevents me from sending any more until I drop to character select and re-enter the game.

Re: Rock5's Mail Mods

Posted: Thu Jan 06, 2011 9:13 pm
by Germangold
i am working on a buying script for the new Level 61 "Excellent Belt" Item Id is : 227502 which can be bought
as a Clear item in Limo Desert from NPC @Nebular Grey-Eye for 3,455 gold
transmuting this belt with an regular fusionsstone >> Manastone-Tier 4
its far more efficient with these belt.


Is there a spesific Mail option to send an specifiy amount of belt to char 1, char 2, char3 ?

following code would send ALL "Excellent Belt" to Char: worldsgreatest

Code: Select all

	player:target_Object("Briefkasten",2000); yrest(150);
	sendMacro("ChoiceOption(1);");yrest(150);
	UMM_SendByNameOrId("worldsgreatest",{227502 });yrest(330); 
an modified parameter like UMM_SendByNameAndQuantity("XY",{227502},8); should send exaclty 8 belt

does this make sense to you rock5?

Re: Rock5's Mail Mods

Posted: Fri Jan 07, 2011 2:22 am
by rock5
Germangold wrote:an modified parameter like UMM_SendByNameAndQuantity("XY",{227502},8); should send exaclty 8 belt

does this make sense to you rock5?
I don't think I want to do that as then I'd have to deal will stackable items too. But this has made me realize there is no way to send a specific item. So what I'll do is add a basic send 1 item function. So you can search the inventory yourself for the item you want to send then send that item.

eg.

Code: Select all

counter = 0
for __, item in pairs(inventory.BagSlot) do
    if item.Name=="Excellent Belt" then
        counter = counter + 1
        UMM_SendInventoryItem(recipient, item) -- or UMM_SendInventoryItem(recipient, item.SlotNumber)
    end
    if counter = 10 then break end -- number you want to send
end

Re: Rock5's Mail Mods

Posted: Mon Jan 17, 2011 6:14 am
by hagenleu
Rock5 the command of your last reply, UMM_SendItem(recipient, item), is already implemented in the UMM (if so can you make an example? cause i 'm not be able to use it) or is a work in progress?