Difference between revisions of "OgreEvent:OthersOnItemUse"
From ISXOgre
(Created page with "== OgreEvent_OnItemUse == When OgreBot uses an item, it will fire this event. == To attach == <pre>Event[OgreEvent_OthersOnItemUse]:AttachAtom[OgreEvent_OthersOnItemUse]</pr...") |
(→Comments) |
||
Line 21: | Line 21: | ||
Items don't have an ID like abilities do, therefore there is no ItemID like there is for Abilities. | Items don't have an ID like abilities do, therefore there is no ItemID like there is for Abilities. | ||
+ | |||
+ | This does NOT fire for yourself. Use [[OgreEvent:OnItemUse|OgreEvent_OnItemUse]] to see your own item uses. |
Latest revision as of 11:08, 14 December 2015
OgreEvent_OnItemUse
When OgreBot uses an item, it will fire this event.
To attach
Event[OgreEvent_OthersOnItemUse]:AttachAtom[OgreEvent_OthersOnItemUse]
To use
atom OgreEvent_OthersOnItemUse(string _Caster, string _ItemName, uint _OnPlayerID, string _OnPlayer) { if ${_OnPlayer.Length} > 0 || ${_OnPlayerID} > 0 echo ${Time}: ${_Caster} used item ${_ItemName} on ${_OnPlayer} ( ${_OnPlayerID} ) else echo ${Time}: ${_Caster} used item ${_ItemName} }
Comments
There are times where some of the fields will be blank. Such items require no target, they won't have an 'OnPlayer' or 'OnPlayerID'.
Items don't have an ID like abilities do, therefore there is no ItemID like there is for Abilities.
This does NOT fire for yourself. Use OgreEvent_OnItemUse to see your own item uses.