Thread Tools Display Modes
07-28-08, 06:14 PM   #1
Nexuapex
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 25
Behaviors

Been working on it for a little while, and now my first publicly released add-on, Behaviors, is available. It's basically a lightweight way to add snippets of Lua to the game. I found myself one day with five or six macros and add-ons that all made tiny little tweaks, and decided that I wanted to make a lightweight add-on that let me keep all those tweaks in one place. This is the result.

The download page should have most of the useful information. Feedback would be awesome.

Last edited by Nexuapex : 07-30-08 at 03:45 PM. Reason: v1.01.
  Reply With Quote
07-28-08, 06:46 PM   #2
VonRoeder
A Kobold Labourer
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1
This is an exceptionally clever idea. I'm jealous I didn't think of it.
  Reply With Quote
07-30-08, 03:45 PM   #3
Nexuapex
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 25
v1.01

I probably should do something besides work on this add-on.

Anyway, 1.01 adds support for enabling/disabling behaviors on a per-character basis, and also for adding slash commands.
  Reply With Quote
08-03-08, 07:35 AM   #4
hypehuman
A Deviate Faerie Dragon
 
hypehuman's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 17
Mounting Trinket

I love it! I've made one that equips my Carrot on a Stick while I'm mounted. Itemrack already does this, but the one that this mod enabled me to make is better in two ways: (1) it won't interrupt your spell casting upon dismount, and (2) it takes into account trinkets that you manually equip while you're mounted. There are two places you might want to change it, and they're right in the beginning. One is the list of mounts (a full list can be found at http://thottbot.com/?e=Apply%20Aura%3A%20Mounted#B::A under "spells"). The second is the ID of the item you're using (you might have your leatherworking trinket).

--declare item code for the trinket to be equipped
MountTrinketID="11122"

--declare names of the mount's spell and buff; NOT the item's name
MountNames={"Great Brown Kodo", "Silver Riding Talbuk", "Snowy Gryphon Mount"}

--track movements of items into top trinket slot
event "ITEM_LOCK_CHANGED"
function blah(slot)
if slot==13 then
T1ItemEquipped=string.sub(GetInventoryItemLink("player",13),18,22)
if not (T1ItemEquipped==MountTrinketID) then
TrinketEquippedBeforeMount=T1ItemEquipped
end
end
end

--mounting up
event "UNIT_SPELLCAST_SUCCEEDED"
function HantleMounting(arg1, arg2)
local mount=0
if arg1=="player" then
i=1
repeat
if arg2==MountNames[i] then
MountCastName = MountNames[i]
if not (TrinketSwapQueued==1) then
TrinketEquippedBeforeMount=T1ItemEquipped
if TrinketEquippedBeforeMount==nil then TrinketEquippedBeforeMount=string.sub(GetInventoryItemLink("player",13),18,22) end
if TrinketEquippedBeforeMount==MountTrinketID then TrinketEquippedBeforeMount=nil end
end
EquipItemByName(MountTrinketID)
CurrentMountName=MountCastName
end
i=i+1
until not (MountCastName==nil) or i>getn(MountNames)
MountCastName=nil
end
end

--dismounting
event "PLAYER_AURAS_CHANGED"
function HandleDismounting(arg1)
if not (CurrentMountName==nil) and GetPlayerBuffName(CurrentMountName)==nil then
if not (UnitCastingInfo("Player")==nil) or UnitAffectingCombat("player") then
TrinketSwapQueued=1
else
EquipItemByName(TrinketEquippedBeforeMount)
TrinketEquippedBeforeMount=nil
end
CurrentMountName=nil
end
end

--queued swap upon leaving combat
event "PLAYER_REGEN_ENABLED"
function HandleExitCombat()
if TrinketSwapQueued==1 and UnitCastingInfo("Player")==nil then
EquipItemByName(TrinketEquippedBeforeMount)
TrinketEquippedBeforeMount=nil
TrinketSwapQueued=0
end
end

--queued swap upon cast finishing
event "UNIT_SPELLCAST_STOP"
function HandleStopSpell(caster)
if TrinketSwapQueued==1 and caster=="player" and not UnitAffectingCombat("player") then
EquipItemByName(TrinketEquippedBeforeMount)
TrinketEquippedBeforeMount=nil
TrinketSwapQueued=0
end
end
  Reply With Quote
08-03-08, 05:09 PM   #5
Nexuapex
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 25
I also have a Carrot on a Stick behavior, but it's a tad simpler (one mount, and doesn't watch changes to your trinket when mounted). One of the things on my wish list is a way to simplify these mount behaviors, but that may not happen, given WotLK's proximity.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Released AddOns » Behaviors


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off