sylphan wrote:I'm really liking Mudlet, and the scripts that people have shared - Findis's here, and some on the PBworks page.
Question: I'm using a vitals script posted by Tarax. It's here:
http://genesisquests.pbworks.com/w/file ... 160213.zip.
I'd like to keep the x alignment the same but move it near the top of the screen. But I don't want to screw it up. How would I do that? Thanks.
It all depends how much you would like to move it up. The key is in the first few pieces of code. I'll try and paste here.
First of all, here is the code from the file.
Code: Select all
--Right Top Cointainer -- This container is empty for now
right_top_container = Geyser.Container:new({
name = "right_top_container ",
x=0, y=0, -- this container occupies the top, so it starts top-left as well
width = "100%", height="35%", -- but only uses 35% of the height
}, right_container) -- this is the important bit - it says that right_top_container should be inside right_container
--Right Middle Container -- This container is empty for now
right_middle_container = Geyser.Container:new({
name = "right_middle_container",
x=0, y="35%",
width = "100%", height="35%",
}, right_container)
--Right Bottom Container -- This container cotains vital and status containers
right_bottom_container = Geyser.Container:new({
name = "right_bottom_container",
x=0, y="70%",
width = "100%", height="40%",
}, right_container)
As it is set up, the window is essentially split into thirds and the bars are placed into the bottom third. You can keep everything in thirds and move it to the middle or top third, or you can re-define the location to fit exactly where you would like. If you would like to move everything to the middle third, you just need to change the items from being in right_bottom_container to being in right_middle_container. Please see the example below.
First we have the code as written, putting the bar into the lower container:
Code: Select all
-- Vitals containers
--lua health_container:flash()
--Health Container
health_container = Geyser.Container:new({
name = "health_container",
x=0, y=0,
width = "100%", height=20,
}, right_bottom_container)
The following code changes just the very last line to put it in the middle container:
Code: Select all
-- Vitals containers
--lua health_container:flash()
--Health Container
health_container = Geyser.Container:new({
name = "health_container",
x=0, y=0,
width = "100%", height=20,
}, right_middle_container)
If you like the location of the middle container, you can select the text from "-- Vitals containers" and below that, then do a Find and Replace of "right_bottom_container" to "right_middle_container" in that selected area.
Alternatively, if you do not like the location of the middle third, you can adjust the bottom box location to start a bit higher on the screen. The code as written is already above, but let's say we wanted the top of your vitals bar to be halfway down the screen. You could do the following:
Code: Select all
--Right Bottom Container -- This container cotains vital and status containers
right_bottom_container = Geyser.Container:new({
name = "right_bottom_container",
x=0, y="50%",
width = "100%", height="40%",
}, right_container)
Note that the "y=" changed from 70% (from the top) to 50% (from the top). You can mess around with this number to get it exactly where you would like it.
Hope this helps!