MUSHClient AutoSipper

by relaren

Back to Mechanic's Corner.

relaren2007-02-14 12:17:16
OK, so a friend needs an auto-sipper for MUSH, which being my usual self, offered to try and get something up and running for her.

Coded in VBScript, and originally for Achaea I think, I have it running so far as Health/Mana goes, though for some reason, as soon as I start to include bromide sipping in there, it all goes haywire.
Not sure of the original writer of this script, but from what I have got working, it seems pretty solid.

The following code works, though if somebody could fix it up to include bromide, you would be doing an exceptionally great service.

Thanks in advance.

-Jeisha.

CODE




        save_state="y" date_written="2007-02-14" date_modified="2007-02-14" requires="3.32" version="1.0"
     id="ebbb2e6c8db0bfb433d76dbf">
  
    

        

    







  
  





     enabled="y"
   keep_evaluating="y"
   match="^(\\d+)h, (\\d+)m, (\\d+)e, (\\d+)p, (\\d+)en, (\\d+)w (.*)$"
   name="prompt_trigger"
   regexp="y"
   script="DecipherPromptInfo"
   sequence="1"
   other_text_colour="black"
   other_back_colour="black"
  >
  

     enabled="n"
   name="HealthBalanceRecovered"
   match="*You may drink another health, mana, or bromide potion."
   script="HealthRecovery"
   sequence="100"
  >
  

     enabled="y"
   name="ElixirWasted"
   match="*The potion flows down your throat without effect."
   script="AttemptResult"
   keep_evaluating="y"
   sequence="10"
  >
  

     enabled="y"
   name="SparkleWasted"
   match="*The aftertaste of the berry turns sour."
   script="AttemptResult"
   sequence="100"
  >
  

     enabled="n"
   name="SparkleBalanceRecovered"
   match="*You may eat another sparkleberry."
   script="HealthRecovery"
   keep_evaluating="y"
   sequence="10"
  >
  




      name="SwitchHealing"
    script="SetHealingMode"
    enabled="y"
    regexp="y"
    match="^sipper (on|off)$"
    sequence="100"
  />
      name="max_mana"
    script="SetMaxValues"
    enabled="y"
    regexp="y"
    match="^AutoHealer:maxMana (\\d+)$"
    sequence="100"
   />
      name="max_health"
    script="SetMaxValues"
    enabled="y"
    regexp="y"
    match="^AutoHealer:maxHealth (\\d+)$"
    sequence="100"
   />
      name="autohealer_help"
    script="DisplayHelp"
    enabled="y"
    match="AutoHealer:help"
    sequence="100"
   />
      name="autohealer_sparkleberry"
    script="SetSparkle"
    enabled="y"
    match="sparkle (on|off)"
    regexp="y"
   />
     name="autohealer_health"
   script="Manual"
   enabled="n"
   match="dh"
  />
     name="autohealer_mana"
   script="Manual"
   enabled="n"
   match="dm"
   sequence="100"
  />
     name="autohealer_sparkleeat"
   script="Manual"
   enabled="n"
   match="em"
   sequence="100"
  />



820
820
85
85
65





laeric2007-02-15 11:16:12
I believe that's Keldar's autosipper. I could be wrong. To start off with, are you allowed to put your name as the author? I would put the original author's name in there, and make a note that it was modified for Lusternia by you. Also, do you have a link for the original xml file? If I can compare what you've modified I might be able to help you a bit more. Also, have you considered writing your own auto sipper? This way you know exactly what's going on at all times, with your own script -g-. Otherwise, I'll try and see what I can do, give me time please -g-
laeric2007-02-15 11:34:22
Perhaps this will work. Terribly sorry if it doesn't, I did not test it.

CODE




        save_state="y" date_written="2007-02-14" date_modified="2007-02-14" requires="3.32" version="1.0"
     id="ebbb2e6c8db0bfb433d76dbf">
  
    

        

    







  
  





     enabled="y"
   keep_evaluating="y"
   match="^(\\d+)h, (\\d+)m, (\\d+)e, (\\d+)p, (\\d+)en, (\\d+)w (.*)$"
   name="prompt_trigger"
   regexp="y"
   script="DecipherPromptInfo"
   sequence="1"
   other_text_colour="black"
   other_back_colour="black"
  >
  

     enabled="n"
   name="HealthBalanceRecovered"
   match="*You may drink another health, mana, or bromide potion."
   script="HealthRecovery"
   sequence="100"
  >
  

     enabled="y"
   name="ElixirWasted"
   match="*The potion flows down your throat without effect."
   script="AttemptResult"
   keep_evaluating="y"
   sequence="10"
  >
  

     enabled="y"
   name="SparkleWasted"
   match="*The aftertaste of the berry turns sour."
   script="AttemptResult"
   sequence="100"
  >
  

     enabled="n"
   name="SparkleBalanceRecovered"
   match="*You may eat another sparkleberry."
   script="HealthRecovery"
   keep_evaluating="y"
   sequence="10"
  >
  




      name="SwitchHealing"
    script="SetHealingMode"
    enabled="y"
    regexp="y"
    match="^sipper (on|off)$"
    sequence="100"
  />
      name="max_mana"
    script="SetMaxValues"
    enabled="y"
    regexp="y"
    match="^AutoHealer:maxMana (\\d+)$"
    sequence="100"
   />
      name="max_health"
    script="SetMaxValues"
    enabled="y"
    regexp="y"
    match="^AutoHealer:maxHealth (\\d+)$"
    sequence="100"
   />
      name="max_ego"
    script="SetMaxValues"
    enabled="y"
    regexp="y"
    match="^AutoHealer:maxEgo (\\d+)$"
    sequence="100"
   />
      name="autohealer_help"
    script="DisplayHelp"
    enabled="y"
    match="AutoHealer:help"
    sequence="100"
   />
      name="autohealer_sparkleberry"
    script="SetSparkle"
    enabled="y"
    match="sparkle (on|off)"
    regexp="y"
   />
     name="autohealer_health"
   script="Manual"
   enabled="n"
   match="dh"
  />
     name="autohealer_mana"
   script="Manual"
   enabled="n"
   match="dm"
   sequence="100"
  />
     name="autohealer_bromide"
   script="Manual"
   enabled="n"
   match="db"
   sequence="100"
  />
     name="autohealer_sparkleeat"
   script="Manual"
   enabled="n"
   match="em"
   sequence="100"
  />



820
820
820
85
85
85
65



<script>
        




If it does not work, then you are more than welcome to purchase mine *grin*
relaren2007-02-15 13:29:35
QUOTE(Laeric @ Feb 15 2007, 11:16 AM) 383509
I believe that's Keldar's autosipper. I could be wrong. To start off with, are you allowed to put your name as the author? I would put the original author's name in there, and make a note that it was modified for Lusternia by you. Also, do you have a link for the original xml file? If I can compare what you've modified I might be able to help you a bit more. Also, have you considered writing your own auto sipper? This way you know exactly what's going on at all times, with your own script -g-. Otherwise, I'll try and see what I can do, give me time please -g-


No, it is actually a friends from Aetolia, and as for the purchase of your own, I will politely decline. My coding is more than good enough for my own purposes. I use zMUD personally and know that inside out. The fact I come on here asking for help to fix a simple script for a language I am not familiar with should warrant a little help rather than people trying to make a few creds for something that I gladly -give- away for zMUD.

-Jeisha
laeric2007-02-15 18:59:58
My apologies, did I not do exactly as you wished, and modified your plugin to include bromide? The least you could do is thank me.

EDIT: Perhaps you thought that I qouted you? That was the code that you needed, including ego sipping.
relaren2007-02-15 20:15:49
Oh, no, please accept my apologies there, I was rather abrupt. It was just having somebody try and make credits from another coming on to ask for help with a simple script that had me a little peeved. The help IS appreciated.
laeric2007-02-16 16:03:22
No problem at all, I was certainly happy to help. The offer to sell my auot sipper was more of a joke than anything *g*. Also, your friend's script isn't exactly "simple", he certainly takes a bit more complicated and different approach to it. Post any other MUSHclient questions as needed.