(Condition) getting current number of mails in mailbox

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Froote
Posts: 17
Joined: Sun Aug 24, 2014 5:53 am

(Condition) getting current number of mails in mailbox

#1 Post by Froote » Fri Nov 14, 2014 10:45 am

I use the curse's addon UltimateMailMod, but i can also switch to rock5's mail mod.
I am looking for a function that returns the number of mails i got in my mailbox ; or a function that returns true or false, if my mailbox is empty or not.
I saw in UMM files something like XXX.MailCount, but i don't know how to use it :s

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

Re: (Condition) getting current number of mails in mailbox

#2 Post by rock5 » Fri Nov 14, 2014 12:44 pm

I don't think UMM keeps the mail count. The only time it shows the count is when you open the mailbox. At other times all you see is an icon that says you have mail but not how many. Looking at the code I can't see it saving the count, but it is pretty complex for me to follow.

If you're happy with just knowing if you have mail then you should be able to check UMMConfig.NewMail["playername"]. If it's 1 then you have mail.

I see on my setup that my XBar addon shows the mail count. Maybe if you have an addon like that that shows the mail count then you could get it from there.

Just remember, which ever way you do it, you can only count mail if you receive it while online
  • 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

Froote
Posts: 17
Joined: Sun Aug 24, 2014 5:53 am

Re: (Condition) getting current number of mails in mailbox

#3 Post by Froote » Sat Nov 15, 2014 11:08 am

In this case i use this number or this boolean to take mails until i have no mails in my mailbox :

i am gonna write a code that targets the mail, checks if the mailbox is empty or not (variable mailCondtionEmpty), takes mails, and repeats if mailConditionEmpty is false.

I don't know which function delivers me an information about the mail count (when the mailbox is open), that's what i am looking for ^^

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

Re: (Condition) getting current number of mails in mailbox

#4 Post by rock5 » Sat Nov 15, 2014 11:41 am

Well if you are at the mailbox and the mailbox is open then you can use this to get the mail count

Code: Select all

RoMScript("UMMMailManager.MailCount")
This only works if the mailbox is open. So you could do something like

Code: Select all

repeat
   UMM_TakeMail()
   player:target_NPC("Mailbox") yrest(2000)
until RoMScript("UMMMailManager.MailCount") == 0
  • 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

Froote
Posts: 17
Joined: Sun Aug 24, 2014 5:53 am

Re: (Condition) getting current number of mails in mailbox

#5 Post by Froote » Sat Nov 15, 2014 11:47 am

Thanks a lot for the tip :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest