Looking CREATING AUTO LOGIN LIST FOR @EVERYONE, LF TIPS!

fa1thDEV

Baron
Customer
Hello, I create a auto login system for lucera, my objetive is share for all on this community, but I cant get the window in the login lobby if someone can help I'll share all


My interface script (credits to BIT for the help):

BIT_AutologinWnd:
JavaScript:
/************************************

class BIT_AutologinWnd extends UICommonAPI;

const MAX_SAVE_LOGIN = 10;

var WindowHandle Me;
var ListCtrlHandle LoginListCtrl;
var CheckBoxHandle AutoSaveCheckBox;

function OnLoad() {
    Me = GetWindowHandle("BIT_AutologinWnd");
    LoginListCtrl = GetListCtrlHandle("BIT_AutologinWnd.LoginListCtrl");
    AutoSaveCheckBox = GetCheckBoxHandle("BIT_AutologinWnd.AutoSaveCheckBox");
}

function OnShow() { /* Se ejecuta al cargar el juego */
    local int i;
    local string Login;
    local array<string> SplitStr, empty;
    local LVDataRecord Record;

    SortInI();
    LoginListCtrl.DeleteAllItem();

    Record.LVDataList.length = 2;
    Record.LVDataList[1].buseTextColor = True;
    Record.LVDataList[1].TextColor = getInstanceL2Util().Yellow;

    for(i = 0; i < MAX_SAVE_LOGIN; i++) { // ? Corrección: < en lugar de <=
        GetINIString("BIT_AUTO_LOGIN", string(i), Login, "AUTOLOGIN.ini");
        Split(Login, ",", SplitStr);

        Record.LVDataList[0].szData = String(i);
        Record.LVDataList[1].szData = SplitStr[0];
        LoginListCtrl.InsertRecord(Record);

        SplitStr = empty; // ? Corrección: "empty" en lugar de "emty"
    }
}

function SortInI() { // Ordenar entradas del INI
    local int i, inc;
    local string Login, SortLogin[MAX_SAVE_LOGIN];

    for(i = 0; i < MAX_SAVE_LOGIN; i++) { // ? Corrección: <
        GetINIString("BIT_AUTO_LOGIN", string(i), Login, "AUTOLOGIN.ini");
        if (Login != "") {
            SortLogin[inc] = Login;
            inc++;
        }
    }

    for(i = 0; i < MAX_SAVE_LOGIN; i++) { // ? Corrección: <
        SetINIString("BIT_AUTO_LOGIN", string(i), SortLogin[i], "AUTOLOGIN.ini");
    }
    RefreshINI("AUTOLOGIN.ini");
}

function AutoSaveLogin(String LoginID, String Pass) { // Autoguardar login y contraseña
    local int i;
    local string Login;
    local array<string> SplitStr, empty;

    if (AutoSaveCheckBox.IsChecked()) { // Si el checkbox está activado
        for(i = 0; i < MAX_SAVE_LOGIN; i++) { // ? Corrección: <
            GetINIString("BIT_AUTO_LOGIN", string(i), Login, "AUTOLOGIN.ini");
            Split(Login, ",", SplitStr);

            if (SplitStr[0] == LoginID) // Si el login ya existe, salir
                return;

            SplitStr = empty; // ? Corrección: "empty"

            if (Login == "") {
                SetINIString("BIT_AUTO_LOGIN", string(i), LoginID$","$Pass, "AUTOLOGIN.ini");
                RefreshINI("AUTOLOGIN.ini");
                break; // ? Corrección: break añadido
            }
        }
    }
}

function OnClickButton(String strID) { /* Manejadores de clics en botones */
    local string Login;
    local array<string> SplitStr;

    if (strID == "LoginBtn") {
        GetINIString("BIT_AUTO_LOGIN", string(LoginListCtrl.GetSelectedIndex()), Login, "AUTOLOGIN.ini");
        Split(Login, ",", SplitStr);
        RequestLogin(SplitStr[0], SplitStr[1], 7); // Iniciar sesión en el juego
    }

    if (strID == "LoginDelBtn") {
        SetINIString("BIT_AUTO_LOGIN", string(LoginListCtrl.GetSelectedIndex()), Login, "AUTOLOGIN.ini"); // ? Corrección: DeleteINIKey
        RefreshINI("AUTOLOGIN.ini");
        OnShow();
    }
}

function OnClickListCtrlRecord(String strID) {
    if (strID == "LoginListCtrl") {
        AddSystemMessageString("Mes"@strID); // ? Mejora: Mensaje claro
    }
}

defaultproperties()


And next I edited the login.uc:
JavaScript:
function onCallUCFunction( String funcName , string param )
{
    local string id;
    local string pass;
    local int ncopt;
  
    local string delString;
    local int i ;

    local string url;
    //debug ( "onCallUCFunction" @ funcName @ param );
  
      local BIT_AutologinWnd AutologinWnd;

            AutologinWnd = BIT_AutologinWnd(GetScript("BIT_AutologinWnd"));//<-----------

      switch (funcName )
    {
        case "setLogin":
            //아이디
            ParseString(param, "ID", id);
            SaveLastLoginID( id );
            //패스워드
            ParseString(param, "pass", pass);
            //OPT
            Parseint(param, "ncopt", ncopt);
          
            //로그인 요청 API
            RequestLogin( ID, pass, ncopt );

                  if (!IsShowWindow("LogIn"))   //<-----------
                     AutologinWnd.AutoSaveLogin(ID, pass);//<-----------



            delString = "";
            for ( i = 0 ; i < Len(param ) ; i ++ )
            {
                delString = delString $ "*"; 
            }
            param = delString;

....................... more code..

And in the xdat I make the next interface:

1739635027888.webp
1739635045304.webp
1739635061639.webp

1739635072757.webp
1739635093985.webp
1739635116024.webp


and in the "GFX" log7:

1739635239379.webp

PROGRAM USE: xdat editor, LUSE, JPEXS FLASH DEMCOPILER and L2TOOL package gfx.

ERRORS:

Not appear the window.. if someone know the problem or want try, i can help to try it
 
Автора скриптов указал бы
Сделаю это за тебя
 
Hello, I create a auto login system for lucera, my objetive is share for all on this community, but I cant get the window in the login lobby if someone can help I'll share all


My interface script (credits to BIT for the help):

BIT_AutologinWnd:
JavaScript:
/************************************

class BIT_AutologinWnd extends UICommonAPI;

const MAX_SAVE_LOGIN = 10;

var WindowHandle Me;
var ListCtrlHandle LoginListCtrl;
var CheckBoxHandle AutoSaveCheckBox;

function OnLoad() {
    Me = GetWindowHandle("BIT_AutologinWnd");
    LoginListCtrl = GetListCtrlHandle("BIT_AutologinWnd.LoginListCtrl");
    AutoSaveCheckBox = GetCheckBoxHandle("BIT_AutologinWnd.AutoSaveCheckBox");
}

function OnShow() { /* Se ejecuta al cargar el juego */
    local int i;
    local string Login;
    local array<string> SplitStr, empty;
    local LVDataRecord Record;

    SortInI();
    LoginListCtrl.DeleteAllItem();

    Record.LVDataList.length = 2;
    Record.LVDataList[1].buseTextColor = True;
    Record.LVDataList[1].TextColor = getInstanceL2Util().Yellow;

    for(i = 0; i < MAX_SAVE_LOGIN; i++) { // ? Corrección: < en lugar de <=
        GetINIString("BIT_AUTO_LOGIN", string(i), Login, "AUTOLOGIN.ini");
        Split(Login, ",", SplitStr);

        Record.LVDataList[0].szData = String(i);
        Record.LVDataList[1].szData = SplitStr[0];
        LoginListCtrl.InsertRecord(Record);

        SplitStr = empty; // ? Corrección: "empty" en lugar de "emty"
    }
}

function SortInI() { // Ordenar entradas del INI
    local int i, inc;
    local string Login, SortLogin[MAX_SAVE_LOGIN];

    for(i = 0; i < MAX_SAVE_LOGIN; i++) { // ? Corrección: <
        GetINIString("BIT_AUTO_LOGIN", string(i), Login, "AUTOLOGIN.ini");
        if (Login != "") {
            SortLogin[inc] = Login;
            inc++;
        }
    }

    for(i = 0; i < MAX_SAVE_LOGIN; i++) { // ? Corrección: <
        SetINIString("BIT_AUTO_LOGIN", string(i), SortLogin[i], "AUTOLOGIN.ini");
    }
    RefreshINI("AUTOLOGIN.ini");
}

function AutoSaveLogin(String LoginID, String Pass) { // Autoguardar login y contraseña
    local int i;
    local string Login;
    local array<string> SplitStr, empty;

    if (AutoSaveCheckBox.IsChecked()) { // Si el checkbox está activado
        for(i = 0; i < MAX_SAVE_LOGIN; i++) { // ? Corrección: <
            GetINIString("BIT_AUTO_LOGIN", string(i), Login, "AUTOLOGIN.ini");
            Split(Login, ",", SplitStr);

            if (SplitStr[0] == LoginID) // Si el login ya existe, salir
                return;

            SplitStr = empty; // ? Corrección: "empty"

            if (Login == "") {
                SetINIString("BIT_AUTO_LOGIN", string(i), LoginID$","$Pass, "AUTOLOGIN.ini");
                RefreshINI("AUTOLOGIN.ini");
                break; // ? Corrección: break añadido
            }
        }
    }
}

function OnClickButton(String strID) { /* Manejadores de clics en botones */
    local string Login;
    local array<string> SplitStr;

    if (strID == "LoginBtn") {
        GetINIString("BIT_AUTO_LOGIN", string(LoginListCtrl.GetSelectedIndex()), Login, "AUTOLOGIN.ini");
        Split(Login, ",", SplitStr);
        RequestLogin(SplitStr[0], SplitStr[1], 7); // Iniciar sesión en el juego
    }

    if (strID == "LoginDelBtn") {
        SetINIString("BIT_AUTO_LOGIN", string(LoginListCtrl.GetSelectedIndex()), Login, "AUTOLOGIN.ini"); // ? Corrección: DeleteINIKey
        RefreshINI("AUTOLOGIN.ini");
        OnShow();
    }
}

function OnClickListCtrlRecord(String strID) {
    if (strID == "LoginListCtrl") {
        AddSystemMessageString("Mes"@strID); // ? Mejora: Mensaje claro
    }
}

defaultproperties()


And next I edited the login.uc:
JavaScript:
function onCallUCFunction( String funcName , string param )
{
    local string id;
    local string pass;
    local int ncopt;
 
    local string delString;
    local int i ;

    local string url;
    //debug ( "onCallUCFunction" @ funcName @ param );
 
      local BIT_AutologinWnd AutologinWnd;

            AutologinWnd = BIT_AutologinWnd(GetScript("BIT_AutologinWnd"));//<-----------

      switch (funcName )
    {
        case "setLogin":
            //아이디
            ParseString(param, "ID", id);
            SaveLastLoginID( id );
            //패스워드
            ParseString(param, "pass", pass);
            //OPT
            Parseint(param, "ncopt", ncopt);
         
            //로그인 요청 API
            RequestLogin( ID, pass, ncopt );

                  if (!IsShowWindow("LogIn"))   //<-----------
                     AutologinWnd.AutoSaveLogin(ID, pass);//<-----------



            delString = "";
            for ( i = 0 ; i < Len(param ) ; i ++ )
            {
                delString = delString $ "*";
            }
            param = delString;

....................... more code..

And in the xdat I make the next interface:

View attachment 5343
View attachment 5344
View attachment 5345

View attachment 5346
View attachment 5347
View attachment 5348


and in the "GFX" log7:

View attachment 5349

PROGRAM USE: xdat editor, LUSE, JPEXS FLASH DEMCOPILER and L2TOOL package gfx.

ERRORS:

with user l h5 can help me ?
 
Hello, I create a auto login system for lucera, my objetive is share for all on this community, but I cant get the window in the login lobby if someone can help I'll share all


My interface script (credits to BIT for the help):

BIT_AutologinWnd:
JavaScript:
/************************************

class BIT_AutologinWnd extends UICommonAPI;

const MAX_SAVE_LOGIN = 10;

var WindowHandle Me;
var ListCtrlHandle LoginListCtrl;
var CheckBoxHandle AutoSaveCheckBox;

function OnLoad() {
    Me = GetWindowHandle("BIT_AutologinWnd");
    LoginListCtrl = GetListCtrlHandle("BIT_AutologinWnd.LoginListCtrl");
    AutoSaveCheckBox = GetCheckBoxHandle("BIT_AutologinWnd.AutoSaveCheckBox");
}

function OnShow() { /* Se ejecuta al cargar el juego */
    local int i;
    local string Login;
    local array<string> SplitStr, empty;
    local LVDataRecord Record;

    SortInI();
    LoginListCtrl.DeleteAllItem();

    Record.LVDataList.length = 2;
    Record.LVDataList[1].buseTextColor = True;
    Record.LVDataList[1].TextColor = getInstanceL2Util().Yellow;

    for(i = 0; i < MAX_SAVE_LOGIN; i++) { // ? Corrección: < en lugar de <=
        GetINIString("BIT_AUTO_LOGIN", string(i), Login, "AUTOLOGIN.ini");
        Split(Login, ",", SplitStr);

        Record.LVDataList[0].szData = String(i);
        Record.LVDataList[1].szData = SplitStr[0];
        LoginListCtrl.InsertRecord(Record);

        SplitStr = empty; // ? Corrección: "empty" en lugar de "emty"
    }
}

function SortInI() { // Ordenar entradas del INI
    local int i, inc;
    local string Login, SortLogin[MAX_SAVE_LOGIN];

    for(i = 0; i < MAX_SAVE_LOGIN; i++) { // ? Corrección: <
        GetINIString("BIT_AUTO_LOGIN", string(i), Login, "AUTOLOGIN.ini");
        if (Login != "") {
            SortLogin[inc] = Login;
            inc++;
        }
    }

    for(i = 0; i < MAX_SAVE_LOGIN; i++) { // ? Corrección: <
        SetINIString("BIT_AUTO_LOGIN", string(i), SortLogin[i], "AUTOLOGIN.ini");
    }
    RefreshINI("AUTOLOGIN.ini");
}

function AutoSaveLogin(String LoginID, String Pass) { // Autoguardar login y contraseña
    local int i;
    local string Login;
    local array<string> SplitStr, empty;

    if (AutoSaveCheckBox.IsChecked()) { // Si el checkbox está activado
        for(i = 0; i < MAX_SAVE_LOGIN; i++) { // ? Corrección: <
            GetINIString("BIT_AUTO_LOGIN", string(i), Login, "AUTOLOGIN.ini");
            Split(Login, ",", SplitStr);

            if (SplitStr[0] == LoginID) // Si el login ya existe, salir
                return;

            SplitStr = empty; // ? Corrección: "empty"

            if (Login == "") {
                SetINIString("BIT_AUTO_LOGIN", string(i), LoginID$","$Pass, "AUTOLOGIN.ini");
                RefreshINI("AUTOLOGIN.ini");
                break; // ? Corrección: break añadido
            }
        }
    }
}

function OnClickButton(String strID) { /* Manejadores de clics en botones */
    local string Login;
    local array<string> SplitStr;

    if (strID == "LoginBtn") {
        GetINIString("BIT_AUTO_LOGIN", string(LoginListCtrl.GetSelectedIndex()), Login, "AUTOLOGIN.ini");
        Split(Login, ",", SplitStr);
        RequestLogin(SplitStr[0], SplitStr[1], 7); // Iniciar sesión en el juego
    }

    if (strID == "LoginDelBtn") {
        SetINIString("BIT_AUTO_LOGIN", string(LoginListCtrl.GetSelectedIndex()), Login, "AUTOLOGIN.ini"); // ? Corrección: DeleteINIKey
        RefreshINI("AUTOLOGIN.ini");
        OnShow();
    }
}

function OnClickListCtrlRecord(String strID) {
    if (strID == "LoginListCtrl") {
        AddSystemMessageString("Mes"@strID); // ? Mejora: Mensaje claro
    }
}

defaultproperties()


And next I edited the login.uc:
JavaScript:
function onCallUCFunction( String funcName , string param )
{
    local string id;
    local string pass;
    local int ncopt;
 
    local string delString;
    local int i ;

    local string url;
    //debug ( "onCallUCFunction" @ funcName @ param );
 
      local BIT_AutologinWnd AutologinWnd;

            AutologinWnd = BIT_AutologinWnd(GetScript("BIT_AutologinWnd"));//<-----------

      switch (funcName )
    {
        case "setLogin":
            //아이디
            ParseString(param, "ID", id);
            SaveLastLoginID( id );
            //패스워드
            ParseString(param, "pass", pass);
            //OPT
            Parseint(param, "ncopt", ncopt);
         
            //로그인 요청 API
            RequestLogin( ID, pass, ncopt );

                  if (!IsShowWindow("LogIn"))   //<-----------
                     AutologinWnd.AutoSaveLogin(ID, pass);//<-----------



            delString = "";
            for ( i = 0 ; i < Len(param ) ; i ++ )
            {
                delString = delString $ "*";
            }
            param = delString;

....................... more code..

And in the xdat I make the next interface:

View attachment 5343
View attachment 5344
View attachment 5345

View attachment 5346
View attachment 5347
View attachment 5348


and in the "GFX" log7:

View attachment 5349

PROGRAM USE: xdat editor, LUSE, JPEXS FLASH DEMCOPILER and L2TOOL package gfx.

ERRORS:

Not appear the window.. if someone know the problem or want try, i can help to try it
There are two files missing as well, AuthLoginUI.dll and AutoLogin.ini. I really wanted to use this on my server. For now, I'm using autologin using a python script outside the game. I wanted autologin inside the game. When you get it, please let me know.
 
There are two files missing as well, AuthLoginUI.dll and AutoLogin.ini. I really wanted to use this on my server. For now, I'm using autologin using a python script outside the game. I wanted autologin inside the game. When you get it, please let me know.
If You want for IL or H5, make it you.

I SHARE 3 versions only for Classic/fafurion. No ALL is free...
 
And I have an obligation to do that for you? :coffee: XD
Of course not, I entered the forum, registered, found the forum very cool, I was just asking for help, I don't know how to do it, as you understood, I thought you could help me, from the beginning I asked please
 
Back
Top