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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#621 Post by rock5 » Sun Jun 08, 2014 1:49 am

Updated the first post with version 1.84 of the userfunction which is essentially the same as 1.84b3 previously posted.
  • 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
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Rock5's Mail Mods

#622 Post by silinky » Sun Jun 22, 2014 5:23 pm

hi!
i think i have a problem ot don't use this how it should be used.
i have this code:

Code: Select all

			UMM_TakeMail();
			yrest(30000);
it opens the mailbox, collects very fast the first 5 items, and it closes the mailbox although i have 30 items inside.
also it does not delete the resulted 5 empty mails so it will clutter the mailbox.

also i tried the suggestion concerning RoMScript("UMMFrameTab1Tools:ButtonClick('take');"); line, but that sux because it either waits too much or too little.

can anyone tell me what am i doing wrong?

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

Re: Rock5's Mail Mods

#623 Post by rock5 » Sun Jun 22, 2014 11:16 pm

Do you have the latest version of the Rock5s_Mail_Functions userfunction?
  • 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
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Rock5's Mail Mods

#624 Post by silinky » Mon Jun 23, 2014 5:58 am

yes i redownloaded both last night :)
i 'kinda' resolved it with this:

Code: Select all

			repeat
				local belts = inventory:itemTotalCount(228966)
				local fusion = inventory:itemTotalCount(202999)
				openMailbox()
				UMM_DeleteEmptyMail()
				UMM_TakeMail()
			until belts == 27 and fusion == 27 
this works, but like this: it opens mailbox, deletes failed mails ok, gets the first 5 attachments VERY FAST, it closes, leaves these mails without attachments undeleted, and it will open again. so it will open mail 5 by 5 until everything is ok.
it works but it doesn't look like the right way.

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

Re: Rock5's Mail Mods

#625 Post by rock5 » Mon Jun 23, 2014 6:07 am

The last version of the userfunction is supposed to fix this. Did you delete or overwrite your old version of the userfunction? Or did you rename it as a backup?
  • 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
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Rock5's Mail Mods

#626 Post by silinky » Mon Jun 23, 2014 6:50 am

i have my old one renamed as a backup, because i have some customizations there.
the new one is loaded though, because the old one does not contain the function: UMM_DeleteEmptyMail()

my UMM is: Version: 1.6.5.1676

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

Re: Rock5's Mail Mods

#627 Post by rock5 » Mon Jun 23, 2014 7:14 am

If the old file still starts with "userfunctions_" and ends with ".lua" then it will get loaded as well. So if the old one loads last then the duplicate functions will be overwritten. UMM_DeleteEmptyMail() doesn't exist in the old file so doesn't get overwritten but all the other functions will.

I usually change the extention to "._lua". 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

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Rock5's Mail Mods

#628 Post by silinky » Mon Jun 23, 2014 8:02 am

these are my userfunctions, i don't think i have the old one here.
Clipboard01.jpg
didn't know this bug is so hard to track down, if you cannot reproduce it, then it must be something on my side.

i am guessing the closing occurs somewhere here?

Code: Select all

	repeat
		yrest(5000)
		InboxCount = taggedCount()
		if InboxCount == lastInboxCount then
			-- Stuck
			RoMScript("HideUIPanel(MailFrame)")
			break
		end
		lastInboxCount = InboxCount
	until RoMScript("UMMMailManager.priv_AutoRunning") == nil

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Rock5's Mail Mods

#629 Post by ZZZZZ » Mon Jun 23, 2014 4:24 pm

The addon_Rock5s_Mail_Functions files, move the old one to a new folder called "Backup" or something, then try again.

The issue you describe was definitely fixed with the latest Mail Function release, I had the exact same issue but not any more.

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Rock5's Mail Mods

#630 Post by silinky » Mon Jun 23, 2014 6:23 pm

ZZZZZ wrote:The addon_Rock5s_Mail_Functions files, move the old one to a new folder called "Backup" or something, then try again.

The issue you describe was definitely fixed with the latest Mail Function release, I had the exact same issue but not any more.
well, i deleted it completely, and you are right. somehow it got loaded even with another extension. this fixed also another bug where it wouldn't wanted to open some mailboxes even if the char was near.
also, as a suggestion i would recommend introducing RoMScript("MailFrame:Show()"); RoMScript("MailFrame:Hide()") into the addon somewhere maybe in openMailbox(), because i get frequent errors concerning these.

thanks for the ideas and for this wonderful addon :)

User avatar
cibervagos
Posts: 26
Joined: Sat Apr 12, 2014 10:36 pm
Location: Argentina

Re: Rock5's Mail Mods

#631 Post by cibervagos » Mon Jun 23, 2014 8:51 pm

Hi Rock5! I always get this error. Any idea??

IGF:\UMMFrameTab1Tools:ButtonClick('take');\:IGF [string "?"]:54: attempt to concatenate field 'Subject' (a nil value)
Attachments
Takemail.jpg

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

Re: Rock5's Mail Mods

#632 Post by rock5 » Mon Jun 23, 2014 10:51 pm

silinky wrote:you are right. somehow it got loaded even with another extension.
I had a look at the pattern the bot uses. It looks like it doesn't require that the name start with "userfunction_" and end with ".lua" only that it contain them. So "blahuserfunction_name.luablah" would still match. Obviously the simple fix would be to make sure there is no "userfunction_" or ".lua" in the name but I'll add a fix to the next version of the bot to make sure it starts and ends with those strings. BTW here is a demonstration of the pattern it uses. It still finds a match.

Code: Select all

Lua> v = "addon_rock5s_mail_functions.lua.bak" print(string.match(v, "addon_(.*)%.lua"))
rock5s_mail_functions
Lua> v = "bakaddon_rock5s_mail_functions.lua" print(string.match(v, "addon_(.*)%.lua"))
rock5s_mail_functions
This is what I'll change it too.

Code: Select all

Lua> v = "addon_rock5s_mail_functions.lua.bak" print(string.match(v, "^addon_(.*)%.lua$"))
nil
Lua> v = "bakaddon_rock5s_mail_functions.lua" print(string.match(v, "^addon_(.*)%.lua$"))
nil
Lua> v = "addon_rock5s_mail_functions.lua" print(string.match(v, "^addon_(.*)%.lua$"))
rock5s_mail_functions
cibervagos wrote:IGF:\UMMFrameTab1Tools:ButtonClick('take');\:IGF [string "?"]:54: attempt to concatenate field 'Subject' (a nil value)
Maybe there is something wrong with your UMM addon. Try reinstalling it. That's the addon in the games interface/addon folder. Don't forget to restart the game after updating it. If you want to keep your old version of the addon as a backup, move it to another location, don't just rename 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
cibervagos
Posts: 26
Joined: Sat Apr 12, 2014 10:36 pm
Location: Argentina

Re: Rock5's Mail Mods

#633 Post by cibervagos » Wed Jun 25, 2014 9:06 pm

Hi again.. I delete my UMM folder and I download again. But I get the same error. some times works. But when I change character doesn't work anymore. If I call UMM_TakeMail() from command line works. But if I put in a waypoint file, just work first time (sometimes) and I get error when I change character or doesn't work at all.

One more time I need to apologies for my english :oops:

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

Re: Rock5's Mail Mods

#634 Post by rock5 » Thu Jun 26, 2014 12:24 am

I don't know. It works for me. Do you recieve any unusual mails? When it fails, does it fail again as soon as you restart it? Does it fail on a particular mail?

Unless you can pinpoint the cause or can consistently reproduce the error, there is not much I can do.
  • 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
cibervagos
Posts: 26
Joined: Sat Apr 12, 2014 10:36 pm
Location: Argentina

Re: Rock5's Mail Mods

#635 Post by cibervagos » Sat Aug 02, 2014 4:46 pm

Hi! I have some info about my problem. I found this error on RoM windows.

call ifg_events_Frame's OnEvent, line: [string "?"]:72: attempt to index global 'os' (a nil value)

and

call UMMMasterFrame's OnUpdate, line: [string "?"]:54: attempt to concatenate field 'subject' (a nil value)
Attachments
Second error message
Second error message
First error message.
First error message.

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

Re: Rock5's Mail Mods

#636 Post by rock5 » Sat Aug 02, 2014 10:43 pm

The first error tells me you need an 'os' replacement addon such as d303fix. This is pretty much a needed requirement for the bot. There are probably some things you could do without this addon but a lot of things need this addon especially a lot of core userfunctions. And when you get an error due to not having it it's often hard to figure out the cause. So just install it.

I'm not sure about the second error. It could in some way be caused by the above problem so I would add the addon first and see if it reoccurs. Otherwise it seems to indicate a message with an empty subject. Are you aware if you received a mail with no subject?

Edit: Did some testing. Looks like it's impossible to send a mail with nil subject so that can't be the cause of your second error.
  • 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
cibervagos
Posts: 26
Joined: Sat Apr 12, 2014 10:36 pm
Location: Argentina

Re: Rock5's Mail Mods

#637 Post by cibervagos » Tue Aug 12, 2014 12:05 pm

Hi again!
rock5 wrote: The first error tells me you need an 'os' replacement addon such as d303fix. This is pretty much a needed requirement for the bot. There are probably some things you could do without this addon but a lot of things need this addon especially a lot of core userfunctions. And when you get an error due to not having it it's often hard to figure out the cause. So just install it.
Well, I install d303fix and 'os' problem is solved. But d303fix causes much other issues in my game. Other addons stop working like pbinfo and DIYCE. And 'subject' still be a nil :(
rock5 wrote: I'm not sure about the second error. It could in some way be caused by the above problem so I would add the addon first and see if it reoccurs. Otherwise it seems to indicate a message with an empty subject. Are you aware if you received a mail with no subject?


All of my mail have a subject, and subject appear in list. But I guess here local packageIcon, sender, subject, COD, moneyMode, money, daysLeft, paperStyle, items, wasRead, wasReturned, canReply = GetInboxHeaderInfo(index); I have the problem. So I quit d303fix and fix the 'subject' problem:

Code: Select all

if (subject) then
	newMail.Subject = subject;
else
	newMail.Subject = "error";
end
(and 'os' message error gone too :shock: )

But with a solved subject new error appear :cry: . Now ItemQueueLength is a nil value.
rock5 wrote: Edit: Did some testing. Looks like it's impossible to send a mail with nil subject so that can't be the cause of your second error.
I dont try to send a mail. I try to take a mail. But I will do some test to see if is an addon problem or not. Be couse the addon work fine if I use manually in game.

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

Re: Rock5's Mail Mods

#638 Post by rock5 » Tue Aug 12, 2014 12:54 pm

cibervagos wrote:But d303fix causes much other issues in my game. Other addons stop working like pbinfo and DIYCE.
You have something majorly wrong. d303fix should not cause problems with addons. In fact it should fix some addons that need the os functions. Even pbinfo needs it for some features. Here is a quote from the d303fix curse page.
IMPORTANT

Any features using the recently removed os.* functions are available only if you install an addon providing these, e.g. d303Fix.
cibervagos wrote:But with a solved subject new error appear :cry: . Now ItemQueueLength is a nil value.
I think there is something buggy with your game.

Maybe you have an addon that is interfering with other addons and the bot. An easy way to test this is to remove all the other addons and see it it works. Note: removing addons may cause the game to loose any settings. Back up your savevariables.lua file so you can restore it later after you return your addons.

Or maybe you have a corrupt macro.bsd. This has been known to cause problems with the bot in the past. Macro.bsd is saved for each character. Are you having the problem with particular characters or all of them?
  • 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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: Rock5's Mail Mods

#639 Post by Rickster » Fri Aug 15, 2014 8:39 pm

I tried to send mail in Hortek for the first time. There are two mailboxes, but both do not open automatically when sending.
Do I have to target them manually, as in the beginning of the userfunction, before Rock5 added this great feature?

Ric

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

Re: Rock5's Mail Mods

#640 Post by rock5 » Sat Aug 16, 2014 3:31 am

I suspect it's the usual problem, the mailboxes don't have the floating mail icon over them. Is this the case?

Mailboxes can have different names so this userfunction searches for the icon that floats over the mail boxes and uses that to find the mailbox. I've already added 2 exceptions for Hyern and Muckgale Port which don't have the floating icon. I suspect, going forward, that more and more mailboxes will be added without the floating mail icon. I can't just keep adding exceptions. I think I will change the function so, hopefully, it wont be necessary in the future. It looks like all new mailboxes are called "Mailbox". Maybe I'll search for "Mailbox" or the floating icon. That should find all mailboxes to date. I'll work on it and post something soon.
  • 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: No registered users and 9 guests