I am attempting my first mod and have been searching around everywhere to find the components of scripting i need in order to have it do what i want. My intention is to make a mod that upon the player dieing and then either doing a corpse run or getting resurected the gathering tradeskill tracking of his choice loads after he is alive again (because i often forget to turn back on the tracking)
thus far though I have found really no mention of how to call the game to cast the tracking skills, Here is the coding i have so far:
Code:
--Slash Commands Defined
function AR_SLASH_SHOW()
SlashCmdList["ARSHOW"] = AutoResourceShow;
SLASH_ARSHOW1 = "/arshow";
end
function AutoResourceShow()
local frame = getglobal("AutoResourceForm");
if (frame:IsVisible()) then
AR_Hide();
else
AR_Show();
end
end
function AR_Hide()
AutoResourceForm:Hide();
end
function AR_Show()
AutoResourceForm:Show();
end
--Define TrackingStart Variable from GUI
function TrackingStart()
local frame = getglobal("AutoResourceFormEnableTracking");
if (ENABLE_TRACKING == "true") then
TrackingType();
end
end
--Define Tracking Types
function TrackingType()
local frame = getglobal("AutoResourceFormTrackingType");
if PLAYER_UNGHOST == "true" or PLAYER_ALIVE == "true" then
if (TrackingType == "Herbs") then
FIND_HERBS="true";
elseif (TrackingType == "Ore") then
FIND_MINERALS="true";
else
FIND_TREASURE="true";
end
end
end
function FIND_HERBS()
if (FIND_HERBS == "true") then
spell:GetLocalized("FIND_HERBS");
UPDATE_TRADESKILL_RECAST();
end
end
function FIND_MINERALS()
if (FIND_MINERALS == "true") then
spell:GetLocalized("FIND_MINERALS");
UPDATE_TRADESKILL_RECAST();
end
end
function FIND_TREASURE()
if (FIND_TREASURE == "true") then
spell:GetLocalized("FIND_TREASURE");
UPDATE_TRADESKILL_RECAST();
end
end
Note that i have a ComboBox with the name of:
Code:
$parentTrackingType
in the actual AutoResourcesFrame.xml with the "Herb, Ore, Treasure" listed unter the collection.
The window itself loads fine when the game is loaded, but does nothing, I can select to enable the mod, and selecte the tracking type but when I hit done and die and go about resurecting it doesn't turn on my selected skill.
Also Note that currently i have my "Close" button set as such:
Code:
<OnClick>this:RegisterEvent("TrackingStart");
And for the UI /LUA editing im using the WOW UI Designer (downloaded from this site).
I hope this makes sence im pretty tired and have been struggling with this all day, This project is a learning "Get my feet wet" project for a much bigger one I intend to do in the near future, I could really use a WoW spacific tutorial site beyond WoWWikki to get me going, hopefully the fix for the above mod is something one of you can help me with, and thankyou in advance for any advice, fixes, etc you can give :)