[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
http://www.shatteredisles.com • MUSHclient
Page 1 of 3

MUSHclient

Posted: Sun Sep 29, 2013 11:47 pm
by
Since I used Mushclient almost exclusively for DG to script instead of zmud, and other games I'll be re-configuring some health bars and timers and stuff to work on this one especially since there is a prompt command to go off of. I'll update this when I get everything working where I want it just to be a nice guy.

Re: MUSHclient

Posted: Sun Sep 29, 2013 11:52 pm
by
I would love to have this option if you figure it out. Mudlet is fine, but the map is really wonky and all I really like are the health bars. I used Mushclient for like 8 years, so that would be more comfortable.

Re: MUSHclient

Posted: Tue Oct 01, 2013 12:37 am
by
I got the health bars working. just gonna need to rework some things for the compass, see if i can find some icons to use make some for position indicators. and work on the buttons to ready and unready weapons and shields.

just watching the gauge while practicing hide is so much easier. if you want i can post the code and then update it as i get more done

Re: MUSHclient

Posted: Wed Oct 09, 2013 12:10 am
by
That's awesome that you got health bars working. By all means share with the other MUSHclient users.

Re: MUSHclient

Posted: Wed Oct 09, 2013 3:10 am
by
This would be awesome to have. I use MUSH as well and always have.

Re: MUSHclient

Posted: Mon Oct 14, 2013 3:40 am
by
Ok this is a modified health bar I've been using for now. Originally for a SMAUG game. Just copy and paste it into notepad and then save it as Health_Bar_Miniwindow.xml
I'll update this when I get the compass working.
Works off this prompt
prompt HP: %h/%H ST: %m/%M

To make it work with your prompt you need to change this part
match="^HP\:\s(\d+)\s*\/(\d+)\sST\:\s(\d+)\s*\/(\d+)"
to match how you have your prompt set up if you want it a certain way

Code: Select all

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

<muclient>
<plugin
   name="Health_Bar_Miniwindow"
   author="Nick Gammon"
   id="48062dcd6b968c590df50f32"
   language="Lua"
   purpose="Shows stats in a mini window"
   date_written="2010-02-14 09:00"
   requires="4.40"
   version="2.0"
   save_state="y"
   >
<description trim="y">
<![CDATA[
Install this plugin to show an info bar with HP and Stamina points shown as a bar.

The window can be dragged to a new location with the mouse.

For Shattered Isles your prompt needs to be set like this:

prompt HP: %h/%H ST: %m/%M 

-- Modified by Teef for Shattered Isles.
Right now This works for this prompt. It ignores anything after the health and movement.

Just copy and paste this into notepad and save as Health_Bar_Miniwindow.xml
then go to plugins add and enable it.
So you can set it to this.

prompt HP: %h/%H ST: %m/%M 




]]>
</description>

</plugin>

<!--  Triggers  -->

<triggers>
  <trigger
   enabled="y"
   match="^HP\:\s(\d+)\s*\/(\d+)\sST\:\s(\d+)\s*\/(\d+)"
   regexp="y"
   script="do_prompt"
   sequence="100"
  >
  </trigger>
</triggers>



<!--  Script  -->


<script>
<![CDATA[

GAUGE_HEIGHT = 15

WINDOW_WIDTH = 300
WINDOW_HEIGHT = 65
NUMBER_OF_TICKS = 5

BACKGROUND_COLOUR = ColourNameToRGB "rosybrown"
FONT_COLOUR = ColourNameToRGB "darkred"
BORDER_COLOUR = ColourNameToRGB "#553333"

function DoGauge (sPrompt, current, max, Colour)

  if max <= 0 then 
    return 
  end -- no divide by zero
  
  -- fraction in range 0 to 1
  local Fraction = math.min (math.max (current / max, 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, 
                          BACKGROUND_COLOUR)  -- 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
  WindowHotspotTooltip(win, sPrompt, string.format ("%s\t%i / %i (%i%%)", 
                        sPrompt, current, max, Fraction * 100) )
                                  
  vertical = vertical + font_height + 3
end -- function DoGauge

function do_prompt (name, line, wildcards)

  hp, max_hp = tonumber (wildcards [1]), tonumber (wildcards [2])
  stamina, max_stamina = tonumber (wildcards [3]), tonumber (wildcards [4])
 
  -- fill entire box to clear it
  check (WindowRectOp (win, 2, 0, 0, 0, 0, BACKGROUND_COLOUR))  -- 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

  DoGauge ("HP: ",    hp ,   max_hp,    ColourNameToRGB "darkgreen")
  DoGauge ("Stamina: ",  stamina,  max_stamina,  ColourNameToRGB "mediumblue")

  WindowShow (win, true)
  
end -- function do_prompt


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
  WindowCreate (win, 
                windowinfo.window_left,
                windowinfo.window_top,
                WINDOW_WIDTH, 
                WINDOW_HEIGHT,  
                windowinfo.window_mode,   
                windowinfo.window_flags,    
                BACKGROUND_COLOUR)

  -- 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, "Stamina: "))
    
  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 OnPluginDisable ()
  WindowShow (win, false)
end -- OnPluginDisable

function OnPluginEnable ()
  WindowShow (win, true)
  
  -- draw gauge again if possible
  if hp and max_hp and stamina and max_stamina then
    do_prompt ("", "", { hp, max_hp, stamina, max_stamina } )
  end -- if know hp, endurance and guile
end -- OnPluginEnable

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


]]>
</script>

</muclient>

Re: MUSHclient

Posted: Mon Oct 14, 2013 12:48 pm
by
Thanks Teef I have been wanting to get MUSH a try to compare. Quick question...where exactly do I save the XML file to?

Re: MUSHclient

Posted: Mon Oct 14, 2013 7:08 pm
by
to keep it organized save it in your "plugin" folder inside your "worlds" folder. but technically you can save it anywhere you want.

Re: MUSHclient

Posted: Tue Oct 22, 2013 2:19 am
by
Ok. If anyone is interested in it I have gotten the old DGate Wizard Compass and the beginning of "Position" indicator done.
Compass still won't show the "hidden" directions this mud uses for doors... :::grumbles:::
And you have to sit and stand to get the little guy to show up and get him calibrated to that character when you first log in since "Position" isn't available in the prompts ... :::GRUMBLES::: ... and I figured it was easier than going though score which also is only broadcast when asked for.

I don't have anywhere to host the images or anything yet so I can just email you the files if you want.
Still to do, add the rate and delay countdown bars (not that they really matter with this front loaded delay) , the sword and shield icons to equip and store them, and a count of monies. Also for the thiefy types, thinking of adding my own custom hidden/invisible icons

Anyone know where I can host simple things like zip files or pictures so you can see what it looks like?

Re: MUSHclient

Posted: Tue Oct 22, 2013 11:48 am
by
I say the beginning of the "Position" indicator because I have yet to see all the possible knock down and fall messages.