#1
memory test trigger~
0 o 100
~
* assign this to a mob, force the mob to mremember you, then enter the
* room the mob is in while visible (not via goto)
say I remember you, %actor.name%!
~
#2
mob greet test~
0 g 100
~
if %direction%
say &cHello, %actor.name%, how are things to the %direction%?&n
else
* if the character popped in (word of recall, etc) this will be hit
say Where did YOU come from, %actor.name%?
end
~
#3
obj get test~
1 g 100
~
%echo% You hear, 'Please put me down, %actor.name%'
~
#4
room test~
2 g 100
~
wait 50
wsend %actor% you enter a room
~
#5
car/cdr test~
0 d 100
test~
say speech: %speech%
say car: %speech.car%
say cdr: %speech.cdr%
~
#6
subfield test~
0 c 100
test~
* test to make sure %actor.skill(skillname)% works
say your hide ability is %actor.skill(hide)% percent.
*
* make sure %actor.eq(name)% works too
eval headgear %actor.eq(head)%
if %headgear%
say You have some sort of helmet on
else
say Where's your headgear?
halt
end
say Fix your %headgear.name%
~
#7
object otransform test~
1 jl 7
test~
* test of object transformation (and remove trigger)
* test is designed for objects 3020 and 3021
* assign the trigger then wear/remove the item
* repeatedly.
%echo% Beginning object transform.
if %self.vnum% == 3020
otransform 3021
else
otransform 3020
end
%echo% Transform complete.
~
#8
makeuid and remote testing~
2 c 100
test~
* makeuid test ---- assuming your MOBOBJ_ID_BASE is 200000,
* this will display the names of the first 10 mobs loaded on your MUD,
* if they are still around.
eval counter 0
while (%counter% < 10)
makeuid mob 200000+%counter%
%echo% #%counter% %mob.id% %mob.name%
eval counter %counter% + 1
done
%echoaround% %actor% %actor.name% cannot see this line.
*
*
* this will also serve as a test of getting a remote mob's globals.
* we know that puff, when initially loaded, is id 200000. We'll use remote
* to give her a global, then %mob.globalname% to read it.
makeuid mob 200000
eval globalname 12345
remote globalname %mob.id%
%echo% %mob.name%'s "globalname" value is %mob.globalname%
~
#9
mtransform test~
0 g 100
~
* mtransform test
* as a greet trigger, entering the room will cause
* the mob this is attached to, to toggle between mob 1 and 99.
%echo% Beginning transform.
if %self.vnum%==1
mtransform -99
else
mtransform -1
end
%echo% Transform complete.
~
#10
attach test~
0 d 100
attach~
attach 9 %self.id%
~
#11
attach test~
0 d 100
detach~
detach 9 %self.id%
~
#12
spellcasting test~
0 c 100
kill~
* This command trigger will disallow anyone from trying to
* use the kill command, and will toss a magic missile at them
* for trying.
dg_cast 'magic missile' %actor%
return 0
~
#13
Roomsave Cleanup - Load Mob~
1 n 100
~
wait 1
%load% mob 92
~
#14
Roomsave Cleanup - Put Stuff~
0 n 100
~
eval Counter 0
while %Counter% < 20
get all
junk all.key
put all pot
put all crate
eval Counter %Counter% + 1
done
%purge% %self%
~
#16
NULL TRIGGER~
0 n 1
test~
halt
~
#20
PORTAL Open~
1 n 100
~
*Load Portal
%echo% |bA small blue light forms in the middle of the room.|n
wait 1s
%echo% |bThe light |wexplodes|b outward forming a portal to a different dimension.|n
otimer 5
~
#21
PORTAL close~
1 f 100
~
*Destroy Portal
%echo% |bThe portal begins to distort itself.|n
wait 5s
%echo% |bThe portal shakes uncontrollably, imploding inward resulting in a loud pop.|n
opurge %self%
~
#22
PORTAL look in~
1 c 100
l~
*Look In Portal
if %cmd.mudcommand% != look || !(inside /= %arg.car%) || %arg.cdr% != portal
return 0
halt
end
%echo% DEBUG v4: %self.val4%
%send% %actor% |bYou stick your head through and see...|n
eval origroom %actor.room%
%teleport% %actor% %self.val4%
%force% %actor% look
%teleport% %actor% %origroom%
%echoaroundc% %actor% %actor.name% sticks his head through the portal, and looks around.
return 1
~
#23
PORTAL enter~
1 c 100
en~
*Enter Portal
if %cmd.mudcommand% != enter || %arg% != portal
halt
end
%echoaroundc% %actor% %actor.name% steps into the portal causing a rippling effect across it's surface.
%send% %actor% You step into the portal.
%teleport% %actor% %self.val4%
%force% %actor% look
%echoaroundc% %actor% %actor.name% steps out of the portal.
~
#30
SENTINEL maintain location if moved~
0 b 100
~
if %LoadRoom%
eval ThisRoom %self.room%
if %LoadRoom% != %ThisRoom.vnum%
emote looks around.
stand
wait 1 s
pathto Dir %LoadRoom%
%Dir%
end
else
eval MyRoom %self.room%
eval LoadRoom %MyRoom.vnum%
global LoadRoom
end
~
$~