|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: Thu Mar 29, 2018 5:19 pm
help with a capture |
Im having a problem with a capture with asterisks "*", or other symbols that appear beside numbers/letters.
the function of them appearing and disappearing is based on a skill related to that symbol (*, +, -, etc)
i will show you an example of this, and hopefully someone can show me how to make 1 capture dor when it IS there and when its NOT
CL: [*54.31%] is this CL~:%s~[([*])([0-9.])~%~]
my script for this
#gag
priest.beseech=%pos("*", %1)
priest.cleanse=%2
#IF (@priest.beseech>0&&@combat=="on"&&@priest.cleanse>=98) {beseech}
can someone please show me how to make a capture work for this when the asterisk (any symbol/letter/number) that is not always there?
thanks in advance! |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4662 Location: Pensacola, FL, USA
|
Posted: Thu Mar 29, 2018 11:13 pm |
For things that may not be there, you need an anonymous variable list that includes a %null value.
In this case: {~*|}
That is a literal asterisk, which may not be there. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: Fri Mar 30, 2018 3:12 am |
hrrrm could you show me how to write that out for this capture please?
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4662 Location: Pensacola, FL, USA
|
Posted: Fri Mar 30, 2018 3:33 am |
#TR {CL: ~[({~*|})([%d.])%~]} {#GAG;#IF (%1) {#IF (%2>=98) {beseech}}}
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: Fri Mar 30, 2018 11:38 am |
doesn't capture shal
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4662 Location: Pensacola, FL, USA
|
Posted: Fri Mar 30, 2018 3:26 pm |
#TR {CL: ~[({~*|})([%d.])~%~]} {#GAG;#IF (%1) {#IF (%2>=98) {beseech}}}
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: Mon Apr 16, 2018 7:27 pm |
I never did get this fixed but i have a similar issue but a bit more complicated only due to the randomness of what is missing and what is showing.
I'll put a bit of it up here:
there are quite a few other possible item inside this hpbar function as well.
I need a way to use the "[ [ ] ]" and captuire whatever comes whenever it comes, i've yet to make a way to do this. If anyone can help, i'd much appreciate it.
heh i dont understand why double brackets aren't showing when i submit this... [ [ ] ] together... are on both sides of that capture |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4662 Location: Pensacola, FL, USA
|
Posted: Tue Apr 17, 2018 3:24 am |
But what is the issue with the capture now? It worked on my local testing.
Use the code tags instead of the quote tags to force it to show literal strings and padded whitespace.
#TR {~[~[Capture: (*)~]~]} {do something} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|