View Single Post
06/09/17, 07:45 PM   #2
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
CS is in the local scope (open the main lua file, it's literally the first line). If you remove the "local" then you can check for it like this in your addon:

lua Code:
  1. function test()
  2.     if CS then
  3.         d("CraftStore loaded.")
  4.     else
  5.         d("CraftStore not loaded.")
  6.     end
  7. end

To hide your addon, you'd add an event for EVENT_CRAFTING_STATION_INTERACT, ensure the craft skill is CRAFTING_TYPE_PROVISIONING and then you'd add an event for EVENT_END_CRAFTING_STATION_INTERACT to bring your addon back.

Last edited by Rhyono : 06/09/17 at 07:50 PM.
  Reply With Quote