Page 2 of 2

Re: AION 5.6 EU Kinah

Posted: Mon Dec 25, 2017 4:01 pm
by nucular
cooco wrote:
Mon Dec 25, 2017 2:02 pm
AS keep working in character select. My problem is how to recognize pin number? Need a program to detect every number. Any idea? :|

Code: Select all

                    foreach (char k in Pin) {
                        for (int i = 0; i < 10; i++) {
                            var numdlg = Game.DialogList.GetDialog("second_password_dialog/ctn_numpad/num" + i.ToString());
                            if (numdlg == null || !numdlg.IsVisible() || !numdlg.IsEnabled()) continue;
                            char key = Game.Process.GetChar(numdlg.GetAddress() + 0x300);
                            if (key == k) {
                                DoDlgClick("second_password_dialog/ctn_numpad/num" + i.ToString());
                                Thread.Sleep(350);
                            }
                        }
                        Thread.Sleep(350);
                        Game.DialogList.Update();
                        DoDlgClick("second_password_dialog/ok");
                    }

Re: AION 5.6 EU Kinah

Posted: Mon Dec 25, 2017 6:20 pm
by cooco
nucular wrote:
Mon Dec 25, 2017 4:01 pm
cooco wrote:
Mon Dec 25, 2017 2:02 pm
AS keep working in character select. My problem is how to recognize pin number? Need a program to detect every number. Any idea? :|

Code: Select all

                    foreach (char k in Pin) {
                        for (int i = 0; i < 10; i++) {
                            var numdlg = Game.DialogList.GetDialog("second_password_dialog/ctn_numpad/num" + i.ToString());
                            if (numdlg == null || !numdlg.IsVisible() || !numdlg.IsEnabled()) continue;
                            char key = Game.Process.GetChar(numdlg.GetAddress() + 0x300);
                            if (key == k) {
                                DoDlgClick("second_password_dialog/ctn_numpad/num" + i.ToString());
                                Thread.Sleep(350);
                            }
                        }
                        Thread.Sleep(350);
                        Game.DialogList.Update();
                        DoDlgClick("second_password_dialog/ok");
                    }
Hi Nucular, tnx for this awesome code.
I have a little "problem".
If I using your code I get an error because Game.DialogList is null. After a lot of trial and error i found a "dirty" solution by using this code before your

Code: Select all

Game.DialogList = new DialogList(Game.Base());
Game.DialogList.Update();
Is this initialization a bad idea? :|

Re: AION 5.6 EU Kinah

Posted: Tue Dec 26, 2017 12:38 am
by Diavolakos
cooco wrote:
Mon Dec 25, 2017 2:02 pm
AS keep working in character select. My problem is how to recognize pin number? Need a program to detect every number. Any idea? :|
Vanilla can use Pin when needed but it cannot log an account using password and username because you need to be on a char logged in game to open vanilla and attach it to the client.

Why do you need the pin? It is only needed once when you enter the account and then you would only need it if you go to panesterra and/or move to fast track server.

To recognize the pin numbers you need AS to be able to look at specific pixels that are present in your screen. I assume vanilla does something similar because when they are about to use the pin the client gets in the foreground.

If you can look at pixel colours in screen you can make a script to recognize the numbers and then hit them in sequence to make a pin.

BUT you should also make sure the client has a specific size otherwise the pin and everything inside it gets different size and thus looking at a specific pixel wouldn't work. Vanilla uses the smallest client size possible always so the position of windows etc is known.

Re: AION 5.6 EU Kinah

Posted: Tue Dec 26, 2017 10:59 am
by nucular
Diavolakos wrote:
Tue Dec 26, 2017 12:38 am
cooco wrote:
Mon Dec 25, 2017 2:02 pm
AS keep working in character select. My problem is how to recognize pin number? Need a program to detect every number. Any idea? :|
Vanilla can use Pin when needed but it cannot log an account using password and username because you need to be on a char logged in game to open vanilla and attach it to the client.

Why do you need the pin? It is only needed once when you enter the account and then you would only need it if you go to panesterra and/or move to fast track server.

To recognize the pin numbers you need AS to be able to look at specific pixels that are present in your screen. I assume vanilla does something similar because when they are about to use the pin the client gets in the foreground.

If you can look at pixel colours in screen you can make a script to recognize the numbers and then hit them in sequence to make a pin.

BUT you should also make sure the client has a specific size otherwise the pin and everything inside it gets different size and thus looking at a specific pixel wouldn't work. Vanilla uses the smallest client size possible always so the position of windows etc is known.
Look at the posted code from above.
If you modify AionScript to run on Login Screen you can use the code i posted above.
It will enter your pin.
No pixel tracking needed.

Re: AION 5.6 EU Kinah

Posted: Tue Dec 26, 2017 12:30 pm
by agonic
So, Where will I paste in code? Where will I write the pin in this code ? and How can I use select it? Thank you in advance :D

Re: AION 5.6 EU Kinah

Posted: Tue Dec 26, 2017 1:14 pm
by cooco
agonic wrote:
Tue Dec 26, 2017 12:30 pm
So, Where will I paste in code? Where will I write the pin in this code ? and How can I use select it? Thank you in advance :D
I use Nucular code inside my script extension c# Project. I don't think is possible to use this in LUA script.

My doubt is where initialize DialogList, bcs in login screen could be null

Re: AION 5.6 EU Kinah

Posted: Tue Dec 26, 2017 1:52 pm
by nucular
cooco wrote:
Tue Dec 26, 2017 1:14 pm
agonic wrote:
Tue Dec 26, 2017 12:30 pm
So, Where will I paste in code? Where will I write the pin in this code ? and How can I use select it? Thank you in advance :D
I use Nucular code inside my script extension c# Project. I don't think is possible to use this in LUA script.

My doubt is where initialize DialogList, bcs in login screen could be null
You should initialize it in your extension yourself.

Because AionScript was not written to work on Login Screen.
There is also no simple support because on Login Screen some parts are not intialized and if AionScript tries to access it, it will crash.
For Example if you would try to toggle No Gravity Aion will crash.

DialogList, EntitiesList is possible to use, but you have to initialize it yourself.
EntitesList contains your current characters on Character Select.

Re: AION 5.6 EU Kinah

Posted: Tue Jan 02, 2018 8:43 pm
by LordSnack
nucular wrote:
Mon Dec 25, 2017 4:01 pm
cooco wrote:
Mon Dec 25, 2017 2:02 pm
AS keep working in character select. My problem is how to recognize pin number? Need a program to detect every number. Any idea? :|

Code: Select all

                    foreach (char k in Pin) {
                        for (int i = 0; i < 10; i++) {
                            var numdlg = Game.DialogList.GetDialog("second_password_dialog/ctn_numpad/num" + i.ToString());
                            if (numdlg == null || !numdlg.IsVisible() || !numdlg.IsEnabled()) continue;
                            char key = Game.Process.GetChar(numdlg.GetAddress() + 0x300);
                            if (key == k) {
                                DoDlgClick("second_password_dialog/ctn_numpad/num" + i.ToString());
                                Thread.Sleep(350);
                            }
                        }
                        Thread.Sleep(350);
                        Game.DialogList.Update();
                        DoDlgClick("second_password_dialog/ok");
                    }
Nice work :3