ROM Hack Game botting with ntr ?

hacksn5s4

Banned!
OP
Banned
Joined
Aug 12, 2015
Messages
4,332
Trophies
0
XP
1,322
Country
So I've seen these Pokemon shiny hunting bots on YouTube they use motors to press the buttons but could you use ntr to put inputs from the bot into the game from a pc and have it read ram to see if moms shiny or not I just want this for fun
 

Zan'

2F88744FEED717856386400A44BBA4B9CA62E76A32C715D4F
Member
Joined
Oct 8, 2015
Messages
387
Trophies
0
Age
32
XP
271
Country
some thing like this but instead of using a machine that presses the buttons on the 3ds send inputs to the 3ds

Depends on how the inputs are handled.
But the console has to get the mechanical inputs into a code acceptable. So somewhere the oressed key has to be stored. By writing to that part you could effectively emulate a button press.
Then you just do this like a macro in a while loop with chained presses. In between it can even read out data and check foe specific requirements.
 

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
30
Location
South of France :)
XP
3,336
Country
France
Yes it's possible to inject inputs through a plugin.

I've posted a working code in the thread for the NTR Debugger with Gateshark support.

You just have to program your bot and use the previously mentioned code for injecting the inputs.
 
  • Like
Reactions: cearp

hacksn5s4

Banned!
OP
Banned
Joined
Aug 12, 2015
Messages
4,332
Trophies
0
XP
1,322
Country
Yes it's possible to inject inputs through a plugin.

I've posted a working code in the thread for the NTR Debugger with Gateshark support.

You just have to program your bot and use the previously mentioned code for injecting the inputs.
Thing is though I need away for it to read the ram so the bot knows what it's doing it needs to know when it encounters a mon needs to know if it's shiny or not
 
Last edited by hacksn5s4,

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
30
Location
South of France :)
XP
3,336
Country
France
I don't understand your question...

If you're asking me about making a bot for a shiny hunting then no I won't.

I don't mind helping with the mechanics of the bot, but there's no way I'm taking time to find where are the information we need in the ram.
I don't need that, and I'm not even playing this game...
 

hacksn5s4

Banned!
OP
Banned
Joined
Aug 12, 2015
Messages
4,332
Trophies
0
XP
1,322
Country
I don't understand your question...

If you're asking me about making a bot for a shiny hunting then no I won't.

I don't mind helping with the mechanics of the bot, but there's no way I'm taking time to find where are the information we need in the ram.
I don't need that, and I'm not even playing this game...
I ment like for imputing into the 3ds
 

Hking0036

Well-Known Member
Member
Joined
Sep 15, 2015
Messages
498
Trophies
0
XP
1,356
Country
United States
I wish more people knew about this think of all the boys that could be made
if you want to bot to get shiny pokemon why not just use pkhex and make one that passes a legality check? That way you're not killing your battery and you still get what you want, if you're willing to spend this much effort to get random ones you can expend significantly less and have whatever you want, still able to battle online.
 

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
30
Location
South of France :)
XP
3,336
Country
France
So here the code I thought about based on ctrulib's HID implementation:
Code:
#define BIT(x) (1 << x)


/* hidSharedMem can be 0x10000000, 0x10001000, 0x10002000 (maybe even 0x10003000 but didn't see the case until now)
** the address can be different between games
** I don't know for now how to retrieve it automatically so you must define the good one manually
*/
vu32    *hidSharedMem = (u32 *)0x10002000;
u32      kDown = 0;

enum
{
    KEY_A       = BIT(0),       ///< A
    KEY_B       = BIT(1),       ///< B
    KEY_SELECT  = BIT(2),       ///< Select
    KEY_START   = BIT(3),       ///< Start
    KEY_DRIGHT  = BIT(4),       ///< D-Pad Right
    KEY_DLEFT   = BIT(5),       ///< D-Pad Left
    KEY_DUP     = BIT(6),       ///< D-Pad Up
    KEY_DDOWN   = BIT(7),       ///< D-Pad Down
    KEY_R       = BIT(8),       ///< R
    KEY_L       = BIT(9),       ///< L
    KEY_X       = BIT(10),      ///< X
    KEY_Y       = BIT(11),      ///< Y
    KEY_CPAD_RIGHT = BIT(28),   ///< Circle Pad Right
    KEY_CPAD_LEFT  = BIT(29),   ///< Circle Pad Left
    KEY_CPAD_UP    = BIT(30),   ///< Circle Pad Up
    KEY_CPAD_DOWN  = BIT(31),   ///< Circle Pad Down

};

u32 hidCheckSectionUpdateTime(vu32 *sharedmem_section, u32 id)
{
    s64 tick0 = 0;
    s64 tick1 = 0;

    if (id==0)
    {
        tick0 = *((u64 *)&sharedmem_section[0]);
        tick1 = *((u64 *)&sharedmem_section[2]);
        if (tick0 == tick1 || tick0 < 0 || tick1 < 0)
            return 1;
    }
    return 0;
}

void scanHID(void)
{
    u32 id = 0;
    kDown = 0;
    id = hidSharedMem[4];

    if (id > 7)
        id = 7;
    if (hidCheckSectionUpdateTime(hidSharedMem, id) == 0)
        kDown = hidSharedMem[10 + id * 4];
}

void    editMemoryRights(void)
{
    int i;

    for (i = 0; i < 8; i++)
        rtCheckRemoteMemoryRegionSafeForWrite(getCurrentProcessHandle(), (u32)hidSharedMem + (10 + i * 4),  4);
}

void    setHID(u32 keys)
{
      u32 id;

      id = hidSharedMem[4];
      if(id > 7)
        id = 7;
    hidSharedMem[10 + id * 4] |= keys;
}

u32    hidKeysDown()
{
    return(kDown);
}


Code:
void    send_key(u32 keys)
{
    setHID(keys);
}

void    my_super_bot(void)
{
    editMemoryRights();
    //Press L + A +B to exit the loop
    while (hidKeysDown() != (KEY_A | KEY_B | KEY_L))
    {
         //send A
        send_key(KEY_A);
        //wait 1s
        svcSleep(1000000000);
        //send B
        send_key(KEY_B);
        //wait 1s
        svcSleep(1000000000);
        //send A
        send_key(KEY_A);
        //wait 10s
        svcSleep(10000000000);
        scanHID();
    }
}
 
  • Like
Reactions: Azel and cearp

hacksn5s4

Banned!
OP
Banned
Joined
Aug 12, 2015
Messages
4,332
Trophies
0
XP
1,322
Country
if you want to bot to get shiny pokemon why not just use pkhex and make one that passes a legality check? That way you're not killing your battery and you still get what you want, if you're willing to spend this much effort to get random ones you can expend significantly less and have whatever you want, still able to battle online.
Because it would not be legit and it's fun to watch
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: https://gbatemp.net/profile-posts/163064/