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
(Condition) getting current number of mails in mailbox
Re: (Condition) getting current number of mails in mailbox
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
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
Re: (Condition) getting current number of mails in mailbox
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 ^^
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 ^^
Re: (Condition) getting current number of mails in mailbox
Well if you are at the mailbox and the mailbox is open then you can use this to get the mail count
This only works if the mailbox is open. So you could do something like
Code: Select all
RoMScript("UMMMailManager.MailCount")
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
Re: (Condition) getting current number of mails in mailbox
Thanks a lot for the tip ![Smile :)](./images/smilies/icon_e_smile.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest