SRL Archive - OSR Help

Logic Help


GREEN GIANT

2013-08-19 15:02:35

Hi Guys,

I feel kinda dumb for asking but i can't seem to figure it out.

I'm using GetRunEnergy to determine how many doses of Energy potion to drink but cant get my < > symbols right.

I want say;

If (GetRunEnergy is higher than 20 but less than 40 ) then

How would i write the above?

Janilabo

2013-08-19 15:05:06

if InRange(GetRunEnergy, 21, 39) then

..or…

if ((GetRunEnergy > 20) and (GetRunEnergy < 40)) then

GREEN GIANT

2013-08-19 15:25:49

From: Janilabo
if InRange(GetRunEnergy, 21, 39) then

..or…

if ((GetRunEnergy > 20) and (GetRunEnergy < 40)) then


Great help, Thankyou.

+1 to you ;)

Janilabo

2013-08-19 15:39:05

From: GREEN GIANT
Great help, Thankyou.

+1 to you ;)
Glad to hear it helped you man!

By the way, I recommend using variable for the raw method (2nd option).. :)

Something like this:

re := GetRunEnergy;

Which you could then use like this:

if ((re > 20) and (re < 40)) then

That way it will be slightly better/faster, because you don't run the function twice then..

-Jani

Sin

2013-08-19 15:52:14

From: Janilabo
Glad to hear it helped you man!

By the way, I recommend using variable for the raw method (2nd option).. :)

Something like this:

re := GetRunEnergy;

Which you could then use like this:

if ((re > 20) and (re < 40)) then

That way it will be slightly better/faster, because you don't run the function twice then..

-Jani


This so much.
Glad to see someone does it the same way I do :3