kauna_imperian.xml 99.9 KB
Newer Older
1 2 3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.001">
Maiyannah Bishop's avatar
Maiyannah Bishop committed
4 5 6 7 8 9 10 11 12
	<TriggerPackage />
	<TimerPackage />
	<AliasPackage />
	<ActionPackage />
	<ScriptPackage>
		<Script isActive="yes" isFolder="no">
			<name>Kauna.Imperian.Core</name>
			<packageName></packageName>
			<script>Kauna.Imperian = Kauna.Imperian or {}
13 14

-- Hotbar
15 16
Kauna.Imperian.Hotbar = Kauna.Imperian.Hotbar or {}
Kauna.Imperian.Stats = Kauna.Imperian.Stats or {}
17 18

-- Map box
19
Kauna.Imperian.Map = Kauna.Imperian.Map or {}
20

21
-- Information box
22 23
Kauna.Imperian.InfoPanel = Kauna.Imperian.InfoPanel or {}
Kauna.Imperian.Tooltips  = Kauna.Imperian.Tooltips or {}
24

25 26 27
-- Status Icons
Kauna.Imperian.StatusIcons = Kauna.Imperian.StatusIcons or {}

28
-- Professions
29 30 31 32 33 34
Kauna.Imperian.Mage        = Kauna.Imperian.Mage or {}
Kauna.Imperian.Templar     = Kauna.Imperian.Templar or {}
Kauna.Imperian.Wardancer   = Kauna.Imperian.Wardancer or {}
Kauna.Imperian.Shaman      = Kauna.Imperian.Shaman or {}
Kauna.Imperian.Druid       = Kauna.Imperian.Druid or {}
Kauna.Imperian.Deathknight = Kauna.Imperian.Deathknight or {}</script>
Maiyannah Bishop's avatar
Maiyannah Bishop committed
35 36 37 38 39 40
			<eventHandlerList />
		</Script>
		<Script isActive="yes" isFolder="no">
			<name>Kauna.Imperian.Map</name>
			<packageName></packageName>
			<script>-- =============================================================================
41 42 43 44 45 46
-- VALKRYJA V1.0   |          MULTI-MUD UI AND SYSTEM FOR MUDLET 3.21.0
-- ----------------+------------------------------------------------------------
-- This system is distributed under specific licensing terms specified in
-- &lt;readme.md&gt;   You should have received a copy of this file with the system
-- and if you did not, you can receive a copy from &lt;maiyannah@valkryja.com&gt;
--
47
-- VALKYRJA MUD SYSTEM is (c) 2006-2020 Maiyannah Bishop
48
--
49
-- Kauna.Imperian.Map
50 51
--    Imperian-specific map capture and display.
--
52
-- @package     Imperian
53 54 55
-- @category    UI
-- @subcategory Hotbar
-- @author      Maiyannah Bishop &lt;maiyannah@valkryja.com&gt;
56
-- @copyright   2006-2020 Maiyannah Bishop
57 58
-- @link        valkryja.com
-- =============================================================================
59
-- Function: Kauna.Imperian.Map.Update
60
-- Update the actual map itself's display
61
function Kauna.Imperian.Map.Update()
62
   echo("map_console", Kauna.Map.Contents)
63
    cur_line = nil
64 65
end

66
-- -----------------------------------------------------------------------------
67
-- Function: Kauna.Imperian.Map.UpdateInfoLabel
68 69
-- Display specific information about this room - area, environment, any special
-- features, and so forth.
70
function Kauna.Imperian.Map.UpdateInfoLabel()
71
   local format = [[&lt;span style='font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:8pt;color:#2c606d;'&gt;]]
72
   info =
73
      "&lt;b&gt;"..Valkryja.Wrap((Room.Area or "unknown").." ", 12, "&lt;br&gt;").."&lt;/b&gt;&lt;br&gt;"..
74
      "v"..(Room.vNum or "???").."&lt;br&gt;"..
75 76
      [[&lt;span style="color:#000000;"&gt;]]..
      (Room.Affinity or "neutral").."&lt;br&gt;"..
77 78
      Valkryja.Wrap((Room.Environment or "Unknown"), 12, "&lt;br&gt;").."&lt;br&gt;"..
      Valkryja.Wrap((Room.Plane or "Unknown"), 12, "&lt;br&gt;").."&lt;/span&gt;"
79
   if (Room.HolyClaim) then
80
      info = info..format..Valkryja.Wrap("&lt;br&gt;"..Room.HolyClaim.." influence", 12, "&lt;br&gt;").."&lt;/span&gt;"
81 82
   end
    if (Room.Owner) then
83
      info = info..format..[[&lt;span style="color:#2c606d;"&gt;]]..Valkryja.Wrap("&lt;br&gt;"..Room.Owner.."'s room", 12, "&lt;br&gt;").."&lt;/span&gt;"
84 85
   end
   if (Room.Explored&gt;0) then
86
      info = info..format..[[&lt;span style="color:#000000;"&gt;]].."&lt;br&gt;"..Room.Explored.."% explored&lt;/span&gt;"
87 88
   end
   if (Room.Private) then
89
      info = info..format..[[&lt;span style="color:#00ff00;"&gt;]].."&lt;br&gt;private".."&lt;/span&gt;"
90 91
   end
   if (Room.WillpowerBonus) then
92
      info = info..format..[[&lt;span style="color:#00ff00;"&gt;]].."&lt;br&gt;willpower".."&lt;/span&gt;"
93 94
   end
   if (Room.EnduranceBonus) then
95 96
      info = info..format..[[&lt;span style="color:#00ff00;"&gt;]].."&lt;br&gt;endurance".."&lt;/span&gt;"
   end
97
   if (Room.Stable) then
98 99
      info = info..format..[[&lt;span style="color:#808000;"&gt;]].."&lt;br&gt;stable".."&lt;/span&gt;"
   end
100
   if (Room.FightingPit) then
101
      info = info..format..[[&lt;span style="color:#00ff00;"&gt;]].."&lt;br&gt;safe dueling".."&lt;/span&gt;"
102 103
   end
   if (Room.Preservation) then
104
      info = info..format..[[&lt;span style="color:#808000;"&gt;]].."&lt;br&gt;preservation".."&lt;/span&gt;"
105 106
   end
   if (Room.Enchanting) then
107
      info = info..format..[[&lt;span style="color:#808000;"&gt;]].."&lt;br&gt;enchanting".."&lt;/span&gt;"
108 109
   end
   if (Room.BashingLevel) then
110
      info = info..format..[[&lt;span style="color:#cb0000;"&gt;]]..Valkryja.Wrap("&lt;br&gt;level "..Room.BashingLevel, 12, "&lt;br&gt;").."&lt;/span&gt;"
111 112
   end
   if (Room.InstanceTime&gt;0) then
113
      info = info..format..[[&lt;span style="color:#cb0000;"&gt;]]..Valkryja.Wrap("&lt;br&gt;time left: "..Room.InstanceTime.. "m&lt;br&gt;").."&lt;/span&gt;"
114 115
   end
   if (Room.Vermin) then
116
      info = info..format..[[&lt;span style="color:#00ff00;"&gt;]].."&lt;br&gt;vermin".."&lt;/span&gt;"
117 118 119
   end
   echo("map_info", format..info.."&lt;/span&gt;")
   info = nil
120 121 122
end

-- -----------------------------------------------------------------------------
123
-- Function: Kauna.Imperian.Map.UpdateRoomTitle()
124
-- Updates the map panel (sub?)title with the room's name
125
function Kauna.Imperian.Map.UpdateRoomTitle()
126
   local format = [[&lt;center&gt;&lt;span style='font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:12pt;color:#2c606d;'&gt;]]
127
    echo("map_title", format..Room.Name.."&lt;/span&gt;&lt;/center&gt;")
128 129 130 131
end

-- END OF SCRIPT
-- =============================================================================</script>
Maiyannah Bishop's avatar
Maiyannah Bishop committed
132 133
			<eventHandlerList />
		</Script>
134 135 136 137 138 139 140 141 142 143
		<Script isActive="yes" isFolder="no">
			<name>Kauna.Imperian.Infobox</name>
			<packageName></packageName>
			<script>-- =============================================================================
-- VALKRYJA V1.0   |          MULTI-MUD UI AND SYSTEM FOR MUDLET 3.21.0
-- ----------------+------------------------------------------------------------
-- This system is distributed under specific licensing terms specified in
-- &lt;readme.md&gt;   You should have received a copy of this file with the system
-- and if you did not, you can receive a copy from &lt;maiyannah@valkryja.com&gt;
--
144
-- VALKYRJA MUD SYSTEM is (c) 2006-2020 Maiyannah Bishop
145 146
--
-- @author      Maiyannah Bishop &lt;maiyannah@valkryja.com&gt;
147
-- @copyright   2006-2020 Maiyannah Bishop
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
-- @link        valkryja.com
-- =============================================================================
-- Function: Kauna.Imperian.InfoPanel.UpdateBG()
-- Update background of information box based on class
function Kauna.Imperian.InfoPanel.UpdateBG()
   local prof = string.lower(tostring(Character.Vitals.Profession))
   local bg_img = Valkryja.Paths["sbr_bg_blank"]
   if (prof=="amazon") then
      bg_img = Valkryja.Paths["sbr_bg_amazon"]
   elseif (prof=="assassin") then
      bg_img = Valkryja.Paths["sbr_bg_assassin"]
   elseif (prof=="bard") then
      bg_img = Valkryja.Paths["sbr_bg_bard"]
   elseif (prof=="berzerker") then
      bg_img = Valkryja.Paths["sbr_bg_berzerker"]
   elseif (prof=="shaman") then
      bg_img = Valkryja.Paths["sbr_bg_shaman"]
   elseif (prof=="templar") then
      bg_img = Valkryja.Paths["sbr_bg_templar"]
   end
   Valkryja.Debug("prof="..tostring(prof).." bg_img="..tostring(bg_img), false)
   UI.RightSidebar_InfoBG:setStyleSheet([[
      qproperty-alignment: 'AlignLeft | AlignTop';
      background-image: url("]] .. bg_img ..[[");
      background-repeat: no-repeat;
      background-position: top left;
      background-origin: margin;]])
end

-- END OF SCRIPT
-- ============================================================================</script>
			<eventHandlerList />
		</Script>
		<Script isActive="yes" isFolder="no">
			<name>Kauna.Imperian.Room</name>
			<packageName></packageName>
			<script>-- =============================================================================
-- VALKRYJA V1.0   |          MULTI-MUD UI AND SYSTEM FOR MUDLET 3.21.0
-- ----------------+------------------------------------------------------------
-- This system is distributed under specific licensing terms specified in
-- &lt;readme.md&gt;   You should have received a copy of this file with the system
-- and if you did not, you can receive a copy from &lt;maiyannah@valkryja.com&gt;
--
191
-- VALKYRJA MUD SYSTEM is (c) 2006-2020 Maiyannah Bishop
192 193
--
-- @author      Maiyannah Bishop &lt;maiyannah@valkryja.com&gt;
194
-- @copyright   2006-2020 Maiyannah Bishop
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
-- @link        valkryja.com
-- =============================================================================

function Kauna.Imperian.doMudSpecificRoomInfo()
    Generator = Room.Specials.Generator or false
    Shrine    = Room.Specials.Shrine or false
    Idol      = Room.Specials.Idol or false
    Jeken     = Room.Specials.Jeken or false
    Rakaraska = Room.Specials.Rakaraska or false
    Monoliths = Room.Specials.Monoliths or false
    Keys      = Room.Specials.Keys or false
   if (Generator==true) then
      message = message .. [[&lt;span style='color:green;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..
         "&lt;b&gt;Energy Generator&lt;/b&gt;&lt;/span&gt;&lt;br&gt;"
   end
   -- -------------------------------------------------------------------------
   -- Single-line items
   if ((Shrine~=false) and (Shrine~="none")) then
      message = message .. [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..
         "&lt;b&gt;"..tostring(Room.Specials.Shrine).." shrine&lt;/b&gt;&lt;/span&gt;&lt;br&gt;"
   end
   if ((Idol~=false) and (Idol~="none")) then
      message = message .. [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..
         "&lt;b&gt;"..tostring(Room.Specials.Idol).." idol&lt;/b&gt;&lt;/span&gt;&lt;br&gt;"
   end
   if (Jeken==true) then
      message = message .. [[&lt;span style='color:green;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..
         "&lt;b&gt;Jeken Shortfur&lt;/b&gt; (Skegdald horde turn-in)&lt;/span&gt;&lt;br&gt;"
   end
   if (Rakaraska==true) then
      message = message .. [[&lt;span style='color:green;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..
         "&lt;b&gt;Rakaraska, the Sage&lt;/b&gt; (akrabi language teacher)&lt;/span&gt;&lt;br&gt;"
   end
   
    -- -------------------------------------------------------------------------
   -- Concat'd items
   local concat = [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]
   if (Monoliths~=false) then
      if (Monoliths==1) then
         concat = concat .. "a key sigil, "
      else
         concat = concat .. tostring(Keys) .. " key sigils, "
      end
   end
   if (Keys~=false) then
      if (Keys==1) then
         concat = concat .. "a key sigil, "
      else
         concat = concat .. tostring(Keys) .. " key sigils, "
      end
   end
   message = message .. concat

   Generator = nil
   Shrine    = nil
   Idol      = nil
   Jeken     = nil
   Rakaraska = nil
   Monoliths = nil
   Keys      = nil

   return true
end</script>
			<eventHandlerList />
		</Script>
Maiyannah Bishop's avatar
Maiyannah Bishop committed
260 261 262 263
		<Script isActive="yes" isFolder="no">
			<name>Kauna.Imperian.Hotbar</name>
			<packageName></packageName>
			<script>-- =============================================================================
264 265 266 267 268 269
-- VALKRYJA V1.0   |          MULTI-MUD UI AND SYSTEM FOR MUDLET 3.21.0
-- ----------------+------------------------------------------------------------
-- This system is distributed under specific licensing terms specified in
-- &lt;readme.md&gt;   You should have received a copy of this file with the system
-- and if you did not, you can receive a copy from &lt;maiyannah@valkryja.com&gt;
--
270
-- VALKYRJA MUD SYSTEM is (c) 2006-2020 Maiyannah Bishop
271
--
272
-- Kauna.Imperian.Hotbar
273 274 275 276 277 278
--    Imperian-specific hotbar functions such as drawing class-specfic icons.
--
-- @package     Imperian
-- @category    UI
-- @subcategory Hotbar
-- @author      Maiyannah Bishop &lt;maiyannah@valkryja.com&gt;
279
-- @copyright   2006-2020 Maiyannah Bishop
280 281 282 283
-- @link        valkryja.com
-- =============================================================================
-- Hotbar Gauges - Gauge Updaters
-- -----------------------------------------------------------------------------
284
-- Function: Kauna.Imperian.Hotbar.UpdateGauge1()
285
-- Update the first hotbar gauge (XP)
286
function Kauna.Imperian.Hotbar.UpdateGauge1()
287 288 289 290 291 292 293 294
   floor = math.floor
   local tnl = tonumber(Character.Levels.Overall_percent) or 0

   -- Update gauge with values
   setGauge("hotbar_gauge1", tnl, 100)
   cecho("hotbar_gauge1_text",
      [[&lt;span style='font-family:"Friz Quadrata TT",Aver,serif;font-size:10pt;color:#fff;font-weight:bold;text-align:center;'&gt;]]..
      "Level "..tostring(Character.Levels.Overall).." - "..tostring(tnl).."% to next level&lt;/span&gt;")
295 296 297
    
    -- Dealloc
    tnl, floor = nil, nil
298 299 300
end

-- -----------------------------------------------------------------------------
301
-- Function: Kauna.Imperian.Hotbar.UpdateGauge2()
302
-- Update the second hotbar gauge (class resource)
303
function Kauna.Imperian.Hotbar.UpdateGauge2()
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
   floor = math.floor
   local willpower     = tonumber(Character.Vitals.Willpower) or 0
   local willpower_max = tonumber(Character.Vitals.Willpower_max) or 1
   local willpower_pct = tonumber(floor((willpower/willpower_max)*100)) or 0

   -- Clamp overflow
   willpower_str = nil
   if (willpower &gt; willpower_max) then
      local willpower_str = willpower
      willpower = willpower_max
   end
   local willpower_str = willpower_str or willpower

   -- Update gauge with values
   cecho("hotbar_gauge2_text", willpower, willpower_max)
319 320 321
    
    willpower, willpower_str, willpower_max = nil, nil, nil
    return true
322 323 324 325 326 327
end


-- =============================================================================
-- Hotbar Labels - Label Updaters
-- -----------------------------------------------------------------------------
328 329
-- Function: Kauna.Imperian.Hotbar.UpdateStatsLabel_Col1
function Kauna.Imperian.Hotbar.UpdateStatsLabel_Col1()
330 331 332 333 334 335 336 337 338
   local format = [[&lt;span style='color:#74bfcd;font-family:"Friz Quadrata TT",Aver,serif;font-weight:normal;font-size:10pt;'&gt;]]
   local line   = Character.Attributes.Strength.. "/" ..Character.Attributes.Strength_max..
      "&lt;br&gt;&lt;br&gt;" ..Character.Attributes.Constitution.. "/" ..Character.Attributes.Constitution_max
   echo("hb_stats_1", format..line.."&lt;/span&gt;")
   format, line = nil, nil
   return true
end

-- -----------------------------------------------------------------------------
339 340
-- Function: Kauna.Imperian.Hotbar.UpdateStatsLabel_Col2
function Kauna.Imperian.Hotbar.UpdateStatsLabel_Col2()
341
   local format = [[&lt;span style='color:#74bfcd;font-family:"Friz Quadrata TT",Aver,serif;font-weight:normal;font-size:10pt;'&gt;]]
342 343
   local line   = Character.Attributes.Dexterity.. "/" ..Character.Attributes.Dexterity_max..
      "&lt;br&gt;&lt;br&gt;" ..Character.Attributes.Intelligence.. "/" ..Character.Attributes.Intelligence_max
344
   echo("hb_stats_2", format..line.."&lt;/span&gt;")
345 346
   format, line = nil, nil
   return true
347 348 349
end

-- -----------------------------------------------------------------------------
350
-- Function: Kauna.Imperian.Hotbar.UpdateVitalsLabel
351
-- Update the vitals line
352
function Kauna.Imperian.Hotbar.UpdateVitalsLabel()
353
   local format = [[&lt;span style='color:#74bfcd;font-family:"Friz Quadrata TT",Aver,serif;font-weight:normal;font-size:10pt;'&gt;]]
354
   local line   = (Character.Vitals.Age or "??").."-year-old "..(Character.Vitals.Sex or "??").." "..(Character.Vitals.Race).." "..(Character.Vitals.Profession or "??")
355
   echo("hb_vitals", format..line.."&lt;/span&gt;")
356 357
   format, line = nil, nil
   return true
358 359 360
end

-- -----------------------------------------------------------------------------
361
-- Function: Kauna.Imperian.Hotbar.UpdateCreditsLabel
362
-- Update the sobriety level in the appropriate label
363
function Kauna.Imperian.Hotbar.UpdateSobrietyLabel()
364 365
   local format = [[&lt;span style='color:#ffffff;font-family:"Friz Quadrata TT",Aver,serif;font-weight:normal;font-size:10pt;'&gt;]]
   sob = Character.Extras.Sobriety or "unknown"
366 367
   if (Character.Extras.Sobriety=="completely sober") then
      sob = "sober"
368 369
   end
   echo("hb_sobriety", format..sob.."&lt;/span&gt;")
370 371
   format, sob = nil, nil
   return true
372 373 374
end

-- -----------------------------------------------------------------------------
375
-- Function: Kauna.Imperian.Hotbar.UpdateGoldLabel
376
-- Update the gold display in the appropriate label
377
function Kauna.Imperian.Hotbar.UpdateGoldLabel()
378 379
   local format = [[&lt;span style='color:#ffffff;font-family:"Friz Quadrata TT",Aver,serif;font-weight:normal;font-size:10pt;'&gt;]]
   echo("hb_gold", format..(Character.Currencies.Gold.Held or 0).."gp&lt;/span&gt;")
380 381
   format = nil
   return true
382 383 384
end

-- -----------------------------------------------------------------------------
385
-- Function: Kauna.Imperian.Hotbar.UpdateCreditsLabel
386
-- Update the credits display in the appropriate label
387
function Kauna.Imperian.Hotbar.UpdateCreditsLabel()
388
   local format = [[&lt;span style='color:#ffffff;font-family:"Friz Quadrata TT",Aver,serif;font-weight:normal;font-size:10pt;'&gt;]]
389 390 391
   local ubc    = Character.Currencies.Credits.Unbound or 0
   local bc     = Character.Currencies.Credits.Bound   or 0
   local tokens = Character.Currencies.Tokens          or 0
392 393
   echo("hb_credits", format..ubc.."cr/"..bc.."bcr/"..tokens.."t".."&lt;/span&gt;")
   format, ubc, bc, tokens = nil, nil, nil, nil
394
   return true
395 396 397
end

-- -----------------------------------------------------------------------------
398
-- Function: Kauna.Imperian.Hotbar.UpdateBeliefLabel
399
-- Update the belief level in the appropriate label
400
function Kauna.Imperian.Hotbar.UpdateBeliefLabel()
401 402 403 404 405 406 407 408
   local format = [[&lt;span style='color:#ffffff;font-family:"Friz Quadrata TT",Aver,serif;font-weight:normal;font-size:10pt;'&gt;]]
   local belief = Character.Extras.Belief or "unknown"
   echo("hb_fatigue", format..belief.."&lt;/span&gt;")
   format, belief = nil, nil
   return true
end

-- -----------------------------------------------------------------------------
409
-- Function: Kauna.Imperian.Hotbar.UpdateTargetLabel
410
-- Update the displayed target in the target label
411
function Kauna.Imperian.Hotbar.UpdateTargetLabel()
412 413 414 415 416 417 418 419 420
   local format = [[&lt;span style='color:#ffffff;font-family:"Friz Quadrata TT",Aver,serif;font-weight:normal;font-size:10pt;'&gt;]]
   local tar    = tostring(Valkryja.CurrTarget)
   if (tar=="false") then tar = "none" end
   echo("hb_target", format..tar.."&lt;/span&gt;")
   format, tar = nil, nil
   return true
end

-- ----------------------------------------------------------------------------
421
-- Function: Kauna.Imperian.UpdateHungerLabel
422
-- Update the hunger level in the hunger label
423
function Kauna.Imperian.Hotbar.UpdateHungerLabel()
424
   local format = [[&lt;span style='color:#ffffff;font-family:"Friz Quadrata TT",Aver,serif;font-weight:normal;font-size:10pt;'&gt;]]
425
   local hunger = Character.Extras.Hunger or "unknown"
426
   echo("hb_hunger", format..hunger.."&lt;/span&gt;")
427 428
   format, hunger = nil, nil
   return true
429 430 431 432 433 434
end


-- =============================================================================
-- Hotbar Labels - Label Draws
-- -----------------------------------------------------------------------------
435
function Kauna.Imperian.Hotbar.DrawLabels()
436 437 438 439 440 441 442 443
   if not pcall(Kauna.Imperian.Hotbar.DrawTargetLabel)   then Valkryja.Exception("Unable to display target label in hotbar.") end
   if not pcall(Kauna.Imperian.Hotbar.DrawHungerLabel)   then Valkryja.Exception("Unable to display hunger label in hotbar.") end
   if not pcall(Kauna.Imperian.Hotbar.DrawFatigueLabel)  then Valkryja.Exception("Unable to display fatigue label in hotbar.") end
   if not pcall(Kauna.Imperian.Hotbar.DrawSobrietyLabel) then Valkryja.Exception("Unable to display sobriety label in hotbar.") end
   if not pcall(Kauna.Imperian.Hotbar.DrawVitalsLabel)   then Valkryja.Exception("Unable to display target label in hotbar.") end
   if not pcall(Kauna.Imperian.Hotbar.DrawGoldLabel)     then Valkryja.Exception("Unable to display gold label in hotbar.") end
   if not pcall(Kauna.Imperian.Hotbar.DrawCreditsLabel)  then Valkryja.Exception("Unable to display credits label in hotbar.") end
   if not pcall(Kauna.Imperian.Hotbar.DrawStatsLabel)    then Valkryja.Exception("Unable to display attributes label by hotbar.") end
444 445 446
end

-- -----------------------------------------------------------------------------
447 448 449
-- Function: Kauna.Imperian..Hotbar.DrawStatsLabel
function Kauna.Imperian.Hotbar.DrawStatsLabel()
   Kauna.Imperian.Hotbar.StatsLabel_1 = Geyser.Label:new({
450 451 452 453
      name = "hb_stats_1",
      x="59", y="825",
      width="40", height="100",})
   setBackgroundColor("hb_stats_1", 0,0,0,0)
454
   Kauna.Imperian.Hotbar.StatsLabel_2 = Geyser.Label:new({
455 456 457 458
      name = "hb_stats_2",
      x="143", y="825",
      width="40", height="100",})
   setBackgroundColor("hb_stats_2", 0,0,0,0)
459 460
   catch = Kauna.Imperian.Hotbar.UpdateStatsLabel_Col1()
   catch = Kauna.Imperian.Hotbar.UpdateStatsLabel_Col2()
461 462 463 464 465
   catch = nil
   return true
end

-- -----------------------------------------------------------------------------
466
-- Function: Kauna.Imperian.Hotbar.DrawVitalsLabel
467
-- Origin: 218, 841  Dimensions: 397x18
468 469
function Kauna.Imperian.Hotbar.DrawVitalsLabel()
   Kauna.Imperian.Hotbar.VitalsLabel = Geyser.Label:new({
470 471 472 473 474
      name = "hb_vitals",
      x="218", y="807",
      width="397", height="18",})
   setBackgroundColor("hb_vitals", 0,0,0,0)
   raiseWindow("hb_vitals")
475
   catch = Kauna.Imperian.Hotbar.UpdateVitalsLabel()
476 477 478 479 480
   catch = nil
   return true
end

-- -----------------------------------------------------------------------------
481
-- Function: Kauna.Imperian.Hotbar.DrawSobrietyLabel
482
-- Origin: 241,854  Dimensions: 82x28
483 484
function Kauna.Imperian.Hotbar.DrawSobrietyLabel()
   Kauna.Imperian.Hotbar.TargetLabel = Geyser.Label:new({
485 486 487 488
      name = "hb_sobriety",
      x="241", y="824",
      width="82", height="28",})
   setBackgroundColor("hb_sobriety", 0,0,0,0)
489
   catch = Kauna.Imperian.Hotbar.UpdateSobrietyLabel()
490 491
   catch = nil
   return true
492 493 494
end

-- ----------------------------------------------------------------------------
495
-- Function: Kauna.Imperian.Hotbar.DrawHungerLabel
496 497
-- Draws the label used to display hunger status
-- Origin: 498, 854  Dimensions: 115x28
498 499
function Kauna.Imperian.Hotbar.DrawHungerLabel()
   Kauna.Imperian.Hotbar.TargetLabel = Geyser.Label:new({
500 501 502 503
      name = "hb_hunger",
      x="498", y="824",
      width="115", height="28",})
   setBackgroundColor("hb_hunger", 0,0,0,0)
504
   catch = Kauna.Imperian.Hotbar.UpdateHungerLabel()
Maiyannah Bishop's avatar
Maiyannah Bishop committed
505 506
   catch = nil
   return true
507 508 509
end

-- -----------------------------------------------------------------------------
510
-- Function: Kauna.Imperian.Hotbar.DrawFatigueLabel
511
-- Origin: 351,854  Dimensions: 110x28
512 513
function Kauna.Imperian.Hotbar.DrawFatigueLabel()
   Kauna.Imperian.Hotbar.TargetLabel = Geyser.Label:new({
514 515 516 517
      name = "hb_fatigue",
      x="353", y="824",
      width="115", height="28",})
   setBackgroundColor("hb_fatigue", 0,0,0,0)
518
   catch = Kauna.Imperian.Hotbar.UpdateFatigueLabel()
519 520 521 522 523
   catch = nil
   return true
end

-- -----------------------------------------------------------------------------
524
-- Function: Imperian.UI.Hotbar.DrawGoldLabel
525
-- Origin: 241,891  Dimensions: 82x28
526 527
function Kauna.Imperian.Hotbar.DrawGoldLabel()
   Kauna.Imperian.Hotbar.GoldLabel = Geyser.Label:new({
528 529 530 531
      name = "hb_gold",
      x="241", y="857",
      width="82", height="28",})
   setBackgroundColor("hb_gold", 0,0,0,0)
532
   catch = Kauna.Imperian.Hotbar.UpdateGoldLabel()
533 534
   catch = nil
   return true
535 536 537
end

-- -----------------------------------------------------------------------------
538
-- Function: Kauna.Imperian.Hotbar.DrawCreditsLabel
539
-- Origin: 351,891  Dimensions: 110x28
540 541
function Kauna.Imperian.Hotbar.DrawCreditsLabel()
   Kauna.Imperian.Hotbar.CreditsLabel = Geyser.Label:new({
542 543 544 545
      name = "hb_credits",
      x="353", y="857",
      width="115", height="28",})
   setBackgroundColor("hb_credits", 0,0,0,0)
546
   catch = Kauna.Imperian.Hotbar.UpdateCreditsLabel()
547 548
   catch = nil
   return true
549 550 551
end

-- -----------------------------------------------------------------------------
552
-- Function: Imperian.Kauna.Hotbar.DrawTargetLabel
553 554
-- Draws the label used to reflect target information
-- Origin: 498,891  Dimensions: 115x28
555 556
function Kauna.Imperian.Hotbar.DrawTargetLabel()
   Kauna.Imperian.Hotbar.TargetLabel = Geyser.Label:new({
557 558 559 560
      name = "hb_target",
      x="498", y="857",
      width="115", height="28",})
   setBackgroundColor("hb_target", 0,0,0,0)
561
   catch = Kauna.Imperian.Hotbar.UpdateTargetLabel()
562 563 564 565 566 567 568 569 570 571 572
   catch = nil
   return true
end


-- ============================================================================
-- HOTBAR ITSELF - DRAW
-- ----------------------------------------------------------------------------
-- Function UI.DrawHotbarButtons
-- Draw the various hotbar buttons
--
573 574 575 576 577
-- UNIVERSAL:
-- o f2:  sip health
-- o f3:  sip mana
-- o f4:  eat toadstool
-- o f5:  class strike
578 579
-- o f12: auto-bashing toggle
--
580 581 582 583 584 585 586 587 588
-- TEMPLAR:
-- o f5:  class strike
-- o f6:  tendoncut
-- o f7:  lacerate
-- o f8:  resurrect
-- o f9:  engage
-- o f10: lay rites
-- o f11: perform hands
--
589 590 591 592
-- BERSERKER:
-- o f4:  rage
--
-- Origin: 402, 796
593
function Kauna.Imperian.Hotbar.DrawButtons()
594 595
   local prof = Character.Vitals.Profession or ""
   local prof = string.lower(prof) or ""
596
   Valkryja.Debug("In hotbar draw, prof detected as: "..prof, false)
597
   
598
   -- -------------------------------------------------------------------------
599
   -- F2
600
    
601 602 603
   -- Draw
   Kauna.drawButton("hb_f2", (Kauna.Hotbar.F2Origin_x or 617), (Kauna.Hotbar.F2Origin_y or 829), 
      (Kauna.Hotbar.F2Width or 62), (Kauna.Hotbar.F2Height or 62))
604
   
605 606
   -- Assign icon and actions
   f2action   = Config.UI.Hotbar.F2Action or false
607
   f2icon     = Config.UI.Hotbar.F2Icon   or nil
608 609 610
   f2tooltip  = Config.UI.Hotbar.F2Tooltip or nil
   f2override = Config.UI.Hotbar.F2HardOverride or nil
   if (f2override==true) then
611
      -- use user-supplied values
612
      Kauna.setF2Button(f2action, f2icon, f2tooltip)
613
   else
614
      Kauna.setF2Button("Kauna.Imperian.Hotbar.F2", "btn-imp-siphealth.png", "Kauna.Imperian.Tooltips.DisplayF2Tooltip")
615 616 617 618 619
   end
   f2action, f2icon, f2tooltip, f2override = nil, nil, nil, nil

   -- -------------------------------------------------------------------------
   -- F3
620
    
621
   -- Draw
622
   Kauna.drawButton("hb_f3", (Kauna.Hotbar.F3Origin_x or 683), (Kauna.Hotbar.F3Origin_y or 829), 
623 624
       (Kauna.Hotbar.F3Width or 62), (Kauna.Hotbar.F3Height or 62))
    
625
   -- Assign icon and actions
626 627
   f3action   = Config.UI.Hotbar.F3Action or false
   f3icon     = Config.UI.Hotbar.F3Icon   or nil
628 629
   f3tooltip  = Config.UI.Hotbar.F3Tooltip or nil
   f3override = Config.UI.Hotbar.F3HardOverride or nil
630 631
   if (f3override==true) then
      -- use user-supplied values
632
      Kauna.setF3Button(f3action, f3icon, f3tooltip)
633
   else
Maiyannah Bishop's avatar
Maiyannah Bishop committed
634
      Kauna.setF3Button("Kauna.Imperian.Hotbar.F3", "btn-imp-sipmana.png", "Kauna.Imperian.Tooltips.DisplayF3Tooltip")
635 636 637 638 639
   end
   f3action, f3icon, f3tooltip, f3override = nil, nil, nil, nil

   -- -------------------------------------------------------------------------
   -- F4
640
    
641 642 643
   -- Draw
   Kauna.drawButton("hb_f4", (Kauna.Hotbar.F4Origin_x or 749), (Kauna.Hotbar.F4Origin_y or 829), 
      (Kauna.Hotbar.F4Width or 62), (Kauna.Hotbar.F4Height or 62))
644
         
645 646 647
   -- Assign icon and actions
   f4action   = Config.UI.Hotbar.F4Action or false
   f4icon     = Config.UI.Hotbar.F4Icon   or nil
648 649 650
   f4tooltip  = Config.UI.Hotbar.F4Tooltip or nil
   f4override = Config.UI.Hotbar.F4HardOverride or nil
   if (f4override==true) then
651
      -- use user-supplied values
652
      Kauna.setF4Button(f4action, f4icon, f4tooltip)
653 654
   else
      Kauna.setF4Button("Kauna.Imperian.Hotbar.F4", "btn-imp-eattoadstool.png", "Kauna.Imperian.Tooltips.DisplayF4Tooltip")
655 656 657 658 659
   end
   f4action, f4icon, f4tooltip, f4override = nil, nil, nil, nil

   -- -------------------------------------------------------------------------
   -- F5 - bashing strike
660 661
    
    -- Draw
662
   Kauna.drawButton("hb_f5", (Kauna.Hotbar.F5Origin_x or 815), (Kauna.Hotbar.F5Origin_y or 829), 
663
       (Kauna.Hotbar.F5Width or 62), (Kauna.Hotbar.F5Height or 62))
664 665 666 667

    -- Assign icon and actions
   f5action   = Config.UI.HotbarF5Action or false
   f5icon     = Config.UI.HotbarF5Icon   or nil
668 669 670
   f5tooltip  = Config.UI.HotbarF5Tooltip or nil
   f5override = Config.UI.HotbarF5HardOverride or nil
   if (f5override==true) then
671
      -- use user-supplied values
672
      Kauna.setF5Button(f5action, f5icon, f5tooltip)
673
   elseif (prof=="templar") then
674
      Kauna.setF5Button("Berkana.Imperian.ClassStrike", "btn-f5-bashing-templar.png", "Kauna.Tooltips.DisplayBashingStrikeTooltip")
675
   elseif (prof=="berserker") then
676
      Kauna.setF5Button("Berkana.Imperian.ClassStrike", "btn-f5-bashing-wardancer.png", "Kauna.Tooltips.DisplayBashingStrikeTooltip")
677
   elseif (prof=="mage") then
678
      Kauna.setF5Button("Berkana.Imperian.ClassStrike", "btn-f5-bashing-mage.png", "Kauna.Tooltips.DisplayBashingStrikeTooltip")
679
   else
680
      Kauna.setF5Button("Berkana.Imperian.ClassStrike", "btn-f5-bashing.png", "Kauna.Tooltips.DisplayBashingStrikeTooltip")
681 682 683 684 685 686
   end
   f5action, f5icon, f5tooltip, f5override = nil, nil, nil, nil

   -- -------------------------------------------------------------------------
   -- F6

687 688 689 690 691
   -- Draw
   Kauna.drawButton("hb_f6", (Kauna.Hotbar.F6Origin_x or 881), (Kauna.Hotbar.F6Origin_y or 829), 
      (Kauna.Hotbar.F6Width or 62), (Kauna.Hotbar.F6Height or 62))

   -- Assign actions and icon
692 693 694 695 696 697
   f6action   = Config.UI.HotbarF6Action or false
   f6icon     = Config.UI.HotbarF6Icon   or nil
   f6tooltip  = Config.UI.HotbarF6Tooltip or nil
   f6override = Config.UI.HotbarF6HardOverride or nil
   if (f6override==true) then
      -- use user-supplied values
698
      Kauna.setF6Button(f6action, f6icon, f6tooltip)
699
   elseif (prof=="templar" or prof=="deathknight") then
700
      Kauna.setF6Button("Kauna.Imperian.Hotbar.F6", "btn-imp-tendoncut.png", "Kauna.Imperian.Tooltips.DisplayF6Tooltip")
701
   elseif (prof=="berserker") then
702
      Kauna.setF6Button("UI.Hotbar.doImpale", "btn-f6-imp-impale.png", "Kauna.Imperian.Tooltips.DisplayImpaleTooltip")
703
   else
704
      Kauna.setF6Button(f6action, f6icon, f6tooltip)
705 706 707 708 709
   end
   f6action, f6icon, f6tooltip, f6override = nil, nil, nil, nil

   -- ------------------------------------------------------------------------
   -- F7
710 711
    
    -- Draw
712
   Kauna.drawButton("hb_f7", (Kauna.Hotbar.F7Origin_x or 947), (Kauna.Hotbar.F7Origin_y or 829), 
713
      (Kauna.Hotbar.F7Width or 62), (Kauna.Hotbar.F7Height or 62))
714
       
715 716 717
   -- Assign actions and icon
   f7action   = Config.UI.Hotbar.F7Action or false
   f7icon     = Config.UI.Hotbar.F7Icon   or nil
718 719 720
   f7tooltip  = Config.UI.Hotbar.F7Tooltip or nil
   f7override = Config.UI.Hotbar.F7HardOverride or nil
   if (f7override==true) then
721
      -- use user-supplied values
722
      Kauna.setF7Button(f7action, f7icon, f7tooltip)
723
   elseif (prof=="templar" or prof=="deathknight") then
724
      Kauna.setF7Button("Kauna.Imperian.Hotbar.F7", "btn-imp-lacerate", "Kauna.Imperian.Tooltips.DisplayF7Tooltip")
725
   elseif (prof=="berserker") then
726
      Kauna.setF7Button("UI.Hotbar.doDisembowel", "btn-f7-imp-disembowel", "Kauna.Imperian.Tooltips.DisplayDisembowelTooltip")
727
   else
728
      Kauna.setF7Button(f7action, f7icon, f7tooltip)
729 730 731 732 733
   end
   f7action, f7icon, f7tooltip, f7override = nil, nil, nil, nil

   -- ------------------------------------------------------------------------
   -- F8
734 735 736 737
    
    -- Draw
    Kauna.drawButton("hb_f8", (Kauna.Hotbar.F8Origin_x or 1013), (Kauna.Hotbar.F8Origin_y or 829), 
       (Kauna.Hotbar.F8Width or 62), (Kauna.Hotbar.F8Height or 62))
738 739 740 741

   -- Assign actions and icon
   f8action   = Config.UI.Hotbar.F8Action or false
   f8icon     = Config.UI.Hotbar.F8Icon   or nil
742 743 744
   f8tooltip  = Config.UI.Hotbar.F8Tooltip or nil
   f8override = Config.UI.Hotbar.F8HardOverride or nil
   if (f8override==true) then
745
      -- use user-supplied values
746
      Kauna.setF8Button(f8action, f8icon, f8tooltip)
747 748
   elseif (prof=="templar") then
      -- resurrect
Maiyannah Bishop's avatar
Maiyannah Bishop committed
749
      Kauna.setF8Button("Kauna.Imperian.Hotbar.F8", "btn-imp-resurrect.png", "Kauna.Imperian.Tooltips.DisplayF8Tooltip")
750
   elseif (prof=="berserker") then
751
      Kauna.setF8Button("UI.Hotbar.doTransfix", "btn-imp-transfix.png", "Kauna.Imperian.Tooltips.DisplayTransfixTooltip")
752
   else
753
      Kauna.setF8Button(f8action, f8icon, f8tooltip)
754
   end
755
   f8action, f8icon, f8tooltip, f8override = nil, nil, nil, nil    
756 757 758

   -- -------------------------------------------------------------------------
   -- F9
759
    
760 761 762
   -- Draw
   Kauna.drawButton("hb_f9", (Kauna.Hotbar.F9Origin_x or 1079), (Kauna.Hotbar.F9Origin_y or 829), 
      (Kauna.Hotbar.F9Width or 62), (Kauna.Hotbar.F9Height or 62))
763 764 765 766

   -- Assign actions and icon
   f9action   = Config.UI.HotbarF9Action or false
   f9icon     = Config.UI.HotbarF9Icon   or nil
767 768 769
   f9tooltip  = Config.UI.HotbarF9Tooltip or nil
   f9override = Config.UI.HotbarF9HardOverride or nil
   if (f9override==true) then
770
      -- use user-supplied values
771
      Kauna.setF9Button(f9action, f9icon, f9tooltip)
772
   elseif (prof=="templar" or prof=="deathknight") then
773
      Kauna.setF9Button("Kauna.Imperian.Hotbar.F9", "btn-imp-engage", "Kauna.Imperian.Tooltips.DisplayF9Tooltip")
774
   else
775
      Kauna.setF9Button(f9action, f9icon, f9tooltip)
776 777 778 779 780
   end
   f9action, f9icon, f9tooltip, f9override = nil, nil, nil, nil

    -- -------------------------------------------------------------------------
    -- F10
781 782 783 784
      
    -- Draw
    Kauna.drawButton("hb_f10", (Kauna.Hotbar.F10Origin_x or 1145), (Kauna.Hotbar.F10Origin_y or 829), 
       (Kauna.Hotbar.F10Width or 62), (Kauna.Hotbar.F10Height or 62))      
785 786 787 788

   -- Assign actions and icon
   f10action   = Config.UI.Hotbar.F10Action or false
   f10icon     = Config.UI.Hotbar.F10Icon   or nil
789 790 791
   f10tooltip  = Config.UI.Hotbar.F10Tooltip or nil
   f10override = Config.UI.Hotbar.F10HardOverride or nil
   if (f10override==true) then
792
      -- use user-supplied values
793
      Kauna.setF10Button(f10action, f10icon, f10tooltip)
794
   elseif (prof=="templar" or prof=="deathknight") then
795
      Kauna.setF10Button("Kauna.Imperian.Hotbar.F10", "btn-imp-impale", "Kauna.Imperian.Tooltips.DisplayF10Tooltip")
796
   else
797
      Kauna.setF10Button(f10action, f10icon, f10tooltip)
798 799
   end
   f10action, f10icon, f10tooltip, f10override = nil, nil, nil, nil
800
    
801 802
   -- -------------------------------------------------------------------------
   -- F11
803
    
804 805 806 807
   -- Draw
   Kauna.drawButton("hb_f11", (Kauna.Hotbar.F11Origin_x or 1211), (Kauna.Hotbar.F11Origin_y or 829), 
      (Kauna.Hotbar.F11Width or 62), (Kauna.Hotbar.F11Height or 62))
 
808 809
   f11action   = Config.UI.Hotbar.F11Action or false
   f11icon     = Config.UI.Hotbar.F11Icon   or nil
810 811 812
   f11tooltip  = Config.UI.Hotbar.F11Tooltip or nil
   f11override = Config.UI.Hotbar.F11HardOverride or nil
   if (f11override==true) then
813
      -- use user-supplied values
814
      Kauna.setF11Button(f11action, f11icon, f11tooltip)
815 816
   elseif (prof=="templar") then
      Kauna.setF11Button("Kauna.Imperian.Hotbar.F11", "btn-imp-rites", "Kauna.Imperian.Tooltips.DisplayF11Tooltip")
817
   else
818
      Kauna.setF11Button(f11action, f11icon, f11tooltip)
819 820 821 822 823
   end
   f11action, f11icon, f11tooltip, f11override = nil, nil, nil, nil

   -- -------------------------------------------------------------------------
   -- F12 - Autobashing Toggle
824
   Kauna.HB_autobash = Geyser.Label:new({
825 826 827 828
      name = "hb_autobash",
      x="1275", y="821",
      width="67", height="86",})
   if (auto_bashing==true) then
829
      Kauna.HB_autobash:setStyleSheet([[
830 831 832 833 834 835
         qproperty-alignment: 'AlignLeft | AlignTop';
         background-image: url("]]..Valkryja.SystemPath..[[img/hb/btn-autobashing-on.png");
         background-repeat: no-repeat;
         background-position: top left;
         background-origin: margin;]])
   else
836
      Kauna.HB_autobash:setStyleSheet([[
837 838 839 840 841 842
         qproperty-alignment: 'AlignLeft | AlignTop';
         background-image: url("]]..Valkryja.SystemPath..[[img/hb/btn-autobashing-off.png");
         background-repeat: no-repeat;
         background-position: top left;
         background-origin: margin;]])
   end
843
   setLabelClickCallback("hb_autobash", "Kauna.toggleAutobash")
844 845
   setLabelOnEnter("hb_autobash", "Kauna.Tooltips.DisplayAutobashingTooltip")
   setLabelOnLeave("hb_autobash", "Kauna.InfoPanel.RevertToDefaultTooltip")
846 847 848 849
end

-- END OF SCRIPT
-- ============================================================================</script>
Maiyannah Bishop's avatar
Maiyannah Bishop committed
850 851 852 853 854 855
			<eventHandlerList />
		</Script>
		<Script isActive="yes" isFolder="no">
			<name>Kauna.Imperian.Hotbar.Tooltips</name>
			<packageName></packageName>
			<script>-- =============================================================================
856 857 858 859 860 861
-- VALKRYJA V1.0   |          MULTI-MUD UI AND SYSTEM FOR MUDLET 3.21.0
-- ----------------+------------------------------------------------------------
-- This system is distributed under specific licensing terms specified in
-- &lt;readme.md&gt;   You should have received a copy of this file with the system
-- and if you did not, you can receive a copy from &lt;maiyannah@valkryja.com&gt;
--
862
-- VALKYRJA MUD SYSTEM is (c) 2006-2020 Maiyannah Bishop
863
--
864
-- Kauna.Imperian.Hotbar.Tooltips
865 866 867 868 869 870
--    Functions to display hotbar button tooltips
--
-- @package     Imperian
-- @category    UI
-- @subcategory Hotbar
-- @author      Maiyannah Bishop &lt;maiyannah@valkryja.com&gt;
871
-- @copyright   2006-2020 Maiyannah Bishop
872 873
-- @link        valkryja.com

874 875 876 877 878 879 880 881 882 883 884 885 886 887
-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Tooltips.DisplayF2Tooltip
-- Display the appropriate tooltip for the F2 hotbar slot depending on class.
function Kauna.Imperian.Tooltips.DisplayF2Tooltip()
   Kauna.DisplayingTooltip=true
   local message_title = "Sip health"
   local message_body  = "&lt;hr&gt;".."Normally Valkryja will automate sipping health to recover, but if it has hung up, or you have disabled that, you can use this button to do so normally."..
      "&lt;hr&gt;"..[[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].."Takes:&lt;/span&gt; Elixir Balance"
   message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;"..
      [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
   echo("infopanel", message)
   message = nil
end

888 889 890 891 892 893 894 895 896 897 898 899 900 901
-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Tooltips.DisplayF3Tooltip
-- Display the appropriate tooltip for the F3 hotbar slot depending on class.
function Kauna.Imperian.Tooltips.DisplayF3Tooltip()
   Kauna.DisplayingTooltip=true
   local message_title = "Sip mana"
   local message_body  = "&lt;hr&gt;".."Normally Valkryja will automate sipping mana to recover, but if it has hung up, or you have disabled that, you can use this button to do so normally."..
      "&lt;hr&gt;"..[[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].."Takes:&lt;/span&gt; Elixir Balance"
   message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;"..
      [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
   echo("infopanel", message)
   message = nil
end

902 903 904 905 906 907 908
-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Tooltips.DisplayF4Tooltip
-- Display the appropriate tooltip for the F4 hotbar slot depending on class.
function Kauna.Imperian.Tooltips.DisplayF4Tooltip()
   Kauna.DisplayingTooltip=true
   local message_title = "Eat toadstool"
   local message_body  = "&lt;hr&gt;".."Normally Valkryja will automate eating toadstool to recover, but if it has hung up, or you have disabled that, you can use this button to do so normally."..
909
      "&lt;hr&gt;"..[[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].."Takes:&lt;/span&gt; Toadstool Balance"
910 911 912 913 914 915
   message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;"..
      [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
   echo("infopanel", message)
   message = nil
end

916
-- ----------------------------------------------------------------------------
917
-- Function: Kauna.Imperian.Tooltips.DisplayF6Tooltip
918
-- Display the appropriate tooltip for the F6 hotbar slot depending on class.
919 920
function Kauna.Imperian.Tooltips.DisplayF6Tooltip()
   Kauna.DisplayingTooltip=true
921
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
922
   message =[[&lt;span style='color:red;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]]..
923
       "If you're seeing this, the tooltip mouseover code for "..prof.." class F6 failed :(&lt;/span&gt;"
924
   if (prof=="templar") then
925
      Valkryja.Debug("Templar class F6 Tooltip displayed", false)
926 927 928 929
      local message_title = "Tendoncut"
      local message_body  = "&lt;hr&gt;".."Tendoncut uses a scimitar to apply various effects to broken limbs.  Valkryja will attempt to attack a limb based on which is most damage and the target's current affliction status."..
         "&lt;hr&gt;"..[[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].."Takes:&lt;/span&gt; Balance, Scimitar"
      message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;"..
930
         [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
931 932 933
   end
   echo("infopanel", message)
   message = nil
934 935 936
end

-- ----------------------------------------------------------------------------
937
-- Function: Kauna.Imperian.DisplayF7Tooltip
938
-- Display the appropriate tooltip for the F7 hotbar slot depending on class.
939 940
function Kauna.Imperian.Tooltips.DisplayF7Tooltip()
   Kauna.DisplayingTooltip=true
941
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
942
   message =[[&lt;span style='color:red;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]]..
943
       "If you're seeing this, the tooltip mouseover code for "..prof.." class F7 failed :(&lt;/span&gt;"
944
   if (prof=="templar") then
945
      Valkryja.Debug("Templar class F7 Tooltip displayed", false)
946 947 948 949
      local message_title = "Lacerate"
      local message_body  = "&lt;hr&gt;"..
         "This longsword attack inflicts damage scaled to how heavily the target is bleeding."..
         "&lt;hr&gt;"..[[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].."Takes:&lt;/span&gt; Balance, Longsword"
950
      message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;"..
951
         [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
952 953 954
   end
   echo("infopanel", message)
   message = nil
955 956 957 958
end


-- ----------------------------------------------------------------------------
959
-- Function: Kauna.Imperian.Tooltips.DisplayF8Tooltip
960
-- Display the appropriate tooltip for the F8 hotbar slot depending on class.
961 962
function Kauna.Imperian.Tooltips.DisplayF8Tooltip()
   Kauna.DisplayingTooltip=true
963
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
964
   message =[[&lt;span style='color:red;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]]..
965
       "If you're seeing this, the tooltip mouseover code for "..prof.." class F7 failed :(&lt;/span&gt;"
966
   if (prof=="templar") then
967
      Valkryja.Debug("Templar class F8 Tooltip displayed", false)
968 969 970 971
      local message_title = "Resurrection"
      local message_body  = "&lt;hr&gt;".."One of the holiest of abilities, this will grant life anew to the target player."..
         "&lt;hr&gt;"..[[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].."Takes:&lt;/span&gt; Equilibrium, 600 Devotion"
      message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;"..
972
         [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989
   end
   echo("infopanel", message)
   message = nil
end

-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Tooltips.DisplayF9Tooltip
-- Display the appropriate tooltip for the F9 hotbar slot depending on class.
function Kauna.Imperian.Tooltips.DisplayF9Tooltip()
   Kauna.DisplayingTooltip=true
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
   message =[[&lt;span style='color:red;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]]..
       "If you're seeing this, the tooltip mouseover code for "..prof.." class F9 failed :(&lt;/span&gt;"
   if (prof=="templar") then
      Valkryja.Debug("Templar class F9 Tooltip displayed", false)
      local message_title = "Engage"
      local message_body  = "&lt;hr&gt;".."There is nothing more despicable and dishonorable than a coward, and this ability will allow you to punish cowards, as is their due. Once you have engaged a player, if he or she tries to leave the room, you will get in one extra strike at them, regardless of whether you have equilibrium and balance or not."..
990
         "&lt;hr&gt;"..[[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].."Takes:&lt;/span&gt; Balance"
991 992
      message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;"..
         [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
993 994 995
   end
   echo("infopanel", message)
   message = nil
996 997
end

998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017
-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Tooltips.DisplayF10Tooltip
-- Display the appropriate tooltip for the F10 hotbar slot depending on class.
function Kauna.Imperian.Tooltips.DisplayF10Tooltip()
   Kauna.DisplayingTooltip=true
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
   message =[[&lt;span style='color:red;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]]..
       "If you're seeing this, the tooltip mouseover code for "..prof.." class F10 failed :(&lt;/span&gt;"
   if (prof=="templar") then
      Valkryja.Debug("Templar class F10 Tooltip displayed", false)
      local message_title = "Impale"
      local message_body  = "&lt;hr&gt;".." This wicked ability may be used when your hapless victim has fallen to the ground and lies there, helpless. With it, you will drive your weapon into his body, causing regular damage as long as he is on the weapon. Further, while impaled, he will find himself unable to move, though you too will be unable to move. WITHDRAW BLADE will remove your weapon from your opponent."..
         "&lt;hr&gt;"..[[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].."Takes:&lt;/span&gt; Balance, sword (longsword, broadsword, shortsword, scimitar, claymore, or saber)"
      message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;"..
         [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
   end
   echo("infopanel", message)
   message = nil
end

1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037
-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Tooltips.DisplayF11Tooltip
-- Display the appropriate tooltip for the F11 hotbar slot depending on class.
function Kauna.Imperian.Tooltips.DisplayF11Tooltip()
   Kauna.DisplayingTooltip=true
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
   message =[[&lt;span style='color:red;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]]..
       "If you're seeing this, the tooltip mouseover code for "..prof.." class F10 failed :(&lt;/span&gt;"
   if (prof=="templar") then
      Valkryja.Debug("Templar class F11 Tooltip displayed", false)
      local message_title = "Rites"
      local message_body  = "&lt;hr&gt;".."Either attempt to lay rites at this location according to configuration options, or CONVERGE existing rites."..
         "&lt;hr&gt;"..[[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].."Takes:&lt;/span&gt; Equilibrium, devotion (variable amount)"
      message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;"..
         [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
   end
   echo("infopanel", message)
   message = nil
end

1038 1039
function Kauna.Imperian.Tooltips.DisplayBerserkerRageTooltip()
   Kauna.DisplayingTooltip=true
1040 1041 1042 1043 1044 1045 1046 1047
   local message_title = "Berserker Rage"
   local message_body  = "This ability will allow you to cure certain pacifying afflictions, notably those that are normally cured by eating galingale.&lt;br&gt;&lt;br&gt;"..
      "&lt;font color='red'&gt;NOTE:&lt;/font&gt; this will consume an amount of balance, how much depends on your statpack."
   local message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;&lt;br&gt;"..
      [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
   echo("infopanel", message)
end

1048 1049
function Kauna.Imperian.Tooltips.DisplayImpaleTooltip()
   Kauna.DisplayingTooltip=true
1050 1051 1052 1053 1054 1055 1056 1057 1058
   local message_title = "Impale"
   local message_body  = "Should your opponent be knocked to the ground, you will be able to skewer them through the body, pinning them to the ground.&lt;br&gt;"..
       "This attack can be followed by a warchant.&lt;br&gt;&lt;br&gt;"..
      "&lt;font color='red'&gt;NOTE:&lt;/font&gt; this will consume an amount of balance, how much depends on your statpack."
   local message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;&lt;br&gt;"..
      [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
   echo("infopanel", message)
end

1059 1060
function Kauna.Imperian.Tooltips.DisplayDisembowelTooltip()
   Kauna.DisplayingTooltip=true
1061 1062 1063 1064 1065 1066 1067 1068
   local message_title = "Disembowel"
   local message_body  = "This powerful attack will cause massive damage to the impaled foe as you tear your blade from them.&lt;br&gt;&lt;br&gt;"..
      "&lt;font color='red'&gt;NOTE:&lt;/font&gt; this will consume an amount of balance, how much depends on your statpack."
   local message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;&lt;br&gt;"..
      [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
   echo("infopanel", message)
end

1069 1070
function Kauna.Imperian.Tooltips.DisplayTransfixTooltip()
   Kauna.DisplayingTooltip=true
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080
   local message_title = "Transfix"
   local message_body  = "If your swords have streamers attached, you can weave a pattern of dance and color, allowing you to hypnotize your foe.&lt;br&gt;&lt;br&gt;"..
      "&lt;font color='red'&gt;NOTE:&lt;/font&gt; this will consume an amount of balance, how much depends on your statpack."
   local message = [[&lt;span style='color:#2c606d;font-family:]]..Config.FontFamily..[[;font-weight:bold;font-size:10pt;'&gt;]].. message_title .."&lt;/span&gt;&lt;br&gt;"..
      [[&lt;span style='color:#000000;font-family:]]..Config.FontFamily..[[;font-weight:normal;font-size:10pt;'&gt;]]..message_body.."&lt;/span&gt;"
   echo("infopanel", message)
end

-- END OF SCRIPT
-- ----------------------------------------------------------------------------</script>
Maiyannah Bishop's avatar
Maiyannah Bishop committed
1081 1082 1083 1084 1085 1086
			<eventHandlerList />
		</Script>
		<Script isActive="yes" isFolder="no">
			<name>Kauna.Imperian.Hotbar.Actions</name>
			<packageName></packageName>
			<script>-- =============================================================================
1087 1088 1089 1090 1091 1092
-- VALKRYJA V1.0   |          MULTI-MUD UI AND SYSTEM FOR MUDLET 3.21.0
-- ----------------+------------------------------------------------------------
-- This system is distributed under specific licensing terms specified in
-- &lt;readme.md&gt;   You should have received a copy of this file with the system
-- and if you did not, you can receive a copy from &lt;maiyannah@valkryja.com&gt;
--
1093
-- VALKYRJA MUD SYSTEM is (c) 2006-2020 Maiyannah Bishop
1094
--
1095
-- Kauna.Imperian.Hotbar.Actions
1096 1097 1098 1099 1100 1101
--    Functions to handle actions taken when a button on the HB is clicked
--
-- @package     Imperian
-- @category    UI
-- @subcategory Hotbar
-- @author      Maiyannah Bishop &lt;maiyannah@valkryja.com&gt;
1102
-- @copyright   2006-2020 Maiyannah Bishop
1103 1104
-- @link        valkryja.com
-- =============================================================================
1105
-- Function: Kauna.Imperian.Hotbar.TemplarResurrect
1106
-- Perform AURA RESURRECT on the next term
1107
function Kauna.Imperian.Hotbar.TemplarResurrect()
1108 1109 1110
   send("queue eqbal aura resurrection")
end

1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129
-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Hotbar.F2
-- Function to perform the appropriate action for the F2 hotbar slot, depending
-- on class.
function Kauna.Imperian.Hotbar.F2()
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
   send("sip health")
end


-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Hotbar.F3
-- Function to perform the appropriate action for the F3 hotbar slot, depending
-- on class.
function Kauna.Imperian.Hotbar.F3()
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
   send("sip mana")
end

1130 1131 1132 1133 1134 1135 1136 1137 1138
-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Hotbar.F3
-- Function to perform the appropriate action for the F3 hotbar slot, depending
-- on class.
function Kauna.Imperian.Hotbar.F4()
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
   send("eat toadstool")
end

1139
-- ----------------------------------------------------------------------------
1140
-- Function: Kauna.Imperian.Hotbar.F6
1141 1142
-- Function to perform the appropriate action for the F6 hotbar slot, depending
-- on class.
1143
function Kauna.Imperian.Hotbar.F6()
1144
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
1145
   if (prof=="templar") then
1146
      -- Berkana.Imperian.doTendoncut() -- TODO: Implement me #232
1147
   end
1148 1149 1150
end

-- ----------------------------------------------------------------------------
1151
-- Function: Kauna.Imperian.Hotbar.F7
1152
-- Function to perform the appropriate action for the F7 hotbar slot, depending
1153
-- on class.
1154
function Kauna.Imperian.Hotbar.F7()
1155
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
1156
   if (prof=="templar") then
1157
      send("queue eqbal combo lacerate lacerate "..Valkryja.CurrTarget)
1158
   end
1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177
end

-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Hotbar.F8
-- Function to perform the appropriate action for the F8 hotbar slot, depending
-- on class.
function Kauna.Imperian.Hotbar.F8()
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
end

-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Hotbar.F9
-- Function to perform the appropriate action for the F9 hotbar slot, depending
-- on class.
function Kauna.Imperian.Hotbar.F9()
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
   if (prof=="templar") then
      send("queue eqbal engage ".. Valkryja.CurrTarget)
   end
1178 1179
end

1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190
-- ----------------------------------------------------------------------------
-- Function: Kauna.Imperian.Hotbar.F10
-- Function to perform the appropriate action for the F10 hotbar slot, depending
-- on class.
function Kauna.Imperian.Hotbar.F10()
   local prof = Character.Vitals.Class and string.lower(Character.Vitals.Class) or ""
   if (prof=="templar") then
      send("queue eqbal impale ".. Valkryja.CurrTarget)
   end
end

1191 1192
-- END OF SCRIPT
-- ----------------------------------------------------------------------------</script>
Maiyannah Bishop's avatar
Maiyannah Bishop committed
1193 1194 1195 1196 1197 1198
			<eventHandlerList />
		</Script>
		<Script isActive="yes" isFolder="no">
			<name>Kauna.Imperian.UpdateTarget</name>
			<packageName></packageName>
			<script>function Kauna.Imperian.UpdateTarget()
1199
   if (Valkryja.isImperian()==false) then return false end
1200
    Kauna.Imperian.Hotbar.UpdateTargetLabel()
1201
end</script>
Maiyannah Bishop's avatar
Maiyannah Bishop committed
1202 1203 1204 1205 1206 1207 1208 1209
			<eventHandlerList>
				<string>berkanaTargetChange</string>
			</eventHandlerList>
		</Script>
		<ScriptGroup isActive="yes" isFolder="yes">
			<name>GMCP</name>
			<packageName></packageName>
			<script>-------------------------------------------------
1210 1211 1212 1213 1214
--         Put your Lua functions here.        --
--                                             --
-- Note that you can also use external scripts --
-------------------------------------------------
</script>
Maiyannah Bishop's avatar
Maiyannah Bishop committed
1215 1216 1217 1218 1219
			<eventHandlerList />
			<Script isActive="yes" isFolder="no">
				<name>Kauna.Imperian.CharacterVitals</name>
				<packageName></packageName>
				<script>-- =============================================================================
1220 1221 1222 1223 1224 1225
-- VALKRYJA V1.0   |          MULTI-MUD UI AND SYSTEM FOR MUDLET 3.21.0
-- ----------------+------------------------------------------------------------
-- This system is distributed under specific licensing terms specified in
-- &lt;readme.md&gt;   You should have received a copy of this file with the system
-- and if you did not, you can receive a copy from &lt;maiyannah@valkryja.com&gt;
--
1226
-- VALKYRJA MUD SYSTEM is (c) 2006-2020 Maiyannah Bishop
1227 1228 1229 1230 1231 1232 1233 1234 1235 1236
--
-- CharacterVitals
--    Harvest gmcp.Char.Vitals and put its information in our Character
--    superclass where appropriate.  Also includes the scaffolding for holding
--    and updating this information.
--
-- @package     Scripts
-- @category    Imperian
-- @subcategory Character
-- @author      Maiyannah Bishop &lt;maiyannah@valkryja.com&gt;
1237
-- @copyright   2006-2020 Maiyannah Bishop
1238 1239 1240
-- @link        valkryja.com
-- =============================================================================

1241
function Kauna.Imperian.CharacterVitals()
1242
   -- Update UI
1243 1244
    
    -- The vitals labels
1245 1246 1247 1248 1249
   if not pcall(Kauna.Imperian.Hotbar.UpdateVitalsLabel) then Valkryja.Exception("Failed to vitals label on GMCP.vitals receipt") end

   -- Gauges for HP, MP, XP
   if not pcall(Kauna.Nameplate.UpdateGauge1)       then Valkryja.Exception("Failed to update health gauge on GMCP.vitals receipt") end
   if not pcall(Kauna.Nameplate.UpdateGauge2)       then Valkryja.Exception("Failed to update mana gauge on GMCP.vitals receipt") end
1250 1251 1252 1253 1254 1255 1256 1257 1258
   if not pcall(Kauna.Imperian.Hotbar.UpdateGauge1) then Valkryja.Exception("Failed to update experience gauge on GMCP.vitals receipt") end   
    
    -- Balance icons
    if not pcall(Kauna.BalanceIcons.UpdateBalance)     then Valkryja.Exception("Failed to update balance icon on GMCP.vitals receipt") end
    if not pcall(Kauna.BalanceIcons.UpdateEquilibrium) then Valkryja.Exception("Failed to update equilibrium icon on GMCP.vitals receipt") end
    if not pcall(Kauna.BalanceIcons.UpdateElixir)      then Valkryja.Exception("Failed to update elixir balance icon on GMCP.vitals receipt") end
    if not pcall(Kauna.BalanceIcons.UpdatePipe)        then Valkryja.Exception("Failed to update pipe balance icon on GMCP.vitals receipt") end
    if not pcall(Kauna.BalanceIcons.UpdateSalve)       then Valkryja.Exception("Failed to update salve balance icon on GMCP.vitals receipt") end
    if not pcall(Kauna.BalanceIcons.UpdateToadstool)   then Valkryja.Exception("Failed to update toadstool balance icon on GMCP.vitals receipt") end
1259 1260 1261 1262
end

-- END OF SCRIPT
-- =============================================================================</script>
Maiyannah Bishop's avatar
Maiyannah Bishop committed
1263 1264 1265 1266 1267 1268 1269 1270
				<eventHandlerList>
					<string>gmcp.Char.Vitals</string>
				</eventHandlerList>
			</Script>
			<Script isActive="yes" isFolder="no">
				<name>Kauna.Imperian.CharacterStatus</name>
				<packageName></packageName>
				<script>-- =============================================================================
1271 1272 1273 1274 1275 1276
-- VALKRYJA V1.0   |          MULTI-MUD UI AND SYSTEM FOR MUDLET 3.21.0
-- ----------------+------------------------------------------------------------
-- This system is distributed under specific licensing terms specified in
-- &lt;readme.md&gt;   You should have received a copy of this file with the system
-- and if you did not, you can receive a copy from &lt;maiyannah@valkryja.com&gt;
--
1277
-- VALKYRJA MUD SYSTEM is (c) 2006-2020 Maiyannah Bishop
1278 1279 1280 1281 1282 1283 1284 1285 1286 1287
--
-- CharacterStayus
--    Harvest gmcp.Char.Status and put its information in our Character
--    superclass where appropriate.  Also includes the scaffolding for holding
--    and updating this information.
--
-- @package     Scripts
-- @category    Imperian
-- @subcategory Character
-- @author      Maiyannah Bishop &lt;maiyannah@valkryja.com&gt;
1288
-- @copyright   2006-2020 Maiyannah Bishop
1289 1290 1291
-- @link        valkryja.com
-- =============================================================================

1292
function Kauna.Imperian.CharacterStatus()
1293
   -- Update the UI
1294 1295 1296
   if not pcall(Kauna.Imperian.Hotbar.UpdateGoldLabel) then Valkryja.Exception("Failed to update gold label on GMCP receipt") end
   if not pcall(Kauna.Nameplate.UpdateName)   then Valkryja.Exception("Failed to update Player Nameplate Title on GMCP receipt") end
   if not pcall(Kauna.Nameplate.UpdateLevel)  then Valkryja.Exception("Failed to update Player Nameplate level display on GMCP receipt") end
1297 1298 1299
end

-- END OF SCRIPT
1300
-- ============================================================================</script>
Maiyannah Bishop's avatar
Maiyannah Bishop committed
1301 1302 1303 1304 1305 1306 1307 1308 1309
				<eventHandlerList>
					<string>gmcp.Char.Status</string>
				</eventHandlerList>
			</Script>
		</ScriptGroup>
		<ScriptGroup isActive="yes" isFolder="yes">
			<name>Character</name>
			<packageName></packageName>
			<script>-------------------------------------------------