Page 1 of 10
rock5&swietlowka Autologin v2.1 with boxes and secondarypass
Posted: Fri Jan 21, 2011 5:56 pm
by swietlowka
=========================================================
ATTENTION!
Seeing as I'm the one providing most of the support for this version and swietlowka
hasn't been on since march, I'm moving my support to my old thread that this version
was based on. http://www.solarstrike.net/phpBB3/viewt ... =21&t=1245. You can find my updated version there.
rock5
=========================================================
Redo of rock5's autologin with boxes and added secondary password functionality
added rock5's secondary pass automation
Re: swietlowka Autologin 1.31 with boxes
Posted: Fri Jan 21, 2011 7:40 pm
by rock5
Sweeet!
I've been wanting to do this ever since the password reset because I left the passwords as those random characters. So every time I wanted to log onto a different account than my main, I had to look up the password. But I've been too busy.
I was also planning to add a function for changing characters. So you could do something like
and it would log off, return to the account login if necessary and then log in with the correct account and player. But there's no hurry now.
Re: swietlowka Autologin 1.31 with boxes
Posted: Fri Jan 21, 2011 8:15 pm
by swietlowka
im just working on it now...
Ps. glad u like it ;d
EDIT: crap i'm nowhere...
added this
Code: Select all
AutoLoginAccount=0 -- Do not change this here. Change it in game to log into other account
into account.lua
and this
Code: Select all
function CharacterSelect_OnShow(this)
if ( AutoLoginAccount ~= 0 ) then
CharacterSelect_Exit();
CustomLoginButton_OnClick("..AutoLoginAccount..")
end
AccountLoginPasswordEdit:SetText("");
AccountLogin:Hide();
if ( not fastLoginNoZoom ) then
OpenCharacterSelect();
end
CharacterList_Update();
RegionList_Update();
CharacterSelectZoneName:SetText("");
CharacterSelectRealmName:SetText(GetCurrentRealm());
end
to the character.lua im keep getting some shit..
ofcourse to call it i use
Code: Select all
sendMacro("}AutoLoginAccount=2 ;a={")
sendMacro("}fastLoginRelog=false ;a={")
some thoughs maybe?
Re: swietlowka Autologin 1.31 with boxes
Posted: Fri Jan 21, 2011 10:35 pm
by rock5
Maybe when logging in, you could save the account details in a variable. eg.
Code: Select all
CurrentAcc = {Id = i , Name= AccountLoginAccountEdit:GetText()}
Then, when you are reloging, you can see if you are already on the right account and just load the new character.
swietlowka wrote: im keep getting some shit..
What exactly happens?
swietlowka wrote:ofcourse to call it i use
Code: Select all
sendMacro("}AutoLoginAccount=2 ;a={")
sendMacro("}fastLoginRelog=false ;a={")
some thoughs maybe?
I never liked doing it that way. Maybe you could add a function like this
Code: Select all
function ChangeCharacter(acc, char)
AutoLoginAccount = acc
AutoLoginCharacter = char
Logout();
end
and what ever other commands are needed then we could call it with
Code: Select all
sendMacro("ChangeCharacter(2, 1)")
It would simplify things.
Re: swietlowka Autologin 1.31 with boxes
Posted: Fri Jan 21, 2011 10:38 pm
by jduartedj
Post it in the UF
repository
Re: swietlowka Autologin 1.31 with boxes
Posted: Fri Jan 21, 2011 11:00 pm
by lisa
only just started using this, I really like it.
so many acc and so many passes, hard to remember them all lol
Re: swietlowka Autologin 1.31 with boxes
Posted: Sat Jan 22, 2011 5:27 am
by swietlowka
rock5 wrote:Maybe when logging in, you could save the account details in a variable. eg.
Code: Select all
CurrentAcc = {Id = i , Name= AccountLoginAccountEdit:GetText()}
Then, when you are reloging, you can see if you are already on the right account and just load the new character.
swietlowka wrote: im keep getting some shit..
What exactly happens?
swietlowka wrote:ofcourse to call it i use
Code: Select all
sendMacro("}AutoLoginAccount=2 ;a={")
sendMacro("}fastLoginRelog=false ;a={")
some thoughs maybe?
I never liked doing it that way. Maybe you could add a function like this
Code: Select all
function ChangeCharacter(acc, char)
AutoLoginAccount = acc
AutoLoginCharacter = char
Logout();
end
and what ever other commands are needed then we could call it with
Code: Select all
sendMacro("ChangeCharacter(2, 1)")
It would simplify things.
i'll try that... hopefully today :d
id like to add one more feature to it but im not sure if its possible...
it would be really nice if i could assing client.config.ini to each account (lets say editing it on startup or smt... im not sure if its possible thouhg)
Re: swietlowka Autologin 1.31 with boxes
Posted: Sat Jan 22, 2011 6:36 am
by rock5
Not from the games as its lua doesn't include file functions.
Re: swietlowka Autologin 1.31 with boxes
Posted: Sat Jan 22, 2011 5:41 pm
by swietlowka
Code: Select all
function AutoChangeCharacter(accounttoload, charactertoload)
local AutoLoginAccount = accounttoload
local AutoLoginCharacter = charactertoload
Logout();
if ( AutoLoginAccount = CurrentAccID ) then
CHARACTER_SELECT.selectedIndex = AutoLoginCharacter
CharacterSelect_EnterWorld();
else
CharacterSelect_Exit();
CustomLoginButton_OnClick("..AutoLoginAccount..");
CHARACTER_SELECT.selectedIndex = AutoLoginCharacter
CharacterSelect_EnterWorld();
end
end
local function CheckCurrentAccountID()
if ( CustomLogin.Account1.UserName == CurrentAcc ) return 1;
elseif ( CustomLogin.Account2.UserName == CurrentAcc ) return 2;
elseif ( CustomLogin.Account3.UserName == CurrentAcc ) return 3;
elseif ( CustomLogin.Account4.UserName == CurrentAcc ) return 4;
elseif ( CustomLogin.Account5.UserName == CurrentAcc ) return 5;
elseif ( CustomLogin.Account6.UserName == CurrentAcc ) return 6;
elseif ( CustomLogin.Account7.UserName == CurrentAcc ) return 7;
elseif ( CustomLogin.Account8.UserName == CurrentAcc ) return 8;
elseif ( CustomLogin.Account9.UserName == CurrentAcc ) return 9;
elseif ( CustomLogin.Account10.UserName == CurrentAcc ) return 10;
elseif ( CustomLogin.Account11.UserName == CurrentAcc ) return 11;
elseif ( CustomLogin.Account12.UserName == CurrentAcc ) return 12;
elseif ( CustomLogin.Account13.UserName == CurrentAcc ) return 13;
elseif ( CustomLogin.Account14.UserName == CurrentAcc ) return 14;
elseif ( CustomLogin.Account15.UserName == CurrentAcc ) return 15;
elseif ( CustomLogin.Account16.UserName == CurrentAcc ) return 16;
elseif ( CustomLogin.Account17.UserName == CurrentAcc ) return 17;
elseif ( CustomLogin.Account18.UserName == CurrentAcc ) return 18;
end
end
someone tell me why im getting error because of the obove functions?
when they i do paste them autologin stops working...
Code: Select all
function AccountLogin_Login()
if ( fastLoginAutoLogin and ( not fastLoginTriedOnce ) ) then
fastLoginLoggedInUser = fastLoginUser -- rv
DefaultServerLogin(fastLoginUser, fastLoginPass);
else
fastLoginLoggedInUser = AccountLoginAccountEdit:GetText() -- rv
DefaultServerLogin(AccountLoginAccountEdit:GetText(), AccountLoginPasswordEdit:GetText());
end
CurrentAcc = AccountLoginAccountEdit:GetText();
CurrentAccID = CheckCurrentAccountID();
AccountLoginPasswordEdit:SetText("");
AccountLoginAccountEdit:ClearFocus();
AccountLoginPasswordEdit:ClearFocus();
end
change to autologin to store CurrentAccID
Re: swietlowka Autologin 1.31 with boxes
Posted: Sat Jan 22, 2011 7:49 pm
by rock5
I'll give you a clue. It's a mistake we all do again and again.
Code: Select all
if ( AutoLoginAccount = CurrentAccID ) then
Also you really need to learn how to deal with variables. A simpler way to do the CheckCurrentAccountID function is like this.
Code: Select all
local function CheckCurrentAccountID()
for i = 1, 18 do
if CustomLogin["Account"..i].UserName = CurrentAcc then return i end
end
end
Hmm.. What happens if a user types in an account that is not in the list?
Keep up the good work.
Re: swietlowka Autologin 1.31 with boxes
Posted: Sat Jan 22, 2011 8:59 pm
by lisa
rock5 wrote: Code: Select all
local function CheckCurrentAccountID()
for i = 1, 18 do
if CustomLogin["Account"..i].UserName = CurrentAcc then return i end
end
end
That is going into my file of code examples, been looking for that type of example for ages =)
Re: swietlowka Autologin 1.31 with boxes
Posted: Sat Jan 22, 2011 10:18 pm
by rock5
You just need to know that all these are the same.
Code: Select all
table.item1.value
table["item1"].value
table["item1"]["value"]
i=1
table["item"..i].value
The only thing you need to be careful of is numbers
is not the same as
and
is not valid
Re: swietlowka Autologin 1.31 with boxes
Posted: Sun Jan 23, 2011 5:17 am
by swietlowka
Code: Select all
local function CheckCurrentAccountID()
for i = 1, 18 do
if CustomLogin["Account"..i].UserName = CurrentAcc then return i else return 0 end
end
end
so it should look like that, since when we put anything else than in the boxes manually and will want to switch we dont need the data, just something to compare with
EDIT: adding that function gets hole script to stops working... dunno why, tried diffrent setups and stuff im running out of options...
how do i change
Code: Select all
local AutoLoginAccount = accounttoload
to be "o" in default?
to use it i'll change the function to:
Code: Select all
function AutoChangeCharacter(charactertoload, accounttoload)
then we could simply call AutoChangeCharacter(8) without account
Re: swietlowka Autologin 1.31 with boxes
Posted: Mon Jan 24, 2011 7:27 pm
by rock5
swietlowka wrote:Code: Select all
local function CheckCurrentAccountID()
for i = 1, 18 do
if CustomLogin["Account"..i].UserName = CurrentAcc then return i else return 0 end
end
end
What this does is return 0 the first time it compares. What you want it to do is check the whole list first then, if it doesn't find it, return 0.
Code: Select all
local function CheckCurrentAccountID()
for i = 1, 18 do
if CustomLogin["Account"..i].UserName = CurrentAcc then return i end
end
return 0
end
swietlowka wrote:how do i change
Code: Select all
local AutoLoginAccount = accounttoload
to be "o" in default?
to use it i'll change the function to:
Code: Select all
function AutoChangeCharacter(charactertoload, accounttoload)
then we could simply call AutoChangeCharacter(8) without account
You could say
Code: Select all
if accounttoload == nil then accounttoload = "o" end
Or you could just say
Code: Select all
if accounttoload ~= nil and accounttoload ~= currentaccount then
change account
end
Then select the character.
And can I suggest you add a button map to make it easier for the users to place their accounts. Something like
Code: Select all
-- Here is a button map to help with button placement. If the Account username is
-- empty then the button will be hidden.
--
-- Account4 Account8
-- Account3 Account7
-- Account2 Account1 Log In Account5 Account6
-- Account9 Account10 Account11 Account12 Account13
-- Account14 Account15 Account16 Account17 Account18
Re: swietlowka Autologin 1.31 with boxes
Posted: Tue Jan 25, 2011 3:27 am
by swietlowka
ok i can easily add your suggestion, the problem is no matter how i put that function there it stops working and im nor sure why :/ i was thinking about maybe some restriction or smt, but dont really know how to fix it, ill check it later today, maybe ill rename the function or smt...
Re: swietlowka Autologin 1.31 with boxes
Posted: Tue Jan 25, 2011 3:47 am
by rock5
Post the function the way it is now. Maybe I can see something.
Re: swietlowka Autologin 1.31 with boxes
Posted: Wed Jan 26, 2011 7:38 am
by swietlowka
there comes a bigger issue, im nto sure ill handle it, 3.0.8 asks (or rather is going to ask) for the secondary password on login...
Re: swietlowka Autologin 1.31 with boxes
Posted: Wed Jan 26, 2011 4:02 pm
by fluxus
3.0.8 is the latest update?
Have been asked for second pw just once.
But the addon didnt fully work yesterday, took me straight to char selection and stopt :/
Is ingame language importend?
Re: swietlowka Autologin 1.31 with boxes
Posted: Wed Jan 26, 2011 4:25 pm
by swietlowka
fluxus wrote:3.0.8 is the latest update?
Have been asked for second pw just once.
But the addon didnt fully work yesterday, took me straight to char selection and stopt :/
Is ingame language importend?
it works with 3.0.8 but you need to manually give the secondary pass for now...
its working well for me, maybe u made some config wrong or smt?
Re: swietlowka Autologin 1.31 with boxes
Posted: Wed Jan 26, 2011 5:10 pm
by fluxus
oh ok(but i think i entered sec. pw using my keyboard while text on screen said it could only be entered by onscreen keyboard...)
look into my config again, didnt changed anything but works now. i love pc´s x)
ps.: if you cant enter sec. pw by keyboard: i recently installed the addon "Purchase In Quantities" (
http://rom.curse.com/downloads/rom-addo ... ntity.aspx),
now im also able to type in numbers at the "Split stack" and Buy dialog(tested using my nummber pad) Maybe this helps...