Advertisement
hebitori

Morph Tracker Trigger

Jul 6th, 2015
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. Trigger: return gmcp.Char.Vitals (set as Lua function)
  2.  
  3. -- Hello! This is a tiny combined effort of Yae and Firien to make a morph tracker script.
  4.  
  5. -- If you want to track morphs outside of this script, you can use the 'morph' variable.
  6. -- Example Keybinding: (ctrl+1)
  7. -- if morph == "Wyvern" then
  8. -- send("summon flame")
  9. -- end
  10.  
  11. -- For more custom morph colours for the label, just follow the examples below.
  12. -- The script will use default colours if it's not applicable.
  13.  
  14. fgColours = {
  15. ["Icewyrm"] = "aquamarine",
  16. ["Elephant"] = "gainsboro",
  17. ["Squirrel"] = "cornsilk",
  18. ["Wolverine"] = "white",
  19. ["Hydra"] = "pink",
  20. ["Wyvern"] = "red",
  21. ["Gorilla"] = "snow",
  22. ["None"] = "a_twolevel"
  23. }
  24.  
  25. bgColours = {
  26. ["Icewyrm"] = "dark_slate_gray",
  27. ["Elephant"] = "dim_gray",
  28. ["Squirrel"] = "sienna",
  29. ["Wolverine"] = "brown",
  30. ["Hydra"] = "maroon",
  31. ["Wyvern"] = "black",
  32. ["Gorilla"] = "a_twolevel",
  33. ["None"] = "a_onelevel"
  34. }
  35.  
  36. if fgColours[morph] ~= nil then
  37. morphForeground = fgColours[morph]
  38. else
  39. morphForeground = "aquamarine"
  40. end
  41.  
  42. if bgColours[morph] ~= nil then
  43. morphBackground = bgColours[morph]
  44. else
  45. morphBackground = "dark_slate_gray"
  46. end
  47.  
  48. -- Morph Tracker
  49. -- To customise it, just adjust the x, y, width, height.
  50. -- Make sure both values on dragon/not-dragon scripts are the same!
  51.  
  52. if gmcp.Char.Status["race"] == "Dragon" then
  53. sunlightBar:hide()
  54. mTemp = gmcp.Char.Vitals.charstats[3]
  55. morph = string.sub(mTemp,8)
  56. morphCurrent = Geyser.Label:new({
  57. name = "morphCurrent",
  58. x = "7.4%", y = "92.5%",
  59. width = "10%", height = "4%",
  60. fgColor = "white",
  61. color = "firebrick",
  62. fontSize = 25,
  63. message = [[<center>Dragon</center>]]})
  64.  
  65. elseif gmcp.Char.Status["race"] ~= "Dragon" then
  66. sunlightBar:show()
  67. mTemp = gmcp.Char.Vitals.charstats[3]
  68. morph = string.sub(mTemp,8)
  69. morphCurrent = Geyser.Label:new({
  70. name = "morphCurrent",
  71. x = "7.4%", y = "92.5%",
  72. width = "10.5%", height = "4%",
  73. fgColor = morphForeground,
  74. color = morphBackground,
  75. fontSize = 25,
  76. message = [[<center>]] .. morph:upper() .. [[</center>]]})
  77. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement