Away Mode and Message (script)

From Elanthipedia
Jump to navigation Jump to search
Away Mode and Message (script)
Category utility
Front-end Genie
Author Isharon


Features

These scripts put you in sleep mode to drain experience while AFK. Once you run out of experience, the idle script aborts all other scripts, runs the awaken script to set you up for active play when you return, and then logs you out of the game.

In order to avoid an unexpected death (such as during invasions) and as a courtesy to your fellow players, do not idle in a public place. It is best to use a locked room, such as a player-owned home or inn. See Idle experience drain for more details.

Experience and Interaction Avoidance

Before going into idle, this script does the following:

  • adopts a defensive stance (evasion and shield), reallocating unused offensive stance points to defenses.
  • stops performing songs on instruments
  • stows held items
  • stops teaching and listening to classes
  • releases cyclic spells, held mana, and prepared spells
  • turns on all avoids
  • goes into sleep mode (prevents inadvertent experience gain)
  • closes packs, sheaths, herb pouches, and gem pouches
  • sets demeanor to cold

The awaken script reverses some of these changes:

  • turns off avoids (except dancing)
  • exits sleep mode
  • opens packs, sheaths, herb pouches, and gem pouches
  • returns to your default demeanor (requires global variable)

Away Message

During sleep mode, it will send a private OOC away message to those who attempt to communicate with you. There is a timer to prevent the away message script from spamming responses if you receive more than one message within a 60-second period.

Event Responds Via
someone whispers to you OOC command
someone speaks to you OOC command
someone thinks to you gwethdesuan (personal message)
someone gweths your name gwethdesuan (personal message)

Instructions

The scripts must have the following names to work:

  • sleep.cmd
  • idle.cmd
  • afkmessage.cmd
  • awaken.cmd

Once you have configured the required global variables, simply type .SLEEP to enter sleep mode. When you return, type .AWAKEN to return to active play.

Be sure to review the away messaging in afkmessage.cmd. By default, it is set to give alternate contact information (AIM and e-mail).

Required Genie Settings

You must configure the following global variables to use the script.

#var {pack} {your pack}
#var {sheath} {your weapon sheath}
#var {demeanor} {your default demeanor}
#var {AIMname} {your AIM screen name}
#var {email} {your e-mail address}

Here is an example of how to set those variables:

#var pack legionary's pack
#var sheath greatsword sheath
#var demeanor reserved
#var AIMname PlayerDR
#var email playerdr/@play.net
#var save

(Genie requires a backslash before the at sign. Otherwise, it just moves your cursor to the position of the at sign and doesn't send the command.)

Scripts

sleep.cmd

put #class arrive off
put #class racial on
put #class rp on
put #class combat off
put #class joust off

if $charactername = Isharon then
{
put stance set 0 100 100 0
waitforre ^Setting your Evasion stance to
put stance set 12 100 100 0
waitforre ^Setting your Evasion stance to
}

if $charactername = Sarkranis then
{
put stance set 100 0 100 0
waitforre ^Setting your Evasion stance to
put stance set 100 6 100 0
waitforre ^Setting your Evasion stance to
}

send stop play
waitforre ^You stop playing your song|^In the name of love|^But you're not performing anything

send stow right
waitforre ^You put|^Stow what|^There isn't|^The .+ is too long to fit in the

send stow left
waitforre ^You put|^Stow what|^There isn't|^The .+ is too long to fit in the

send stop teach
waitforre ^You stop|^But you

send stop listen
waitforre ^You stop|^But you

send release all
waitforre ^You aren't harnessing any mana|^You aren't holding any mana|^You aren't preparing a spell|^You have no cyclic spell active to release|^You let your concentration lapse and feel the spell's energies dissipate|^You release the mana you were holding

send avoid !all
waitforre ^All AVOID options turned on
send sleep
waitforre ^You relax|^You are already

put close my $sheath
waitforre ^You|^That|^The|^What were you referring to
put close my $pack
waitforre ^You|^That|^The|^What were you referring to
put close my herb pouch
waitforre ^You|^That|^The|^What were you referring to
put close my gem pouch
waitforre ^You|^That|^The|^What were you referring to

send demeanor cold
waitforre ^You decide

send .idle

idle.cmd

action goto exit when ^\s+No skills have field experience or none meet your criteria!$

put /timers end all
put .afkmessage

put #window hide OOC
put #window show OOC
put #window hide Experience
put #window show Experience
put #window hide Thoughts
put #window show Thoughts
put #window hide Log
put #window show Log

put /timers start idle

idle:
put skills
pause 60

put look
pause 60
put /timers list

goto idle

exit:
exit

afkmessage.cmd

var whisper-time $gametime
var think-time $gametime
var chatter-time $gametime
var mentor-time $gametime
action var player $1;goto WhisperAFK when ^(\w+) just tried to whisper to you, but you turned away
action var player $1;goto WhisperAFK when ^(\w+) whispers, \"
action var player $1;goto WhisperAFK when ^(\w+) (asks|exclaims to|says to) you, \".+\"$
action var player $1;goto WhisperAFK when ^(\w+) (\S+) (asks|exclaims to|says to) you, \".+\"$
action var player $1;goto WhisperAFK when ^(\w+) (asks|exclaims|says), \"$charactername\"$
action var player $1;goto WhisperAFK when ^(\w+) (\S+) (asks|exclaims|says), \"$charactername\"$
action var player $1;goto WhisperAFK when ^(\w+) (asks|exclaims|says), \"$charactername.+\"$
action var player $1;goto WhisperAFK when ^(\w+) (\S+) (asks|exclaims|says), \"$charactername.+\"$
action var player $1;goto WhisperAFK when ^(\w+) (asks|exclaims|says), \".+$charactername.+\"$
action var player $1;goto WhisperAFK when ^(\w+) (\S+) (asks|exclaims|says), \".+$charactername.+\"$
action var player $1;goto WhisperAFK when ^(\w+) (asks|exclaims|says), \".+$charactername\"$
action var player $1;goto WhisperAFK when ^(\w+) (\S+) (asks|exclaims|says), \".+$charactername\"$
action var player $1;goto ThinkAFK when ^Your mind hears (\w+) thinking, \"<to you>\"
action var player $1;goto ThinkAFK when ^\[Personal\]\[(\w+)\]\s+\"\<to you\>\"\s+\"(.*)\"$
action var player $1;goto ThinkAFK when ^\[(.+)\]\[(\w+)\](?! \"\<to you\>\")\"$charactername\"$
action var player $1;goto ThinkAFK when ^\[(.+)\]\[(\w+)\](?! \"\<to you\>\")\"$charactername.+\"$
action var player $1;goto ThinkAFK when ^\[(.+)\]\[(\w+)\](?! \"\<to you\>\")\".+$charactername.+\"$
action var player $1;goto ThinkAFK when ^\[(.+)\]\[(\w+)\](?! \"\<to you\>\")\".+$charactername\"$
action goto ChatterAFK when ^Chatter\[(.+)\].+$charactername
action goto MentorAFK1 when ^Your mind burns with (\w+)'s thoughts,.+$charactername
action var player $1;goto MentorAFK2 when ^You sense a focused thought from (\w+), \"(.+)\"
action goto MentorAFK3 when ^The voice of Cleranch the doorman softly echoes from somewhere within the mansion, \"(.+) just rang the doorbell\.
action goto MentorAFK3 when ^Your mind burns with Aldamus' thoughts, \"(.+) just rang the doorbell at (Aldamus House|Jadewater Mansion)

WhisperAFK:
if $gametime > %whisper-time then
{
put OOC %player I am AFK right now. I'll get back to you later. You can also leave me a message on AIM at $AIMname or write to $email.
var whisper-time $gametime
math whisper-time add 60
}
goto loopAFK

ThinkAFK:
if $gametime > %think-time then
{
send send %player OOC: I am AFK right now. I'll get back to you later. You can also leave me a message on AIM at $AIMname or write to $email.
var think-time $gametime
math think-time add 60
}
goto loopAFK

ChatterAFK:
if $gametime > %chatter-time then
{
put chatter I am AFK right now. I'll get back to you later. You can also leave me a message on AIM at $AIMname or write to $email.
var chatter-time $gametime
math chatter-time add 60
}
goto loopAFK

MentorAFK1:
if $gametime > %mentor-time then
{
put Mentor message I am AFK right now. I'll get back to you later. You can also leave me a message on AIM at $AIMname or write to $email.
var mentor-time $gametime
math mentor-time add 60
}
goto loopAFK

MentorAFK2:
if $gametime > %mentor-time then
{
put Mentor message %player, I am AFK right now. I'll get back to you later. You can also leave me a message on AIM at $AIMname or write to $email.
var mentor-time $gametime
math mentor-time add 60
}
goto loopAFK

MentorAFK3:
if $gametime > %mentor-time && $charactername = Isharon then
{
put Mentor message I am AFK right now.
var mentor-time $gametime
math mentor-time add 60
}
goto loopAFK

loopAFK:
pause 60
goto loopAFK

awaken.cmd

put #class arrive off
put #class racial on
put #class rp on
put #class combat off
put #class joust off
put /timers end all

put avoid all
waitforre ^All
put avoid !dancing
waitforre ^You're now avoiding
put awaken
waitforre ^You awaken|^But you

put open my $sheath
waitforre ^You|^That|^The|^What were you referring to
put open my $pack
waitforre ^You|^That|^The|^What were you referring to
put open my $lockpicks
waitforre ^You|^That|^The|^What were you referring to
put open my alchemist's kit
waitforre ^You|^That|^The|^What were you referring to
put open my thigh bag
waitforre ^You|^That|^The|^What were you referring to
put open my herb pouch
waitforre ^You|^That|^The|^What were you referring to
put close my gem pouch
waitforre ^You|^That|^The|^What were you referring to

put demeanor $demeanor
waitforre ^You adopt|^You decide|^You show|^You love

put #parse SCRIPT DONE
exit