You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

1

Saturday, December 3rd 2011, 7:56am

Item ID function

Basically I'm trying to find a function that will identify an equipped item.

I want the macro I'm making to check if the cape in equipment slot 6 (cape slot) is a certain cape, and if it is it switches to a different cape in my bag. If it isn't the cape with that ID then it does nothing or something else entirely.

I've found fuction GetEquipSlotInfo... but i have no idea how to use it or if that's even correct.

Example (that doesn't work at all):
/run if GetEquipSlotInfo(6)="Callous Wisdom Cape" then UseItemByName("Juggler Cape")

I'm a novice at this, but I'm somewhat literate to the code at the least. Any help would be appreciated.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

2

Thursday, January 19th 2012, 12:12am

Sorry for the rather late reply, didn't see this post. If you are still interested in the info (or for anyone else looking at this type of thing) here's an answer:

The function you are looking for is GetInventoryItemDurable().

you could use it in a macro like this (based on your posted, unworking macro):

Source code

1
2
/run _,_,InvName,_,_ = GetInventoryItemDurable("player",6)
/run if InvName == "Callous Wisdom Cape" then UseItemByName("Juggler Cape") end


Note that the above is untested.
2013... The year from hell....