SRL Archive - Jr. Member General Help and Discussion

Coshing Stun Detection


Taric

2015-02-16 22:23:18

Goal:
Whenever a Coshing Volunteer is not successfully knocked out, the script does not go on to loot said Volunteer.

Problem:
The method I'm using, waiting for the chatbox to display a message ('Your player has been stunned'), is innificient and is cutting 20k xp per hour out of my coshing script.

Is there a better way to get this done? I'm considering using pixelshift to detect the stun animation… Am I silly for considering this?

You can tell it is cold outside, when you step outside and it is cold.

J_R

2015-02-16 22:52:17

From: Taric
Goal:
Whenever a Coshing Volunteer is not successfully knocked out, the script does not go on to loot said Volunteer.

Problem:
The method I'm using, waiting for the chatbox to display a message ('Your player has been stunned'), is innificient and is cutting 20k xp per hour out of my coshing script.

Is there a better way to get this done? I'm considering using pixelshift to detect the stun animation… Am I silly for considering this?

You can tell it is cold outside, when you step outside and it is cold.


If I remember correctly, the old cosher I used to use detected the stun by detecting the yellow birds that circle around your head when you are stunned (not sure if this mechanic has changed since then). You could try giving that a shot.

Taric

2015-02-17 17:19:44

From: J_R
If I remember correctly, the old cosher I used to use detected the stun by detecting the yellow birds that circle around your head when you are stunned (not sure if this mechanic has changed since then). You could try giving that a shot.


Quickly gave it a shot. The text and the stun animation play at the same time… sad face.

3Garrett3

2015-02-17 18:06:37

So the methods I can quickly think up. Keep in mind I have no idea what this coshing thing is at all or what it means.

1) Chatbox Text checking
2) Animation checking (pixelshift)
3) Exp counting and/or inventory checking?

Unless someone else knows what's up and tries explaining with some experience, you could briefly describe why it is inefficient, what is happening in RS that you would like to speed up, and I can try to brainstorm based on that.

Edit:

Based on my brainstorms, I'd like to know the nature of movement of this coshing thing. Are you always in one spot, is the target moving? If nothing is moving it gives more options than if everything is wandering around (including you)

KeepBotting

2015-02-17 18:11:35

From: 3Garrett3
So the methods I can quickly think up. Keep in mind I have no idea what this coshing thing is at all or what it means.

1) Chatbox Text checking
2) Animation checking (pixelshift)
3) Exp counting and/or inventory checking?

Unless someone else knows what's up and tries explaining with some experience, you could briefly describe why it is inefficient, what is happening in RS that you would like to speed up, and I can try to brainstorm based on that.

Edit:

Based on my brainstorms, I'd like to know the nature of movement of this coshing thing. Are you always in one spot, is the target moving? If nothing is moving it gives more options than if everything is wandering around (including you)


You're supposed lure the dude and cosh him in one spot so he won't wander around - so under ideal circumstances, no, he wouldn't be moving.

OP: does mouseover or chooseoption text change at all when the volunteer is active —> knocked out? In that case, it may be viable to quickly right-click every couple times to see if you've a loot option.

Taric

2015-02-17 18:21:38

From: 3Garrett3
So the methods I can quickly think up. Keep in mind I have no idea what this coshing thing is at all or what it means.

1) Chatbox Text checking
2) Animation checking (pixelshift)
3) Exp counting and/or inventory checking?

Unless someone else knows what's up and tries explaining with some experience, you could briefly describe why it is inefficient, what is happening in RS that you would like to speed up, and I can try to brainstorm based on that.

Edit:

Based on my brainstorms, I'd like to know the nature of movement of this coshing thing. Are you always in one spot, is the target moving? If nothing is moving it gives more options than if everything is wandering around (including you)


Currently have tried both chatbox and pixelshift shtuff. I lose out on 2 game ticks by doing this resulting in a 25k loss of xp/h.

From: KeepBotting
You're supposed lure the dude and cosh him in one spot so he won't wander around - so under ideal circumstances, no, he wouldn't be moving.

OP: does mouseover or chooseoption text change at all when the volunteer is active —> knocked out? In that case, it may be viable to quickly right-click every couple times to see if you've a loot option.


None of the options/mouse over text change, sadly.

All in all I could have stun detection using xp/chatbox/pixelshift, but they have way to much xp loss to seem justifiable.

3Garrett3

2015-02-17 18:40:25

From: Taric
Currently have tried both chatbox and pixelshift shtuff. I lose out on 2 game ticks by doing this resulting in a 25k loss of xp/h.

None of the options/mouse over text change, sadly.

All in all I could have stun detection using xp/chatbox/pixelshift, but they have way to much xp loss to seem justifiable.


2 game ticks seems like human reaction time, or even better probably. To get exactly the second it happens (one game tick I assume?) you would have to be injecting or reflecting (Simba does neither for RS3). I feel like your best bet would be to use pixelshift and just keep refining the shift value and the wait time to try to optimize it. You'll probably find a balance of false positives to optimal time somewhere in there though.

Edit:

Especially if the person isn't moving tiles, you'll be able to have a very specialized tBox for pixelshift searching which will give you the best results IMO.

honeyhoney

2015-02-18 19:16:19

This definitely does seem to be a level of optimisation that is difficult to achieve without significant manual tuning if you don't have access to the features reflection provides.

Just so we're clear; the script currently achieves the best experience rates by attempting to loot (twice?) despite failing to stun the volunteer?

ie.
it currently loops;
STUN(SUCCESS OR FAIL) -> LOOT -> LOOT

and the aim is;
STUN(SUCCESS) -> LOOT -> LOOT
STUN(FAIL) -> STUN until SUCCESS

the bank

2015-03-04 16:50:13

Here's an idea!

I'm currently detecting the HP box, since when stunned your HP box also appears above your character!

PheteyGee

2015-03-12 03:13:07

From: the bank
Here's an idea!

I'm currently detecting the HP box, since when stunned your HP box also appears above your character!


Could also try detecting if HP has been lost?

the bank

2015-03-12 08:01:18

From: PheteyGee
Could also try detecting if HP has been lost?


They don't actually hurt you. Usually.

PheteyGee

2015-03-12 20:57:13

From: the bank
They don't actually hurt you. Usually.


Thought it would be the same as a pickpocket? If you fail they bitch slap you for some life points? Normally not many so you can stay there for infinite time…