Random Lua Auto-login Stuff menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Random Lua Auto-login Stuff

    Doing some auto-login stuff for a friend, and I figured I'd post it here too as I do it, to save other people from doing it from scratch (caus Lua sucks ass).

    Logging in:
    WoWLua("AccountLoginAccountEdit:SetText('" + MyUsername + "')");
    WoWLua("AccountLoginPasswordEdit:SetText('" + MyPassword + "')");
    WoWLua("AccountLogin_Login()");

    Selecting a realm:
    (This will automatically select the first realm it finds on which you have a character, you will need to tweak this if you use multiple realms and need different behaviour.)
    WoWLua(
    "for i = 1, select(\"#\", GetRealmCategories()), 1 do "
    " local numRealms = GetNumRealms(i); "
    " for j = 1, numRealms, 1 do "
    " local _, numCharacters = GetRealmInfo(i, j); "
    " if (numCharacters > 0) then "
    " ChangeRealm(i, j); "
    " end "
    " end "
    "end ");

    Selecting a character:
    WoWLua("CharacterSelect_SelectCharacter(" + CharId + ", 0)");

    Entering the world:
    WoWLua("CharacterSelect_EnterWorld()");

    P.S. I suck at Lua, so meh, there might be some minor mistakes. Whatever. Point them out if you see them.

    Also, everyone else feel free to add to this. I'll add more as I do it.

    Random Lua Auto-login Stuff
  2. #2
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For login, I just use

    Code:
    Lua.DoString(string.Format("DefaultServerLogin('{0}', '{1}')", username, password));

  3. #3
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, much better approach.

    All this shit is just based off GlueXML, I just noticed the textbox's names and decided to use those, didn't even think to look for an actual API.

    GlueXML copypasta ftw.

  4. #4
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here ya go;

    Code:
        public static class LoginHelpers
        {
            public static bool RealmFrameVisible { get { return Lua.GetReturnVal<bool>("RealmList:IsShown()", 0); } }
            public static bool CharSelectVisible { get { return Lua.GetReturnVal<bool>("CharacterSelectUI:IsShown()", 0); } }
    
            public static void Login(string account, string password)
            {
                Lua.DoString(string.Format("DefaultServerLogin('{0}', '{1}')", account, password));
            }
    
            public static void SelectRealm(string name)
            {
                if (RealmFrameVisible)
                {
                    Lua.DoString(
                        string.Format(
                            "for i = 1, select('#', GetRealmCategories()), 1 do local numRealms = GetNumRealms(i);" +
                            "for j = 1, numRealms, 1 do local name, numCharacters = GetRealmInfo(i, j);" +
                            "if (name ~= nil and name == '{0}')ChangeRealm(i,j);end end end",
                            name));
                }
            }
    
            public static void SelectCharacter(string name)
            {
                if (CharSelectVisible)
                {
                    Lua.DoString(
                        string.Format(
                            "for i=0,GetNumCharacters(),1 do local name = GetCharacterInfo(i);" +
                            "if (name ~= nil and name == '{0}')CharacterSelect_SelectCharacter(i);end end",
                            name));
                }
            }
    
            public static void EnterWorld()
            {
                Lua.DoString("EnterWorld()");
            }
        }

  5. #5
    garkeinplan's Avatar Member
    Reputation
    7
    Join Date
    Aug 2007
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And here my script to select your game account on the battlenet screen

    Code:
    public void SelectGameAccount (string name)
    {
        this.DoString ("for i = 0, GetNumGameAccounts(), 1 do " +
                           "local name = GetGameAccountInfo (i); " +
                           "if (name == '" + name + "' then " +
                           "SetGameAccount (i); " +
                           "end " +
                           "end");
    }

  6. #6
    miceiken's Avatar Contributor Authenticator enabled
    Reputation
    208
    Join Date
    Dec 2007
    Posts
    401
    Thanks G/R
    7/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice, thank you all.

  7. #7
    satia's Avatar Active Member
    Reputation
    20
    Join Date
    Jan 2009
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apoc,

    while in login screen we dont have player base address right?

    how yours Lua.GetReturnVal works? because we cant use
    GetLocalizedText to get result cuz we dont have player base?

    Thanks in advance,
    satia

  8. #8
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by satia View Post
    Apoc,

    while in login screen we dont have player base address right?

    how yours Lua.GetReturnVal works? because we cant use
    GetLocalizedText to get result cuz we dont have player base?

    Thanks in advance,
    satia
    GetLocalizedText sucks, this has already been covered in this forum multiple times. Learn to search.

  9. #9
    flo8464's Avatar Active Member
    Reputation
    30
    Join Date
    Apr 2009
    Posts
    434
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how yours Lua.GetReturnVal works? because we cant use
    GetLocalizedText to get result cuz we dont have player base?
    If you have to use it, you should rewrite it, so it doesn't require any objectpointers anymore.
    But better take a look at a good C-lua-reference and lua_pcall().
    Hey, it compiles! Ship it!

  10. #10
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Injection - Question on Design

    removed, started a new thread
    Last edited by Tanaris4; 01-27-2010 at 02:02 PM.
    https://tanaris4.com

  11. #11
    GliderPro's Avatar Member
    Reputation
    -1
    Join Date
    Mar 2009
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    moved comment to Tanaris4's other thread.
    Last edited by GliderPro; 01-27-2010 at 11:19 AM.

  12. #12
    AlexF's Avatar Banned
    Reputation
    1
    Join Date
    Feb 2010
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Doing some auto-login stuff for a friend, and I figured I'd post it here too as I do it, to save other people from doing it from scratch (caus Lua sucks ass).

    Logging in:
    WoWLua("AccountLoginAccountEdit:SetText('" + MyUsername + "')");
    WoWLua("AccountLoginPasswordEdit:SetText('" + MyPassword + "')");
    WoWLua("AccountLogin_Login()");

    Selecting a realm:
    (This will automatically select the first realm it finds on which you have a character, you will need to tweak this if you use multiple realms and need different behaviour.)
    WoWLua(
    "for i = 1, select(\"#\", GetRealmCategories()), 1 do "
    " local numRealms = GetNumRealms(i); "
    " for j = 1, numRealms, 1 do "
    " local _, numCharacters = GetRealmInfo(i, j); "
    " if (numCharacters > 0) then "
    " ChangeRealm(i, j); "
    " end "
    " end "
    "end ");

    Selecting a character:
    WoWLua("CharacterSelect_SelectCharacter(" + CharId + ", 0)");

    Entering the world:
    WoWLua("CharacterSelect_EnterWorld()");

    P.S. I suck at Lua, so meh, there might be some minor mistakes. Whatever. Point them out if you see them.

    Also, everyone else feel free to add to this. I'll add more as I do it.

    can you upload project,i dont understand,do you inject DLL in process Wow.exe and do instruction WoWLua("AccountLoginAccountEdit:SetText('" + MyUsername + "')");

  13. #13
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by AlexF View Post
    can you upload project,i dont understand,do you inject DLL in process Wow.exe and do instruction WoWLua("AccountLoginAccountEdit:SetText('" + MyUsername + "')");
    Read the damned rules.

    You posted in 3 threads asking for source code, which is AGAINST THE RULES.

    See ya in 2 weeks.

  14. #14
    misz's Avatar Member
    Reputation
    1
    Join Date
    Nov 2007
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Doing some auto-login stuff for a friend, and I figured I'd post it here too as I do it, to save other people from doing it from scratch (caus Lua sucks ass).

    Logging in:
    WoWLua("AccountLoginAccountEdit:SetText('" + MyUsername + "')");
    WoWLua("AccountLoginPasswordEdit:SetText('" + MyPassword + "')");
    WoWLua("AccountLogin_Login()");

    Selecting a realm:
    (This will automatically select the first realm it finds on which you have a character, you will need to tweak this if you use multiple realms and need different behaviour.)
    WoWLua(
    "for i = 1, select(\"#\", GetRealmCategories()), 1 do "
    " local numRealms = GetNumRealms(i); "
    " for j = 1, numRealms, 1 do "
    " local _, numCharacters = GetRealmInfo(i, j); "
    " if (numCharacters > 0) then "
    " ChangeRealm(i, j); "
    " end "
    " end "
    "end ");

    Selecting a character:
    WoWLua("CharacterSelect_SelectCharacter(" + CharId + ", 0)");

    Entering the world:
    WoWLua("CharacterSelect_EnterWorld()");

    P.S. I suck at Lua, so meh, there might be some minor mistakes. Whatever. Point them out if you see them.

    Also, everyone else feel free to add to this. I'll add more as I do it.
    Nice, might decrease bot starting time allot, from bot start -> Char in World.

    Thank You.

  15. #15
    DEMON_PK's Avatar Member
    Reputation
    2
    Join Date
    Mar 2009
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
                    Lua.DoString(
                        string.Format(
                            "for i=0,GetNumCharacters(),1 do local name = GetCharacterInfo(i);" +
                            "if (name ~= nil and name == '{0}')CharacterSelect_SelectCharacter(i);end end",
                            name));
    How do it in AutoIt?
    Code:
    $format="for i=0,GetNumCharacters(),1 do local name = GetCharacterInfo(i);"&@CRLf&"if (name ~= nil and name == 'Магороз') then"&@CRLf&"CharacterSelect_SelectCharacter(i);"&@CRLf&"end"&@CRLf&"end"
    MsgBox(0, "this example can not select character", $format)
    WowLuaDoString( $wow, "", $format)
    PS without word 'then' string gives lua error

Page 1 of 2 12 LastLast

Similar Threads

  1. [PC] WoW Auto-Login Manager (With MEFix support!)
    By Gothian in forum World of Warcraft Bots and Programs
    Replies: 131
    Last Post: 10-29-2011, 10:59 AM
  2. LUA Auto Login [the final solution]
    By mnbvc in forum WoW Memory Editing
    Replies: 22
    Last Post: 01-26-2011, 11:08 AM
  3. Hate getting D/C?? -- Auto Login -- useful for bots and private servers
    By ADAMZY in forum World of Warcraft Bots and Programs
    Replies: 24
    Last Post: 11-05-2007, 05:06 PM
  4. [Mac] WoWAL (WoW Auto Login)
    By Quafe in forum World of Warcraft Bots and Programs
    Replies: 17
    Last Post: 10-29-2007, 03:53 PM
  5. Auto Login
    By Relz in forum World of Warcraft Bots and Programs
    Replies: 15
    Last Post: 12-27-2006, 10:56 AM
All times are GMT -5. The time now is 04:52 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search