SRL Archive - RS3 Help

Best way to capture level up


Battousai

2015-02-18 16:31:05

I have been trying for the past few minutes to think of a decent way to take a screenshot when ever you get a level up on a script, The way i thought would work (reading a line of the chatbox) I would have to loop that, And it would take multiple screenshots until another line replaced that one,

It feels like i am making posts on here for help everyday, And for that i am sorry, But does anyone have any ideas on a good way to do this?

3Garrett3

2015-02-18 17:55:58

From: Battousai
I have been trying for the past few minutes to think of a decent way to take a screenshot when ever you get a level up on a script, The way i thought would work (reading a line of the chatbox) I would have to loop that, And it would take multiple screenshots until another line replaced that one,

It feels like i am making posts on here for help everyday, And for that i am sorry, But does anyone have any ideas on a good way to do this?


I know @Incurable had a way of doing this for his smelting script. You should check it out and see exactly what he did. My understanding was that he used either a DTM or a bitmap of the popup that shows up at the top of the screen. When you see that, take a screenshot and wait for X amount of time until it goes away before checking again. You'll have to be constantly looping often enough to catch it though, just like any method.

As a side note, don't feel bad asking for advice, everyone needs help sometimes!

Battousai

2015-02-18 18:19:41

From: 3Garrett3
I know @Incurable had a way of doing this for his smelting script. You should check it out and see exactly what he did. My understanding was that he used either a DTM or a bitmap of the popup that shows up at the top of the screen. When you see that, take a screenshot and wait for X amount of time until it goes away before checking again. You'll have to be constantly looping often enough to catch it though, just like any method.

As a side note, don't feel bad asking for advice, everyone needs help sometimes!


He seems to have removed his script temporarily, So do you know of any other examples that people have done?

3Garrett3

2015-02-18 18:23:31

From: Battousai
He seems to have removed his script temporarily, So do you know of any other examples that people have done?


I don't know other examples but my suggestion is still to level up, take a screenshot manually. With that screenshot, create a bitmap and a DTM of the symbol (top center when you level up). Then test the detection on that screenshot (drag the crosshairs and write a quick test function). If one works better than the other (bitmap should be more accurate but might miss more often), then use it.

Just call it in the loop of whatever you're doing. In order to not have it detect double, you could have a wait that happens if the symbol is detected.