Showing results 1 to 25 of 194
Search took 0.01 seconds.
Search: Posts Made By: Vrul
Forum: Lua/XML Help 06-10-14, 09:41 AM
Replies: 6
Views: 440
Posted By Vrul
Not tested but: local format, random =...

Not tested but:

local format, random = string.format, math.random
local index, samples, used = 1, { }, { }
while(index <= 400) do
local plate = random(1, 521)
local sample = format("%03u:%c:%u",...
Forum: Lua/XML Help 06-05-14, 09:45 AM
Replies: 5
Views: 707
Posted By Vrul
What Phanx posted should fix your problem...

What Phanx posted should fix your problem (provided you hook the correct function). Another reason the code you posted wouldn't have worked is that the ADDON_LOADED event would have fired for...
Forum: AddOn Help/Support 04-21-14, 08:50 AM
Replies: 39
Views: 2,041
Posted By Vrul
All of those FEASTS, MOUNT, PORTAL, SPELL entries...

All of those FEASTS, MOUNT, PORTAL, SPELL entries need to be in quotes.
Forum: Lua/XML Help 04-20-14, 09:04 PM
Replies: 3
Views: 361
Posted By Vrul
You should be able to just hook ChatFrame_OnLoad...

You should be able to just hook ChatFrame_OnLoad since it should only be called once per chat frame:

hooksecurefunc('ChatFrame_OnLoad', function(chatFrame)
-- do stuff
end)


If you want to be...
Forum: Lua/XML Help 03-26-14, 09:53 AM
Replies: 10
Views: 971
Posted By Vrul
The variable texture you are using doesn't change...

The variable texture you are using doesn't change during that loop so you are attempting to set the same texture for each item. I would image a quick fix would be to change the line:

strvars["eICO"...
Forum: General Authoring Discussion 03-19-14, 08:28 PM
Replies: 7
Views: 714
Posted By Vrul
Those were possible returns from GetCursorInfo...

Those were possible returns from GetCursorInfo that it was checking.
Forum: General Authoring Discussion 03-19-14, 08:01 PM
Replies: 7
Views: 714
Posted By Vrul
That code from SecureHandlers.lua is for handling...

That code from SecureHandlers.lua is for handling dragging. The code to handle clicking/using a button is in SecureTemplates.lua, specifically the possible options for "type" are the entries in the...
Forum: Lua/XML Help 03-12-14, 11:30 AM
Replies: 35
Views: 1,802
Posted By Vrul
Based on what you are using it for you don't...

Based on what you are using it for you don't really need a separate UnitIsPet function, also the class name used to index CUSTOM_CLASS_COLORS and RAID_CLASS_COLORS should be in all...
Forum: Lua/XML Help 03-12-14, 09:54 AM
Replies: 15
Views: 810
Posted By Vrul
That code you posted doesn't work because you...

That code you posted doesn't work because you call SetScript before you have defined the local variable it references. Since all your scripts are doing is calling Hide/Show and the first argument...
Forum: Lua/XML Help 03-12-14, 09:39 AM
Replies: 35
Views: 1,802
Posted By Vrul
UnitGUID can return nil so you need to account...

UnitGUID can return nil so you need to account for that:

local function UnitIsPet(unit)
local GUID = UnitGUID(unit)
return GUID and tonumber(GUID:sub(5, 5), 16) % 8 == 4
end


UnitGUID...
Forum: Lua/XML Help 03-11-14, 11:47 AM
Replies: 3
Views: 396
Posted By Vrul
Try changing: ...

Try changing:

_G[k]:HookScript("OnValueChanged", function()
if _G[k].reset then
Set(a, k);
_G[k].reset = false;
...
Forum: Lua/XML Help 03-03-14, 06:46 PM
Replies: 20
Views: 1,091
Posted By Vrul
I think it works just like you said and the...

I think it works just like you said and the constant switching back and forth of two textures, one of which not being in memory, is what messes it up. Of the two workarounds I found, one just cached...
Forum: Lua/XML Help 03-03-14, 03:45 PM
Replies: 20
Views: 1,091
Posted By Vrul
You don't need this bit anymore...

You don't need this bit anymore either:

tooltip[index] = _G[addonName .. "TempEnchantScannerTexture" .. index]


Duugu I noticed the nonBlocking bit earlier but I originally thought it was similar...
Forum: Lua/XML Help 03-03-14, 12:26 PM
Replies: 20
Views: 1,091
Posted By Vrul
Did the texture change for Flametongue Weapon...

Did the texture change for Flametongue Weapon without that spell being on an action bar somewhere?

I can get the Windfury Weapon icon to show up on my level 20 rogue's Sharpening Stone temp enchant...
Forum: Lua/XML Help 03-03-14, 10:12 AM
Replies: 20
Views: 1,091
Posted By Vrul
I leveled an enhancement shaman up to get...

I leveled an enhancement shaman up to get Flametongue Weapon and Windfury Weapon on two different weapons at the same time and they both showed up fine for me using the code I posted earlier. Not...
Forum: Lua/XML Help 03-01-14, 10:35 PM
Replies: 20
Views: 1,091
Posted By Vrul
I leveled a shaman to 10 so I could see what you...

I leveled a shaman to 10 so I could see what you were talking about and I can't explain why that is happening but here is something that works (on a level 10 shaman at least):

local _, class =...
Forum: Lua/XML Help 03-01-14, 05:49 PM
Replies: 20
Views: 1,091
Posted By Vrul
Try: local _, class = UnitClass("player") if...

Try:

local _, class = UnitClass("player")
if class ~= "ROGUE" and class ~= "SHAMAN" then return end

local addonName = ...
local tooltip = CreateFrame("GameTooltip", addonName .....
Forum: Macro Help 02-26-14, 07:32 PM
Replies: 4
Views: 706
Posted By Vrul
If I am understanding you correctly you want a...

If I am understanding you correctly you want a macro that changes behavior if shift or ctrl is held down but ignores the alt key?

/use [mod:shift] Y; [mod:ctrl] Z; X

Swap the shift/ctrl part based...
Forum: AddOn Search/Requests 02-23-14, 08:51 AM
Replies: 9
Views: 749
Posted By Vrul
This is another way to...

This is another way to go:

RegisterStateDriver(PlayerFrame, "visibility", "[combat] show; hide")
RegisterStateDriver(TargetFrame, "visibility", "[combat,exists] show;...
Forum: Macro Help 02-12-14, 04:26 PM
Replies: 6
Views: 2,481
Posted By Vrul
semlar gave you the best way but if you still...

semlar gave you the best way but if you still wanted to see your original method shrunk a bit for educational purposes:

/run local f,p=IsFlyableArea(),"MOUNT"
for i=1,GetNumCompanions(p) do
...
Forum: General Authoring Discussion 02-12-14, 08:14 AM
Replies: 31
Views: 1,711
Posted By Vrul
The intended use is to have an action bar follow...

The intended use is to have an action bar follow the tangent line of a function. An action bar should not be upside down which is what values around 180 degrees would do. So if you stick to +/- 180...
Forum: General Authoring Discussion 02-11-14, 03:09 PM
Replies: 31
Views: 1,711
Posted By Vrul
Based off your intended use your values should...

Based off your intended use your values should not exceed the +/-90 degree range, so if your array contained -7 instead of 353 it would work just fine. That pushes the problem boundary to the 180...
Forum: General Authoring Discussion 02-11-14, 02:44 PM
Replies: 31
Views: 1,711
Posted By Vrul
So post the function that calculates the rotation...

So post the function that calculates the rotation angle and some examples of inputs that give bad outputs and what those outputs should be and maybe we can fix that.


Resike's code does exactly what...
Forum: Lua/XML Help 02-08-14, 10:03 PM
Replies: 24
Views: 1,531
Posted By Vrul
As Phanx pointed out again, you can't target like...

As Phanx pointed out again, you can't target like you are trying. You are also creating a button that does nothing but /click another button? I think this does what you want (or close):

local...
Forum: Lua/XML Help 01-24-14, 10:01 PM
Replies: 9
Views: 1,139
Posted By Vrul
You are making it way more complicated than it...

You are making it way more complicated than it needs to be, however your error is a simple fix:

self._index = self

should be:

self.__index = self
Showing results 1 to 25 of 194