Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Trigger: return gmcp.Char.Vitals (set as Lua function)
- -- Hello! This is a tiny combined effort of Yae and Firien to make a morph tracker script.
- -- If you want to track morphs outside of this script, you can use the 'morph' variable.
- -- Example Keybinding: (ctrl+1)
- -- if morph == "Wyvern" then
- -- send("summon flame")
- -- end
- -- For more custom morph colours for the label, just follow the examples below.
- -- The script will use default colours if it's not applicable.
- fgColours = {
- ["Icewyrm"] = "aquamarine",
- ["Elephant"] = "gainsboro",
- ["Squirrel"] = "cornsilk",
- ["Wolverine"] = "white",
- ["Hydra"] = "pink",
- ["Wyvern"] = "red",
- ["Gorilla"] = "snow",
- ["None"] = "a_twolevel"
- }
- bgColours = {
- ["Icewyrm"] = "dark_slate_gray",
- ["Elephant"] = "dim_gray",
- ["Squirrel"] = "sienna",
- ["Wolverine"] = "brown",
- ["Hydra"] = "maroon",
- ["Wyvern"] = "black",
- ["Gorilla"] = "a_twolevel",
- ["None"] = "a_onelevel"
- }
- if fgColours[morph] ~= nil then
- morphForeground = fgColours[morph]
- else
- morphForeground = "aquamarine"
- end
- if bgColours[morph] ~= nil then
- morphBackground = bgColours[morph]
- else
- morphBackground = "dark_slate_gray"
- end
- -- Morph Tracker
- -- To customise it, just adjust the x, y, width, height.
- -- Make sure both values on dragon/not-dragon scripts are the same!
- if gmcp.Char.Status["race"] == "Dragon" then
- sunlightBar:hide()
- mTemp = gmcp.Char.Vitals.charstats[3]
- morph = string.sub(mTemp,8)
- morphCurrent = Geyser.Label:new({
- name = "morphCurrent",
- x = "7.4%", y = "92.5%",
- width = "10%", height = "4%",
- fgColor = "white",
- color = "firebrick",
- fontSize = 25,
- message = [[<center>Dragon</center>]]})
- elseif gmcp.Char.Status["race"] ~= "Dragon" then
- sunlightBar:show()
- mTemp = gmcp.Char.Vitals.charstats[3]
- morph = string.sub(mTemp,8)
- morphCurrent = Geyser.Label:new({
- name = "morphCurrent",
- x = "7.4%", y = "92.5%",
- width = "10.5%", height = "4%",
- fgColor = morphForeground,
- color = morphBackground,
- fontSize = 25,
- message = [[<center>]] .. morph:upper() .. [[</center>]]})
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement