Dangerous, yet necessary... delete character button

Hi coders!
I need one little bit of info. Please. Please. :blush:

This control feature clicks on the Create New Character button on the character select screen:

var control = getControl(6, 33, 528, 168, 60);
control.click();

My inquiry is:
Is there a getControl(type, x, y, xsize, ysize); which is used with the control.click() and which clicks on the Delete Character button while in the character select screen?

I’ll keep looking if there is one already in one of d2bs’ scripts. Yet, if anyone knows, thank you in advance for share the values.

It should be in here somewhere https://github.com/D2etal/Etal/blob/master/D2NT/scripts/libs/controlInfo.ntl

2 Likes

Awesome! Thank you!
I was just about to screen shot the character select screen and to try to map out the x,y coords. Thanks for the link. Have an awesome Sunday. :video_game:

In case anyone else needs the means to delete a char, e.g., due to it died and you wish for your script to recreate a new char with the same name, then here are the control codes which are to be called while in the character select screen:

var control = getControl(6,433,528,168,60); //.deleteChar
control.click();

var control = getControl(6,421,337,96,32); // Yes confirmation button in delete conf dialogue box
control.click();

You will need to add a safe delay in between those two calls as the delete confirmation box does not have its own getLocation() id. Its getLoc id is the same getLoc id as the character select screen (= 12).

A huge thank you to Snoop for the link to the very useful controlInfo.ntl page.

I pulled those values from:
this.controls.characterSelect.button.deleteChar = [6,433,528,168,60];
this.controls.characterSelect.button.deleteYes = [6,421,337,96,32];