set = function(item, value) OxyAddon.db.profile[item[#item]] = value end,
This is my set function:
function OxyAddon:SetGroundMounts(info, newValue)
self.db.profile.GroundMount = { strsplit(";", newValue) }
end
This is my get:
get = function(item) return OxyAddon.db.profile[item[#item]] end,
This is my get function:
function OxyAddon:GetGroundMounts(info)
self.string = ""
for index,value in ipairs(self.db.profile.GroundMount) do
self.string = self.string..value..";"
end
return self.string
end
In short I am trying to make a random mount caster
for all the dif type of area, ground, flying, and sea. I want to store the numbers of the mount ex. out of 12 on each page using the numbers say 3 are flyers, number 2 across, number 5 across and so on, would look like 2,5,...
I was using the options and acedb so i could have diff profiles for each toon. you would go into interface>addons tab and select my addon in txt boxes were numbers 2,5,... for ground mounts, and in the flying mounts was 1,3,... what ever the numbers are will randomly choose a mount and cast.
Hello again, and sorry, I should have stated but I am a bit new to lua, I have good experience in c++ and lsl(lyndon scripting language) but very little in lua, I would love to learn more and have been playing around a bit with it. As far as the globals I should use local for the most of then unless I need to globally access them correct?
Im sorry but I don't see a reply to me, I am trying to figure how to get the value for this part of he code:
local itemLink = blahblah -- Get your itemlink somehow
How do I get item link in that variable?
Thank you again, any help would be great.
Here is some of the code:
function TradeTalker_Broadcast()
rString = EditBox_RecruitmentString:GetText()
bCastTime = EditBox_BroadcastTime:GetNumber()
bCastTimeString = tostring(bCastTime)
TradeTalker_ClearFocus()
if bCastTime <= 29 then
DEFAULT_CHAT_FRAME:AddMessage("[TradeTalker]Sorry, this is not a spamming tool. Time must be greater than 30 seconds.")
TradeTalker_StopTimer()
else
DEFAULT_CHAT_FRAME:AddMessage(string.format("%s %s %s", "[TradeTalker]Starting broadcast in ", bCastTimeString, " seconds..."))
f:Show()
-- Frame to receive OnUpdate calls
-- last is the time since the code last executed
-- throttle is the time to wait between executions (in seconds). This is a 1 minute delay.
local last, throttle = 0, bCastTime
f:SetScript('OnUpdate', function(self, elapsed)
-- Increment the time since last update
last = last + elapsed
-- If the time since last execution exceeds the wait time, then broadcast a message.
if last >= throttle then
local index = GetChannelName("Trade - City") -- It finds trade is a channel at index 1
if (index~=nil) then
SendChatMessage(rString, "CHANNEL", nil, index);
end
-- Reset time since last update
last = 0
end
end)
end
end
--[[
Shift click func.
]]--
function TradeTalkerUI:OnClick(self, button)
local itemLink = blahblah -- Get your itemlink somehow
local itemName = GetItemInfo(itemLink)
if (itemLink and button == "LeftButton" and IsShiftKeyDown() and ChatFrameEditBox:IsVisible()) then
-- Insert itemlink into chat
ChatFrameEditBox:Insert(itemLink)
return
end
if (itemLink and button == "LeftButton" and IsShiftKeyDown() and (not ChatFrameEditBox:IsVisible()) and (EditBox_RecruitmentString and EditBox_RecruitmentString:IsVisible())) then
-- Insert itemlink into AH browse editbox
EditBox_RecruitmentString:SetText(itemName)
return
end
end
In regards to this post http://forums.curseforge.com/showthread.php?t=10347 I also am looking for the same function but to no avail have been able to get the itemlink from chat or inventory. Any help would be great, thank you, rawroot
0
This is my set function:
This is my get:
This is my get function:
Any help would be great, thanks again guys.
0
for all the dif type of area, ground, flying, and sea. I want to store the numbers of the mount ex. out of 12 on each page using the numbers say 3 are flyers, number 2 across, number 5 across and so on, would look like 2,5,...
I was using the options and acedb so i could have diff profiles for each toon. you would go into interface>addons tab and select my addon in txt boxes were numbers 2,5,... for ground mounts, and in the flying mounts was 1,3,... what ever the numbers are will randomly choose a mount and cast.
Thanks! Any help is great.
0
The Database contents look like this.
0
When I run this it returns a hex number or similar, but mot the actual data I have entered.
Question is How do I store a array in the acedb and or fetch it for later use.
Thank you, Any help would be great.
0
0
0
0
Any help would be great, Thank you, rawroot