How to create a single servant that triggers incrementally changing actions?

Servants, just tap your bell to call them.
Post Reply
User avatar
jamesedwards
Posts: 2234
Joined: Wed Nov 21, 2018 6:16 pm

I assumed I could increment stored values (or use signals) to use a single servant trigger to perform different actions on an incremental basis.

eg:
Trigger servant 1st time: back £10, with condition of stored value not set, storing value of 1
Trigger servant 2nd time: back £20, with condition of stored value = 1, updating stored value to 2
Trigger servant 3rd time: back £30, with condition of stored value =2, updating stored value to 3

Tried this with both stored values and signals but it persists to trigger all three actions with just the 1st trigger.

Have I got something wrong with the set-up or is what I propose not possible? Or is there a better way to do it?
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

I see what's happening, you set SV to 1 then the next line acts if it's 1. That sets it to 2 and so on.
Maybe you could reverse the sequence of the rules so it checks the £30 rule first, then the £20 rule, then the £10 rule?
If you're incrementing check for the biggest value first.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

jamesedwards wrote:
Wed Feb 02, 2022 4:57 pm
I assumed I could increment stored values (or use signals) to use a single servant trigger to perform different actions on an incremental basis.

eg:
Trigger servant 1st time: back £10, with condition of stored value not set, storing value of 1
Trigger servant 2nd time: back £20, with condition of stored value = 1, updating stored value to 2
Trigger servant 3rd time: back £30, with condition of stored value =2, updating stored value to 3

Tried this with both stored values and signals but it persists to trigger all three actions with just the 1st trigger.

Have I got something wrong with the set-up or is what I propose not possible? Or is there a better way to do it?
It would need to be done with stored values (shared)
Signals can only be referenced by the rules file that sets them, even if the same file is re-used it won't see the earlier signals, only the ones it sets this time

Just so I understand exactly what it is you need, once you've started the servant its to place a £10 back bet, then you want to start the same servant a second time and its to place a £20 back bet and the same for a 3rd?

If so when would you be starting it a second and third time?
ie, will the previous bet always have been matched, part matched, never matched, sometimes matched?
User avatar
jamesedwards
Posts: 2234
Joined: Wed Nov 21, 2018 6:16 pm

Dallas wrote:
Fri Feb 04, 2022 10:31 pm
jamesedwards wrote:
Wed Feb 02, 2022 4:57 pm
I assumed I could increment stored values (or use signals) to use a single servant trigger to perform different actions on an incremental basis.

eg:
Trigger servant 1st time: back £10, with condition of stored value not set, storing value of 1
Trigger servant 2nd time: back £20, with condition of stored value = 1, updating stored value to 2
Trigger servant 3rd time: back £30, with condition of stored value =2, updating stored value to 3

Tried this with both stored values and signals but it persists to trigger all three actions with just the 1st trigger.

Have I got something wrong with the set-up or is what I propose not possible? Or is there a better way to do it?
It would need to be done with stored values (shared)
Signals can only be referenced by the rules file that sets them, even if the same file is re-used it won't see the earlier signals, only the ones it sets this time

Just so I understand exactly what it is you need, once you've started the servant its to place a £10 back bet, then you want to start the same servant a second time and its to place a £20 back bet and the same for a 3rd?

If so when would you be starting it a second and third time?
ie, will the previous bet always have been matched, part matched, never matched, sometimes matched?
Thanks Dallas.

The 2nd and 3rd time could be anything from immediately afterwards to never at all. The previous bet would be sometimes matched but not always.

How do I stop the attached from placing all three bets on just the 1st press please?
incremental servant test.baf
You do not have the required permissions to view the files attached to this post.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

jamesedwards wrote:
Sat Feb 05, 2022 12:31 am
Dallas wrote:
Fri Feb 04, 2022 10:31 pm
jamesedwards wrote:
Wed Feb 02, 2022 4:57 pm
I assumed I could increment stored values (or use signals) to use a single servant trigger to perform different actions on an incremental basis.

eg:
Trigger servant 1st time: back £10, with condition of stored value not set, storing value of 1
Trigger servant 2nd time: back £20, with condition of stored value = 1, updating stored value to 2
Trigger servant 3rd time: back £30, with condition of stored value =2, updating stored value to 3

Tried this with both stored values and signals but it persists to trigger all three actions with just the 1st trigger.

Have I got something wrong with the set-up or is what I propose not possible? Or is there a better way to do it?
It would need to be done with stored values (shared)
Signals can only be referenced by the rules file that sets them, even if the same file is re-used it won't see the earlier signals, only the ones it sets this time

Just so I understand exactly what it is you need, once you've started the servant its to place a £10 back bet, then you want to start the same servant a second time and its to place a £20 back bet and the same for a 3rd?

If so when would you be starting it a second and third time?
ie, will the previous bet always have been matched, part matched, never matched, sometimes matched?
Thanks Dallas.

The 2nd and 3rd time could be anything from immediately afterwards to never at all. The previous bet would be sometimes matched but not always.

How do I stop the attached from placing all three bets on just the 1st press please?

incremental servant test.baf
You'd need to build something into the conditions that identifies when you'll have pressed it a second and third time, the most obvious is if you were waiting for each to be matched, you could then use either a number of matched bets and/or matched bets amounts conditions to control which triggers
But without some condition/s it would have no way of knowing which of the the rules to fire and which to ignore

There is a template I've posted that would increment the value of SV's for you but that on its own wouldn't work without the above either, without any conditions the SV's would just increment 1,2,3 as soon as you started it

An easier option would of course be to have 3 separate servants ie, assigned to keys 1, 2 and 3 for your £10, £20 and £30 bets
User avatar
Dabbla
Posts: 662
Joined: Wed Apr 15, 2009 1:50 pm

Just to add to what Dallas has said . If you use the rule (stop servant) at the end of the file. The servant will stop after 1 loop.
Start servant > Increment > bet > stop servant > (repeat till happy)

You would not really need any conditions on your bets other than SV = xx

I have modded a similar file, have a look it’s pretty much what you asking for
Click 1 back at 1000 for £1
Click 2 back at 950 for £1
Click 3 (CLEAR/ RESET)
Click 4 (See click 1)
(O_OB) AUTO CANCELS 2.baf
You do not have the required permissions to view the files attached to this post.
User avatar
jamesedwards
Posts: 2234
Joined: Wed Nov 21, 2018 6:16 pm

Thank you both. This works!!! 8-)

incremental servant test.baf
You do not have the required permissions to view the files attached to this post.
lsmiles
Posts: 18
Joined: Sun Sep 07, 2014 11:59 am

My thanks to whoever created this. If possible I'd like to be able to reset the servant after the 3rd press so it cycles back through the presses, any ideas? I've tried clearing the 'press' stored value but it hasn't worked.

Thanks
lsmiles
Posts: 18
Joined: Sun Sep 07, 2014 11:59 am

Sorry I need to correct my previous post. I actually need the servant to reset within 5 seconds of press 1. So I have tried adding a rule to clear stored values with a stored value change condition, changed 3-5 seconds. See attached. I've tried with each stored value, press and test, it just doesn't want to trigger.
You do not have the required permissions to view the files attached to this post.
User avatar
Dabbla
Posts: 662
Joined: Wed Apr 15, 2009 1:50 pm

The stop rule should be last, you will need a similar condition, so that it doesn't trigger before the clear rule.
Post Reply

Return to “Bet Angel - Servants”