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

#481 Post by rock5 » Tue Jul 09, 2013 6:10 am

The original reason I had my own version of UMM is because all the 'setfocus' commands would stop RoMScript macros from running. I don't know if it's still true today to tell you the truth. Maybe the changes I've made since then to detect and automatically close open edit boxes makes the original UMM work. I might have to test it.

Rickster wrote:I added an yrest() to the return part of the function, when the mailbox was opened an everything works fine now.
So you don't think it's a UMM problem but just that it has to wait for the frame to finish opening? A better solution might be to find some indicator that the items have finished loading and wait for that. I'll have a look.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#482 Post by rock5 » Tue Jul 09, 2013 7:05 am

Looks like you can use any version now, assuming I didn't make use of any changes I made, in the userfunction, which it looks like I didn't. Seems pointless to maintain my own version now.


I couldn't find a clear indicator that the inbox has finished updating. You might have to go with the yrest. So was this yrest fix for the version you showed us?
  • 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

#483 Post by Rickster » Tue Jul 09, 2013 12:37 pm

rock5 wrote:So you don't think it's a UMM problem but just that it has to wait for the frame to finish opening?
Yes, but all this is far away of my programming knowlege and understanding :-/
So just waiting a little bit helps your userfunction to take the mails in the box, instead of skipping the whole process.
rock5 wrote:So was this yrest fix for the version you showed us?
Yes. But nobody else seemed to discover that prob, so it may have something to do with the version of UMM I use ore with the machines speed people are running all this on.

At the moment i use Rock5's mail related functions Version 1.82b3 with above changes and unmodified Ultimate Mail Mod (continued) Version: 5.0.3.2579.


And here go my next questions, independent from the other topics ;) I hope I do not get on your nerves asking ...

1. When there is no mailbox at the chars location, or a mailbox is a little bit to far away, so you you have to make a step towards it to open it, the userfunction tries to use a one use mailbox. Can I tell it to not use one use mailboxes in any circumstances?

2. UMM_SetOneUseMailboxRelog() controls how it is relogging, when using one use mailboxes. But it is not clear to me when and how it is relogging when using ordinary mailboxes.
Can you please explain a little more detailed how and when relogging takes place?

For example I watched it relogging when I interrupted the automatic mail sending by moving the char or by clicking with the mouse at the RoM window, so it does not get to finish sending of one item.

Thanks
Ric

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

Re: Rock5's Mail Mods

#484 Post by rock5 » Tue Jul 09, 2013 1:52 pm

Rickster wrote:So just waiting a little bit helps your userfunction to take the mails in the box, instead of skipping the whole process.
Maybe I'll add it then, even if it's just to make it more compatible with other versions.
Rickster wrote:1. When there is no mailbox at the chars location, or a mailbox is a little bit to far away, so you you have to make a step towards it to open it, the userfunction tries to use a one use mailbox. Can I tell it to not use one use mailboxes in any circumstances?
There is no such option but if you are near a mailbox it should not be trying to use a 1usemailbox. The distance check it uses is 100. I just checked that in game and that is quite far. If it even moves toward it then it definitely found it which means it won't use a 1useamilbox unless maybe there is something strange about that mailbox.
Rickster wrote:2. UMM_SetOneUseMailboxRelog() controls how it is relogging, when using one use mailboxes. But it is not clear to me when and how it is relogging when using ordinary mailboxes.
Can you please explain a little more detailed how and when relogging takes place?
Relogging usually takes place when you reach the send limit, which happens when you send about 60 mails in a short time, if I remember correctly. When it relogs that counter get reset and you can send another 60. By stopping it sending you made it think it had reached the limit so it relogged. You should probably have paused or stopped the script altogether before stopping the mail.
  • 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

#485 Post by Rickster » Tue Jul 09, 2013 3:04 pm

Ok, thank you for the info :)

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

Re: Rock5's Mail Mods

#486 Post by Rickster » Wed Jul 10, 2013 5:21 am

next problem about relogging ...

Sometimes when using

Code: Select all

success, err_msg = UMM_SendAdvanced(recipient,nil,nil,nil,nil,{"Rezepte",})
and the recipients mailbox is full, system message is displayed in the rom client, the bot starts relogging in an endless loop.

Code: Select all

Sending items by name or id.
Sending items to xxx...
Mailing delayed. Reloging before continuing.
Spieleradresse geändert: 0x65D0FA00
Fernkampffähigkeit gefunden: ROGUE_THROW
Wir versuchen den NPC 110538 zu finden:
Der NPC 'Postfach' wurde erfolgreich ausgewählt. Wir öffnen das Dialogfenster.

Mailing delayed. Reloging before continuing.
Spieleradresse geändert: 0x26896900
Fernkampffähigkeit gefunden: ROGUE_THROW
Wir versuchen den NPC 110538 zu finden:
Der NPC 'Postfach' wurde erfolgreich ausgewählt. Wir öffnen das Dialogfenster.

Mailing delayed. Reloging before continuing.
Spieleradresse geändert: 0x2FC1C300
closing the RoM client, starting a new client and restarting the script solves the prob and sending to the full mailbox is skipped as expected and return values are correct.
any ideas about that?

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

Re: Rock5's Mail Mods

#487 Post by rock5 » Wed Jul 10, 2013 5:54 am

What's different between when it gets stuck in a loop and when you restart? When it gets stuck, has the client been running for awhile? Has there been relogs?
  • 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

#488 Post by Rickster » Wed Jul 10, 2013 7:23 pm

Before it ends in a loop, there have been several character changes on one account and the char, which ends up in a loop, has send mails to a few other chars already, whos mailboxes are not full, then sending to a mailbox that is already full and it starts relogging instead of recognising the system message about the full mailbox.
In rare cases this also happens for one char without character changes, running around for a long time and already sending lots of mails meanwhile.

When I manually restarted, the char starts (by my script) to send to a few chars (mentioned above), but because he already sent to them there is nothing to send, then comes to send to the char it ended in a loop before ond continues as whiched, recognising the full mailbox, skips it and continues. Then running as usual untill the same situation happens again after some character changes.

As I write this, there comes to my mind that you wrote something to restart the client after some character changes. I never had a look at that yet, so I will do so now :)

Thanks so far
Ric

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

Re: Rock5's Mail Mods

#489 Post by rock5 » Thu Jul 11, 2013 12:50 am

Yes I think it may just be a memory issue. Restarting the client could help. You need 'userfunction_login.lua' (http://solarstrike.net/phpBB3/viewtopic ... 043#p48043). Set it up as described on that page and then you can use it with loginnextchar by using this function SetRestartClientSettings(frequency, client) which is described here http://solarstrike.net/phpBB3/viewtopic ... 350#p10350.
  • 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

#490 Post by Rickster » Sat Jul 13, 2013 3:21 am

hm, sorry to say that, but automated restarting of the client does not help to solve the relogging problem.

by using the automated relogging i figured out, that it also sometimes starts reloging with a fresh client and also sometimes when sending mails for the first time. but when it happens, then after sending to a mailbox that is full.
what helps is to just restart the rombot script, which ended in the relog loop before, and all continues as planed.

so i think, this is not a memory problem of the game client.

if i can help in some way to solve this prob, by testing or something else, please tell me.

beside this, is it possible to add a switch to toggle off relogging? maybe inside the userfunction as a usersetting, so we can have the behaviour of the userfunction, like it was before relogging was added. i never needed this and all worked fine before this feature was added.

dr-nuker
Posts: 145
Joined: Sun Oct 09, 2011 7:33 am

Re: Rock5's Mail Mods

#491 Post by dr-nuker » Tue Jul 16, 2013 6:16 am

Since my last update i'm facing problems, too.
I wanted to get the userfunction to send items by tier of mana stone they would give.

But I spam one of my characters with the items from several farmers so it happens all the time that it's mailbox is full.
But not totally full. I think it can hold 90 mails but now i get an abort if 30 are in the loop at the character.
I can also not prevent the bot from crashing.

Code: Select all

1:7pm - IGF:\igf_events:getLastEventMessage('WARNING_MESSAGE','Recipient's mailb
ox is full!',2.0300000000002)\ Error in command sent to IGF.
I tried the igf_events.lua with ReloadUI but it did not help.

Any ideas?

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

Re: Rock5's Mail Mods

#492 Post by rock5 » Tue Jul 16, 2013 6:35 am

The error there is the ' in Recipient's. I'll have to fix 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#493 Post by rock5 » Tue Jul 16, 2013 8:15 am

@Rickster, when it get's stuck in a relog loop does it open the mailbox and try to send each time? Or does it just relog without opening the mailbox?
  • 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

#494 Post by Rickster » Tue Jul 16, 2013 8:45 am

Hi,

I am not sure right now if the mailbox opens. I have to wait for the next full mailbox to watch it ;)

I tried to have a closer look for the situation a relog happens, but it seems random to me.
Only one thing is sure, it ends up in the relog loop, when sending to a full mailbox.
  • Sometimes it is the very first mail a fresh started client sends to a full mailbox, ending in the loop.
  • Other time it changes over different chars, and different accounts without restarting the client and already sent to full mailboxes, then when sending for the xx. time to a full mailbox, starts looping.
  • sometimes after a lots of relogs, caused by sending to a full mailbox (most time the client crashes after several relogs) it finaly gets over sending to the full mailbox, with correct return values, and continues the script. this only happens in very rare cases.
  • when ending in the loop, restarting the scipt without restarting the game client helps to continue, when sending to a full mailbox, except the first attempt to send already ends in a loop.
Ric

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

Re: Rock5's Mail Mods

#495 Post by rock5 » Tue Jul 16, 2013 12:28 pm

I think what might be happening is when it relogs it tries to use the mailbox before it is fully ready. because it's not fully ready it passes the full mailbox check and relogs. I'm adding some code that waits for the mail to finish loading when opening the mailbox. That might fix your problem. If you have nay code that tries to send mail as soon as a character is loaded you could try adding a pause of a few seconds before sending.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's Mail Mods

#496 Post by rock5 » Tue Jul 16, 2013 12:42 pm

I updated the beta version on the first post. 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

turbobay
Posts: 44
Joined: Wed Jul 31, 2013 7:20 pm

Re: Rock5's Mail Mods

#497 Post by turbobay » Thu Aug 01, 2013 7:01 pm

I am trying to use the function UMM_SendByNameOrId() but i am getting not always successful results.
Sometimes i get error message.

Code: Select all

Wir versuchen den NPC 110538 zu finden:
Der NPC 'Postfach' wurde erfolgreich ausgewählt. Wir öffnen das Dialogfenster.
Sending items by name or id.
Sending items to toonxyz...  Did not find any crashed game clients.
1:56am - ...ts/rc3/userfunctions/addon_Rock5s_Mail_Functions.lua:515: attempt to
 call global 'getLastWarning' (a nil value)
I noticed that, when one item from my list is not actually in the inventory i get these problems. But i got it also the first time i ran, when "all" the listed items where in the bag.

Code: Select all

RoMScript("UMMFrame:Hide()");
		 UMM_SendByNameOrId ("toonxyz", {	
							"200624", 
							"200609", 
							"200855", 
							"Spinnengift"});
  		 yrest(500); 
		 RoMScript("UMMFrame:Hide()");
Do i have to check before UMM_Send if i actually have at least one item of each in the list in my bag ?

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

Re: Rock5's Mail Mods

#498 Post by rock5 » Fri Aug 02, 2013 12:23 am

'getLastWarning' is a bot function, a fairly new function. What version of the bot are you running?
  • 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

turbobay
Posts: 44
Joined: Wed Jul 31, 2013 7:20 pm

Re: Rock5's Mail Mods

#499 Post by turbobay » Fri Aug 02, 2013 8:48 am

It's version 3.29 i think it was a test candidate/beta version when i got it, because the release version did not work.
it's in a "rc3" folder.

I tried with the UMM_SendByRange - function, hoping that by sending everything possible it will make no problems, but again a getLastWarning issue, this time at line 699.

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

Re: Rock5's Mail Mods

#500 Post by rock5 » Fri Aug 02, 2013 9:53 am

3.29 doesn't really mean much. The revision number is what we want and is usually printed under the picture of the worm when you start the bot. But you say you have the rc3 version. I don't think that will show a revision number. I'm pretty sure you could be using a newer official release version of the bot. What version of the game are you using? I'll try to match you up with the newest revision you can use. I don't know if that will fix your problem though. If not, you will probably have to use the 1.81 version of the 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

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 0 guests