Thread Tools Display Modes
11-12-11, 05:25 PM   #1
Talisia
A Deviate Faerie Dragon
Join Date: Sep 2007
Posts: 15
Lua Help pretty please!

I am back begging for help once again! I love messing around with lua but unfortunately I have no real idea what I am actually doing =D

If anybody is bored enough I would be extremely grateful for some help with a few things that have been bothering me =)

First of all, I have a simple code for my ToT in Pitbull:

if UnitIsUnit(unit,"player") then
return "< You! >"
else
return Name(unit)
end

Is it possible and if so, could someone point out how I add class colouring to this?

Secondly, I am in charge of our WoL reports in raids but I always seem to forget to start logging and usually even miss a boss or 2 before I realise. Is there any way I could send myself a little message when entering a raid? For Ex: "Start Logging!" or something similar to appear where my raid warning frame is, stay on my screen for a minute then dissapear. Would I need a full blown addon to achieve this or (im hoping) it could be a simple bit of code I could just add in to an existing one?

I have been searching for something that could achieve this result for a while but have found absolutely nothing relevant =( I did look into weak auras texts but I need a trigger, just entering a raid instance doesnt work.

Thank you for any input at all! =)
  Reply With Quote
11-12-11, 06:29 PM   #2
Minerv
A Black Drake
 
Minerv's Avatar
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 89
Maybe you can go on from here, dunno if it will help you tho
  Reply With Quote
11-12-11, 06:47 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
You could do something like this for class coloring.
Code:
local color=RAID_CLASS_COLORS[select(2,UnitClass(unit)) or ""];
local name=UnitIsUnit("player",unit) and "< You >" or UnitName(unit);
return (color and name) and ("|cff%02x%02x%02x%s|r"):format(color.r*255,color.g*255,color.b*255,name) or name;


As far as instance alerting, you could have an addon start the log for you as a plugin for the one you're using to parse and store the log.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
11-12-11, 07:02 PM   #4
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
You can let BossLogger do it for you automatically.

There's other autologgers out there but
1. That's mine
2. It will only record raid bosses (if you tell it to) so logs don't get huge.
  Reply With Quote
11-15-11, 12:43 PM   #5
Talisia
A Deviate Faerie Dragon
Join Date: Sep 2007
Posts: 15
Only just managed to get back to this post! Pc probs =(

Just wanted to say a massive ty for the code, worked perfectly =)

As for the combat logging, ty for the suggestions! Thing is, I tend to do live reports instead of messing about with uploading afterwards. I do use BasicChatMod which actually has the automatic logging (although it logs everything and I have no control over it!). I just forget to start the client for the live reporting

I will look into BossLogger, so again ty for that =)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Lua Help pretty please!


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off