I would like to know how i can use the new functions in my waypoints.
Like Inventory:getMainHandDurability() but this doesn´t work.
And i recommend to make a threat in which the new functions are explained
New Functions
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: New Functions
The inventory functions are still developmental, so you can expect problems. After a quick look at the function, it looks like return value is actually a ratio. 0 would be broken, and 1 would be full durability remaining. Perhaps this is your problem?
Oh, also, you should be using
Make sure the C is in there.
You'll also need to set up a macro for the new macro system. Open your macro screen with /macro. The first two slots will be used by the bot. Create a new, empty macro in the top left slot, and move it to your hotkey bar. Then set
in the hotkeys section of your profile (where 0 is your actual hotkey). You can leave the second one blank, but do not leave a macro you wish to keep there.
Oh, also, you should be using
Code: Select all
CInventory:getMainHandDurability();
You'll also need to set up a macro for the new macro system. Open your macro screen with /macro. The first two slots will be used by the bot. Create a new, empty macro in the top left slot, and move it to your hotkey bar. Then set
Code: Select all
<hotkey name="MACRO" key="VK_0" />
Re: New Functions
Ahh okay atm i use this ....
but i get an error with this Oo
if( a < 0.99 )
okay got it :
Seems micromacro has a problem with "<" ...
Code: Select all
local durability, durabilityMax = RoMScript("GetInventoryItemDurable('player', 15);");
a = durability/durabilityMax;
if( a < 0.99 ) then
printf("low")
end
if( a < 0.99 )
okay got it :
Seems micromacro has a problem with "<" ...
Code: Select all
if( a >= 0.51 ) then
else
printf("low")
end
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: New Functions
Yes. You cannot use the '<' character inside of an XML tag like that because it confuses the XML parser. It can't tell the difference between you using it as a less-than sign in code or opening a new XML tag. You should use '<' instead of '<'.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest