New Functions

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
master121
Posts: 45
Joined: Mon Dec 29, 2008 10:40 am

New Functions

#1 Post by master121 » Tue Sep 01, 2009 7:07 am

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

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: New Functions

#2 Post by Administrator » Tue Sep 01, 2009 7:20 am

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

Code: Select all

CInventory:getMainHandDurability();
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

Code: Select all

		<hotkey name="MACRO"        key="VK_0" />
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.

master121
Posts: 45
Joined: Mon Dec 29, 2008 10:40 am

Re: New Functions

#3 Post by master121 » Tue Sep 01, 2009 7:24 am

Ahh okay atm i use this ....

Code: Select all

local durability, durabilityMax = RoMScript("GetInventoryItemDurable('player', 15);");
a = durability/durabilityMax;
if( a < 0.99 ) then
   printf("low")
end
but i get an error with this Oo
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

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: New Functions

#4 Post by Administrator » Tue Sep 01, 2009 7:41 am

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 '&lt' instead of '<'.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 22 guests