Ok, so the goal is to take these three genes:
cond
*.eye5 0 =
start
'look around
stop
cond
*.eye5 0 !=
*.refeye *.myeye !=
start
'jump at the foe
stop
cond
*.refeye 0 =
start
'eat the lettuce
stop
end
and turn them into one.
So, lets look at the shared conditions. *.eye5 0 = and *.eye5 0 != will always be opposite one another, one true, one false. This means we actually only need one of them, the other two conditions are similar, but have a large enough twist that they must be computed separately. Now lets set up the first condition.
start
*.eye5 0 =
'look around
stop
Now, to add in the next conditions / actions we are going to reuse the value that is already on the boolean stack.
start
*.eye5 0 =
dupbool not 'duplicates and inverts the top value on the stack
*.refeye *.myeye != and 'adds a new value to the top of the stack and combines it with the inverted value
'jump at the foe
dropbool 'remove the top value from the stack, we now only have the value of *.eye5 0 = on the stack
dupbool not 'duplicate and invert our initial condition again
*.refeye 0 = and 'same as before
'eat the lettuce
dropbool 'returns to initial condition
'look around
stop
This code can be simplified a touch by using a single != and removing some of the nots but that's not a big deal.