Quick Pitbull4 Question

All things /script related

Moderators: Fridmarr, Worldie, Aergis, _Chloe

Quick Pitbull4 Question

Postby Tandors » Sat Aug 15, 2009 9:24 am

Is there anyway to get Pitbull4 to limit the number of letters it shows in each characters name? Kinda like the way Grid does for its raid frames?
Image
Tandors
 
Posts: 247
Joined: Wed Dec 19, 2007 4:43 pm

Re: Quick Pitbull4 Question

Postby Seloei » Sat Aug 15, 2009 11:41 am

quite sure it's limited by the font size but maybe there is something in the new lua code. Never bothered to dig into it. The old system was more easier to use unless you are very familiar with the lua coding.
Image
Seloei
 
Posts: 1130
Joined: Wed Mar 19, 2008 2:24 am
Location: Estonia

Re: Quick Pitbull4 Question

Postby Tandors » Sat Aug 15, 2009 1:05 pm

Right now there is definitely no limit on the player names. They go out of the fram as far as they need to get the whole name spelled out.
Image
Tandors
 
Posts: 247
Joined: Wed Dec 19, 2007 4:43 pm

Re: Quick Pitbull4 Question

Postby Jerey-Darkspear » Sat Aug 15, 2009 7:12 pm

Image
Jerey-Darkspear
 
Posts: 183
Joined: Tue Jun 17, 2008 12:38 am

Re: Quick Pitbull4 Question

Postby trellian » Tue Aug 25, 2009 10:06 am

sorry for necro-ing your post but it might be usefull.

I use this for Pitbull LuaText name field:

Code: Select all
if IsMouseOver(unit) then
  local max,cur = MaxHP(unit),HP(unit)
  local rem = max - cur
  if rem > 0 then
    local r,g,b = HPColor(cur, max)
    return "|cff%02x%02x%02x-%s|r",r,g,b,Short(max-cur,true)
  else
    return '%s',strsub(Name(unit),1,6)
  end
else
  local s = Status(unit)
  if s then
    return s
  else
    return '%s',strsub(Name(unit),1,6)
  end
end



Shows the first 6 characters of the unit name. When mouseovered, it shows either the amount of missing hp or the players name when full health.
User avatar
trellian
 
Posts: 671
Joined: Wed Jul 16, 2008 3:02 am
Location: Silvermoon, EU

Re: Quick Pitbull4 Question

Postby Tandors » Tue Aug 25, 2009 6:22 pm

Perfect. Thank you so much.
Image
Tandors
 
Posts: 247
Joined: Wed Dec 19, 2007 4:43 pm

Re: Quick Pitbull4 Question

Postby Jerey-Darkspear » Tue Aug 25, 2009 9:39 pm

There's a cool way to make it alternate between two texts using a sine function. I have it alternating between Faction Name and Faction Rep Level and then displaying xp on mouseover currently. I'll go grab the code to share with you in a sec.

Code: Select all
[if IsMouseOver then
    FractionalXP ' ' PercentXP:Percent:Paren ' ' Concatenate('R: ', PercentRestXP:Hide(0):Percent)
elseif Sin(Rad(10 * Pi * CurrentTime)) < 0 then
    ReputationName
elseif ReputationName then
    FractionalReputation ' ' PercentReputation:Percent:Paren
end]


I think the frequency is 5 seconds. My trig is a little rusty. Don't think I've seen something like this implemented before. If you really wanted to, you could put a rotation of as many items as you wanted. Just split the sine curve into as many slices as you want items, amplify it, and adjust the frequency. If you have something specific in mind and can't do the math for it, let me know and I'll see if I can write it up.
Image
Jerey-Darkspear
 
Posts: 183
Joined: Tue Jun 17, 2008 12:38 am


Return to Add-ons, UI, and Macros

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Who is online

In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 380 on Tue Oct 14, 2008 6:28 pm

Users browsing this forum: Google [Bot] and 1 guest