Find
You are looking at a command called shove
shove {object} position
shove {object} to the position
Moves and object on the map view to the position specified.
Position can be center, middle, up, down, left, right, noth, east, south, west, top and bottom.
eg
shove the house to the west
or
shove the house to the center
or
shove the house up
Created by
wolis
, last updated 24 Dec 2006
Code
swap $cmd_text so "to the " is "";
get $target,$lastword in $loc;
if $target > 0 then continue else fail;
##continue:
var $nextsub to "shove$lastword";
runsub $nextsub;
##shovecentre:runsub shovecenter;
##shovemiddle:runsub shovecenter;
##shovetop:runsub shoveup;
##shovenorth:runsub shoveup;
##shovebottom:runsub shovedown;
##shovesouth:runsub shovedown;
##shoveeast:runsub shoveright;
##shovewest:runsub shoveleft;
##shovecenter:
set $target's x to $maxx/2;
set $target's y to $maxy/2;
look $loc,map;
msg $loc,$actor,$actor,0,'force',"force:look $loc,map";
##shoveup:
set $target's y to $miny;
look $loc,map;
msg $loc,$actor,$actor,0,'force',"force:look $loc,map";
##shovedown:
set $target's y to $maxy;
look $loc,map;
msg $loc,$actor,$actor,0,'force',"force:look $loc,map";
##shoveleft:
set $target's x to $minx;
look $loc,map;
msg $loc,$actor,$actor,0,'force',"force:look $loc,map";
##shoveright:
set $target's x to $maxx;
look $loc,map;
msg $loc,$actor,$actor,0,'force',"force:look $loc,map";
##fail:
say 'fails',"[$actor] could not shove [$cmd_text]";
look $loc,map;