Atalkez

Untitled

Sep 16th, 2021
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.35 KB | None | 0 0
  1. --table of default prompt tags
  2. sys.prompttags = {
  3.   ["health"] = function() return stats.h end,
  4.   ["percenthealth"] = function() return(math.floor(stats.h / stats.maxh * 100).. "%h") end,
  5.   ["mana"] = function() return stats.m end,
  6.   ["percentmana"] = function() return(math.floor(stats.m / stats.maxm * 100).. "%m") end,
  7.   ["endurance"] = function() return stats.e end,
  8.   ["percentendurance"] = function() return math.floor(stats.e / stats.maxe * 100) end,
  9.   ["willpower"] = function() return stats.w end,
  10.   ["percentwillpower"] = function() return math.floor(stats.w / stats.maxw * 100) end,
  11.   ["bal"] = function() if sys.bals.b then return "X" else return "" end end,
  12.   ["eq"] = function() if sys.bals.e then return "E" else return "" end end,
  13.   ["target"] = function() if target then return target else return "" end end,
  14.   ["paused"] = function() if sys.paused then return "(PP)" else return "" end end,
  15.   ["softpaused"] = function() if sys.softpaused then return "(sP)" else return "" end end,
  16.   ["phase"] = function() if Def.phased or Def.blackwind or Def.astralform then return "@" else return "" end end,
  17.   ["retardation"] = function() if sys.retard then return "<blue>[<red>RET<blue>]" else return "" end end,
  18.   ["kai"] = function() if gmcp.Char.Status.class == "Monk" then return gmcp.Char.Vitals.charstats[3]:sub(6) else return "" end end,
  19.   ["shin"] = function() if gmcp.Char.Status.class == "Blademaster" then return gmcp.Char.Vitals.charstats[3]:sub(7) else return "" end end,
  20.   ["warning"] = function() return prefixWarning end,
  21.   ["limbs"] = function() if gmcp.Char.Status.class == "Blademaster" and not raid then return "<white>[<gold>RL: " ..rightDam.. " LL: " ..leftDam.. "<white>]" else return "" end end,
  22.   ["exits"] = function()
  23.             promptExits = {}
  24.             local roomExits = gmcp.Room.Info.exits
  25.               for k, v in pairs(roomExits) do
  26.                 if k ~= wallDirection then
  27.                   table.insert(promptExits, k:upper())
  28.                 end
  29.               end
  30.             return table.concat(promptExits, "<red>|<gold>")
  31.             end,
  32.   ["mw"] = function() if Def.metawake then return "MW" else return "" end end,
  33.   ["breathing"] = function() if Def.breathing then return "br" else return "" end end,
  34.   ["affs"] = function() return affTags() end,
  35.   ["oaff"] = function() return oprompt() end,
  36.   ["timestamp"] = function() return getTimestamp(getLineCount()) end,
  37.   ["diffhealth"] = function()
  38.           if stats.h < stats.oh then
  39.            return("<red>(-"..stats.oh - stats.h .. "h, " .. string.format("%.1f", ((stats.oh - stats.h) / stats.maxh) * 100) .. "%)")
  40.           elseif stats.h > stats.oh then
  41.            return("<green>(+"..stats.h - stats.oh .. "h, " .. string.format("%.1f", ((stats.h - stats.oh) / stats.maxh) * 100) .. "%)")
  42.           else
  43.            return ""
  44.           end -- if
  45.         end, --func
  46.   ["diffmana"] = function()
  47.         if stats.m < stats.om then
  48.          return("<slate_blue>(-"..stats.om - stats.m .. "m, " .. string.format("%.1f", ((stats.om - stats.m) / stats.maxm) * 100) .. "%)")
  49.         elseif stats.m > stats.om then
  50.          return("<purple>(+".. stats.m - stats.om .. "m, " .. string.format("%.1f", ((stats.m - stats.om) / stats.maxm) * 100) .. "%)")
  51.         else
  52.          return ""
  53.         end -- if
  54.       end, --func
  55.   ["def"] = function()
  56.               local defstring = ""
  57.               if def.blindness then
  58.                 defstring = defstring .. "<SeaGreen>B "
  59.               end
  60.               if def.deafness then
  61.                 defstring = defstring .. "<SeaGreen>D "
  62.               end
  63.               if def.cloak then
  64.                 defstring = defstring .. "<deep_sky_blue>C "
  65.               end
  66.               if def.kola then
  67.                 defstring = defstring .. "<yellow>K "
  68.               end
  69.               if def.density then
  70.                 defstring = defstring .. "<maroon>M "
  71.               end -- if
  72.               if def.heldbreath then
  73.                 defstring = defstring .. "<light_grey>br"
  74.               end --if
  75.               return defstring
  76.             end, --func
  77.   ["devo"] = function()
  78.               if gmcp.Char.Status.class == "Paladin" or gmcp.Char.Status.class == "Priest" then
  79.                 if stats.devo < 15 then
  80.                   return "<white>[<red>" ..stats.devo.. "% Devo<white>]"
  81.                 elseif stats.devo < 50 then
  82.                   return "<white>[<firebrick>" ..stats.devo.. "% Devo<white>]"
  83.                 elseif stats.devo < 75 then
  84.                   return "<white>[<dark_orange>" ..stats.devo.. "% Devo<white>]"
  85.                 elseif stats.devo >= 75 then
  86.                   return "<white>[<yellow>" ..stats.devo.. "% Devo<white>]"
  87.                 end
  88.               else
  89.                 return ""
  90.               end
  91.             end,
  92.   ["angel"] = function()
  93.                 if gmcp.Char.Status.class == "Priest" then
  94.                   if angel_power < 15 then
  95.                     return "<white>[<red>" ..angel_power.. "% AP<white>]"
  96.                   elseif angel_power < 50 then
  97.                     return "<white>[<red>" ..angel_power.. "% AP<white>]"
  98.                   elseif angel_power < 75 then
  99.                     return "<white>[<red>" ..angel_power.. "% AP<white>]"
  100.                   elseif angel_power >= 75 then
  101.                     return "<white>[<red>" ..angel_power.. "% AP<white>]"
  102.                   end
  103.                 else
  104.                   return ""
  105.                 end
  106.               end,
  107.   ["xp"] = function()
  108.             stats.exp = tonumber(gmcp.Char.Vitals.nl)
  109.               if stats.exp < 49 then
  110.              return "<white>[<SaddleBrown>" ..stats.exp.. "%<white>]"
  111.               elseif stats.exp < 65 then
  112.              return "<white>[<gold>" .. stats.exp .. "%<white>]"
  113.               elseif stats.exp < 100 then
  114.              return "<white>[<dark_green>" .. stats.exp .. "%<white>]"
  115.               else return ""
  116.               end
  117.             end,--func
  118.   ["invdef"] = function()
  119.               local invdefstring = ""
  120.               if not def.blindness then
  121.                 invdefstring = invdefstring .. "<SeaGreen>B "
  122.               end
  123.               if not def.deafness then
  124.                 invdefstring = invdefstring .. "<SeaGreen>D "
  125.               end
  126.               if not def.cloak then
  127.                 invdefstring = invdefstring .. "<deep_sky_blue>C "
  128.               end
  129.               if not def.kola then
  130.                 invdefstring = invdefstring .. "<yellow>K "
  131.               end
  132.               if not def.density then
  133.                 invdefstring = invdefstring .. "<maroon>M "
  134.               end -- if
  135.               if def.heldbreath then
  136.                 invdefstring = invdefstring .. "<light_grey>br"
  137.               end --if
  138.               return invdefstring
  139.             end, --func
  140.   ["npchp"] = function()
  141.                if gmcp.IRE.Target then        
  142.                 if gmcp.IRE.Target.Info.id == "-1" then
  143.                   return("<white>[<red>" ..gmcp.IRE.Target.Set.. "<white>]")
  144.                 else
  145.                     return("<white>[<red>" ..gmcp.IRE.Target.Info.hpperc.. "<white>]")                
  146.                 end
  147.               end
  148.           end, --func
  149. }
  150.  
  151. --table of default prompt tag colors
  152. sys.prompttagcolors = {
  153.   ["stances"] = function()
  154.     local bmStance = gmcp.Char.Vitals.charstats[4]:sub(9)
  155.     if bmStance == "Thyr" then
  156.       return "sea_green"
  157.     elseif bmStance == "Mir" then
  158.       return "blue"
  159.     elseif bmStance == "Arash" then
  160.       return "boldred"
  161.     elseif bmStance == "Doya" then
  162.       return "orange"
  163.     elseif bmStance == "Sanya" then
  164.       return "purple"
  165.     end --if
  166.   end,
  167.  
  168.   ["hcolour"] = function()
  169.                   if stats.h >= (stats.maxh * 0.75) then
  170.                     return "sea_green"
  171.                   elseif stats.h >= (stats.maxh * 0.33) then
  172.                     return "yellow"
  173.                   else
  174.                     return "red"
  175.                   end --if
  176.                 end, --fn
  177.   ["mcolour"] = function()
  178.                   if stats.m >= (stats.maxm * .75) then
  179.                     return "sea_green"
  180.                   elseif stats.m >= (stats.maxm * .50) then
  181.                     return "yellow"
  182.                   else
  183.                     return "red"
  184.                   end -- if
  185.                 end, --fn
  186.   ["wcolour"] = function()
  187.                   if stats.w >= (stats.maxw * .66) then
  188.                     return "sea_green"
  189.                   elseif stats.w >= (stats.maxw * .50) then
  190.                     return "yellow"
  191.                   else
  192.                     return "red"
  193.                   end -- if
  194.                 end, --fn
  195.   ["ecolour"] = function()
  196.                   if stats.e >= (stats.maxe * .66) then
  197.                     return "sea_green"
  198.                   elseif stats.e >= (stats.maxe * .50) then
  199.                     return "yellow"
  200.                   else
  201.                     return "red"
  202.                   end -- if
  203.                 end, --fn
  204.   ["kaicolour"] = function()
  205.                     if stats.kai < 10 then
  206.                       --can't even choke
  207.                       return "red"
  208.                     elseif stats.kai < 21 then
  209.                       --can't heal
  210.                       return "firebrick"
  211.                     elseif stats.kai < 41 then
  212.                       --can't cripple
  213.                       return "dark_orange"
  214.                     elseif stats.kai < 61 then
  215.                       --can't enfeeble
  216.                       return "yellow"
  217.                     elseif stats.kai >= 61 then
  218.                       --can do anything
  219.                       return "dark_green"
  220.                     end
  221.                   end, --function,
  222.   ["shincolour"] = function()
  223.                     if stats.shin < 4 then
  224.                       --can't even infuse
  225.                       return "red"
  226.                     elseif stats.shin < 14 then
  227.                       --can't fist
  228.                       return "firebrick"
  229.                     elseif stats.shin < 29 then
  230.                       --can't blizzard
  231.                       return "dark_orange"
  232.                     elseif stats.shin < 39 then
  233.                       --can't annihilate
  234.                       return "yellow"
  235.                     else
  236.                       --can do anything
  237.                       return "dark_green"
  238.                     end
  239.                   end, --function
  240.  
  241. }
Add Comment
Please, Sign In to add comment