Page 18 of 46

Re: rock5's "fastLogin Revisited"

Posted: Mon Jul 09, 2012 5:42 pm
by rock5
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.

Re: rock5's "fastLogin Revisited"

Posted: Mon Jul 09, 2012 7:18 pm
by lisa
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.

Re: rock5's "fastLogin Revisited"

Posted: Tue Jul 10, 2012 2:20 am
by rock5
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.

Re: rock5's "fastLogin Revisited"

Posted: Tue Jul 24, 2012 8:18 am
by Ego95
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

Re: rock5's "fastLogin Revisited"

Posted: Tue Jul 24, 2012 10:14 am
by lisa
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}},
})

Re: rock5's "fastLogin Revisited"

Posted: Tue Jul 24, 2012 11:09 am
by Ego95
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.

Re: rock5's "fastLogin Revisited"

Posted: Tue Jul 24, 2012 7:07 pm
by lisa

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");

Re: rock5's "fastLogin Revisited"

Posted: Wed Jul 25, 2012 4:57 am
by Ego95

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)

Re: rock5's "fastLogin Revisited"

Posted: Wed Jul 25, 2012 5:28 am
by lisa
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

Re: rock5's "fastLogin Revisited"

Posted: Wed Jul 25, 2012 7:37 am
by Ego95
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 :)

Re: rock5's "fastLogin Revisited"

Posted: Wed Jul 25, 2012 1:24 pm
by rock5
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.

Re: rock5's "fastLogin Revisited"

Posted: Thu Jul 26, 2012 7:00 am
by Ego95
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.

Re: rock5's "fastLogin Revisited"

Posted: Mon Sep 10, 2012 6:51 am
by panda2012
Hi all!
Is there a way to delete character?

Re: rock5's "fastLogin Revisited"

Posted: Mon Sep 10, 2012 7:07 am
by rock5
With the bot? No.

Re: rock5's "fastLogin Revisited"

Posted: Mon Sep 10, 2012 7:16 am
by panda2012
Bad news :(
Idea of making tier on one account has failed...

Re: rock5's "fastLogin Revisited"

Posted: Fri Sep 14, 2012 7:08 am
by Alleexx
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.

Re: rock5's "fastLogin Revisited"

Posted: Fri Sep 14, 2012 8:44 am
by rock5
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.

Re: rock5's "fastLogin Revisited"

Posted: Fri Sep 14, 2012 10:06 am
by Alleexx
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.

Re: rock5's "fastLogin Revisited"

Posted: Fri Sep 14, 2012 10:27 am
by rock5
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.

Re: rock5's "fastLogin Revisited"

Posted: Fri Sep 14, 2012 5:59 pm
by Alleexx
Nope that didn't work :S