puredew

Game Commands for UI Modifications, Macros & More

you can get frames to center without add ons:

example

/run PlayerFrame:ClearAllPoints() PlayerFrame:SetPoint("CENTER",UIParent,-111,-175)PlayerFrame:SetUserPlaced(true)

/run TargetFrame:ClearAllPoints() TargetFrame:SetPoint("CENTER",UIParent,113,-175)TargetFrame:SetUserPlaced(true)

more distance on camera:
/script SetCVar ("cameraDistancemax" ,50)

          
 

6

Share this post


Link to post

Posted (edited)

Adding on to Puredew's commands above:

For the following commands, UIParent is your screen, "CENTER" is where on the screen you're docking your frame, and (X,Y) is the movement of the frame in relation to it's dock. Your Player, Party, and TargetFrame positions are preserved. Everything else resets upon logging out. While this is an annoyance, you simply have to press the macros once on login - Addons can do this via an OnEvent trigger. 

 

Moving Party Frames

/run PartyMemberFrame1: ClearAllPoints() PartyMemberFrame1: SetPoint("CENTER",UIParent,-250,-60)PartyMemberFrame1:SetUserPlaced(true)

Moving your Tooltip

/run hooksecurefunc("GameTooltip_SetDefaultAnchor", function(tooltip) tooltip:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -900, 400) end)

Moving your Cast Bar

/run local f = CastingBarFrame; f:ClearAllPoints(); f:SetPoint("CENTER", UIParent, "CENTER", 0, -375); f.SetPoint = function() end; f:SetMovable(false); f:SetUserPlaced(true);

Moving your Target Cast Bar

This anchors the "BOTTOMLEFT" of the Target's Cast Bar to the "TOPLEFT" of your Target Frame. Adjust your anchor points as necessary. I do believe it has to remain anchored to the TargetFrame in 2.4.3 otherwise the spell fill will warp/stretch.

/run TargetFrameSpellBar:ClearAllPoints(); TargetFrameSpellBar:SetPoint("BOTTOMLEFT", TargetFrame, "TOPLEFT", 20, -15); TargetFrameSpellBar.SetPoint = function() end;

Moving your Right Action Bar

/run local f = MultiBarRight; f:ClearAllPoints(); f:SetPoint("RIGHT", UIParent, "RIGHT", 0, 300); f.SetPoint = function() end; f:SetMovable(false); f:SetUserPlaced(true);

Rescaling your UI

You can string your rescale commands together with ";" so you only have to press one SetScale macro on login (if you're within the 255 character limit).

/run PlayerFrame:SetScale(1.1);TargetFrame:SetScale(1.1);GameTooltip:SetScale(0.8)

Return the Reference name of a UI element (mouseover)

/script DEFAULT_CHAT_FRAME:AddMessage( GetMouseFocus():GetName() );

Reposition a frame with Mouse-Drag

This does not work on some UI elements, namely Action Bars. "framename" is the reference name of frame you're dragging, i.e. TargetFrame

/run local f=framename; f:SetMovable(true); f:EnableMouse(true); f:SetUserPlaced(true); f:SetScript("OnMouseDown", f.StartMoving); f:SetScript("OnMouseUp", f.StopMovingOrSizing);

Set Opacity

1 is Opaque, 0 is Transparent. Change "Minimap" to the desired frame. Certain elements cannot have their Alpha scaled.

/run Minimap:SetAlpha(0.75)

Remove End Caps (Stone Gryphons)

If you're repositioning Action Bars, you can remove the gryphons like the dirty little immersionless gremlin you are.

/run MainMenuBarLeftEndCap:Hide();MainMenuBarRightEndCap:Hide()

Get Subzone and Coordinates of Player Position

/script SetMapToCurrentZone() local x,y=GetPlayerMapPosition("player") DEFAULT_CHAT_FRAME:AddMessage(format("%s, %s: %.1f, %.1f",GetZoneText(),GetSubZoneText(),x*100,y*100))

 

Edited by Geology
Cleaned up layout, commands, and attempted to make it easier to digest.
2

Share this post


Link to post

Posted (edited)

Thanks to the both of you for posting this information. A lot of this stuff is hard to find, changed during wrath/cata, and is generally unknown to most players who just opted to use addons. This is some great stuff to utilize to have an "acceptable" raiding ui. Below are some screenshots from testing these (from Geology). If anyone else knows cool way to edit ui without addons, please let us know!

https://imgur.com/a/party-frames-repositioned-no-addons-chdOgY2

https://imgur.com/a/raid-frames-no-addons-jyF3i8S

Edited by abap
1

Share this post


Link to post
9 hours ago, abap said:

Thanks to the both of you for posting this information. A lot of this stuff is hard to find, changed during wrath/cata, and is generally unknown to most players who just opted to use addons. This is some great stuff to utilize to have an "acceptable" raiding ui. Below are some screenshots from testing these (from Geology). If anyone else knows cool way to edit ui without addons, please let us know!

https://imgur.com/a/party-frames-repositioned-no-addons-chdOgY2

https://imgur.com/a/raid-frames-no-addons-jyF3i8S

Can you write down the commands you used to save me the work?

 

11 hours ago, Geology said:

You'll need to enter the string in on each login to reposition the cast bar. (If someone is aware of a cleaner way to do this - please comment below, my knowledge on this is barebones)

 

/run CastingBarFrame:ClearAllPoints() CastingBarFrame:SetPoint("CENTER",UIParent,0,-350) CastingBarFrame.SetPoint = function() end

Presumably you can macro this in to either a standalone macro or some button you hit often whilst logged in (e.g. mount followed by this). Maybe there is a more elegant solution which is persistent, though.

0

Share this post


Link to post
2 hours ago, bumbaloe said:

 

Presumably you can macro this in to either a standalone macro or some button you hit often whilst logged in (e.g. mount followed by this). Maybe there is a more elegant solution which is persistent, though.

All of the commands function as macros, rather than pasting the line of text in the chatbox as long as they don't exceed the character limit. The ones that do need to be separated into shorter strings and run in succession.

The longer string ones that I'm having issues with are a series of 4 or more macros designed to allow both buffs and debuffs to display concurrently on raid and party frames. Buffs, in particular HoTs on your party frame only show if you mouseover the party member. With the default raid frames, rdruids and to a lesser extent priests have to choose between showing debuffs or tracking their HoTs/Shields (so by and large, mainly just an inconvenience for RDruids). Mainly just trying to improve the QoL for a druid friend so he doesn't have an aneurysm on certain encounters or in heroics. 

However, these are from ~2010 and either these functions aren't supported in the base 2.4.3 client without editing it with addons - or the syntax to allow them to show concurrently changed between 2.4.3 and 3.3.5, or both. My small American male brain is unsure which, though I assume it wasn't supported without addons until later expansions. I quit at the end of TBC and never touched wrath (moved to pservers instead), used xperl/luna and then grid when it came out around 2.2 back then, tl:dr brain too small for this.

0

Share this post


Link to post

This is a huge things to have thank you Geology and friends~ <3

0

Share this post


Link to post

Posted (edited)

Here is the current state of my UI. For those that feel like this layout is sufficient enough of a base for you to work with you can copy and paste the subsequent commands to reproduce it (The value of the UI Scaling Slider in video settings I use is the minimum of 0.64). Tweak the (x,y) coordinates and scaling as you see fit.

https://imgur.com/a/WttTmCc

My commands are likely messy and could be cleaned up/made more efficient. I'm sorry. Don't hate me.

Enter each of the following once, either in individual macros or just in the chat window:

/run PlayerFrame:ClearAllPoints() PlayerFrame:SetPoint("CENTER",UIParent,-120,-290)PlayerFrame:SetUserPlaced(true)
/run TargetFrame:ClearAllPoints() TargetFrame:SetPoint("CENTER",UIParent,120,-290)TargetFrame:SetUserPlaced(true)
/run PartyMemberFrame1: ClearAllPoints() PartyMemberFrame1: SetPoint("CENTER",UIParent,-250,-60)PartyMemberFrame1:SetUserPlaced(true)

Next, create a macro for each of the following. These are the ones you'll press once each time you log in:

/run local f = CastingBarFrame; f:ClearAllPoints(); f:SetPoint("CENTER", UIParent, "CENTER", 0, -375); f.SetPoint = function() end; f:SetMovable(false); f:SetUserPlaced(true);
/run hooksecurefunc("GameTooltip_SetDefaultAnchor", function(tooltip) tooltip:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -1220, 130) end)
/run PlayerFrame:SetScale(1.1);TargetFrame:SetScale(1.1);PartyMemberFrame1:SetScale(1.3);PartyMemberFrame2:SetScale(1.3);PartyMemberFrame3:SetScale(1.3);PartyMemberFrame4:SetScale(1.3);GameTooltip:SetScale(0.8)
/run RaidPullout1:SetScale(1.3);RaidPullout2:SetScale(1.3);RaidPullout3:SetScale(1.3);RaidPullout4:SetScale(1.3);RaidPullout5:SetScale(1.3)

The last line requires your raid frames to be active, and is only there to increase the scale for ease of mouseover targeting for heals. 

Edited by Geology
Cleaning up code
4

Share this post


Link to post
On 2024-06-16 at 8:15 PM, Geology said:

 

Is there any macro/command to move the editbox above the chat?

0

Share this post


Link to post

Posted (edited)

1 hour ago, danzor00 said:

Is there any macro/command to move the editbox above the chat?

I don't believe this is possible via a macro command in 2.4.3. You could reference chat addons like Prat to see how they anchor it to a new SetPoint to see if it's possible to pull a string or two out that works as a standalone macro.

In newer clients you can reference it as ChatFrame1EditBox and use SetPoint to anchor it to the "TOPLEFT" of the ChatFrame1. This doesn't work in 2.4.3 though (at least, I haven't been able to get it to work, granted I only spent ~30 minutes on it before I stopped caring).

Edited by Geology
0

Share this post


Link to post
2 hours ago, Geology said:

I don't believe this is possible via a macro command in 2.4.3. You could reference chat addons like Prat to see how they anchor it to a new SetPoint to see if it's possible to pull a string or two out that works as a standalone macro.

In newer clients you can reference it as ChatFrame1EditBox and use SetPoint to anchor it to the "TOPLEFT" of the ChatFrame1. This doesn't work in 2.4.3 though (at least, I haven't been able to get it to work, granted I only spent ~30 minutes on it before I stopped caring).

Ahh, thanks anyway, im useless in that regard. i dont know where or what i would be looking for tbh:D:D

0

Share this post


Link to post

Can you move the minimap with such commands also?

0

Share this post


Link to post

Also there is supposedly a hidden Focus frame in blizz UI, any of you magicians know if it is possible to make it visible?

0

Share this post


Link to post
16 hours ago, kverti said:

Also there is supposedly a hidden Focus frame in blizz UI, any of you magicians know if it is possible to make it visible?

oh i would LOVE to know this one ! Playing hunter, i love having focusframed my pet to EZ track Mend pet and stuff...

also, anyone knows some macros for max graphics settings in 2.4.3 ? i remember there were some console stuff but ofc i didnt save them... -.-

0

Share this post


Link to post

Posted (edited)

___

Edited by GreenWay1143
0

Share this post


Link to post

Posted (edited)

On 7/17/2024 at 1:16 AM, eXtence said:

Can you move the minimap with such commands also?

Yes. It is referenced as "MinimapCluster" I believe. Move it the same way you'd move other frames. I would assume it follows the rules of target/party frames and can be moved with the mouse drag command as well. Have not tested though.

Edited by Geology
0

Share this post


Link to post

Banning Addons, but allowing all sorts of scripting aka macros is kind of ridiculous, cause that is cheating then as well. Sadly i didn't study programming and just looking up all these things to get advantages is just too annyoing to deal with. Wish, they had banned macros too.....

Enough salt for today.

-3

Share this post


Link to post
26 minutes ago, Genevara said:

Banning Addons, but allowing all sorts of scripting aka macros is kind of ridiculous, cause that is cheating then as well. Sadly i didn't study programming and just looking up all these things to get advantages is just too annyoing to deal with. Wish, they had banned macros too.....

Enough salt for today.

Hahah, this is as bad as the "joke" ; ban keybinds aswell.

Macros and keybinds are in the client.

I belive that only removing questhelper will seperate people who love and know this game for its fantasy story and content from people who run the numbers game.

Hyped for tomorrow!

0

Share this post


Link to post

Keybound macros are quite a bit different than lua automation ;)

2

Share this post


Link to post

I use a razer naga and would love a way to move action bars so i can have 4 rows. Is there a script to do this. Atm, game is basically unplayable for me mentally lol. Ive been using a naga an 4x3 layout for 15 years now

0

Share this post


Link to post

I got a disconnect after using 

/run local f = MultiBarRight; f:ClearAllPoints(); f:SetPoint("RIGHT", UIParent, "RIGHT", 0, 300); f.SetPoint = function() end; f:SetMovable(false); f:SetUserPlaced(true); 

is that suppose to happen ? ^^

0

Share this post


Link to post

It's unlikely related to the server.

0

Share this post


Link to post

I was able to figure it out. This shit is annoying and buggy af. gg

lu5vOEr.png

This requires 4 separate macros. And the positioning may be different based on your monitors resolution. My laptop is 1920x1200. I've tested this on my desktops 1440p monitor and had to change the Y axis in the macros. The positioning does not save after you close the client, so put the 4 macros somewhere on your bars and click them when you log in.

/run MultiBarRight:ClearAllPoints() MultiBarRight:SetPoint("BOTTOMLEFT", MainMenuBar, "TOPLEFT", 6, -372) MultiBarRight:SetScale(1) MultiBarRight:Show()
/run for i = 2, 12 do local button = _G["MultiBarRightButton" .. i] button:ClearAllPoints() button:SetPoint("LEFT", _G["MultiBarRightButton" .. (i - 1)], "RIGHT", 6, 0) button:Show() end
/run MultiBarLeft:ClearAllPoints() MultiBarLeft:SetPoint("BOTTOMLEFT", MainMenuBar, "TOPLEFT", 6, -416) MultiBarLeft:SetScale(1) MultiBarLeft:Show()
/run for i = 2, 12 do local button = _G["MultiBarLeftButton" .. i] button:ClearAllPoints() button:SetPoint("LEFT", _G["MultiBarLeftButton" .. (i - 1)], "RIGHT", 6, 0) button:Show() end

 

2

Share this post


Link to post

Would it be possible to have the party frames on the right side too? I have tried everything, but unfortunately I have no idea how it could work.

0

Share this post


Link to post
3 hours ago, troetz said:

Would it be possible to have the party frames on the right side too? I have tried everything, but unfortunately I have no idea how it could work.

 

The macro listed up above:

 

run PartyMemberFrame1: ClearAllPoints() PartyMemberFrame1: SetPoint("CENTER",UIParent,-250,-60)PartyMemberFrame1:SetUserPlaced(true)

 

Edit the -250 ( this is the "x" axis ) and -60 ( this is the "y" axis ) 

To move it on the right side correct the -60 to "100" for example 

0

Share this post


Link to post

Posted (edited)

.

Edited by Isharis
0

Share this post


Link to post

Posted (edited)

The following two macros will put coordinates at the bottom of your world map based on your mouse cursor position:

/run WF=CreateFrame("Frame","WF",WorldMapFrame) Wt=0 WS=WF:CreateFontString(nil,"OVERLAY","GameTooltipText") WS:SetPoint("CENTER",WorldMapFrame,"CENTER",0,-368)
/run WF:SetScript("OnUpdate",function(s,e) Wt=Wt+e if Wt>.1 then Wt=0 x,y=GetCursorPosition() W=WorldMapDetailFrame z=W:GetEffectiveScale() WS:SetFormattedText("%.1f, %.1f",(x/z-W:GetLeft())/W:GetWidth()*100,(W:GetTop()-y/z)/W:GetHeight()*100) end end)

Run those two macros once, in order, every time you log into the game or reload your UI.

Edited by BananaRama
8

Share this post


Link to post

Nice macro! Is there any way to modify this to overlay on the minimap frame and use the player's current position?

0

Share this post


Link to post

Posted (edited)

On 8/17/2024 at 9:30 AM, Olivine said:

Nice macro! Is there any way to modify this to overlay on the minimap frame and use the player's current position?

Here are player coordinates just below the minimap in a large font with a black background:

/run MF=CreateFrame("Frame") MS=MF:CreateFontString(nil,"OVERLAY","GameFontNormalLarge") MS:SetTextColor(1,1,1) MS:SetPoint("CENTER",Minimap,"CENTER",0,-90) MT=MF:CreateTexture() MT:SetAllPoints(MS) MT:SetTexture(0,"CLAMPTOBLACK")
/run Mt=0 MF:SetScript("OnUpdate",function(s,e) Mt=Mt+e if Mt>.2 then Mt=0 _=WorldMapFrame:IsVisible() or SetMapToCurrentZone() x,y=GetPlayerMapPosition("player") MS:SetText("") _=IsInInstance() or MS:SetFormattedText("%.1f, %.1f",x*100,y*100) end end)

You can change "GameFontNormalLarge" to "GameFontNormal" for a regular-sized font. You can use MS:SetTextColor(r,g,b) to change the color, for example: MS:SetTextColor(0,1,0) would make the coordinates green. If you want the coordinates to display inside the minimap, change -90 to -55 after SetPoint.

Edited by BananaRama
Fixed second macro issue that prevented changing the world map from current zone (e.g. zooming out)
3

Share this post


Link to post
53 minutes ago, BananaRama said:

Here are player coordinates just below the minimap in a large font with a black background:


/run MF=CreateFrame("Frame") MS=MF:CreateFontString(nil,"OVERLAY","GameFontNormalLarge") MS:SetTextColor(1,1,1) MS:SetPoint("CENTER",Minimap,"CENTER",0,-90) MT=MF:CreateTexture() MT:SetAllPoints(MS) MT:SetTexture(0,"CLAMPTOBLACK")
/run Mt=0 MF:SetScript("OnUpdate",function(s,e) Mt=Mt+e if Mt>.2 then Mt=0 SetMapToCurrentZone() local x,y=GetPlayerMapPosition("player") if not IsInInstance() then MS:SetFormattedText("%.1f, %.1f",x*100,y*100) else MS:SetText("") end end end)

You can change "GameFontNormalLarge" to "GameFontNormal" for a regular-sized font. You can use MS:SetTextColor(r,g,b) to change the color, for example: MS:SetTextColor(0,1,0) would make the coordinates green. If you want the coordinates to display inside the minimap, change -90 to -55 after SetPoint.

based thx

0

Share this post


Link to post

Im not sure what Im looking for, where are the coordinates supposed to be? Theyre not below the minimap. I have two macros, first one as coord 1 and second lines as coord 2, i click them in order, /console reloadui and log out/in and nothing. What am i missing?

0

Share this post


Link to post

Posted (edited)

24 minutes ago, Thealbida said:

Im not sure what Im looking for, where are the coordinates supposed to be? Theyre not below the minimap. I have two macros, first one as coord 1 and second lines as coord 2, i click them in order, /console reloadui and log out/in and nothing. What am i missing?

Are you talking about the 1st post by OP?  Those coordinates show when you open the Map (pressing the M Key) they should be in the grey border at the bottom.

The 2nd post by OP has a big black rectangle under the minimap.  Can't miss it.

EDIT: You also have to run them everytime you log in as OP mentioned.

Edited by Satch
0

Share this post


Link to post
28 minutes ago, Satch said:

Are you talking about the 1st post by OP?  Those coordinates show when you open the Map (pressing the M Key) they should be in the grey border at the bottom.

The 2nd post by OP has a big black rectangle under the minimap.  Can't miss it.

EDIT: You also have to run them everytime you log in as OP mentioned.

Solved! mustve missed it at the very bottom. misunderstood the directions, thought it was use macros and refresh. now i see!

0

Share this post


Link to post

The following macros enable quality of life features: sharing macros with other players and receiving their macros, auto-repairing and vendoring grey items when you open a merchant window, and opening your mail by spamming your mousewheel.

The first two macros declare abbreviations and functions; the third monitors the chat window for the presence of the purple diamond target marker in whisper, say, party, raid, and guild. Run these three macros before anything else every time you log in or reload your UI.

-- Macro 1: Definitions
/run CF=CreateFrame CIL=GetContainerItemLink CNS=GetContainerNumSlots CP=GetCursorPosition IHI=GetInboxHeaderInfo II=IsInInstance INI=GetInboxNumItems SCM=SendChatMessage SMZ=SetMapToCurrentZone UCI=UseContainerItem WMD=WorldMapDetailFrame
-- Macro 2: Definitions
/run VC="MERCHANT_CLOSED" VS="MERCHANT_SHOW" NL=string.char(13,10) OE="OnEvent" OU="OnUpdate" cy=coroutine.yield msg=function(s)DEFAULT_CHAT_FRAME:AddMessage(s)end RE=function(f,...)for i=1,select('#',...)do f:RegisterEvent(select(i,...))end end
-- Macro 3: Chat Listener
/run if not C then C=CF("Frame") RE(C,"CHAT_MSG_WHISPER","CHAT_MSG_SAY","CHAT_MSG_PARTY", "CHAT_MSG_RAID","CHAT_MSG_GUILD") C:SetScript(OE,function(s,_,m)if string.find(m,"%{rt3%}")then s.m=m end end) end

The fourth macro stores the latest message you received containing the purple diamond target marker. Only the whisper, say, party, raid, and guild channels are monitored. If you keybind this macro to CTRL-C, you can "copy paste" the latest macro from the chat window and automatically create it in the "Character Specific Macros" tab.

/run if not ShareMacro then ShareMacro=function(m,c,t)_=GetMacroBody(m)SCM(_:gsub("%c+","%{rt3%}"),c,nil,t)end end if C.m then CreateMacro("zMacro"..select(2,GetNumMacros())+1,1,C.m:gsub("%{rt3%}",NL),true,1) msg("Macro created.")C.m=nil end

For this to work, you must use ShareMacro() to send your macro to other players. Here are some examples of how to use ShareMacro():

/run ShareMacro("Unequip","PARTY") -- Will send your MH/OH (un)equip macro to party chat, replacing line breaks with spaces
/run ShareMacro("AutoMail","GUILD") -- Will send your AutoMail macro to guild chat
/run ShareMacro("Wrist","WHISPER","Fancypants") -- Will whisper Fancypants the multi-line mouse wheel macro that spams your main ability

Macros shared in this way are limited to 251 characters or 11 lines, whichever comes first. Your macro in the Macro Window must have a blank line at the end to work properly.

The fifth macro automatically repairs and sells your grey items whenever you open a merchant window.

/run if not V then V=CF("Frame")RE(V,VS,VC)V:SetScript(OE,function(_,e)if e==VS then RepairAllItems()for b=0,4 do for s=1,CNS(b)do _=CIL(b,s)if _ and _:sub(5,10)=="9d9d9d" then msg("Selling ".._)UCI(b,s)end end end end end)end

The sixth and final macro allows you to take mail from your inbox by spamming it. Bind this to your mousewheel and make sure your mailbox window is open.

/run local h,i=GetInboxHeaderInfo for i=GetInboxNumItems(),1,-1 do if select(6,h(i))==0 and not select(13,h(i)) then TakeInboxMoney(i) TakeInboxItem(i) end end

Enjoy, and please report any bugs you find.

Edited by BananaRama
Updated macros
1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now