![]() |
LuaTexts - The new DogTags
"LuaTexts is a text provider module for PitBull4. It's a more efficient alternative to DogTagTexts. Texts are entered using Lua rather that DogTags. Custom texts are harder to write than DogTags as it requires some knowledge of Lua."
Shefki (co-author of PitBull4) writes: Quote:
This thread is intended to work as http://elitistjerks.com/f32/t23615-dogtags_3_0_thread/, but obviously for LuaTexts instead. Unsure how to get started? Check this out. |
I'll try to keep an eye on this thread and answer questions if need be. I'm really hoping that a community will spring up around LuaTexts to help people out with them. However, LuaTexts is PB4 centric. So there probably won't be as there was with people using DogTags with Cowtip, PB3 and others.
While I'll reply I'm not gonna generally get in the mode of converting every DogTag someone happens to post here. If the tag you want converted is instructive to the community then it will probably get converted. So don't feel slighted if I don't specifically respond to your post. |
I'll bite first. I'd like to get rid of Grid and only use PB4. I tried I but failed to write a "Missing Buff" Dogtag, and had to settle for a "Has Buff" tag. Something like
Code:
[if hasaura ("arcane briallance") "."]Code:
[if hasuara ("Aracne Briallance")nil, else "."] |
Little question:
the UF addon Stuf also has a .lua method for inputting your values for HP and such. Do you reckon this will work the same? Or will it work totally different? |
Quote:
Code:
local i = 1 |
Quote:
|
I can't seem to concat with '..' in the texts code, I just get an error. Is there another way to write this?
Code:
if MaxPower(unit) > 0 then |
Edit; He fixed it himeslf
|
Quote:
Code:
If MaxPower(unit) > 0 then |
Code:
[HP:Short "/" MaxHP:Short " " (if PercentHP > 70 then |
Quote:
Code:
[HP:Short "/" MaxHP:Short " " PercentHP:VeryShort:Percent:HPColor]Code:
local cur,max = HP(unit),MaxHP(unit) |
So I have spent a few hours on this and am throwing my hands in the air. I feel like I am so close to having it working (probably not optimal, but working). My bugsack is showing everything fine until the return line
Dogtag version: Code:
[if IsEnemy and ~IsPet thenCode:
local i = 1 |
Quote:
You're using “ when you should be using ". Also I believe that the or ‘’ part should be or "". |
Your text formatting looks kinda weird.
I wonder why are you using something like Code:
"|cff%02x%02x%02x%s|r", tr,tg,tb,"T |n"Code:
"|cff%02x%02x%02xT|r|n", tr,tg,tbAnd of course take into account what Kalroth said about quotation marks. BTW if it doesn't help, could you paste what bugsack said about that return line? edit: forgot |n |
Sweet, thanks for the feedback. All my lua knowledge is coding by mimicing, so...yeah.
Once maintenance is over I'll do this stuff. The spaces are there for a reason, I have the text vertically on the left edge, but I don't want it on the edge of the frame, but rather right next to it. btw: what exactly does |r mean? |
| All times are GMT -4. The time now is 3:06 AM. |
Forum Infrastructure by vBulletin 3.6.12 ©2000-2007, Jelsoft Enterprises Ltd.