Find
You are looking at a command called wield
wield {object}
Wield an object, like a sword or a daisy.
create the guilded sword of happiness. wield it
If your carrying the object (
inv
to see what you are carrying) you will take it out first, then wield it.
scripting notes
This command sends out the keword 'wields' if sucessful and 'wieldfail' if the object was locked.
if reacting to wield then saysomething;
Created by
wolis
, last updated 04 Sep 2009
Code
get $target in $actor;
if $target's loc == $actor then wieldfrominv else checkground;
##wieldfrominv:
relocate $target to $loc print "[$target] is plucked away by [$actor]" then "[$actor] pulls out [$target]";
runsub dothewieldthing;
##checkground:
get $target in $loc;
if $target > 0 then chklock else fail;
##chklock:
$pwd = $actor's pwd;
if $pwd like $target's pwd then dothewieldthing else itslocked;
##dothewieldthing:
clear $target,all;
unhost $target;
set $target's host to $actor;
set $target's hosthow to 'by';
set $target's pose to 'wielded';
$spd = (menacingly,proudly,quickly,slowly);
$how = (in a suprising way,with gusto,with style,with panache,with grace,clumsily);
$wav = (waving,brandishing,shaking,raising);
getgender $target;
$thimher = $himher;
getgender $actor;
say 'wields',"[$actor] $spd wields [$target] $how, $wav $thimher above $hisher head";
relook $loc;
##itslocked:
say 'wieldfail',"[$actor] really wants to wield [$target] but its locked";
##fail:
var $click_cmd to 'wield';
var $desc_intro to "Click on the object you want to $click_cmd:
";
look $loc,list;
msg $loc,$actor,$actor,0,'force',"force:look $loc,list