Scripts

From HavenMUD Wiki
Jump to: navigation, search

This page is where you will find various scripts and plugins and addons and all the other various synonyms of the same thing, for various clients that players may use.

Contents

Cmud

Cmud is a powerful mud client created by the same people that brought you Zmud. However, this is a more modern version that has been updated to work especially well with windows vista and windows 7. Many of the syntaxes for triggers/aliases/etc have changed quite dramatically from Zmud, however, Cmud does have an 'Import from Zmud' function for older scripts if you've got any. This is my personal favorite, however, it does cost money to use. You can download a demo from here current price is $29.95, but there is a free 30 day evaluation period as well.

Hit Percent Calculator

This is a little Hit Percent Calculator I wrote for myself. I have it trigger after 'You kill blahblah.' I also have it set to reset the combat variables upon login.
Additional aliases included are:

combat - display current combat stats
combatreset - reset all counters for the combat output, useful to check your % when fighting new things

Cmud combat perc.png

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <class name="combat">
    <trigger priority="1300" case="true">
      <pattern>You miss (*)</pattern>
      <value>#cw magenta
#ADD combatmisses 1
hitcounter</value>
    </trigger>
    <trigger priority="1310">
      <pattern>(*) dodges your attack</pattern>
      <value>#cw magenta
#ADD combatmisses 1
hitcounter</value>
    </trigger>
    <trigger priority="1320" case="true">
      <pattern>You crush (*)</pattern>
      <value>#cw grey
#ADD combathits 1
hitcounter</value>
    </trigger>
    <trigger priority="1330" case="true">
      <pattern>You hit (*)</pattern>
      <value>#cw grey
#ADD combathits 1
hitcounter</value>
    </trigger>
    <trigger priority="1340" case="true">
      <pattern>You pulverize (*)</pattern>
      <value>#cw grey
#ADD combathits 1
hitcounter</value>
    </trigger>
    <trigger priority="1350" case="true">
      <pattern>You smash (*)</pattern>
      <value>#cw grey
#ADD combathits 1
hitcounter</value>
    </trigger>
    <trigger priority="1360" case="true">
      <pattern>You destroy (*)</pattern>
      <value>#cw grey
#ADD combathits 1
hitcounter</value>
    </trigger>
    <trigger priority="1370">
      <pattern>softly</pattern>
      <value>#cw 10</value>
    </trigger>
    <trigger priority="1380">
      <pattern>brutally</pattern>
      <value>#cw 1</value>
    </trigger>
    <trigger priority="1390">
      <pattern>severely</pattern>
      <value>#cw 12</value>
    </trigger>
    <trigger priority="1400">
      <pattern>hard</pattern>
      <value>#cw 10</value>
    </trigger>
    <trigger priority="1410">
      <pattern>forcibly</pattern>
      <value>#cw red</value>
    </trigger>
    <trigger priority="1420">
      <pattern>utterly</pattern>
      <value>#cw red</value>
    </trigger>
    <trigger priority="1430" case="true">
      <pattern>You receive (*) experience.</pattern>
      <value>#cw yellow
#VAR xpcount ( @xpcount + %1)</value>
    </trigger>
    <trigger priority="1440">
      <pattern>(*) is severed!</pattern>
      <value>#cw red</value>
    </trigger>
    <trigger priority="1450">
      <pattern>really hard</pattern>
      <value>#cw 9</value>
    </trigger>
    <alias name="combatreset" autoappend="true">
      <value>#VAR combathits 0
#VAR combatmisses 0
#VAR combattotal 0
#VAR combatpercent 0
#ECHO Resetting Combat Hit Counter</value>
    </alias>
    <alias name="hitcounter" autoappend="true">
      <value>#VAR combattotal (@combathits + @combatmisses)
#VAR combatpercent %round( %float( %eval( (@combathits / (@combattotal + 0.0))*100)))</value>
    </alias>
    <trigger priority="990">
      <pattern>You kill (*)</pattern>
      <value>combat</value>
    </trigger>
    <alias name="combat">
      <value><![CDATA[#SH %ansi(cyan)Hits: %ansi(white)@combathits %ansi(cyan)Misses: %ansi(white)@combatmisses %ansi(cyan)Total: %ansi(white)@combattotal %ansi(cyan)Percent: %if(@combatpercent >= 51 && @combatpercent < 75, %ansi(white)@combatpercent%)%if(@combatpercent > 0 && @combatpercent < 51, %ansi(red)@combatpercent%)%if(@combatpercent >= 75, %ansi(yellow)@combatpercent%)%if(@combatpercent = 0, %ansi(grey)@combatpercent%)]]></value>
    </alias>
    <trigger priority="4590">
      <pattern>Password~:$</pattern>
      <value>combatreset</value>
    </trigger>
  </class>
</cmud>


Zmud

Coming soon

MushClient

MushClient is a very powerful free client for muds/mush/etc. However, it is quite complicated when it comes to scripting and does require some moderate to advanced knowledge of various scripting languages. Many tutorials for various common functionalities can be found online.

Health Bar

The following is a health bar plugin that has been adapted from Nick Gammon's Health_Bar.xml from 2003. Original can be found here.
Health Bar MushClient.png

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient [
  <!ENTITY trigger_match
   "^hp\: (\d+)/(\d+)   mp\: (\d+)/(\d+)   sp\: (\d+)/(\d+)(.+)?">
]>




<muclient>
<plugin
   name="Health_Bar"
   author="Nick Gammon"
   id="a2af5216d68563401888e01e"
   language="VBscript"
   purpose="Shows HP, Mana, Movement points in a colour bar"
   date_written="2003-04-28 09:50:05"
   date_modified="2003-04-28 12:40:05"
   requires="3.29"
   version="1.1"
   >
<description trim="y">
<![CDATA[
Install this plugin to show an info bar with HP, Mana, 
and Movement points shown as a bar (between 0 and 10 blocks).

You need your prompt line to display the appropriate information,
naturally. I used this in SMAUG:

prompt <%h/%H hp %m/%M m %v/%V mv>
fprompt <%h/%H hp %m/%M m %v/%V mv>

"prompt" sets the normal prompt, "fprompt" sets the fight prompt.

Customise the plugin if you want to match a different sort of prompt line.

To see this message, type: Health_Bar:help

]]>
</description>

</plugin>



<triggers>
  <trigger
   enabled="y"
   match="&trigger_match;"
   name="InfoBar"
   regexp="y"
   script="DoPrompt"
   sequence="100"
  >
  </trigger>
</triggers>



<script>
<![CDATA[
sub DoGauge (sPrompt, iCurrent, iMax, sGoodColour, sBadColour)
dim pc, count

'
'  Do prompt in black Arial
'
  InfoColour "black"
  InfoFont "Arial", 10, 0
  Info sPrompt

'
'  Use Webdings for gauge (black square)
'

  InfoFont "Webdings", 10, 0

  pc = CInt ((CInt (iCurrent) / CInt (iMax)) * 10)

'
'  Below 20% warn by using different colour
'

  if pc < 2 then
    InfoColour sBadColour
  else
    InfoColour sGoodColour
  end if

'
'  Draw active part of gauge
'
  for count = 0 to pc
    Info "g"
  next  

'
'  Draw rest of gauge in grey (ie. unfilled bit)
'

  InfoColour "dimgray"
  while count <= 10
    count = count + 1
    Info "g"
  wend

end sub

sub DoPrompt (sName, sLine, wildcards)

  InfoClear

'
'  World name
'

'  InfoFont "Arial", 12, 1  ' 12 point Arial *bold*
'  InfoColour "purple"
'  Info GetInfo (2)  ' world name

  DoGauge "HP: ", wildcards (1), wildcards (2), "darkgreen", "red"
  DoGauge "  MP: ", wildcards (3), wildcards (4), "mediumblue", "red"
  DoGauge "  SP: ", wildcards (5), wildcards (6), "gold", "red"

  InfoColour "black"
  InfoFont "Arial", 10, 0
  Info " "
  Info wildcards (7)

end sub

'
'  Do this once
'
ShowInfoBar vbTrue



]]>
</script>



<aliases>
  <alias
   script="OnHelp"
   match="Health_Bar:help"
   enabled="y"
  >
  </alias>
</aliases>

<script>
<![CDATA[
Sub OnHelp (sName, sLine, wildcards)
  world.Note world.GetPluginInfo (world.GetPluginID, 3)
End Sub
]]>
</script> 

</muclient>



TinTin++

Tintin is a command line based mud client for *nix/Windows/OSX(I believe). It has a lot of functionality, but is a little more intensive to use as there are not helpful gui's for editing anything. It's a man's client.

Combat Bar

The following is an adaptation of the previous Cmud script for combat hit percentage output. This however, is a bar that is shown continuously and updated accordingly.
Tintin combat bar.png

#split {2}
#var combatmisses 0
#var combathits 0
#var combattotal 0
#var combatpercent 0
#var stringcol {<060>}
#var digitcol {<070>}
#var goodcol {<030>}
#var badcol {<010>}
#var resetcol {<088>}

#act {You miss %*} {#math combatmisses {$combatmisses + 1};#math combattotal {$combathits + $combatmisses};#math combatpercent {$combathits * 1.00 / $combattotal * 100};hitbar}
#act {%* dodges your attack} {#math combatmisses {$combatmisses + 1};#math combattotal {$combathits + $combatmisses};#math combatpercent {$combathits * 1.00 / $combattotal * 100};hitbar}

#act {You crush %*} {#math combathits {$combathits + 1};#math combattotal {$combathits + $combatmisses};#math combatpercent {$combathits * 1.00 / $combattotal * 100};hitbar}
#act {You hit %*} {#math combathits {$combathits + 1};#math combattotal {$combathits + $combatmisses};#math combatpercent {$combathits * 1.00 / $combattotal * 100};hitbar}
#act {You pulverize %*} {#math combathits {$combathits + 1};#math combattotal {$combathits + $combatmisses};#math combatpercent {$combathits * 1.00 / $combattotal * 100};hitbar}
#act {You smash %*} {#math combathits {$combathits + 1};#math combattotal {$combathits + $combatmisses};#math combatpercent {$combathits * 1.00 / $combattotal * 100};hitbar}
#act {You destroy %*} {#math combathits {$combathits + 1};#math combattotal {$combathits + $combatmisses};#math combatpercent {$combathits * 1.00 / $combattotal * 100};hitbar}


#alias comb {#math combattotal {$combathits + $combatmisses * 1.00};#math combatpercent {$combathits * 1.00 / $combattotal * 100};#echo {Hits: $combathits Misses: $combatmisses Total: $combattotal Percent: $combatpercent %}}

#alias hitbar {#var cspacer {};#math combattotal {$combathits + $combatmisses};#math combattotaldec {$combattotal * 1.0};#math combatpercent {$combathits / $combattotaldec * 100};#var combhits {Hits: $digitcol$combathits};#var combmisses {Misses: $digitcol$combatmisses};#var combtotal {Total: $digitcol$combattotal};#var combperc {Percent: $digitcol$combatpercent%};#format len {%L} {$combhits$combmisses$combtotal$combperc};#format scrWidth {%C};#math comblength {$scrWidth - $len};#math padLength {$comblength/3.0};#math padLength {$padLength - 1};#loop {0} {$padLength} {cnt} {#if {$cnt != $padLength} {#format cspacer {%s } {$cspacer}}};#format fullcombat {%L} {$stringcol$combhits$cspacer$stringcol$combmisses$cspacer$stringcol$combtotal$cspacer$stringcol$combperc};#if {$fullcombat < $scrWidth} {#var extraspacer {};#math extra {$scrWidth - $fullcombat};#loop {0} {$extra} {cnt} {#if {$cnt != $extra} {#format extraspacer {%s } {$extraspacer}}};} {#var extraspacer {}};#if {$combatpercent > 75} {#var combperc {Percent: $goodcol$combatpercent%}} {#if {$combatpercent > 45} {#var combperc {Percent: $digitcol$combatpercent%}} {#var combperc {Percent: $badcol$combatpercent%}}};#echo {{$stringcol$combhits$cspacer$stringcol$combmisses$cspacer$stringcol$combtotal$cspacer$stringcol$combperc$extraspacer$resetcol}{1}};}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox