Comunication error with macro ingame

Talk about anything in Runes of Magic. This does not need to pertain to botting.
Message
Author
User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Comunication error with macro ingame

#21 Post by BlubBlab » Sun Apr 20, 2014 2:21 pm

Like I said I do that when a GM was found with searchGMList()
So you must have somewhere searchGMList() in it or a yrest with a timer calling it.
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

spyfromsiochain
Posts: 84
Joined: Sun Aug 18, 2013 9:57 am

Re: Comunication error with macro ingame

#22 Post by spyfromsiochain » Sun Apr 20, 2014 2:29 pm

The only thing I changed in the userfunction file was the "friends" variable... added 3 names, nothing else, the rest is untouched.

The profile I use and the waypoint, I uploaded in this post, and I dont think they have anything tempered in searchGMList().

Regards
I look at those fans with no blades and it amazes me everytime, how can they push air without using blades lol - lisa (pro sentence :D)

spyfromsiochain
Posts: 84
Joined: Sun Aug 18, 2013 9:57 am

Re: Comunication error with macro ingame

#23 Post by spyfromsiochain » Sat Apr 26, 2014 4:12 am

working well now after installed version 773 of bot. That's the only thing I did really.

I was wondering is it possible go put a timer in this waypoint of some sorts, so I start bot at for example 2 am, it ends all accounts at 4 am, and it will stay in character screen w8ing for another order in last character of the accounts, the thing is: is it possible to restart the bot in first character after reset in 5:01 am? like that is would do 2 days straight.

Regards
I look at those fans with no blades and it amazes me everytime, how can they push air without using blades lol - lisa (pro sentence :D)

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

Re: Comunication error with macro ingame

#24 Post by rock5 » Sat Apr 26, 2014 5:51 am

In your relog function/code, before you do your LoginNextChar(), you can check to see if you are on your last character using IsLastChar(). If you are, then you can wait for 5am then log into your first character again. Example:

Code: Select all

if IsLastChar() and 5 > os.date("*t").hour then
    repeat
        yrest(1000)
    until os.date("*t").hour >= 5
    ChangeChar(1,1) -- Change to the first character in your character list
else
    LoginNextChar()
end
How does that 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

spyfromsiochain
Posts: 84
Joined: Sun Aug 18, 2013 9:57 am

Re: Comunication error with macro ingame

#25 Post by spyfromsiochain » Sun Apr 27, 2014 4:00 am

it looks perfect, I will try it today.

ty

Edit: Got that error with loginnextchar(), I changed to ChangeChar() and worked nicely, didnt checked the timer at 5 am yet ofc, but other then that is working perfect.
Attachments
error.jpg
I look at those fans with no blades and it amazes me everytime, how can they push air without using blades lol - lisa (pro sentence :D)

spyfromsiochain
Posts: 84
Joined: Sun Aug 18, 2013 9:57 am

Re: Comunication error with macro ingame

#26 Post by spyfromsiochain » Sun May 04, 2014 7:45 am

Has a following on this post:

- It does stop in last character of the account, and waits, but when reset triggers I get the absence of server/character info in character screen. Is this a problem in the loginxml?

Regards
Attachments
After 5 am triggers
After 5 am triggers
When it waits for 5 am
When it waits for 5 am
I look at those fans with no blades and it amazes me everytime, how can they push air without using blades lol - lisa (pro sentence :D)

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

Re: Comunication error with macro ingame

#27 Post by rock5 » Sun May 04, 2014 9:35 am

LoginNextChar expects a character list has been set but if you are happy to just go through the characters in the current account in order then ChangeChar is fine.

Are you sure the login details for account 1 are correct? Check your log in details in accountlogin.lua.
  • 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

spyfromsiochain
Posts: 84
Joined: Sun Aug 18, 2013 9:57 am

Re: Comunication error with macro ingame

#28 Post by spyfromsiochain » Sun May 04, 2014 8:04 pm

Code: Select all

yrest(1000)
				until os.date("*t").hour >= 5
				ChangeChar(1,1) -- Change to the first character in your character list
			   else
now I get what is wrong rocks, the problem is that my accounts are 50/51/52/53 its 4 accounts, shall I do 4 different waypoints? and just change:

Code: Select all

ChangeChar(50,1) -- Change to the first character in your character list

Code: Select all

ChangeChar(51,1) -- Change to the first character in your character list

Code: Select all

ChangeChar(52,1) -- Change to the first character in your character list

Code: Select all

ChangeChar(53,1) -- Change to the first character in your character list
should work?
I look at those fans with no blades and it amazes me everytime, how can they push air without using blades lol - lisa (pro sentence :D)

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

Re: Comunication error with macro ingame

#29 Post by rock5 » Sun May 04, 2014 10:44 pm

That's not what is normally done but what you do depends on what you need.

If you run all 4 accounts at the same time and you want to do every character in each account then just ChangeChar() will do. ChangeChar() just logs in to the next character in the account. Looks like I made a mistake when it reaches the end of the list. The command should be ChangeChar(1) so that it changes to the first character of the current account. I think that's all you are after.

If you want to do all accounts with 1 client or you want to skip some characters then you have to use LoginNextChar which goes through a specified list.

Example 1:

Code: Select all

SetCharList({
    {account=50, chars= {}},
    {account=51, chars= {}},
    {account=52, chars= {}},
    {account=53, chars= {}},
})
if IsLastChar() and 5 > os.date("*t").hour then
    repeat
        yrest(1000)
    until os.date("*t").hour >= 5
    ChangeChar(1,50) -- Change to the first character in your character list
else
    LoginNextChar()
end
This example is if you use 1 client and want to do all characters. You can limit which characters are done by adding the character numbers in the 'chars' part. You would start account 50, character 1 and then start your bot.

Example 2:

Code: Select all

SetCharList({
    {
        {account=50, chars= {1,2,3,5,6,7}},
    },{
        {account=51, chars= {2,3,4,6,8}},
    },{
        {account=52, chars= {1,3,5,6,7,8}},
    },{
        {account=53, chars= {1,2,4,5,6,8}},
    }
})
if IsLastChar() and 5 > os.date("*t").hour then
    repeat
        yrest(1000)
    until os.date("*t").hour >= 5
    ChangeChar(1) -- Change to the first character in your character list
else
    LoginNextChar()
end
This example is if you want to run 4 clients and only do certain characters. You would start 4 clients and log into the first character of each of the account lists and start a bot for each.
  • 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

spyfromsiochain
Posts: 84
Joined: Sun Aug 18, 2013 9:57 am

Re: Comunication error with macro ingame

#30 Post by spyfromsiochain » Sat May 10, 2014 4:27 pm

ChangeChar(1) is working now, nicely.

how can I put to start at 5:05 am? since it checks the time in windows and server time is 5 min later in my case...

ty
regards
I look at those fans with no blades and it amazes me everytime, how can they push air without using blades lol - lisa (pro sentence :D)

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

Re: Comunication error with macro ingame

#31 Post by rock5 » Sat May 10, 2014 7:29 pm

Code: Select all

    until os.date("*t").hour >= 5 and os.date("*t").min>= 5
  • 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

spyfromsiochain
Posts: 84
Joined: Sun Aug 18, 2013 9:57 am

Re: Comunication error with macro ingame

#32 Post by spyfromsiochain » Sat May 10, 2014 8:40 pm

Code: Select all

 
if IsLastChar() and 5 >= os.date("*t").hour and >= 10 os.date("*t").min then
repeat
yrest(1000)
until os.date("*t").hour >= 5 and os.date("*t").min>= 10
ChangeChar(1) -- Change to the first character in your character list
else
ChangeChar()
end
Something like this?
I look at those fans with no blades and it amazes me everytime, how can they push air without using blades lol - lisa (pro sentence :D)

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

Re: Comunication error with macro ingame

#33 Post by rock5 » Sat May 10, 2014 8:58 pm

Close but you messed up the first line.

Code: Select all

if IsLastChar() and 5 >= os.date("*t").hour and 10 >= os.date("*t").min then
Although it probably would have been fine if you left that as it was. I got the impression from what you said before that the first time through usually finished long before 5am. The important part was to change the waiting part in the repeat loop.
  • 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

spyfromsiochain
Posts: 84
Joined: Sun Aug 18, 2013 9:57 am

Re: Comunication error with macro ingame

#34 Post by spyfromsiochain » Sun May 11, 2014 5:17 pm

Didn't work. After all characters are done it goes to character screen, the problem is in the minutes:

Code: Select all

 and 10 >= os.date("*t").min then
I used:

Code: Select all

if IsLastChar() and 6 >= os.date("*t").hour then
and it did well, it started at 6 am thou :D

Code: Select all

if IsLastChar() and 5 >= os.date("*t").hour then
should work if I add like 7 min to 10 min in my OS clock :D its a solution :D but doesnt look like the best one.

I think the best solution would be to add in the if a check for the 0/10 in dailies, since even if the os.date("*m") works well, there is a week or so in the year that this "if" will not work, the summer change in the clock of the server, I think will screw this up.
So I though since its possible to check on the fly for the public event in rorozan, for example, do u remember the fires public quest? that waypoint check the reset in the event. Idk something similar for this case? just a tought.

Regards
I look at those fans with no blades and it amazes me everytime, how can they push air without using blades lol - lisa (pro sentence :D)

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

Re: Comunication error with macro ingame

#35 Post by rock5 » Sun May 11, 2014 8:07 pm

I told you you could have left the first line like it is. :)

Your right that it's wrong. It's basically saying "if the hour is 5 or less and the minutes are 10 or less then wait". Obviously in the earlier hours you don't want to limit the minutes. You could be more specific eg.

Code: Select all

if IsLastChar() and (5 > os.date("*t").hour or (5 == os.date("*t").hour and 10 >= os.date("*t").min) ) then
That's a bit complex and hard to follow. An easier solution is to look at the code in the repeat loop, that works, and do the opposite, eg.

Code: Select all

if IsLastChar() and not (os.date("*t").hour >= 5 and os.date("*t").min>= 10) then
spyfromsiochain wrote:I think the best solution would be to add in the if a check for the 0/10 in dailies,
For dailies, that's probably a better idea, eg.

Code: Select all

if IsLastChar() and RoMScript("Daily_count()") == 10 then
This is ok if you don't mind that after the second time through it waits for the dailies to become available again. If you want it to exit when it's filally finished then you'll have to add a time check.
spyfromsiochain wrote:So I though since its possible to check on the fly for the public event in rorozan, for example, do u remember the fires public quest? that waypoint check the reset in the event. Idk something similar for this case? just a tought.
I'm not sure how public events relate to this. Public event timers present their own problems and challenges especially when public event functions don't work unless the public event frame is visible. Getting dailies is easy. The command always works.
  • 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

spyfromsiochain
Posts: 84
Joined: Sun Aug 18, 2013 9:57 am

Re: Comunication error with macro ingame

#36 Post by spyfromsiochain » Thu May 29, 2014 12:40 pm

Sorry, I haven't been playing daily so I couldn't have tested this before.

Code: Select all

if IsLastChar() and RoMScript("Daily_count()") == 10 then
repeat
yrest(1000)
until IsLastChar() and (5 >= os.date("*t").hour)
ChangeChar(1) -- Change to the first character in your character list
else
ChangeChar()
end
It was working well, it checked the daily count on last character, and if 10/10 it would go back to first character on that acc, but it would do that all the time none stop, till I added the 2nd condition, so it would stop changing after second time around (after 5 am). What happends now, it that it does all the characters and in last one doesn't change back to first character...

What is wrong in the second condition:

Code: Select all

until IsLastChar() and (5 >= os.date("*t").hour)
regards
I look at those fans with no blades and it amazes me everytime, how can they push air without using blades lol - lisa (pro sentence :D)

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

Re: Comunication error with macro ingame

#37 Post by rock5 » Thu May 29, 2014 8:33 pm

If you are going to be checking if you have finished your dailies you should be doing that first because if you haven't finished your dailies then you shouldn't be doing any of that other code. Usually you would have this code in a relog function (although you don't have to) and only call it when you finish your dailies so the relog function doesn't need to check the dailies.

I don't know why it's wrong but the second condition doesn't need to check if it's the last character because you already did that. All you are doing there is waiting for 5 to be more than the hour which I believe is wrong. Don't you want to wait until after 5 to do the dailies again? It should probably be.

Code: Select all

until os.date("*t").hour >= 5
So I would do something like this.

Code: Select all

function relog()
    if IsLastChar() then
        repeat
            yrest(1000)
        until os.date("*t").hour>=5
        ChangeChar(1) -- Change to the first character in your character list
    else
        ChangeChar()
    end
end
Then before trying to accept the quests again I would do something like

Code: Select all

if RoMScript("Daily_count()") == 10 then
    relog()
else
    AcceptQuestByName(...)
end
Note: As it is, after it finishes the dailies for the second time it will relog back to the first character again. The way I see it, if it reaches the last character before 5 then it should wait until 5 and change to the first character to do the dailies again. If it's after 5 when it reaches the last character then it's done the dailies for the second time and should stop. So you could do something like.

Code: Select all

function relog()
    if IsLastChar() then
        if os.date("*t").hour>=5 then
            player:logout()
            error("Finished")
        else
            repeat
                yrest(1000)
            until os.date("*t").hour>=5
            ChangeChar(1) -- Change to the first character in your character list
        end
    else
        ChangeChar()
    end
end
  • 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 0 guests