- - Added exception for the Hyern mailbox.
- Added support for tier 5 items.
- UMM_SendIntentoryItem can now also accept a table of items and slotnumbers.
Rock5's Mail Mods
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Only post additional bot resources here. Please do not ask unrelated questions.
Re: Rock5's Mail Mods
Updated to Version 1.81
- 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
Re: Rock5's Mail Mods
Thanx Rock! Good job!
Ric
p.s. you left the debugfilter enabled
Ric
p.s. you left the debugfilter enabled
Re: Rock5's Mail Mods
Thanks. Fixed.Rickster wrote:p.s. you left the debugfilter enabled
- 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
Re: Rock5's Mail Mods
My server is down for maintanance right now, so I have time to get through some probs and questions I have
Ric
- Relogging on mailsend
When I send some mails to a recipient, whos mailbox is full, the bot relogs in an endless loop.
The behaviour I would prefer is that it just stops sending, skips an additional try to send mail and continues with the next waypoint or whatelse task it has to do by the script.
Can I get the behaviour of the bot like this and maybe get some return values that it skipped sending mails to this recipient? The idea is to write that info to a logfile (no explanation needed on that) to get to this char later on and clear the mailbox.
Does this only trigger when using OneUseMailboxes, or also skips relogging at normal mailboxes?UMM_SetOneUseMailboxRelog(_boolean)
When reaching the sending limit, UMM can now relog and continue sending when using a mailbox, rented portable mailbox or IS purchased convenient mailbox. By default it wont relog when using single-use convenient mailboxes as it might be wasteful. If you still want it to relog and use another single-use mailbox then set this option to true before sending. - Sending jewels for T5
In some regions there drop items from bags, which make a manastone of tier 5. These items are most of the time jewels (necklaces, rings, earrings).
I have not tried jet, but does this also trigger for jewels?_fusedtier - [..] Sends only armor and weapons.
In itemtypestable.lua for the german client jewels are listed as "Schmuckstücke".
So does the following code sends blue jewels with at least level 74?Code: Select all
UMM_SendAdvanced("recipient", nil, 2, 74, nil, "Schmuckstücke")
Ric
Re: Rock5's Mail Mods
Maybe you want to change the documentation torock5 wrote:Updated to Version 1.81
- - UMM_SendIntentoryItem can now also accept a table of items and slotnumbers.
UMM_SendInventoryItem(_recipient, _item)
Sends a specific slot item. Useful if you have selected the item yourself with your own code. Can accept an item object or slot number (61 to 240) or a table of item objects or slotnumbers.
Re: Rock5's Mail Mods
1. I never fixed this before, I think, because the UMM interface can't supply the reason the send failed but the bot now has an easy way to check for system messages. It usually displays something like "Recipient's mailbox is full!" right? I can add a check for that.
UMM_SetOneUseMailboxRelog is just for stopping it wasting a lot of 1 use mailboxes if it can't send.
2.
UMM_SetOneUseMailboxRelog is just for stopping it wasting a lot of 1 use mailboxes if it can't send.
2.
Necklaces, rings and earrings are 'armor' and are usually included when using _fusedtier.Rickster wrote:These items are most of the time jewels (necklaces, rings, earrings)
That looks correct.Rickster wrote:UMM_SendAdvanced("recipient", nil, 2, 74, nil, "Schmuckstücke")
I'll update it.Rickster wrote:Maybe you want to change the documentation
- 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
Re: Rock5's Mail Mods
That would be great!rock5 wrote:1. I never fixed this before, I think, because the UMM interface can't supply the reason the send failed but the bot now has an easy way to check for system messages. It usually displays something like "Recipient's mailbox is full!" right? I can add a check for that.
Yes, it displays a red on screen message, I am not sure about the exact text ... I play on a german client and will look at it later, as soon as a recipients mailbox is full
Maybe you can set it to use a language string or make the search string a useroption.
Can you make the userfunction to return something like "recipientmailboxfull" if it detects that system message?
A closer look at itemtypestable.lua should have prevented my unnecessary questionrock5 wrote:2.Necklaces, rings and earrings are 'armor' and are usually included when using _fusedtier.Rickster wrote:These items are most of the time jewels (necklaces, rings, earrings)
Re: Rock5's Mail Mods
Yes I'll use a language string. I found that one, I think it's the right one. In German it is "Empfänger-Postfach ist voll!". Looks like ROM.dbLanguageFileConverter doesn't show the characters properly.
Sorry, I forgot to mention about returned values. I'll probably have it return true/false for first argument and if false then an error message as a second argument, eg.
Sorry, I forgot to mention about returned values. I'll probably have it return true/false for first argument and if false then an error message as a second argument, eg.
Code: Select all
success, err = UMM_Sendfunction(....)
if not success then
-- Take action depending on error message
if err == "Recipients bags are full" then
-- take appropriate action
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
Re: Rock5's Mail Mods
That sounds very cool!
The string in German is: "Empfänger-Postfach ist voll!" (german "Umlaut") ... which most time ends with saving files with supporting codes, which ist not reliable at all, or escaping this characters.
The string in German is: "Empfänger-Postfach ist voll!" (german "Umlaut") ... which most time ends with saving files with supporting codes, which ist not reliable at all, or escaping this characters.
Re: Rock5's Mail Mods
Try the beta version on the first post.
- 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
Re: Rock5's Mail Mods
When starting MM the following error is thrown and mm aborts:
Code: Select all
2:43pm - scripts\rom/bot.lua:79: ... of micromacro/scripts/rom/f
unctions.lua:2313: bad argument #1 to 'gmatch' (string expected, got nil)
Re: Rock5's Mail Mods
I take it you are using an old version of the bot. The latest has been updated to not use gmatch.
That said, the only way I can see that value being nil is if you called "getTEXT()" with a nil value. I suspect there might be an error in a userfunction. Try removing all your userfunctions and seeing if it starts. If it does then, through the process of elimination, find out which userfunction has the problem.
That said, the only way I can see that value being nil is if you called "getTEXT()" with a nil value. I suspect there might be an error in a userfunction. Try removing all your userfunctions and seeing if it starts. If it does then, through the process of elimination, find out which userfunction has the problem.
- 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
Re: Rock5's Mail Mods
ok, i will check that, but i can check it in a few hours at the earliest.
only thing i changed from working mm and bot version was this userfunction ... but i will report back soon.
only thing i changed from working mm and bot version was this userfunction ... but i will report back soon.
Re: Rock5's Mail Mods
There is a new getTEXT in the UMM userfunction so I had a closer look.
With just a couple of line changes I was able to get getTEXT to work like before and sure enough I got that error. Then I realized I had it doing a getTEXT on function load. That wont work with the old getTEXT because it needed to use RoMScript which hasn't been setup by then.
I've changed it to do the getTEXT when it actually uses the functions so it should work fine now. Hopefully everything else works properly.
I updated the first post beta.
With just a couple of line changes I was able to get getTEXT to work like before and sure enough I got that error. Then I realized I had it doing a getTEXT on function load. That wont work with the old getTEXT because it needed to use RoMScript which hasn't been setup by then.
I've changed it to do the getTEXT when it actually uses the functions so it should work fine now. Hopefully everything else works properly.
I updated the first post beta.
- 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
Re: Rock5's Mail Mods
tested and its going to be a litle difficult for me to explain.
sending to one char works fine, wether its mailbox is full or not.
if its free, the first return value contains true and mail is send.
if its full, the return values contain false and the system message and the chars continues the script.
so one can work with the return values to decide what to do next.
but when again sending to another char, because the mailbox of the first char is full, it does not send to the second char, returning false and also the message that its mailbox is full, although it is not.
i used this code to test it:
[edit] ah, i just run out of full mailboxes to test, but had an idea ... maybe my variable names (sendTItemsToAlternative) are too long. if they are internally cut to 12 chars, they are the same
sending to one char works fine, wether its mailbox is full or not.
if its free, the first return value contains true and mail is send.
if its full, the return values contain false and the system message and the chars continues the script.
so one can work with the return values to decide what to do next.
but when again sending to another char, because the mailbox of the first char is full, it does not send to the second char, returning false and also the message that its mailbox is full, although it is not.
i used this code to test it:
Code: Select all
sendTItemsTo = char1
sendTItemsToAlternative = char2
debug_mode = true
local success1, err_msg1 = UMM_SendByFusedTierLevel(sendTItemsTo, 5)
if debug_mode then
cprintf_ex("|purple| returnvalue 1: %s\n",success1)
player:sleep()
end
if not success1 then
if sendTItemsToAlternative and sendTItemsToAlternative ~= "" then
local success2, err_msg2 = UMM_SendByFusedTierLevel(sendTItemsToAlternative, 5)
if debug_mode then
cprintf_ex("|purple| returnvalue 2: %s\n",success2)
player:sleep()
end
if not success2 then
-- do something
end
end
end
Re: Rock5's Mail Mods
No I don't believe there are limits on variable name length. Where you have
Have it print out the err_msg2.
I can't see what's wrong yet but if you show me what it prints and tel me any other error messages you see and what it does, I might find the problem.
How many items does it take to make a mailbox full anyway?
Code: Select all
if not success2 then
I can't see what's wrong yet but if you show me what it prints and tel me any other error messages you see and what it does, I might find the problem.
How many items does it take to make a mailbox full anyway?
- 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
Re: Rock5's Mail Mods
300 items is mail capacityrock5 wrote:How many items does it take to make a mailbox full anyway?
Life is a journey, not destination
Re: Rock5's Mail Mods
here is the result with the return values.
when the postbox of recipient one is full the return values are correct, but the return valus for the second recipient seem to be always the same than the ones from the first recipient.
right after that i restarted the script, but sent directly to char2 and all is sent as expected.
I use this code to send, nearly the same as i used before.
when the postbox of recipient one is full the return values are correct, but the return valus for the second recipient seem to be always the same than the ones from the first recipient.
Code: Select all
Sending items by fused tier.
Sending items to (char1)... Recipient's bags are full.
success1: false, err_msg1: Recipient's bags are full
Sending items by fused tier.
Sending items to (char2)... Recipient's bags are full.
success2: false, err_msg2: Recipient's bags are full
I use this code to send, nearly the same as i used before.
Code: Select all
local success1, err_msg1 = UMM_SendByFusedTierLevel(char1, 5)
err_msg1 = err_msg1 or ""
cprintf_ex("|purple| success1: %s, err_msg1: %s\n",success1, err_msg1)
if not success1 then
if char2 and char2 ~= "" then
local success2, err_msg2 = UMM_SendByFusedTierLevel(char2, 5)
err_msg2 = err_msg2 or ""
cprintf_ex("|purple| success2: %s, err_msg2: %s\n",success2, err_msg2)
if not success2 then
-- too bad :(
end
end
end
Last edited by Rickster on Sat Jun 29, 2013 2:10 pm, edited 1 time in total.
Re: Rock5's Mail Mods
Ok, I think I see the problem. It's skipping the age check. Try this version.
Replace the file in "Runes of Magic/Interface/Addons/ingamefunctions/". Don't forget to restart the game (or do a /script ReloadUI()). Let me know how it goes.- 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
Re: Rock5's Mail Mods
This time, it did not send to recipient one, which is correct, coz the mailbox is full, then it did a relog, where it does not need one, and then send the mails to recipient two:
another thing: is there an option or somethinig else to have it not to relog in whatever case, mailbox full, sent too many mails already e.g.?
[edit]
second test resultet in the expected behaviour and send to the second recipient without relogging:
Code: Select all
Wir versuchen den NPC 122097 zu finden:
Sending items to recipient1 ... Recipient's bags are full.
success1: false, err_msg1: Recipient's bags are full
Sending items by fused tier.
Sending items to recipient2 ...
Mailing delayed. Reloging before continuing.
Spieleradresse geändert: 0x4B33FA00
Fernkampffähigkeit gefunden: xxx
Wir versuchen den NPC 122097 zu finden:
Der NPC 'Postfach' wurde erfolgreich ausgewählt. Wir öffnen das Dialogfenster.
Items sent.
success2: true, err_msg2:
[edit]
second test resultet in the expected behaviour and send to the second recipient without relogging:
Code: Select all
Sending items by fused tier.
Sending items to recipient1... Recipient's bags are full.
success1: false, err_msg1: Recipient's bags are full
Sending items by fused tier.
Sending items to recipient2... Items sent.
success2: true, err_msg2:
Last edited by Rickster on Sat Jun 29, 2013 2:11 pm, edited 1 time in total.
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests