Glorishan's Autopresser

Scripts and support for your favorite MUD client.
Glorishan
Sojourner
Posts: 456
Joined: Thu Feb 15, 2001 6:01 am
Location: Minneapolis, MN

Glorishan's Autopresser

Postby Glorishan » Thu Apr 27, 2006 9:30 pm

Note: see below for an updated version of this script
This script is nice for when you have some pressing to do, and want to do it for a set amount of time. I'll be doing a rewrite of this so that it handles time a bit differently. For now, if you say pres for 7 minutes, it will pres for 7 minutes. What I plan on doing is having it prompt you for the number of hours you want to put on the corpse, rather than the amount of time you'd like to spend pressing.

The basics commands:
preson - This command starts it all. When you type preson, you will be prompted for 3 pieces of information:
  1. What is the preserve target? - This is the target for the spell. glorishan, 2.glorishan, etc...
  2. Whose corpse is it? - This indicates who will be sent the automated tell after you are finished pressing.
  3. Pres for how long? - This is where you set the amount of time you'd like to pres. It's set at 7 minutes by default (as a lvl 50 grey elven cleric, 7 minutes gives 100 hours most of the time).

It will continue to preserve until time has run out, and it will finish by sending a tell to the pres target letting them know how long you pressed it.
presoff - If you would like to interrupt the pressing, you can use this command and it'll turn everything off.

Note: you must have a preserve alias for this to work, and the alias must be 'pres' -

Code: Select all

#CLASS {preserve}
#ALIAS preson {
  #t+ {preserve|pres}
  #t+ {preserve|alarm}
  prescorpse=%prompt( 2.pcorpse, "What is the preserve target?")
  prescorpsename=%prompt( Glorishan, "Whose corpse is it?")
  prestime=%prompt( 7:00, "Pres for how long? Must be in M:SS format")
  #say Autopressing @prescorpse
  presnow
  }
#ALIAS presoff {
  #t- {Preserve|pres}
  #t- {Preserve|alarm}
  #t- {Preserve|hours}
  #untrig @prestime
  #say Autopresser off
  #wa 7000
  #math hours1 (@hours/60)
  #math hours2 (@hours-(@hours/60)*60)
  #say @prescorpse preserved for @hours1 hours and @hours2 minutes
  t @prescorpsename Pressed your corpse for @hours1 hours and @hours2 minutes (automated tell)
  }
#ALIAS presnow {pres @prescorpse}
#CLASS 0
#CLASS {preserve|pres} {disable}
#TRIGGER {You complete your spell...} {presnow}
#TRIGGER {You don't have that spell memorized.} {
  r
  pray
  med
  }
#TRIGGER {Your prayers are complete.} {
  st
  presnow
  }
#TRIGGER {You can't concentrate enough while resting.} {
  st
  presnow
  }
#CLASS 0
#CLASS {preserve|alarm} {disable}
#TRIGGER {Corpse of * is preserved for (%n) additional hours.} {
  #alarm {+@prestime} {
    #t- {Preserve|pres}
    #untrig @prestime
    #say Autopresser off
    #var hours
    #alarm {+0:08} {
      #t- {preserve|hours}
      #math hours1 (@hours/60)
      #math hours2 (@hours-(@hours/60)*60)
      #say @prescorpse preserved for @hours1 hours and @hours2 minutes
      t @prescorpsename Pressed @prescorpse for @hours1 hours and @hours2 minutes (automated tell)
      }
    }
  #var hours 0
  #t+ {preserve|hours}
  #t- {preserve|alarm}
  }
#CLASS 0
#CLASS {preserve|hours} {disable}
#TRIGGER {Corpse of * is preserved for (%n) additional hours.} {
  #ad hours %1
  #math hours1 (@hours/60)
  #math hours2 (@hours-(@hours/60)*60)
  #say @hours1 hr @hours2 min
  }
#CLASS 0
Last edited by Glorishan on Thu May 11, 2006 4:01 pm, edited 1 time in total.
Touk says 'ac > glorishan > mr > touk > hps'
Siamorphe OOC: 'If AFKing is the devil, then Corth is the Antichrist and Glorishan is the False Prophet who supports him.'
Referring to the guild on 8/28/06: Oghma responds to your petition with 'your leadership team averages 280 days MIA :('
Glorishan
Sojourner
Posts: 456
Joined: Thu Feb 15, 2001 6:01 am
Location: Minneapolis, MN

Postby Glorishan » Fri Apr 28, 2006 6:27 am

Ok, so here's a 2nd version of it. This version allows you to choose how many hours you want to pres a corpse for, rather than the amount of time you want to cast for. Same commands, and this is actually a bit simpler than the other version.
As with the other version, you need to have a preserve alias in place, and the alias must be 'pres' - if you want to change this, I'm sure you can figure it out.

The basics commands:
preson - This command starts it all. When you type preson, you will be prompted for 3 pieces of information:
  1. Image
    This is the target for the spell. glorishan, 2.glorishan, etc...
  2. Image
    This indicates who will be sent the automated tell after you are finished pressing. ie: If you are pressing 13.corth, it will tell corth you just put x number of hours on 13.corth.
  3. Image
    This is where you set the number of hours you'd like to pres.

It will continue to preserve until the target has the desired number of hours on it, and it will finish by sending a tell to the pres target letting them know how long you pressed it.
presoff - If you would like to interrupt the pressing, you can use this command and it'll turn everything off.

Code: Select all

#CLASS {preserve}
#ALIAS preson {
  #t+ {preserve|pres}
  #t+ {preserve|hours}
  #t+ {preserve|trig}
  prescorpse=%prompt( 2.pcorpse, "What is the preserve target?")
  prescorpsename=%prompt( Glorishan, "Whose corpse is it?")
  prestime=%prompt( 100, "Pres for how many hours?")
  #say Autopressing @prescorpse
  #var hours 0
  presnow
  }
#ALIAS presoff {
  abo
  #t- {Preserve|pres}
  #t- {Preserve|trig}
  #say Autopresser off
  #t- {preserve|hours}
  #math hours1 (@hours/60)
  #math hours2 (@hours-(@hours/60)*60)
  #say @prescorpse preserved for @hours1 hours and @hours2 minutes
  t @prescorpsename Pressed @prescorpse for @hours1 hours and @hours2 minutes (automated tell)
  }
#ALIAS presnow {pres @prescorpse}
#CLASS 0
#CLASS {preserve|hours} {disable}
#TRIGGER {Corpse of * is preserved for (%n) additional hours.} {
  #ad hours %1
  #math hours1 (@hours/60)
  #math hours2 (@hours-(@hours/60)*60)
  #say @hours1 hr @hours2 min
  }
#CLASS 0
#CLASS {preserve|pres} {disable}
#TRIGGER {You don't have that spell memorized.} {
  r
  pray
  med
  }
#TRIGGER {Your prayers are complete.} {
  st
  presnow
  }
#TRIGGER {You can't concentrate enough while resting.} {
  st
  presnow
  }
#CLASS 0
#CLASS {preserve|trig} {disable}
#TRIGGER {Corpse of * is preserved for (%n) additional hours.} {#if (@prestime*60 > @hours) {presnow} {presoff}}
#CLASS 0
Last edited by Glorishan on Thu Jun 29, 2006 2:18 pm, edited 3 times in total.
Touk says 'ac > glorishan > mr > touk > hps'

Siamorphe OOC: 'If AFKing is the devil, then Corth is the Antichrist and Glorishan is the False Prophet who supports him.'

Referring to the guild on 8/28/06: Oghma responds to your petition with 'your leadership team averages 280 days MIA :('
Glorishan
Sojourner
Posts: 456
Joined: Thu Feb 15, 2001 6:01 am
Location: Minneapolis, MN

Postby Glorishan » Fri Apr 28, 2006 6:40 pm

Oh yeah, make sure you're at keys while using this, else ye be botting!
Touk says 'ac > glorishan > mr > touk > hps'

Siamorphe OOC: 'If AFKing is the devil, then Corth is the Antichrist and Glorishan is the False Prophet who supports him.'

Referring to the guild on 8/28/06: Oghma responds to your petition with 'your leadership team averages 280 days MIA :('
Glorishan
Sojourner
Posts: 456
Joined: Thu Feb 15, 2001 6:01 am
Location: Minneapolis, MN

Postby Glorishan » Thu May 04, 2006 2:12 am

2nd version of this is updated to fix some bugginess with the presoff command. Should be the only correction necessary.
Touk says 'ac > glorishan > mr > touk > hps'

Siamorphe OOC: 'If AFKing is the devil, then Corth is the Antichrist and Glorishan is the False Prophet who supports him.'

Referring to the guild on 8/28/06: Oghma responds to your petition with 'your leadership team averages 280 days MIA :('

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 5 guests