|Go to Page...|
||Thread Tools||Display Modes|
|12-08-05, 09:16 PM||#1|
ItemRack - Events
Version 1.7 of ItemRack introduces event-driven scripts to swap gear. You can grab it here: http://www.wowinterface.com/download...fo.php?id=4148
The purpose of this thread is for a place to ask questions about how to make events in ItemRack or to post events that you make. I'm going to post the events manual here and in the next post I'll be putting events as I come across them for anyone to use.
The intent is to have users scripting the events. They are just like macros, they use the exact language for everything that comes after a /script in a macro, except they run in response to game events.
In the options window when you right-click the minimap button are three tabs. All event setup is done in the Events tab.
Events are disabled initially. To begin using events you need to enable it with the "Enable Events" checkbox at the top of the Events tab. This is the "master switch". You can set up a key binding to toggle all events on or off as well.
In that tab you'll see a list of events with a red question mark beside it. Click the question mark to choose what set to equip for the event. When you've chosen a set it will be enabled. You won't be able to enable an event until you've associated a set for it. (even if the event script doesn't rely on a defined script)
To disable/enable a set with an associated event, uncheck the event. Alternately, you can click Delete to remove the set association and have it drop down to the bottom of the list.
Deleting an event not associated with a set will completely remove it if no other characters use that event.
Editing or Creating Events
If you hit Edit or New at the bottom of the events tab you'll be brought to the event script editor. Here you define when the event runs and what it does. You can copy-paste into/out of these boxes. The four boxes are:
Name: This is the name you'll see in the event list, ie Mount, Warrior:Berserker, Swimming, etc.
Trigger: This is the WoW-generated event you want the event to trigger from. ie PLAYER_AURAS_CHANGED, CHAT_MSG_COMBAT_SELF_HITS, etc
Delay: This is the time, in seconds, after the last occurance of the Trigger before the script runs.
Script: This is the actual script that runs. You can use any lua construct or make it as complicated as you want. The code is directly run without any parsing.
Some knowledge of WoW Lua and scripting will help a great deal in editing and creating events. An excellent resource is the wiki: http://www.wowwiki.com/Interface_Customization
In the lower left is a Test button. You can use this to run the script once to make sure there are no syntax or other obvious errors. But it can't test if the trigger works or anything beyond stuff that would prompt a red error box.
If at any time you've messed up your default events and want them back: /itemrack reset events. This will not touch your custom events. It will just recreate the default events.
Originally I had hoped to keep the mod's primary purpose evenly split between being a bar mod to swap individual slots on the fly, and a gear sets mod to swap entire sets of gear at once. As the events concept has fleshed out it's becoming apparent that this mod will have three purposes: bar, sets, events. It will probably be broken into a more modular form in the future, so that those who never use the bar can delete it, and those who never use the events can delete that as well.
The goals when adding events were:
Thanks to everyone who helped in the beta of this. It was a fun technical challenge and I enjoyed it immensely.
|WoWInterface » AddOns, Compilations, Macros » Released AddOns » ItemRack - Events|