help please switching from cmud to mushclient

Posted by Phxgoose on Fri 11 Sep 2009 05:07 AM — 6 posts, 23,455 views.

#0
Hi I'm trying out mushclient i've been using zmud/cmud for years.

I'm having issues with 2 things
1) currently i use a targeting system for the full pkill mud i'm on. if i type v i get two reponses

1) if i set target: sit;spring @target
2) if i did not set target: sit;spring

also i can type v name and it will either follow cmd vs name instead of target. How can do that in mushclient? the script in cmud is

#alias v {#if (%numparam() = 0) {sit;springleap @target} {sit;springleap %params}}

next one comes down to targeting
i have a basic alias for
#alias tar {#var target %params}
which i got to work by following the instruction for setting up a target alias/variable, but i use multiple alias that use that alias

IE: #alias bb {tar %1barbarian}
so i can type bb 2. and it will then it will set my target variable to 2.barbarian

how can i get mushclient to do this? I can't seem to get it to work. i've tried just

alias bb * with send as tar %1barbarian

these are my most important issues before i move compleltly over to mushclient.


Ohh how can i clear out my target variable? On cmud tar " " works, but not on mushclient.
#1
Ok a couple more things, i use alot of stuff in my command line in cmud here is the script.

Target: @target Weapon Target: <color Red>@tarwpn</color> Group: @Group MONK: <color green>@REGEN</color> / <color blue>@HERO</color> Experience: @EXP



the triggers i use to set the variables for my Monk status are below. and my status line will display the apprioptly situation

#trigger {^A sense of heroism grows in your heart.}{#var HERO "HEROISM_IS_UP"}
#trigger {^You no longer feel like a hero!}{#var HERO "HEROISM_IS_OUT"}
#trigger {^You feel your body healing faster.} {#var REGEN "REGENERATION_IS_UP"}
#trigger {^You stop regenerating.} {#var REGEN "REGENERATION_IS_OUT"}


An Example of my status line output:
Target: Weapon Target: Group: MONK: REGENERATION_IS_UP / HEROISM_IS_UP Experience: 2698166

#2
i figured out how to clear the target variable.
Australia Forum Administrator #3
Phxgoose said:

#alias v {#if (%numparam() = 0) {sit;springleap @target} {sit;springleap %params}}


This alias will do it:


<aliases>
  <alias
   match="^v( [A-Za-z0-9.]+){0,1}$"
   enabled="y"
   expand_variables="y"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>

Send "sit"

if "%1" == "" then
  Send "springleap @target"
else
  Send "springleap%1"
end -- if

</send>
  </alias>
</aliases>


Template:pasting
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


This uses "send to script" and inside the script we test if wildcard 1 is empty or not, if not empty we use it, otherwise we use the target variable.
Australia Forum Administrator #4
Phxgoose said:

next one comes down to targeting
i have a basic alias for
#alias tar {#var target %params}
which i got to work by following the instruction for setting up a target alias/variable, but i use multiple alias that use that alias

IE: #alias bb {tar %1barbarian}
so i can type bb 2. and it will then it will set my target variable to 2.barbarian

how can i get mushclient to do this? I can't seem to get it to work.


Instead of "send to world" (the default) change the "send to" to be "Execute". Then any aliases are re-evaluated.
Australia Forum Administrator #5
Phxgoose said:


#trigger {^A sense of heroism grows in your heart.}{#var HERO "HEROISM_IS_UP"}
#trigger {^You no longer feel like a hero!}{#var HERO "HEROISM_IS_OUT"}
#trigger {^You feel your body healing faster.} {#var REGEN "REGENERATION_IS_UP"}
#trigger {^You stop regenerating.} {#var REGEN "REGENERATION_IS_OUT"}



You could do something like this:


<triggers>
  <trigger
   custom_colour="2"
   enabled="y"
   match="A sense of heroism grows in your heart."
   send_to="12"
   sequence="100"
  >
  <send>

SetVariable ("hero", "HEROISM_IS_UP")

SetStatus (
  "Target: " .. (GetVariable ("target") or "&lt;none&gt;") ..
  " Weapon Target: " .. (GetVariable ("tarwpn") or "&lt;none&gt;") ..
  " Group: " .. (GetVariable ("group") or "&lt;none&gt;") ..
  " MONK: " .. (GetVariable ("regen") or "&lt;none&gt;") ..
  " / " .. (GetVariable ("hero")  or "&lt;none&gt;") ..
  " Experience: " .. (GetVariable ("exp") or "&lt;none&gt;")
  )

</send>
  </trigger>
</triggers>


Template:pasting
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


This changes the variable, and then sets the status line with all the current variable values. You would do something similar for the other trigger lines. To save redoing the SetStatus you could make a shared function in a script file - I'll leave that to you.

If you want colours, use the Info bar - see the Info function and related functions. Or, use miniwindows.