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"

#341 Post by rock5 » Mon Jul 09, 2012 5:42 pm

Just posted an update to both loginxml and LoginNextChar.

Thanks Bot_romka for your work and the impetus it gave me to update this addon.

loginxml 3.0 changes:

Accountlogin:
  • - Now has 65 buttons!
    - Added server support. Clicking a button logs on to the associated server.
    - You can change the login buttons display by SHIFT-CLICKING the buttons.
    - Added argument "current" to ChangeChar() function to log off and back onto the same character.eg. ChangeChar("current")
CharacterCreate:
  • - Can now set default values for Race and Class when creating a new character.
    - Skips character create dialog.
    - A random name is now generated by default.
    - Added a button next to the name edit box that generates new random names.
LoginDialog:
  • - Removed logindialog.xml as it was identical to the original. You'll have to delete this manually yourself from the directory if you want to keep it tidy.
Added options:
  • - fastLoginButtonDisplay - You can set what is displayed on the login buttons by default.
    - fastLoginFastCharacterDelete - Whether it shows the character delete confirmation dialog or not.
    - fastLoginDefaultRace - Default race, 1-HUMAN, 2-ELF, 3-DWARF or nil for random Race.
    - fastLoginDefaultClass - Deault class, from 1 to 6 or nil for random Class.

    Finally, I recreated the files using the current versions from patch 5.0.0 and reorganised things to make it easier to update in the future by putting all new variables at the top of the files and all modified and new functions at the bottom, leaving the originals untouched.
userfunction_LoginNextChar.lua
  • -- Seeing as you might be switching between servers with different number of channels, I moved most of the code from "SetChannelForLogin" to just before it logs in in "characterselect.lua".
    -- Added support for the new "current" option to "ChangeChar()", to support the same option in ChangeChar() in the loginxml.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: rock5's "fastLogin Revisited"

#342 Post by lisa » Mon Jul 09, 2012 7:18 pm

Since I play Aus the first thing I noticed is if there is no server listed in the accountlogin.lua it won't show the acc on the login screen.
Aus only has Thalia so all the added server things are not needed for Aus but without putting in the server it won't work at all. I fully understand the other servers have many servers and it is needed it just meant I had to go through and add Thalia to all my account logins.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: rock5's "fastLogin Revisited"

#343 Post by rock5 » Tue Jul 10, 2012 2:20 am

lisa wrote:Since I play Aus the first thing I noticed is if there is no server listed in the accountlogin.lua it won't show the acc on the login screen.
Aus only has Thalia so all the added server things are not needed for Aus but without putting in the server it won't work at all. I fully understand the other servers have many servers and it is needed it just meant I had to go through and add Thalia to all my account logins.
Funnily enough, I was thinking about that this morning in bed. I think the code is set up to log in without a server listed (it only changes server if a server is specified) but I hid the buttons without servers. Well, it was a fairly confusing update. Easy to make a mistake.

What probably threw me is when switching the button display to server it will be a blank button. Or even with account/server it will look like "account/". So to avoid that, I made it a requirement to have the server, not fully thinking it out. But I guess it will have to allow blanks now.
  • 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
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: rock5's "fastLogin Revisited"

#344 Post by Ego95 » Tue Jul 24, 2012 8:18 am

At first, this userfunction/addon is great. First I thought, it's useless, but now I know why very much people use it. It's really helpful.
But I've got a few problems:

I've created three accounts. Every account has got 8 chars. I want to login char no.1 of acc no.1 and then go on until all 24 chars have done their dailys on the elven island. I use this script to complete them: http://solarstrike.net/phpBB3/viewtopic.php?f=27&t=3956

Now my problem:

I thought I could use

Code: Select all

LoginNextChar()
waitForLoadingscreen()

-- Re-initialize player
player = CPlayer.new();
settings.load();
settings.loadProfile("xxx");
yrest (4000)
loadPaths("xxx");
and put it at this point

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
 <!-- # 1 --><waypoint x="31847" z="4592" tag ="Main">
    local dqCount, dqPerDay = RoMScript("Daily_count()");
    if dqPerDay > dqCount then
       queststate = getQuestStatus(questName1);
       if queststate == "complete" then
          player:target_NPC(questEndNpcID1);
          CompleteQuestByName(questName1);
         yrest(300);
         __WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));
        else
          player:target_NPC(questEndNpcID1);
          AcceptQuestByName(questName1,questEndNpcID1);
         yrest(300);
       end
    else
     [b]LoginNextChar()
         waitForLoadingscreen()

         -- Re-initialize player
         player = CPlayer.new();
         settings.load();
         settings.loadProfile("xxx");
         yrest (4000)
         loadPaths("ElfDaily");[/b]
    </waypoint>
The problem is, that I don't understand how to do this, because in this line settings.loadProfile("xxx"); he has to load a new profile for every new char. So what I want to say is if my character A has the name "AAA", character B's name is "BBB" and character C's name is "CCC" then I log in "AAA" while the line in my script looks like this settings.loadProfile("BBB");. After AAA has done his dailys character BBB should login. But when he's ready how should character CCC can login? I think I don't understand the whole concept of the "Re-initialize player".
Moreover so far as I know you can't load the same waypoint file that you are using loadPaths("ElfDaily");

Would be nice if anyone can explain it. :D

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: rock5's "fastLogin Revisited"

#345 Post by lisa » Tue Jul 24, 2012 10:14 am

you should have a read of the very first post as it is always updated with the latest info, specifically SetCharList

Code: Select all

SetCharList({
   {account=2 , chars= {}},
   {account=6 , chars= {1,3,5,6,8}},
   {account=5 , chars= {2,3,4,6,7}},
})
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: rock5's "fastLogin Revisited"

#346 Post by Ego95 » Tue Jul 24, 2012 11:09 am

you should have a read of the very first post as it is always updated with the latest info, specifically SetCharList
Yes this ist what I've done already, he relogs, logs in the next char but then that char doesn't do anything.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: rock5's "fastLogin Revisited"

#347 Post by lisa » Tue Jul 24, 2012 7:07 pm

Code: Select all

SetCharList({
   {account=2 , chars= {}},
   {account=6 , chars= {1,3,5,6,8}},
   {account=5 , chars= {2,3,4,6,7}},
})

Code: Select all


		SetCharList(CharList)
		LoginNextChar()
		loadprofile()
		loadPaths("WPname");
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: rock5's "fastLogin Revisited"

#348 Post by Ego95 » Wed Jul 25, 2012 4:57 am

Code: Select all

SetCharList({
   {account=2 , chars= {}},
   {account=6 , chars= {1,3,5,6,8}},
   {account=5 , chars= {2,3,4,6,7}},
})

Code: Select all

      SetCharList(CharList)
      LoginNextChar()
      loadprofile()
      loadPaths("WPname");

Code: Select all

	SetCharList({
   {account=54 , chars= {1,2,3,4,5,6,7,8}},
   {account=55 , chars= {1,2,3,4,5,6,7,8}},
   {account=56 , chars= {1,2,3,4,5,6,7,8}},
	})
      LoginNextChar()
      loadprofile()
      loadPaths("ElfDaily");
    end
It looks like this.
attempt to call global 'loadprofile' (a nil value)

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: rock5's "fastLogin Revisited"

#349 Post by lisa » Wed Jul 25, 2012 5:28 am

Add this to onload of the WP

Code: Select all

	local function loadprofile()
		-- Re-initialize player
		player = CPlayer.new();
		settings.load();
		settings.loadProfile(convertProfileName(player.Name))
	end
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: rock5's "fastLogin Revisited"

#350 Post by Ego95 » Wed Jul 25, 2012 7:37 am

Add this to onload of the WP

Code: Select all

   local function loadprofile()
      -- Re-initialize player
      player = CPlayer.new();
      settings.load();
      settings.loadProfile(convertProfileName(player.Name))
   end
	
	
It's working :))

Thanks lisa :)

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

Re: rock5's "fastLogin Revisited"

#351 Post by rock5 » Wed Jul 25, 2012 1:24 pm

Didn't I already add a loadProfile function to the bot? Let me see. Yep.

Code: Select all

loadProfile(forcedProfile)
It effectively does what Lisas code does plus a few other things. The way it works is like the profile option works when starting the bot. If a profile is specified, it loads that. If not, then it looks for a profile with the same name as the character and if one doesn't exist it looks for a 'userdefault.xml' profile. You only get an error if none of those profiles exists.
  • 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
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: rock5's "fastLogin Revisited"

#352 Post by Ego95 » Thu Jul 26, 2012 7:00 am

Didn't I already add a loadProfile function to the bot? Let me see. Yep.
Thats what I didn't understand. I thought, if you don't have a profile, you can't use the bot.
So now I made a profile 'userdefault' and now it works.

panda2012
Posts: 2
Joined: Mon Sep 10, 2012 2:30 am

Re: rock5's "fastLogin Revisited"

#353 Post by panda2012 » Mon Sep 10, 2012 6:51 am

Hi all!
Is there a way to delete character?

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

Re: rock5's "fastLogin Revisited"

#354 Post by rock5 » Mon Sep 10, 2012 7:07 am

With the bot? No.
  • 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

panda2012
Posts: 2
Joined: Mon Sep 10, 2012 2:30 am

Re: rock5's "fastLogin Revisited"

#355 Post by panda2012 » Mon Sep 10, 2012 7:16 am

Bad news :(
Idea of making tier on one account has failed...

Alleexx
Posts: 120
Joined: Sun May 15, 2011 4:28 am
Location: Sweden

Re: rock5's "fastLogin Revisited"

#356 Post by Alleexx » Fri Sep 14, 2012 7:08 am

I have 2 problems with the latest version of fastlogin.

- First one is that sometimes when the bot is supposed to switch character it says "Changing to character x account x." but then it just stands there doing nothing and I have to manually log in the next char.

- Second is that I have more than 40 accounts that buy dias from Cedric every day. For all accounts 1-39 this works fine but as soon as it gets to 40 it won't work. For some reason every time I start the bot on a char above number 39 and make it change to another char it thinks it has already sone all chars in the charlist.

I use 3 clients to buy dias from cedric. This is my charlists(with more accounts on it ofc):

Code: Select all

local CharLists = {
		 {
					{account=3,chars={1}}, 
					{account=2,chars={1}}, 
					{account=6,chars={1}}, 
         },
         {
					{account=10,chars={2}}, 
					{account=11,chars={2}}, 
					{account=12,chars={2}}, 

         },
		 {
					{account=34,chars={1}}, -- char1
					{account=24,chars={1}}, -- char2
					{account=39,chars={2}}, -- char3
					{account=40,chars={8}}, -- char4
               {account=41,chars={2}}, -- char5
         },
      }
	  
	  	      local currAcc = RoMScript("LogID")
      CharList = nil
      for k,v in pairs(CharLists) do
         for l,w in pairs(v) do
            if w.account == currAcc then
               CharList = CharLists[k]
               break
            end
            if CharList then break end
         end
      end
This is the code to switch chars:

Code: Select all

	  if player.Name == "charname" or player.Name == "charname" or player.Name == "charname" then
SetChannelForLogin(2)	
elseif 	player.Name == "charname" or player.Name == "charname" or player.Name == "charname" then
SetChannelForLogin(1)	
else
SetChannelForLogin(3)
end
SetCharList(CharList)
		LoginNextChar()
loadPaths("diabuyer");
So when the bot has bought dias on char 3 it thinks the charlist is done and stay at login screen, not logging in the rest accounts.

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

Re: rock5's "fastLogin Revisited"

#357 Post by rock5 » Fri Sep 14, 2012 8:44 am

Alleexx wrote:- First one is that sometimes when the bot is supposed to switch character it says "Changing to character x account x." but then it just stands there doing nothing and I have to manually log in the next char.
How often is 'sometimes'? What do those 'sometimes' have in common? If you see no pattern or common denominator I don't see how I will be able to figure out what the problem is.
Alleexx wrote:- Second is that I have more than 40 accounts that buy dias from Cedric every day. For all accounts 1-39 this works fine but as soon as it gets to 40 it won't work. For some reason every time I start the bot on a char above number 39 and make it change to another char it thinks it has already sone all chars in the charlist.
I'll take a guess here but maybe when you copied your accounts over to the new version you copied a curly bracket too many eg.

Code: Select all

	Account39 = {	UserName = "",	Password = "", Server = "",	},
	Account40 = {	UserName = "",	Password = "", Server = "",	}}
	Account41 = {	UserName = "",	Password = "", Server = "",	},
or something like that. Or something similar in logindialog.lua. I think that would explain what is happening.
  • 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

Alleexx
Posts: 120
Joined: Sun May 15, 2011 4:28 am
Location: Sweden

Re: rock5's "fastLogin Revisited"

#358 Post by Alleexx » Fri Sep 14, 2012 10:06 am

1. So far It has only happened with my helping them grow bots. Usually happens 1-3 times a day. The exact same thing is happening with my friend. We use the same waypoint so maybe something is wrong in it?


2. I've checked for errors in accountlogin and logindialog but I can't find any.

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

Re: rock5's "fastLogin Revisited"

#359 Post by rock5 » Fri Sep 14, 2012 10:27 am

This looks wrong.

Code: Select all

      CharList = nil
      for k,v in pairs(CharLists) do
         for l,w in pairs(v) do
            if w.account == currAcc then
               CharList = CharLists[k]
               break
            end
            if CharList then break end
         end
      end
Should be

Code: Select all

      CharList = nil
      for k,v in pairs(CharLists) do
         for l,w in pairs(v) do
            if w.account == currAcc then
               CharList = CharLists[k]
               break
            end
         end
         if CharList then break end
      end
I don't know if that is related to your problem though. Try it and see.
  • 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

Alleexx
Posts: 120
Joined: Sun May 15, 2011 4:28 am
Location: Sweden

Re: rock5's "fastLogin Revisited"

#360 Post by Alleexx » Fri Sep 14, 2012 5:59 pm

Nope that didn't work :S

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests