IF AND ELSE LoliCode

Hi, I was here studying OB2 (I was used to OB1) and I saw that IF AND ELSE works differently here. I want to enter a CUSTOM INPUT to set a Points value, like in my setup below.

"Amount" Is my CUSTOM INPUT
"Points" Is my PARSE BLOCK

IF "<Points>" Lessthan "<Amount>"
SET STATUS CUSTOM "Sem requisitos"
ENDIF
IF "<Points>" Greaterthan "<Amount>"
SET STATUS SUCCESS
ELSE IF "<Points>" Equalto "<Amount>"
SET STATUS SUCCESS
ENDIF
BLOCK:ConstantInteger
  value = 800
  => VAR @Amount
ENDBLOCK

BLOCK:RandomInteger
  minimum = 10
  maximum = 1000
  => VAR @Points
ENDBLOCK
IF INTKEY @Points LessThan @Amount
data.STATUS = "CUSTOM";
END
IF INTKEY @Points GreaterThan @Amount
data.STATUS = "SUCCESS";
ELSE IF INTKEY @Points EqualTo @Amount
data.STATUS = "SUCCESS";
END
1 Like

if you wanna set a custom status like expired or something like you will need to do this

the input value will be defined by INPUT CUSTOM as in the example below. understood? I added a CUSTOM INPUT in the settings part. when I start work, it will ask me a point value I want to fetch.

IMG_20211218_171628

image

BLOCK:RandomInteger
  minimum = 100
  maximum = 500
  => VAR @Points
ENDBLOCK

BLOCK:ConstantString
  value = $"<input.Amount>"
  => VAR @constantStringOutput
ENDBLOCK //get the value from the input


IF INTKEY @Points LessThan @constantStringOutput
data.STATUS = "CUSTOM";
END
IF INTKEY @Points GreaterThan @constantStringOutput
data.STATUS = "SUCCESS";
ELSE IF INTKEY @Points EqualTo @constantStringOutput
data.STATUS = "SUCCESS";
END
2 Likes

IMG_20211218_175053
IMG_20211218_175027

“Points” is a PARSE block, which captures the points within the REQUEST

Yea ik, the random integer is just a simulation from the parse

about the first print you need to configure the wordlist type in the settings
image
image

and about the 2º print i think you dint set the custom input in the settings section

@najort
I will summarize my config in openbullet 1.

This is my BLOCK PARSE where returns the value of the points
IMG_20211218_192141

This is my *CUSTOM INPUT
IMG_20211218_191540

This is my LS BLOCK
IMG_20211218_192222

This is my fictional block parse where returns a random points value (you will dont need put this in your config because you already have the parse. Just stay the same var)
image

this is my Custom input where the default answer is only for test the config because in stacker doesnt display anything

image

This is my LS BLOCK
image

1 Like

I did it right. but it’s just returning FAIL AND BANNED.

IMG_20211218_200536

even if I put the value “0” to return the ones that have zero points

I did a test with 8 HITS which I have [6 SUCESS AND 2 CUSTOM]. on OB1 it worked normal, on OB2 it was just BANNED AND FAIL, when I removed the CUSTOM INPUT + IF AND ELSE setting. it worked normally returning 8 SUCCESS.

OB1 HIT
IMG_20211218_202828
IMG_20211218_202753

OB2 BANNED (CUSTOM INPUT)
IMG_20211218_202949

OB2 HIT (NO CUSTOM INPUT)
IMG_20211218_202902

@Ruri

could you help me with this CUSTOM INPUT + IF AND ELSE question? and why in the tests here is only giving FAIL AND BANNED. not counting the CPM which is no more than 10

@najort I managed to solve friend. the problem is that in BLOCK PARSE I was using the Sufix “Points Total” and in the IF part I was using an INTKEY in the case for numbers, there was an error because in BLOCK PARSE it had a name too. now it’s all right… :joy:🤦

1 Like