Mushclient Questions

by Esano

Back to Mechanic's Corner.

Unknown2009-07-12 13:16:41
Okay, I've been trying to use Accelerators to improve my flexibility in combat. This is an example of a code that I wanted to do,

QUOTE
Accelerator("Ctrl+S", "envenom 13627 with mantakaya;kata perform @target lung")


However, when I try to execute the command on my keyboard, it does nothing. Am I doing something wrong? Oh and the code's in an alias with send to script.

-- Ooh, nevermind. I'll just put it in my script file. smile.gif
Ardmore2009-07-14 22:25:55
So, I wanted to colour my prompts so I made a trigger (^You have recovered balance on your (left|right) arm\\.$) and made it

-enabled
-omit from output
-keep evaluating
-regular expression

Send: ColourNote("orange", "", "%0")
to: Script (after omit)

But now it masks all my attacks my basher does. I don't like that. How do I fix it?

-- By mask I mean it's
You have recovered balance on your left arm.
8191h, 6171m, 5940e, 10p, 30816en, 23100w elxk<>-You wildly swing a molten-steel dreadlord hammer at a giant centipede. You powerfully pound him, making him stagger back.

You don't see the command get sent through.
Aerotan2009-07-14 22:29:10
How would I go about having an alias step through the various Demesne effects and cast them at preset intervals?

Like, I want to make an alias to do "AQUACAST JELLIES DEMESNE" then wait a little bit, then do "AQUACAST TYPHOON DEMESNE", then wait a bit again, then do "AQUACAST WHIRLPOOL DEMESNE", etc., then stop casting once all my effects are up.
Unknown2009-07-15 00:51:09
QUOTE (Aerotan @ Jul 15 2009, 06:29 AM) <{POST_SNAPBACK}>
How would I go about having an alias step through the various Demesne effects and cast them at preset intervals?

Like, I want to make an alias to do "AQUACAST JELLIES DEMESNE" then wait a little bit, then do "AQUACAST TYPHOON DEMESNE", then wait a bit again, then do "AQUACAST WHIRLPOOL DEMESNE", etc., then stop casting once all my effects are up.



You can use Lua's DoAfterSpecial.

Like.. take note of your equilibrium balance timing then from there put the codes in an alias so that it'll activate with one press:

CODE
DoAfterSpecial(4,"AQUACAST JELLIES DEMESNE")
DoAfterSpecial(4,"AQUACAST TYPHOON DEMESNE")
DoAfterSpecial(4,"AQUACAST WHIRLPOOL DEMESNE")



CODE
Syntax:
DoAfterSpecial(,"")


Case sensitive and send to script and it'll be good.
Unknown2009-07-15 00:56:18
QUOTE (Ardmore @ Jul 15 2009, 06:25 AM) <{POST_SNAPBACK}>
stuff


You... wanted to color the trigger or the exlrxx on the prompt line?
Esano2009-07-15 01:43:14
It's because your basher is sending the command from the omitted line, the echo of the command also gets omitted.

EDIT: And for the demesne timer, you only need DoAfter with that syntax. If you use DoAfterSpecial you need a third argument telling it where to send it. World is 0, so it would be:

DoAfterSpecial(4,"aquacast jellies demesne",0)

Of course, for an aquamancer demesne you don't want to raise every effect as soon as you can, you'll want to time them together. I suggest talking to a senior Aquamancer (probably Munsia) about which effects should go together. Or see if you have a scroll on it.
Ardmore2009-07-15 02:00:32
QUOTE (lussien @ Jul 14 2009, 08:56 PM) <{POST_SNAPBACK}>
You... wanted to color the trigger or the exlrxx on the prompt line?

Just the trigger. It colours, but my commands that prompt off that line no longer show. They go through, I just can't see them... There has to be a way around it!
Unknown2009-07-15 09:22:36
Ardmore, you don't have to omit and redisplay the line to color it all orange. You just need to set the option to change the color of the line to orange and be done with it.

Also, your commands can/should be sent from the prompt rather than the balance lines.
Unknown2009-07-17 10:13:53
Just wondering if anyone could help me with my begging script/alias/thing.

I've got the following triggers:

CODE

     enabled="y"
   group="Begging triggers"
   keep_evaluating="y"
   match="^(+) sighs dramatically and searches his pockets\\, looking for something to give you\\.$"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  SetVariable("begging","0")
SetVariable("begged","0")

  


CODE
   enabled="y"
   group="Begging triggers"
   match="^Explaining your abject poverty\\, you humbly request a little help from (+)\\.$"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  SetVariable("begged","0")
  

CODE
   enabled="y"
   expand_variables="y"
   group="Begging triggers"
   keep_evaluating="y"
   match="^You have recovered equilibrium\\.$"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  if @begging == 1 and @begged == 0
  then Send("influence @target with begging")
elseif @begging == 1 and @begged == 1
  then Send("influence @target with supplication")
end

  


CODE
     enabled="y"
   group="begging triggers"
   match="^You thrust your hand out to (+) and beg shamelessly\\.$"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  SetVariable("begged","1")
  


And this alias to start it off:

CODE

     match="beg"
   enabled="y"
   expand_variables="y"
   send_to="12"
   sequence="100"
  >
  SetVariable("Begging","1")
Send("influence @target with begging")

  


It starts off by begging, and then it supplicates like it should... but after the first supplicate it doesn't beg again, it just keeps supplicating. Any and all help appreciated, thanks.
Esano2009-07-17 10:24:13
Try using
CODE
if "@begging" == "1" then
  if "@begged" == "0" then
      Send("influence @target with begging")
  elseif "@begged" == "1" then
      Send("influence @target with supplication")
  end
end
Unknown2009-07-17 10:34:26
Thanks, Esano!
Dynami2009-07-17 21:08:57
I am trying to make a timer so I know when my angel will attack, but I have no idea what I am doing. Can someone give me simple way of doing it?
Ilyarin2009-07-17 21:17:45
CODE

     group=""
   keep_evaluating="y"
   match="^(?:A beatific cherub|A divine deva|A seraphic angel|A celestial archangel)'s eyes shoot forth beams of holy light that strike \\w+\\, whose body quakes upon the impact\\.$"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  if IsTimer("angel_timer") == 0 then
  EnableTimer("angel_timer",true)
  ResetTimer("angel_timer")
else
  local time = 8
  AddTimer("angel_timer", 0, 0, time, 'ColourNote("white","","Angel is about to attack!");EnableTimer("angel_timer",false)',  timer_flag.Enabled, "")
  SetTimerOption("angel_timer","send_to",sendto.script)
end

  
Razenth2009-07-18 00:12:06
That will only work for Elohoran attacks. You'd have to incorporate all of them to get this correct. In addition, you may want to disable the trigger when you're fighting alongside other Celestines so your own timer isn't thrown off.
Dynami2009-07-18 05:50:16
QUOTE (Razenth @ Jul 17 2009, 08:12 PM) <{POST_SNAPBACK}>
That will only work for Elohoran attacks. You'd have to incorporate all of them to get this correct. In addition, you may want to disable the trigger when you're fighting alongside other Celestines so your own timer isn't thrown off.

I think this timer is too much trouble and you just brought up a good point. Oh, Ilyarin put up with me and my stupid questions for 10 very long minutes, so I would like to thank him.
Unknown2009-07-18 15:39:34
So.. I got wheedling now and I'm trying to change the trigger. But after the first influence I get this error:

:10: '' expected near 'end'

This is the trigger:

CODE

     enabled="y"
   expand_variables="y"
   group="Begging triggers"
   keep_evaluating="y"
   match="^You have recovered equilibrium\\.$"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  if "@begging" == "1" then
  if "@begged" == "0"
       then Send("influence @target with begging")
  elseif "@begged" == "1"
       then Send("influence @target with supplication")
  elseif "@begged" == "2"
       then Send("influence @target with wheedling")
      end
  end
end

  
Esano2009-07-18 15:50:10
What you have is:
CODE
if "@begging" == "1" then
     if "@begged" == "0"
         then Send("influence @target with begging")
     elseif "@begged" == "1"
          then Send("influence @target with supplication")
     elseif "@begged" == "2"
          then Send("influence @target with wheedling")
    end
end
end


You have an extra, unnecessary end there. It should be :


CODE
if "@begging" == "1" then
     if "@begged" == "0"
         then Send("influence @target with begging")
     elseif "@begged" == "1"
          then Send("influence @target with supplication")
     elseif "@begged" == "2"
          then Send("influence @target with wheedling")
    end
end
Ardmore2009-07-22 08:56:52
So I want to make an approximate wound tracker for my target, and I'm looking how Treant does it, so I want to do it a similar way. What I'm confused about is what #variable does. Since Treant is open source, I'm sure Iasmos won't mind me going into detail about what confuses me. So, one of the triggers is:

CODE
^With a powerful lunge\\, + strikes at you with (.+?)(?:(@treant_warrior_miss)|\\, and you partially parry the blow with .+?)?\\.


@treant_warrior_miss:
CODE
\\, and you smoothly step away from the blow
|\\, and you make ready with .+?
|\\, and you raise .+?
|\\, but his thrust hits your powerful aura and rebounds back into himself
|\\, but her thrust hits your powerful aura and rebounds back into herself
|\\. His weapon cuts through the air\\, missing you completely
|\\. Her weapon cuts through the air\\, missing you completely
|\\. +\\'s .+? \\w+ your .+?\\, which completely absorbs the blow
|\\. +\\'s .+? \\w+ your .+?\\, and you easily deflect the blow
|\\. +\\'s .+? strikes your .+? and bounces harmlessly off

Ahem, they're not broken up like that, but when I put them on all one line the forums exploded.

which sends: wounds:attack("%1", "%2", "%0")
CODE
function wounds:attack(weapon, dodged, text)
local stumble = string.find(text, "e stumbles forward as ")
if #dodged == 0 and not stumble then
flags:set("hit_with", weapon)
treant:poisons_on()
end

EnableGroup("Treant_Wounds", true)
display.Debug("Deep wounds attack: " .. text)
end


#dodged == 0, is what I'm confused about. What does it do? I've tried playing with # with notes, like /Note(#target) shows as 18 but I can't for the life of me connect it to the number 18.

So I'm going to have a similar thing, which will have a series of all the messages of my attacks and a variable that holds all the ways I can miss/get blocked, so I need to check to see if I actually hit before I add the approximate wound numbers, and that's the part I'm stuck on because, while I could just copy his code, I want to understand what it means.
Ilyarin2009-07-22 10:11:35
# turns the string into a number relating to what the var type is. For a string, it's the number of characters. For a table, it's the number of keys, etc.