View Full Version : XP Printed out to party chat for your alts
Put this macro on you alts and it will tell you how far along they are XP wise:
[code:1]/run p="player"; O=100;D=" - ";E=GetXPExhaustion()X=UnitXP(p)Y=UnitXPMax(p)L=Uni tLevel(p)SendChatMessage("XP: "..X.."/"..Y..D..floor((X/Y)*O).."% - NEXT LVL "..(L 1)..": "..(Y-X)..D..ceil(O-((X/Y)*O)).."% - "..floor((E/Y)*O).."% Rested "..E,PARTY);[/code:1]
It will print out a message in party chat that looks like:
Toonb says: XP: 35800/71600 - 50% - NEXT LVL 37: 35800 - 50% - 150% Rested 107400
FunkStar
12-27-2007, 10:10 AM
[string "p="player"; O=100;D="- BLABLABLA UnitX..."]:1: ')' expected near '1'.
Not sure what im doing wrong
marvein
01-03-2008, 06:06 PM
floor((X/Y)*O).."% - NEXT LVL "..(L 1)..":
in the huge text try putting a '+' plus sign between the 'L' and the '1' Since if im reading this right it is supposed to say "I am x% away from my next level" so the next level would be L(current level) +1.
Negativ1337
01-04-2008, 10:09 AM
/run p="player"; O=100;D=" - ";E=GetXPExhaustion()X=UnitXP(p)Y=UnitXPMax(p)L=Uni tLevel(p)SendChatMessage("XP: "..X.."/"..Y..D..floor((X/Y)*O).."% - NEXT LVL "..(L+1)..": "..(Y-X)..D..ceil(O-((X/Y)*O)).."% - "..floor((E/Y)*O).."% Rested "..E,PARTY);
Still doesnt work.. :(
Monkofdoom
01-04-2008, 10:21 AM
I was looking around and found this on another forum, I have no idea if it works or not as I am at work and can't test it.
/script X=UnitXP("name"); XP=UnitXPMax("name"); L=UnitLevel("name"); DEFAULT_CHAT_FRAME:AddMessage("XP: "..X.." / "..XP.." - "..ceil( (X / XP)*100 ).."%"); DEFAULT_CHAT_FRAME:AddMessage("Remaining until Level "..(L+1)..": "..(XP-X));
Although it only does a basic, toon has 1111 / 4444 xp 25%
marvein
01-04-2008, 11:32 AM
hmm will try out some more things while I am at work here. shhh, boss doesnt know i have wow installed here so everyone keep it down! :P
Monkofdoom
01-04-2008, 11:41 AM
hmm will try out some more things while I am at work here. shhh, boss doesnt know i have wow installed here so everyone keep it down! :P
lol, and i thought i was bad researching macros :p
marvein
01-04-2008, 11:53 AM
hmm will try out some more things while I am at work here. shhh, boss doesnt know i have wow installed here so everyone keep it down! :P
lol, and i thought i was bad researching macros :p
lol well I am making progress I think, I removed the rested part because frankly I dont care about it and it adds more complexity to the macro. Oh and the error I have been getting was
<name> expected near "
after removing some extra text for the rested exp part Im now getting
unexpected symbol near '.'
which seems to me I have too many periods somewhere
marvein
01-04-2008, 12:55 PM
ok this is it!
[code:1]/script p="player"; O=100;D=" - ";E=GetXPExhaustion()X=UnitXP(p)Y=UnitXPMax(p)L=Uni tLevel(p)SendChatMessage("XP: "..X.."/"..Y..D..floor((X/Y)*O).."% - NEXT LVL "..(L+1)..": "..(Y-X)..D..ceil(O-((X/Y)*O)).."% - "..floor((E/Y)*O).."% Rested "..E,"PARTY"); [/code:1]
and its just under the limit lol 255/255 so no room to send it to a custom channel unless you remove some text
vBulletin® v4.2.2, Copyright ©2000-2025, Jelsoft Enterprises Ltd.