View Single Post
10/27/22, 04:41 PM   #4
PrimeRibeye
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 2
Originally Posted by wookiefriseur View Post
Some useful links in https://www.esoui.com/forums/showthread.php?t=9867


You could probably do something like that:


Bindings.xml

Xml Code:
  1. <Bindings>
  2.     <Layer name="SI_KEYBINDINGS_CATEGORY_GENERAL">
  3.         <Category name="PrimeRibeye's AddOn">
  4.             <Action name="Travel to Crafting House">
  5.                 <Down>CraftingHouse.Port()</Down>
  6.             </Action>
  7.         </Category>
  8.     </Layer>
  9. </Bindings>


Don't forget to make the local Port function available globally, for instance with
Lua Code:
  1. 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.
  Reply With Quote