View Single Post
  #5  
Old 02-26-2004, 02:34 AM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

thx for encouragments. This is still very alpha, and not foolproof. But it would do no harm afaik, so anyone who would give a try and report is welcome.

There is a new version avalaible (same link above)

added aliases : the !alias and !unalias allow to substitute in the command line. Usage is !alias <old> <new>, and !unalias <old>. It's better to single quote if you use regular expressions. Below is a sample :

Code:
!echo on
!alias foo bar
/ooc i say foo
!unalias foo
!unalias foo
!alias '\b\w{4}\b' **** ; get rid of 4 letter words. All of them
/ooc abcd is a 4 letter word ?
!alias god dieu
/ooc in french god is a 4LW
!alias short 'much longer this way'
/ooc i'm saying short
!unalias '\b\w{4}\b'
!alias show_variables perl foreach $clef (keys %uvars) { print "$clef => $uvars{$clef}\n"}
/ooc show_variables
!show_variables
gives out :


Code:
EQEmu test >!alias foo bar
[3]setting alias for foo to bar
EQEmu test >/ooc i say foo
Brent da Kopy says out of character 'i say bar'
EQEmu test >!unalias foo
[3]unaliasing foo
EQEmu test >!unalias foo
[3]unaliasing foo
EQEmu test >!alias '\b\w{4}\b' ****
[3]setting alias for \b\w{4}\b to ****
EQEmu test >/ooc abcd is a 4 letter word ?
Brent da Kopy says out of character '**** is a 4 letter **** ?'
EQEmu test >!alias god dieu
[3]setting alias for god to ****
EQEmu test >/ooc in french god is a 4LW
Brent da Kopy says out of character 'in french **** is a 4LW'
EQEmu test >!alias short 'much longer this way'
[3]setting alias for short to **** longer **** way
EQEmu test >/ooc i'm saying short
Brent da Kopy says out of character 'i'm saying **** longer **** way'
EQEmu test >!unalias '\b\w{4}\b'
[3]unaliasing '\b\w{4}\b'
EQEmu test >!alias show_variables perl foreach $clef (keys %uvars) { print "$clef => $uvars{$clef}\n"}
[3]setting alias for show_variables to perl foreach $clef (keys %uvars) { print "$clef => $uvars{$clef}\n"}
EQEmu test >/ooc show_variables
Brent da Kopy says out of character 'perl foreach $clef (keys %uvars) { print "$clef => $uvars{$clef}\n"}'
EQEmu test >!show_variables
charid => 5432
uguildid => 0
ulevel => 65
deity => 201
userid => 6543
name => Brent da Kopy
uguildrank => 0
race => 1
class => 1
As you see, it allows to define commands as aliases to simple perl scripts.

Other (minor) changes :
fixed /ooc color
$npcid and $mobid are now equivalent, as $mobid has no meaning in the simulator.

Todo :
some fixes ...
Also i'm looking for information on EVENT_SLAY, #attack, ... to define procs that trigger / handle them. Any link you know of would be appreciated.
Reply With Quote