Find
You are looking at a command called zap
zap {object}
Moves an object off anything it was on. This does the same as
push
Created by
wolis
, last updated 20 May 2007
Code
get $target in $loc;
if $target > 0 then blastit else fail;
##blastit:
say 'zap',"sparks fly from [$actor] towards [$target]";
say 'moves',"[$target] says 'OUCH!' and flys backwards!";
msg $loc,$actor,0,0,'force',"force:look $loc";
if $target's class eq 'player' then outdoor else end;
##outdoor:
var $trans to $target;
find $loc,random doorway;
var $tlink to $found_id's link;
var $tloc to $tlink's loc;
say 'leaves',"[$trans] continues out through [$found_id]";
set $trans's loc to $tloc;
clear $trans,all;
msg $tloc,$trans,$tlink,0,'arrives',"[$trans] stumbles in from [$tlink]";
rem look $loc;
msg $tloc,$actor,0,0,'force',"force:look $tloc";
refresh $target;
##fail:
say 'blastfail',"[$actor] tries to zap $cmd_text but nothing happens";