Building & Scripting > Scripting Board

if %cmd.mudcommand%==get

<< < (2/2)

Molly:
First script:

if %actor.is_pc%
  if %arg% == something somewhere
    %load% obj xxxxx %actor%
    %send% %actor% Something good happens
  elseif %arg% == something somewhere1
    %load% obj xxxxx %actor%
    %send% %actor% Something good happens
  elseif %arg% == something somewhere2
    %load% obj xxxxx %actor%
    %send% %actor% Something good happens
  elseif %arg% == something somewhere3
    %load% obj xxxxx %actor%
    %send% %actor% Something good happens
  elseif %arg% == something somewhere4
    %load% obj xxxxx %actor%
    %send% %actor% Something good happens
  elseif %arg% == something somewhere5
    %load% obj xxxxx %actor%
    %send% %actor% Something good happens
  elseif %arg% == something somewhere6
    %load% obj xxxxx %actor%
    %send% %actor% Something good happens
  elseif %arg% == something somewhere7
    %load% obj xxxxx %actor%
    %send% %actor% Something good happens
  elseif %arg% == something somewhere8
    %load% obj xxxxx %actor%
    %send% %actor% Something good happens
  elseif %arg% == something somewhere9
    %load% obj xxxxx %actor%
    %send% %actor% Something good happens
  elseif !%arg%
   %send% %actor% <whatever you want the actor to see>.
  else
    return 0
  end
else
  return 0
end

Second script
Since players go to the Temple of the Gods when they die, you can just use any of the common checks to see if he still is in the room, for instance:

if %actor.room% == !%self-room%
 halt
else
 <move on with the script>
endif

You need to put that check in front of every command line, of course.
(This is generally a good thing to do with lengthy scripts, in case you use %send% %actor%, tell %actor.name%, or other similar commands that don't require the actor to be in the same room as the script.

Navigation

[0] Message Index

[*] Previous page

Go to full version