Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Plugins ➜ Aardwolf health bar plugin - improved

Aardwolf health bar plugin - improved

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Nick Gammon   Australia  (23,132 posts)  Bio   Forum Administrator
Date Wed 08 Jul 2009 03:40 AM (UTC)

Amended on Wed 08 Jul 2009 10:23 PM (UTC) by Nick Gammon

Message
As I was playing around trying to test Blainer's inventory plugin, I thought it was time to upgrade the health-bar plugin.

The improved version below shows your health, mana and movement in a miniwindow. The miniwindow can be dragged around the screen to wherever you want it. If you are fighting it shows the enemy's health as well (hopefully your health is higher than the enemy's), and the name of the enemy you are fighting. If the name is too long to fit it is truncated at the nearest space, and three dots inserted to show the name is not all there.

This plugin also uses the "stats detector" plugin, so you also need this file:

http://www.gammon.com.au/mushclient/plugins/Aardwolf/Stats_Detector.xml

The "Stats detector" plugin uses telnet negotation, so you also need this file:

http://www.gammon.com.au/mushclient/plugins/Aardwolf/telnet_options.lua

In a standard MUSHclient installation these three files should to into this directory:

C:\Program Files\MUSHclient\worlds\plugins\Aardwolf\

To install, copy between the lines below, paste into a text editor document, and save as Aardwolf_Health_Bar_Miniwindow.xml. Then install that into MUSHclient using the File menu -> Plugins (along with the Stats_Detector.xml plugin).


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient>

<muclient>
<plugin
   name="Aardwolf_Health_Bar_Miniwindow"
   author="Nick Gammon"
   id="43825da8d728bce6a86c37d9"
   language="Lua"
   purpose="Shows stats in a mini window"
   date_written="2009-07-08"
   date_modified="2009-07-09"
   requires="4.40"
   version="1.5"
   save_state="y"
   >
<description trim="y">
<![CDATA[
Install this plugin to show an info bar with HP, Mana, 
and Movement points shown as a bar.

The window can be dragged to a new location with the mouse.
]]>
</description>

</plugin>


<!--  Script  -->


<script>
<![CDATA[

require "checkplugin"

GAUGE_LEFT = 60
GAUGE_HEIGHT = 15

WINDOW_WIDTH = 400
WINDOW_HEIGHT = 85
NUMBER_OF_TICKS = 5

BACKGROUND_COLOUR_NORMAL = ColourNameToRGB "slategray"
BACKGROUND_COLOUR_FIGHTING = ColourNameToRGB "rosybrown"
FONT_COLOUR = ColourNameToRGB "darkred"
BORDER_COLOUR = ColourNameToRGB "#553333"

function mousedown(flags, hotspot_id)

  -- find where mouse is so we can adjust window relative to mouse
  startx, starty = WindowInfo (win, 14), WindowInfo (win, 15)
  
  -- find where window is in case we drag it offscreen
  origx, origy = WindowInfo (win, 10), WindowInfo (win, 11)
end -- mousedown

function dragmove(flags, hotspot_id)

  -- find where it is now
  local posx, posy = WindowInfo (win, 17),
                     WindowInfo (win, 18)

  -- move the window to the new location - offset by how far mouse was into window
  WindowPosition(win, posx - startx, posy - starty, 0, 2);
  
  -- change the mouse cursor shape appropriately
  if posx < 0 or posx > GetInfo (281) or
     posy < 0 or posy > GetInfo (280) then
    check (SetCursor ( 11))   -- X cursor
  else
    check (SetCursor ( 1))   -- hand cursor
  end -- if
  
end -- dragmove

function dragrelease(flags, hotspot_id)

  Repaint ()  -- update window location
  
  -- find where window is now
  local newx, newy = WindowInfo (win, 10), WindowInfo (win, 11)
  
  -- don't let them drag it out of view
  if newx < 0 or newx > GetInfo (281) or
     newy < 0 or newy > GetInfo (280) then
     -- put it back
    WindowPosition(win, origx, origy, 0, 2)
    return
  end -- if out of bounds
  
  window_left = newx  -- remember for saving state
  window_top = newy
  window_mode = 0
  window_flags = 2   -- absolute position
  
end -- dragrelease

function DoGauge (sPrompt, Percent, Colour)

  local Fraction = tonumber (Percent)
  
  if Fraction > 1 then Fraction = 1 end
  if Fraction == 0 then return end
   
  local width = WindowTextWidth (win, font_id, sPrompt)
  
  WindowText (win, font_id, sPrompt,
                             GAUGE_LEFT - width, vertical, 0, 0, FONT_COLOUR)

  WindowRectOp (win, 2, GAUGE_LEFT, vertical, WINDOW_WIDTH - 5, vertical + GAUGE_HEIGHT, WindowInfo (win,9) )  -- fill entire box
 
  
  local gauge_width = (WINDOW_WIDTH - GAUGE_LEFT - 5) * Fraction
  
   -- box size must be > 0 or WindowGradient fills the whole thing 
  if math.floor (gauge_width) > 0 then
    
    -- top half
    WindowGradient (win, GAUGE_LEFT, vertical, GAUGE_LEFT + gauge_width, vertical + GAUGE_HEIGHT / 2, 
                    0x000000,
                    Colour, 2) 
    
    -- bottom half
    WindowGradient (win, GAUGE_LEFT, vertical + GAUGE_HEIGHT / 2, GAUGE_LEFT + gauge_width, vertical +                           GAUGE_HEIGHT,   
                    Colour,
                    0x000000,
                    2) 

  end -- non-zero
  
  -- show ticks
  local ticks_at = (WINDOW_WIDTH - GAUGE_LEFT - 5) / (NUMBER_OF_TICKS + 1)
  
  -- ticks
  for i = 1, NUMBER_OF_TICKS do
    WindowLine (win, GAUGE_LEFT + (i * ticks_at), vertical, 
                GAUGE_LEFT + (i * ticks_at), vertical + GAUGE_HEIGHT, ColourNameToRGB ("silver"), 0, 1)
  end -- for

  -- draw a box around it
  check (WindowRectOp (win, 1, GAUGE_LEFT, vertical, WINDOW_WIDTH - 5, vertical + GAUGE_HEIGHT, 
          ColourNameToRGB ("lightgrey")))  -- frame entire box
  
  vertical = vertical + font_height + 3
end -- function

function draw_bar ()

 -- find where it is now
  local posx, posy, mode, flags = WindowInfo (win, 10),
                     WindowInfo (win, 11),
                     WindowInfo (win, 7),
                     WindowInfo (win, 8)

  local height = WINDOW_HEIGHT                    
  local background = BACKGROUND_COLOUR_NORMAL
  
  local line1 = string.format ("Level %i. %s", stats.level, stats.doing)
  
  if  stats.enemy_percent ~= "9999" then
    height = height + 20
    background = BACKGROUND_COLOUR_FIGHTING
    line1 = stats.doing
  end -- if

  WindowCreate (win, 
                 posx, posy, WINDOW_WIDTH, height,  
                 mode,   
                 flags,   
                 background)
  
  -- make a hotspot
  WindowAddHotspot(win, "hs1",  
                   0, 0, 0, 0,   -- whole window
                   "",   -- MouseOver
                   "",   -- CancelMouseOver
                   "mousedown",
                   "",   -- CancelMouseDown
                   "",   -- MouseUp
                   "Drag to move",  -- tooltip text
                   10, 0)  -- movement cursor
                   
  WindowDragHandler(win, "hs1", "dragmove", "dragrelease", 0) 
                 
  -- Edge around box rectangle
  check (WindowCircleOp (win, 3, 0, 0, 0, 0, BORDER_COLOUR, 0, 2, 0, 1))

  vertical = 6  -- pixel to start at
 
  local width = WindowTextWidth (win, font_id, line1)
  local add_dots = false

  -- truncate if too long
  while width > (WINDOW_WIDTH - GAUGE_LEFT - 5) do
    -- get rid of last word
    local s = string.match (" " .. line1 .. "...", "(%s%S*)$")
    if not s or #s == 0 then break end
    line1 = line1:sub (1, - (#s - 2))  -- except the last 3 dots but add the space
    width = WindowTextWidth (win, font_id, line1 .. " ...")
    add_dots = true
  end -- while
  
  if add_dots then
    line1 = line1 .. " ..."
  end -- if
  
  WindowText (win, font_id, line1,
                             GAUGE_LEFT, vertical, 0, 0, FONT_COLOUR)
  
  vertical = vertical + font_height + 3
                             
  DoGauge ("HP: ",   stats.hp_percent / 100, ColourNameToRGB "darkgreen")

  if stats.enemy_percent ~= "9999" then
    -- enemy name:  stats.enemy
    DoGauge ("Enemy: ", stats.enemy_percent / 100, ColourNameToRGB "darkred")
  end -- if fighting 

  DoGauge ("Mana: ", stats.mana_percent / 100, ColourNameToRGB "mediumblue")
  DoGauge ("Move: ", stats.moves_percent / 100, ColourNameToRGB "gold")
 
  WindowShow (win, true)
  
end -- draw_bar

function OnPluginBroadcast (msg, id, name, text)
  if msg == 1 and id == "8a710e0783b431c06d61a54c" then
  
   -- get all variables
   stats = GetPluginVariableList("8a710e0783b431c06d61a54c")
     
   draw_bar ()
   
  end -- stats changed
end

function OnPluginInstall ()
  
  win = GetPluginID ()
  font_id = "fn"
  
  font_name = "Fixedsys"    -- the actual font
    
  window_left, window_top, window_mode, window_flags = 
      tonumber (GetVariable ("windowx")) or 0,
      tonumber (GetVariable ("windowy")) or 0,
      tonumber (GetVariable ("windowmode")) or 7, -- middle right
      tonumber (GetVariable ("windowflags")) or 0
       
  -- make miniwindow so I can grab the font info
  check (WindowCreate (win, 
                     window_left, window_top, WINDOW_WIDTH, WINDOW_HEIGHT,  
                     window_mode,   -- top right
                     window_flags, 
                     0x000000) )

  -- give main world window time to stabilize its size and position                
  DoAfterSpecial (5, "check_map_position ()", sendto.script)
                                      
  check (WindowFont (win, font_id, font_name, 9, false, false, false, false, 0, 0))  -- normal
  
  font_height = WindowFontInfo (win, font_id, 1)  -- height
  
  if GetVariable ("enabled") == "false" then
    ColourNote ("yellow", "", "Warning: Plugin " .. GetPluginName ().. " is currently disabled.")
    check (EnablePlugin(GetPluginID (), false))
    return
  end -- they didn't enable us last time
  
  OnPluginEnable ()  -- do initialization stuff
  
end -- OnPluginInstall

function OnPluginEnable ()
end -- OnPluginEnable

function OnPluginDisable ()
  WindowShow (win, false)
end -- OnPluginDisable

function OnPluginSaveState ()
  SetVariable ("enabled", tostring (GetPluginInfo (GetPluginID (), 17)))
  SetVariable ("windowx", tostring (window_left))
  SetVariable ("windowy", tostring (window_top))
  SetVariable ("windowmode", tostring (window_mode))
  SetVariable ("windowflags", tostring (window_flags))
end -- OnPluginSaveState

function check_map_position ()
 -- check miniwindow visible
  if window_left < 0 or window_left > GetInfo (281) or
     window_top < 0 or window_top > GetInfo (280) then
     window_left, window_top = 0, 0  -- reset to top left
     window_mode = 7
     window_flags = 0
  end -- if not visible

  WindowPosition (win, window_left, window_top, window_mode, window_flags)
  
end -- check_map_position

]]>
</script>

</muclient>



[EDIT] Updated on 9th July 2009 to fix problems with whether it remembered its window position correctly. The updated version is 1.5.

If your version does not appear on the screen, even after moving around, you probably have the older one.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,132 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 08 Jul 2009 03:41 AM (UTC)

Amended on Wed 08 Jul 2009 03:42 AM (UTC) by Nick Gammon

Message

The health bar looks like this if you are fighting:

The health bar looks like this if you are NOT fighting:

The different coloured background is intended to be a visual cue that you are in combat.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Swalec   (24 posts)  Bio
Date Reply #2 on Sat 28 Nov 2009 09:48 AM (UTC)
Message
I just started using this and it's superb. Particularly on wine, where the old status bar version flicked during use.

Many thanks!

Swalec
Top

Posted by Crowe   (21 posts)  Bio
Date Reply #3 on Sun 14 Feb 2010 12:55 PM (UTC)
Message
On forum Improved Health Bar, I am trying to piece together how to convert over to Aardwolf's Health Bar.

http://69.5.26.215/forum/bbshowpost.php?id=9270&page=4

I have very little experience in coding. I am trying my best. I do want to thank Nick Gammon for having these open forums to help build a rather awesome database of scripts. I will be slowly work on this script. Thank you again Nick.
Top

Posted by Nick Gammon   Australia  (23,132 posts)  Bio   Forum Administrator
Date Reply #4 on Sun 14 Feb 2010 09:09 PM (UTC)
Message
I think this will work - I tested it OK:

Template:saveplugin=Aardwolf_Health_Bar_Miniwindow To save and install the Aardwolf_Health_Bar_Miniwindow plugin do this:
  1. Copy between the lines below (to the Clipboard)
  2. Open a text editor (such as Notepad) and paste the plugin into it
  3. Save to disk on your PC, preferably in your plugins directory, as Aardwolf_Health_Bar_Miniwindow.xml
  4. Go to the MUSHclient File menu -> Plugins
  5. Click "Add"
  6. Choose the file Aardwolf_Health_Bar_Miniwindow.xml (which you just saved in step 3) as a plugin
  7. Click "Close"



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient>

<muclient>
<plugin
   name="Aardwolf_Health_Bar_Miniwindow"
   author="Nick Gammon"
   id="43825da8d728bce6a86c37d9"
   language="Lua"
   purpose="Shows stats in a mini window"
   date_written="2009-07-08"
   date_modified="2010-02-15"
   requires="4.40"
   version="2"
   save_state="y"
   >
<description trim="y">
<![CDATA[
Install this plugin to show an info bar with HP, Mana, 
and Movement points shown as a bar.

The window can be dragged to a new location with the mouse.
]]>
</description>

</plugin>


<!--  Script  -->


<script>
<![CDATA[

require "checkplugin"

GAUGE_HEIGHT = 15

WINDOW_WIDTH = 400
WINDOW_HEIGHT = 85
NUMBER_OF_TICKS = 5

BACKGROUND_COLOUR_NORMAL = ColourNameToRGB "slategray"
BACKGROUND_COLOUR_FIGHTING = ColourNameToRGB "rosybrown"
FONT_COLOUR = ColourNameToRGB "darkred"
BORDER_COLOUR = ColourNameToRGB "#553333"


function DoGauge (sPrompt, current, max, Colour, percent)
  local Fraction
  
  if percent then
    Fraction = current 
  else
    if max <= 0 then 
      return 
    end -- no divide by zero

    Fraction = current / max
  end -- if 
  
  -- fraction in range 0 to 1
  Fraction = math.min (math.max (Fraction, 0), 1) 
  
  local width = WindowTextWidth (win, font_id, sPrompt)
  
  WindowText (win, font_id, sPrompt, gauge_left - width, vertical, 0, 0, FONT_COLOUR)

  WindowRectOp (win, 2, gauge_left, vertical, WINDOW_WIDTH - 5, vertical + GAUGE_HEIGHT, 
                          WindowInfo (win,9))  -- fill entire box
  
  local gauge_width = (WINDOW_WIDTH - gauge_left - 5) * Fraction
  
   -- box size must be > 0 or WindowGradient fills the whole thing 
  if math.floor (gauge_width) > 0 then
    
    -- top half
    WindowGradient (win, gauge_left, vertical, gauge_left + gauge_width, vertical + GAUGE_HEIGHT / 2, 
                    0x000000,
                    Colour, 2) 
    
    -- bottom half
    WindowGradient (win, gauge_left, vertical + GAUGE_HEIGHT / 2, 
                    gauge_left + gauge_width, vertical +  GAUGE_HEIGHT,   
                    Colour,
                    0x000000,
                    2) 

  end -- non-zero
  
  -- show ticks
  local ticks_at = (WINDOW_WIDTH - gauge_left - 5) / (NUMBER_OF_TICKS + 1)
  
  -- ticks
  for i = 1, NUMBER_OF_TICKS do
    WindowLine (win, gauge_left + (i * ticks_at), vertical, 
                gauge_left + (i * ticks_at), vertical + GAUGE_HEIGHT, ColourNameToRGB ("silver"), 0, 1)
  end -- for

  -- draw a box around it
  WindowRectOp (win, 1, gauge_left, vertical, WINDOW_WIDTH - 5, vertical + GAUGE_HEIGHT, 
          ColourNameToRGB ("lightgrey"))  -- frame entire box
  
  -- mouse-over information: add hotspot if not there
  if not WindowHotspotInfo(win, sPrompt, 1) then
    WindowAddHotspot (win, sPrompt, gauge_left, vertical, WINDOW_WIDTH - 5, vertical + font_height, 
                  "", "", "", "", "", "", 0, 0)
  end -- if
  
  -- store numeric values in case they mouse over it
  if percent then
    WindowHotspotTooltip(win, sPrompt, string.format ("%s\t(%i%%)", 
                          sPrompt, Fraction * 100) )  
  else
    WindowHotspotTooltip(win, sPrompt, string.format ("%s\t%i / %i (%i%%)", 
                          sPrompt, current, max, Fraction * 100) )
  end -- if
                              
  vertical = vertical + font_height + 3
end -- function DoGauge


function draw_bar ()

  -- find where it is now
  local posx, posy, mode, flags = WindowInfo (win, 10),
                     WindowInfo (win, 11),
                     WindowInfo (win, 7),
                     WindowInfo (win, 8)

  local height = WINDOW_HEIGHT                    
  local background = BACKGROUND_COLOUR_NORMAL

  
  local line1 = string.format ("Level %i. %s", stats.level, stats.doing)
  
  if  stats.enemy_percent ~= "9999" then
    height = height + 20
    background = BACKGROUND_COLOUR_FIGHTING
    line1 = stats.doing
  end -- if

  WindowCreate (win, 
                 posx, posy, WINDOW_WIDTH, height,  
                 mode,   
                 flags,   
                 background)

  -- add the drag handler so they can move the window around
  movewindow.add_drag_handler (win, 0, 0, 0, 0)
  
  -- fill entire box to clear it
  check (WindowRectOp (win, 2, 0, 0, 0, 0, background))  -- fill entire box
  
  -- Edge around box rectangle
  check (WindowCircleOp (win, 3, 0, 0, 0, 0, BORDER_COLOUR, 0, 2, 0, 1))

  vertical = 6  -- pixel to start at
 
  local width = WindowTextWidth (win, font_id, line1)
  local add_dots = false

  -- truncate if too long
  while width > (WINDOW_WIDTH - gauge_left - 5) do
    -- get rid of last word
    local s = string.match (" " .. line1 .. "...", "(%s%S*)$")
    if not s or #s == 0 then break end
    line1 = line1:sub (1, - (#s - 2))  -- except the last 3 dots but add the space
    width = WindowTextWidth (win, font_id, line1 .. " ...")
    add_dots = true
  end -- while
  
  if add_dots then
    line1 = line1 .. " ..."
  end -- if
  
  WindowText (win, font_id, line1,
                             gauge_left, vertical, 0, 0, FONT_COLOUR)
  
  vertical = vertical + font_height + 3
                             
  DoGauge ("HP: ",   tonumber (stats.hp), tonumber (stats.max_hp), ColourNameToRGB "darkgreen")

  if stats.enemy_percent ~= "9999" then
    -- enemy name:  stats.enemy
    DoGauge ("Enemy: ", tonumber (stats.enemy_percent) / 100, nil, ColourNameToRGB "darkred", true)
  end -- if fighting 

  DoGauge ("Mana: ", tonumber (stats.mana), tonumber (stats.max_mana), ColourNameToRGB "mediumblue")
  DoGauge ("Move: ", tonumber (stats.moves), tonumber (stats.max_moves), ColourNameToRGB "gold")
 
  WindowShow (win, true)
  
end -- draw_bar

function OnPluginBroadcast (msg, id, name, text)
  if msg == 1 and id == "8a710e0783b431c06d61a54c" then
  
   -- get all variables
   stats = GetPluginVariableList("8a710e0783b431c06d61a54c")
     
   draw_bar ()
   
  end -- stats changed
end

function OnPluginInstall ()
  
  win = GetPluginID ()
  font_id = "fn"
  
  require "movewindow"  -- load the movewindow.lua module

  -- install the window movement handler, get back the window position
  windowinfo = movewindow.install (win, 7)  -- default to 7 (on right, center top/bottom)
                   
  font_name = "Fixedsys"    -- the font
    
  -- make miniwindow so I can grab the font info
  check (WindowCreate (win, 
                windowinfo.window_left,
                windowinfo.window_top,
                WINDOW_WIDTH, 
                WINDOW_HEIGHT,  
                windowinfo.window_mode,   
                windowinfo.window_flags,    
                BACKGROUND_COLOUR_NORMAL))

  -- add the drag handler so they can move the window around
  movewindow.add_drag_handler (win, 0, 0, 0, 0)
                 
  WindowFont (win, font_id, font_name, 9)
  font_height = WindowFontInfo (win, font_id, 1)  -- height
  
  -- work out how far in to start the gauge
  gauge_left =                        WindowTextWidth (win, font_id, "HP: ")
  gauge_left = math.max (gauge_left,  WindowTextWidth (win, font_id, "Mana: "))
  gauge_left = math.max (gauge_left,  WindowTextWidth (win, font_id, "Move: "))
  gauge_left = math.max (gauge_left,  WindowTextWidth (win, font_id, "Enemy: "))
  
  gauge_left = gauge_left + 5  -- allow gap from edge
    
  if GetVariable ("enabled") == "false" then
    ColourNote ("yellow", "", "Warning: Plugin " .. GetPluginName ().. " is currently disabled.")
    check (EnablePlugin(GetPluginID (), false))
  end -- they didn't enable us last time

 
end -- OnPluginInstall

function OnPluginEnable ()
  WindowShow (win, true)
  
  -- draw gauge again if possible
  if stats then
    draw_bar ()
  end -- if 
end -- OnPluginEnable

function OnPluginDisable ()
  WindowShow (win, false)
end -- OnPluginDisable

function OnPluginSaveState ()
   -- save window current location for next time  
  movewindow.save_state (win)
  SetVariable ("enabled", tostring (GetPluginInfo (GetPluginID (), 17)))
end -- OnPluginSaveState


]]>
</script>

</muclient>

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Crowe   (21 posts)  Bio
Date Reply #5 on Mon 15 Feb 2010 12:55 PM (UTC)
Message
Thank you for writing this Mr. Gammon. I was not expecting you to do this with your busy schedule. Thank again.
Top

Posted by Beardmusiclife   (1 post)  Bio
Date Reply #6 on Tue 20 Apr 2010 10:28 AM (UTC)
Message
Nick thank you so much for pointing me in this direction. Seems like the plugins are working great now.

One last question...

What resolution are you making those videos in on YouTube? The plugins themselves seem to be taking a much larger portion of the screen on my terminal than they do in the tutorials you've posted.

Thank you for your time, your patience, and a great product.

Paul
Top

Posted by Valtara   (2 posts)  Bio
Date Reply #7 on Sat 04 Sep 2010 07:01 AM (UTC)
Message
Hey mate, I know you probably get asked this alot, but is it possible you could do a hp bar plugin like the one you have for aardwolf, but make it for merentha? or maybe point me in the direction of one?

cheers bud, any help is appreciated
Top

Posted by Nick Gammon   Australia  (23,132 posts)  Bio   Forum Administrator
Date Reply #8 on Sat 04 Sep 2010 07:18 AM (UTC)
Message
I suggest you look at this post, it is closer to what you want:

Template:post=9270 Please see the forum thread: http://gammon.com.au/forum/?id=9270.


It is hard to be more helpful without any indication at all about what your prompt looks like, but looking at that plugin, you basically just need to change the trigger to match what your prompt looks like.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Valtara   (2 posts)  Bio
Date Reply #9 on Sun 05 Sep 2010 08:34 AM (UTC)
Message
Ok, I had a look at the link you sent me, and tried to follow the instruction, but i still cant manage to make it work. i've tried a few different triggers incase i was using the wrong prompt.

this is what i can show you.

hp
310/310 hp, 142/142 sp, 287/555 mp and your level is 15

or

report
You say: I have 310/310 hp, 142/142 sp, 290/555 mp and my level is 15

or

prompt
Variable PROMPT set to $h hps|$i sp|$g mp > .
Ok, your prompt has been changed.

I also have a hpinfo command set so my hp is show like this always at the bottom of my screen

310 hps|142 sp|293 mp >

I had a chat with some of the guys on merentha and they said i could set the maxes manually, but does that mean if my vitals maxes change i'd have to redo it?

Top

Posted by Nick Gammon   Australia  (23,132 posts)  Bio   Forum Administrator
Date Reply #10 on Mon 06 Sep 2010 05:02 AM (UTC)
Message
Valtara said:

Ok, I had a look at the link you sent me, and tried to follow the instruction, but i still cant manage to make it work.


Can you post what you have?

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.


Template:codetag To make your code more readable please use [code] tags as described here.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


39,475 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.