Posts: 339
Threads: 44
Joined: Jan 2011
Does anyone know how I would pass a value into my function using
,exec / a hotkey? My goal here is to have one set of functions to handle casting instead of one for scrolls and a copy for normal casting.
Also, I'm not sure if boolean values even exist in injection's script?
Code:
sub greaterHeal_self(useScroll)
uo.waittargetself();
if uo.count(scroll_greater_heal) > 0 AND useScroll = true then
uo.usetype(scroll_greater_heal);
else
uo.cast("Greater Heal");
endif
end sub
Posts: 118
Threads: 5
Joined: Jun 2011
I'd like to know this too. I experimented a bit but was unable to use ,exec testfunction(param) command. Don't think there's a boolean datatype. Only thing I found was this bit about expression evaluation:
- IF-THEN condition. You can use "<",">","<=",">=","==","<>" to check if
one value is less then other. Use "AND", "OR", "NOT" in boolean expressions.
You cn use "&&" instead of "AND" and "||" instead of "OR". The zero value is
considered FALSE, the non-zero is TRUE.
(This post was last modified: 02-27-2012, 02:56 PM by
Cana.)
Posts: 503
Threads: 23
Joined: Dec 2011
Cana Wrote:I'd like to know this too. I experimented a bit but was unable to use ,exec testfunction(param) command. Don't think there's a boolean datatype. Only thing I found was this bit about expression evaluation:
- IF-THEN condition. You can use "<",">","<=",">=","==","<>" to check if
one value is less then other. Use "AND", "OR", "NOT" in boolean expressions.
You cn use "&&" instead of "AND" and "||" instead of "OR". The zero value is
considered FALSE, the non-zero is TRUE.
if this is true then the zero value and non zero value works like a boolean...
Posts: 118
Threads: 5
Joined: Jun 2011
Raziel_ Wrote:if this is true then the zero value and non zero value works like a boolean...
Yes, sort of. If anyone is looking for more information some can be found
here. It's not complete by any means but the text file (scripting.txt) can get you started.
Posts: 2,059
Threads: 158
Joined: Jan 2011
Just thinking outside the box here, but you could make a boolean variable using conditionals for ingame items. Like checking the itemid of a lantern that is turned on or off, then using the lantern to change the value.