rock5&swietlowka Autologin v2.1 with boxes and secondarypass

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.
Post Reply
Message
Author
swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

rock5&swietlowka Autologin v2.1 with boxes and secondarypass

#1 Post by swietlowka » Fri Jan 21, 2011 5:56 pm

=========================================================
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
Autologin 1.31 with boxes by swietlowka.zip
(10.82 KiB) Downloaded 447 times
Loginxml with boxes by swietlowna v2.zip
(14.8 KiB) Downloaded 290 times
Loginxml with boxes by rock5&swietlowka v2.1.zip
(15.35 KiB) Downloaded 377 times
Loginxml with boxes by rock5&swietlowka v2.11.zip
Can now use character names longer than 16 characters.
(14.59 KiB) Downloaded 531 times
Last edited by swietlowka on Wed Feb 09, 2011 4:51 am, edited 3 times in total.

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

Re: swietlowka Autologin 1.31 with boxes

#2 Post by rock5 » Fri Jan 21, 2011 7:40 pm

Sweeet! :D

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

Code: Select all

ChangeCharacter("acc2","player1")
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.
  • 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

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: swietlowka Autologin 1.31 with boxes

#3 Post by swietlowka » Fri Jan 21, 2011 8:15 pm

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?

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

Re: swietlowka Autologin 1.31 with boxes

#4 Post by rock5 » Fri Jan 21, 2011 10:35 pm

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.
  • 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
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: swietlowka Autologin 1.31 with boxes

#5 Post by jduartedj » Fri Jan 21, 2011 10:38 pm

Post it in the UF repository ;)
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

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

Re: swietlowka Autologin 1.31 with boxes

#6 Post by lisa » Fri Jan 21, 2011 11:00 pm

only just started using this, I really like it.
so many acc and so many passes, hard to remember them all lol
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

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: swietlowka Autologin 1.31 with boxes

#7 Post by swietlowka » Sat Jan 22, 2011 5:27 am

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)

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

Re: swietlowka Autologin 1.31 with boxes

#8 Post by rock5 » Sat Jan 22, 2011 6:36 am

Not from the games as its lua doesn't include file functions.
  • 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

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: swietlowka Autologin 1.31 with boxes

#9 Post by swietlowka » Sat Jan 22, 2011 5:41 pm

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

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

Re: swietlowka Autologin 1.31 with boxes

#10 Post by rock5 » Sat Jan 22, 2011 7:49 pm

I'll give you a clue. It's a mistake we all do again and again. :D

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.
  • 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: swietlowka Autologin 1.31 with boxes

#11 Post by lisa » Sat Jan 22, 2011 8:59 pm

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 =)
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: swietlowka Autologin 1.31 with boxes

#12 Post by rock5 » Sat Jan 22, 2011 10:18 pm

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

Code: Select all

table[1]
is not the same as

Code: Select all

table["1"]
and

Code: Select all

table.1
is not valid
  • 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

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: swietlowka Autologin 1.31 with boxes

#13 Post by swietlowka » Sun Jan 23, 2011 5:17 am

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

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

Re: swietlowka Autologin 1.31 with boxes

#14 Post by rock5 » Mon Jan 24, 2011 7:27 pm

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
  • 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

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: swietlowka Autologin 1.31 with boxes

#15 Post by swietlowka » Tue Jan 25, 2011 3:27 am

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...

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

Re: swietlowka Autologin 1.31 with boxes

#16 Post by rock5 » Tue Jan 25, 2011 3:47 am

Post the function the way it is now. Maybe I can see something.
  • 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

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: swietlowka Autologin 1.31 with boxes

#17 Post by swietlowka » Wed Jan 26, 2011 7:38 am

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...

fluxus
Posts: 8
Joined: Thu Aug 05, 2010 8:54 am

Re: swietlowka Autologin 1.31 with boxes

#18 Post by fluxus » Wed Jan 26, 2011 4:02 pm

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?

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: swietlowka Autologin 1.31 with boxes

#19 Post by swietlowka » Wed Jan 26, 2011 4:25 pm

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?

fluxus
Posts: 8
Joined: Thu Aug 05, 2010 8:54 am

Re: swietlowka Autologin 1.31 with boxes

#20 Post by fluxus » Wed Jan 26, 2011 5:10 pm

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...

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests