rock5's "fastLogin Revisited"

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 "fastLogin Revisited"

#621 Post by rock5 » Fri Jan 10, 2014 7:38 am

Are you asking if it's possible to change characters without a waypoint file? Sure. If you type

Code: Select all

/script ChangeChar()
in chat it will switch to the next character in the account. Or you could specify any character on any account.

I even have a slash command set up for it so all I have to do is

Code: Select all

/cc
Or if I want to go to a specific account I can do

Code: Select all

/cc 1,45
I can share the slash code if you really want 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#622 Post by Desmond » Fri Jan 10, 2014 8:09 am

Thanks for the code but how to make that work in the waypoint ie that after 10daily bot automatically switched to another character! And how to make the bot is not closed?

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

Re: rock5's "fastLogin Revisited"

#623 Post by rock5 » Fri Jan 10, 2014 8:35 am

Do you want to go through a list of characters or do you want to just go through all the characters in the current account?
  • 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#624 Post by Desmond » Fri Jan 10, 2014 8:50 am

first and second option

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

Re: rock5's "fastLogin Revisited"

#625 Post by rock5 » Fri Jan 10, 2014 9:03 am

Sorry, I don't understand. Do you want to start with the first character and go through all the characters in the current account or do you want to change to different characters on different accounts. Example: do you want to do characters 1,2,3,4,5,6,7,8 in 1 account or do you want to do a mix of characters such as character 1 on account 1 then character 3 on account 4 then character 5 on account 8?
  • 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#626 Post by Desmond » Fri Jan 10, 2014 9:15 am

Do you want to start with the first character and go through all the characters in the current account Yes

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

Re: rock5's "fastLogin Revisited"

#627 Post by rock5 » Fri Jan 10, 2014 10:22 am

So normally you would do something like this at the waypoint near the npc.

Code: Select all

player:target_NPC("npc name")
CompleteQuestByName("quest name")
if RoMScript("Daily_count()") == 10 then
    ChangeChar()
    loadPaths(__WPL.FileName)
    return
end
AcceptQuestByName("quest name")
Obviously you have to supply the quest name and quest npc. What this does is it changes character if you complete your dailies then reloads the current waypoint file.
  • 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#628 Post by Desmond » Fri Jan 10, 2014 10:55 am

Rock5 Thank you very much!!

User avatar
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#629 Post by Desmond » Sat Jan 11, 2014 8:19 am

And how to make that boat passed through accounts?

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: rock5's "fastLogin Revisited"

#630 Post by BlubBlab » Sat Jan 18, 2014 5:07 am

I'm still testing it(if it solve it) but who's client window from Runes of Magic still called "Radiant Arcana" ?
Okay I know at least it was called that way but after that it was called for a time only "P" and now it called "Runes of Magic".

I know that the client windows from the private servers maybe called the old way?

I stumbled over it because I always had some trouble sometimes and it failed and that increased a lot recently for me.
EDIT:Okay something is wrong because "Radiant Arcana" are also used in function.lua and when I edit it to "Runes of Magic" it doesn't find the client anymore
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

User avatar
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#631 Post by Desmond » Thu Jan 23, 2014 1:58 pm

Hello and in the other to make the transition between waypoints characters?

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<waypoints type="TRAVEL">
    <onLoad>
        -- repeat npcname=RoMScript("TEXT('Sys112794_name')"); yrest(500) until npcname -- ie. "Blinsik"
        repeat npcname="\129\171\168\173\225\168\170"; yrest(500) until npcname -- ie. "Blinsik"
        printf('NPC: %s (%d)\n',npcname,112794)
    </onLoad>
    <!-- #  1 --><waypoint x="31820" z="4597" tag="main">
      player:target_NPC(npcname);player:rest(1);

      RoMScript("CompleteQuest()"); yrest(1);
      RoMScript("AcceptQuest()"); yrest(1);
      RoMScript("AcceptQuest()"); yrest(1);

      player:target_NPC(npcname);player:rest(1);

      RoMScript("CompleteQuest()"); yrest(1);
      RoMScript("AcceptQuest()"); yrest(1);
      RoMScript("AcceptQuest()"); yrest(1);

      local d, m = RoMScript("Daily_count()");
      if (d and d >= m) then
          cprintf(cli.lightblue, "All quests are completed\n");
          player:rest(13);
          player:logout(false);
      elseif d then
          cprintf(cli.lightblue, "Completed %d dailies\n", d);
      end;
    </waypoint>
    <!-- #  2 --><waypoint x="31794" z="4637">   </waypoint>
    <!-- #  3 --><waypoint x="31809" z="4683">   </waypoint>
    <!-- #  4 --><waypoint x="31853" z="4940">   </waypoint>
    <!-- #  5 --><waypoint x="31732" z="5128">   </waypoint>
    <!-- #  6 --><waypoint x="31605" z="5353">   </waypoint>
    <!-- #  7 --><waypoint x="31487" z="5586">   </waypoint>
    <!-- #  8 --><waypoint x="31415" z="5726">   </waypoint>
    <!-- #  9 --><waypoint x="31423" z="5713">
        if(1 > inventory:getItemCount(204839)) then
            player:target_Object(112976,6000,false);
        else
            yrest (1500)
            while (1 > inventory:getItemCount(204840)) do
                player:target_Object(112976,6000,false);
            end
        end
    </waypoint>
    <!-- # 10 --><waypoint x="31438" z="5659">   </waypoint>
    <!-- # 11 --><waypoint x="31643" z="5264">   </waypoint>
    <!-- # 12 --><waypoint x="31741" z="5111">   </waypoint>
    <!-- # 13 --><waypoint x="31827" z="4846">   </waypoint>
    <!-- # 14 --><waypoint x="31795" z="4646">   </waypoint>
    <!-- # 15 --><waypoint x="31817" z="4594">   </waypoint>
</waypoints>

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

Re: rock5's "fastLogin Revisited"

#632 Post by rock5 » Thu Jan 23, 2014 11:39 pm

In the future please use "code" tags. Just select the code and click the "code" button at the top of the edit box. I've done it for you this time.

I'm assuming you are asking to make the waypoint file change characters. This has been mentioned many times. All you have to do is replace the logout command with this

Code: Select all

SetCharList ({
	{account=7 , chars= {1,4,5,7}},
	{account=8 , chars= {2,5,6,7,8}},
})
LoginNextChar()
using your own account and character list. This is for one client. If you are running more than one client at a time on this waypoint file, the character list would look a bit different.

Code: Select all

SetCharList ({
	{
		{account=7 , chars= {1,4,5,7}},
		{account=8 , chars= {2,5,6,7,8}},
	},{
		{account=9 , chars= {}},
		{account=10 , chars= {2,3,4,5,6,7,8}},
	}
})
LoginNextChar()
This example is for 2 clients. The first one you start with account 7 char 1 and it will go through account 7 and 8. And the other client you start with account 9 and it will go through account 9 and 10.
  • 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

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

Re: rock5's "fastLogin Revisited"

#633 Post by ZZZZZ » Wed Jan 29, 2014 4:20 am

I set the 'RestartClientInterval' to 3. It worked fine, restarted client, logged into account, but it keeps logging into the first character, rather than the 1 I have specified in the SetCharList. Had to log in the right character manually then continue.

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

Re: rock5's "fastLogin Revisited"

#634 Post by rock5 » Wed Jan 29, 2014 6:00 am

I made a mistake in the usage of SetCharList in the examples above. It's a function not a variable. So I changed those examples. Please change your code to match and try again.
  • 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

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

Re: rock5's "fastLogin Revisited"

#635 Post by ZZZZZ » Fri Jan 31, 2014 4:37 am

Is there any way to add a name to the button? Currently I use the ServerName variable to name it, which causes it to stuff up at times, just wondering if its possible to add a Button/AccountName variable? (eg, Certain characters on certain accounts and you want to name the button after them (account name is something random/unrelated))

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

Re: rock5's "fastLogin Revisited"

#636 Post by rock5 » Fri Jan 31, 2014 5:36 am

I'm not sure I understand. You are talking about the login buttons right? They should already be showing the account and server name. You can change the display by Shift clicking the buttons. If you want to make the change permanent you can change the fastLoginButtonDisplay option in accountlogin.lua. Valid options are "AccountServer", "Account" or "Server".
  • 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

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

Re: rock5's "fastLogin Revisited"

#637 Post by ZZZZZ » Fri Jan 31, 2014 5:57 am

Sorry, yeh I know that, what I meant was, is it possible to put a name on the login Button that isn't the account's name or the server's name? eg, you have accounts that are for shell farming, put a name on each account @ login like 'Shell 1' 'Shell 2' etc. I have almost all 100 something button's full on my Loginxml and the only way I can keep track of what character is where currently is changing the Server to name them, which also causes issue with reloging/loging in with the server selection screen.

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

Re: rock5's "fastLogin Revisited"

#638 Post by rock5 » Fri Jan 31, 2014 8:25 am

I don't know how many button you use but what I would do is group your buttons together then use a button as a label, eg.
  • Shells
    Account 1
    Account 2
    Account 3
  • 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

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

Re: rock5's "fastLogin Revisited"

#639 Post by ZZZZZ » Fri Jan 31, 2014 3:35 pm

I more used Shell 1 Shell 2 as an example. I have a fair number of accounts with only 1 alt on it etc, and when they crash I see which 1 goes offline and I restart the client by just looking at the server name (Which I have made the name of the character). I also use it that way for some Logs that I record. Was just wondering if it was possible and/or if I would be able to edit that in myself (Not sure how though, looked through loginxml already)

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: rock5's "fastLogin Revisited"

#640 Post by noobbotter » Fri Jan 31, 2014 6:20 pm

I'm revisiting my issue as to why I can't do a client restart with the login userfunction.

If I add the line "SetRestartClientSettings(1, "myrom")" into my waypoint that reloads my next character, I get a window that comes up and says:

S:\Program Files\micromacro\scripts\rom\myrom.lnk
The specified path does not exist.

Check the path, and then try again.



Yet if I purposely specify a filename that I know is wrong, such as "notmyrom.lnk", then I get this window that comes up:

Windows cannot find 'S:/Program" "Files/micromacro/scripts/rom/notmyrom.lnk'. Make
sure you typed the name correctly, and then try again.


I cannot figure out why when I specify the correct name, it won't launch but says the path is not there, yet if I purposely specify the wrong filename, then I get a different error.

??? any ideas? Could the space in "Program Files" be causing the issue? it shouldn't becuase I see that in the userfunction_login.lua file, it uses local path = getExecutionPath().."/"..client so why this isn't working is beyond me.


Now I did some further testing. I created a lua file in the scruipts/rom directory as such:

Code: Select all

function main()
	client = "myrom.lnk"
	local path = getExecutionPath().."/"..client
	-- fix spaces
	path = string.gsub(path," ","\" \"")
	-- Start client
	local a,b,c = os.execute("START "..path.." NoCheckVersion")
	if not a then
		error("Trouble executing shortcut. Values returned were: "..(a or "nil")..", "..(b or "nil")..", "..(c or "nil"))
	end
end

startMacro(main,true);
this gave me the same error. Then I changed the filename to open from myrom.lnk to hello.txt and created the text file. When I executed it, it opened the text file. so why won't it open the rom link? if I manually click it, it will open.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests