Originally Posted by wookiefriseur
Some useful links in https://www.esoui.com/forums/showthread.php?t=9867
You could probably do something like that:
Bindings.xml
Xml Code:
<Bindings> <Layer name="SI_KEYBINDINGS_CATEGORY_GENERAL"> <Category name="PrimeRibeye's AddOn"> <Action name="Travel to Crafting House"> <Down>CraftingHouse.Port()</Down> </Action> </Category> </Layer> </Bindings>
Don't forget to make the local Port function available globally, for instance with
Lua Code:
CraftingHouse.Port = Port()
, and to add the Bindings.xml to your CraftingHouse.txt
That should be enough, but can't test it ingame right now.
|
XML
<Bindings>
<Layer name="SI_KEYBINDINGS_CATEGORY_GENERAL">
<Category name="Crafting House">
<Action name="Port to Craftinghouse">
<Down>CraftingHouse.Port()</Down>
</Action>
</Category>
</Layer>
</Bindings>
|
LUA
CraftingHouse = {}
CraftingHouse.name = "CraftingHouse"
------------------------
function CraftingHouse.Port()
d("Porting to the crafting house.")
JumpToSpecificHouse("@lIIIlIIIl", 47)
end
function CraftingHouse.OnAddOnLoaded(event, addonName)
if addonName == CraftingHouse.name then
SLASH_COMMANDS["/crafting"] = CraftingHouse.Port
EVENT_MANAGER:UnregisterForEvent(CraftingHouse.name, EVENT_ADD_ON_LOADED)
end
end
EVENT_MANAGER:RegisterForEvent(CraftingHouse.name, EVENT_ADD_ON_LOADED, CraftingHouse.OnAddOnLoaded)
|
I did everything exactly right but I can't get it to show up under keybinds in game.