- Registered User
Member for 13 years, 2 months, and 16 days
Last active Mon, Feb, 27 2017 21:07:10
- 0 Followers
- 26 Total Posts
- 0 Thanks
Aug 30, 2008I'm working on an autoreply addon but for this I need to get the whisper name and I can't find anything in the wow API.Posted in: Lua Code Discussion
Maybe it's with getArgs but I'm unable to use it.
Thanks in advance for the ones who will help me
Aug 1, 2008Posted in: Lua Code DiscussionQuote from egingell »
You're code will only execute once and will die because of syntax. For testing equality, you need to use a double-equal (==).
Once you fix that error, you will get another error because you have an "end" where no "end" belongs. You actually have three "end" statements where they don't belong.
This is far from fixed for use, but I fixed the syntax errors for you:
if UnitExists("target") == exists then UIParent:SetAlpha(1) else UIParent:SetAlpha(0.5) -- a,d -- not sure what this is here for. ??? ChatFrame1:SetAlpha(1) end local frame = GetMouseFocus() frame:SetAlpha(0.9)
Just to hammer the point home, if you don't register any events, put in an OnUpdate somewhere, or hook any functions, your code will only run once. Unless, of course, you execute if manually.
P.S. Setting the alpha of UIParent supersedes all other frame's alphas (except WorldFrame). In other words, 0.5 will be as opaque as the ChatFrame1 will ever get if UIParent's alpha is set to 0.5.
Quote from Starinnia »
Technically, the first line should probably be something more like:
if UnitExists("target") then
'exists' is never defined anywhere, and that function returns true or false already, so you really don't need any further comparison.
Thanks for the whole help I think I wouldn't make it usable without you
But If we change the ChatFrame1's parent to WorldFrame
The ChatFrame will be parented with the WorldFrame and we can remove ChatFrame1:SetAlpha(1)
So the code will look like this
if UnitExists("target") then UIParent:SetAlpha(1) else UIParent:SetAlpha(0.5) ChatFrame1:SetParent("WorldFrame") end local frame = GetMouseFocus() frame:SetAlpha(0.9)
Jul 31, 2008First as my topic name is I must say that's my very first addon, before the only thing I did was modify oChat, oUF_kosken and oCDPosted in: Lua Code Discussion
My addon goal is to change the general alpha depending of the target
The code I did is that one
if UnitExists("target") = exists then UIParent:SetAlpha(1)end; else UIParent:SetAlpha(0.5) a,d ChatFrame1:SetAlpha(1) end; end local frame = GetMouseFocus() frame:SetAlpha(0.9) end
But now and for one week I can't use Wow so I can't test it, so can someone tell me if the code may be the good or if there are many errors
Jun 15, 2008It's oCDPosted in: General Chat
Edit: I redo my UI that looks like this now
I have to finish the oCD config, the oUF party et the buffs
Jun 14, 2008Posted in: General ChatQuote from Phanx »
Try to center the bottom panel art... currently it's too far up and to the right, leaving uneven spacing between its edges and the buttons inside it. Likewise, move the trinket buttons down to line up with your action bars, and put the same border on them that you're using on your action bars (and every other button).
I'll try to center the panel and resize it.
For the trinket I can change the borders but Button Facade don' affect Item Rack and their style is from Timsans UI so I'll try to make Button Facade affect Item Rack. And yeah I already make them line up but I haven't taken any screenshot since so we can't see
Jun 13, 2008My last one just finished todayPosted in: General Chat
Any suggestions/comments to improve my UI are welcome
Jun 12, 2008Posted in: General ChatQuote from Phanx »
Because you didn't read my post. I didn't tell you to add that line. I told you to change a specific line, and showed you what that line looked like for me after I changed it.
Change "fill = true" to "fill = false" in the settings table. Honestly if you can't figure things like this out, oCD may not be for you.
I add oCD master and not oCD 2.4 so I didn't add that line thats why I added the line.
I know that I'm not really good in lua but I try to discover and I started with the lua since 1 week.
For the "fill=false"it's in the statusbar options so nothing happenned my CD icons go down when there are several CD (I don't know if I asked correctly the first time)
PS: sorry for the poor english but I'm french
Jun 11, 2008Posted in: General ChatQuote from Phanx »
I'm guessing that you mean "move", not "replace"... and you have to change the first line in the PLAYER_LOGIN function in ocd.lua. Mine looks like this:
self.group = self.display:RegisterGroup("oCD", "TOPLEFT", "UIParent", "CENTER", -162, -252)
I have absolutely no idea how oCD is scaling these values or anchoring the icons, as I haven't looked through the code, but the actual visible distances are nearly double what I had to use in the code. Experimentation is key.
Well... thanks for the help but I add the code line where you told me but nothing happenned
My code looks like that (the values are to test I'll move them later)
function addon:PLAYER_LOGIN() self.group = self.display:RegisterGroup("oCD", "TOPLEFT", "UIParent", "CENTER", -2, -2) register = self.bars.register self:parseSpellBook(BOOKTYPE_SPELL) self.bars.setMinMax(defaults.min, defaults.max) self.bars.setTextPosition(defaults.textPos) end
If you can upload (on pastey or as attached file) your ocd.lua and your bars.lua I'll try to modify the lua to put them where I want
Stanzilla helped me and that's good but what do I have to do to get the Cd go up and not down
Jun 10, 2008Posted in: General ChatQuote from Phanx »
Some rearranging from my last screenshot.
Solo, casting, target:
Visible addons: ButtonFacade (with Rothar skin), Grid (modified for thicker border), InfiniBar, MiniMapster (modified for additional cleanup), Poppins (branch version), oCD, oUF, PhanxChat, Quartz, SatrinaBuffFrame, ShieldsUp (unreleased).
I'll get a raid combat screenshot tomorrow.
I'm not entirely satisfied... probably, either unit frames will get pushed down further, or the action bars will get moved over to the center again. oCD will probably get moved too.
How did you do to replace the ocd buttons I tried but as I don't know very much in lua I didn't had any results
- To post a comment, please login or register a new account.