Find
You are looking at a material called living
All objects with material = 'living' will do whatever this objects is coded to do.
Reactions:
push - says Oi
ask - says time (out of order)
Materials:
{none}
Created by
a lost object #39392
, last updated 18 Mar 2008
Code
if txarget of push then sayoi;
if target of ask then replynow;
if reacting to attack then livingguard;
##replynow:
if $init_msg like time then saytime;
##saytime:
var $tim to today -14 hour format %H:%i on %a;
print "[$actor] says 'it's about $tim'";
##sayoi:
print "[$actor] looks around in [$loc] then glares at [$init_obj] and says 'Oi' ";
##livingguard:
if $actor's health > 0 then livingguard2;
##livingguard2:
if $actor's pose == guarding then livingguard3;
##livingguard3:
if $actor's host == $target then livingattack;
##livingattack:
print "[$actor] gets angry at [$init_obj]";
call "attack $init_obj",2;
##xxx:
// Use: Check each mod.;
// If there is a modobj, check if still hosted, else check duration;
// required: $skiller;
// output: $skillvals,$skillvalsc,$skillpos,$update,$valstringc,$valstringp,$modpos,$mod,$modobj,$moddur,$modtick,$valstring,$modend;
// updates skiller's skillvals;
##tickloc:runsub tickmod;
##tickmod:
$skiller = "$actor";
$skillvals = $skiller's skillvals;
$xskillvals = "$skillvals";
manipulate $skillvals get zzz to $z by 1;
foreach in list do tickmod2;
if $skillvals eq $xskillvals then continue else tickmodsave;
##tickmod2:
$skillname = "$for_key";
$valstring = "$for_value";
$xvalstring = "$for_value";
$mods = '';
$skillmod = 0;
manipulate $valstring get mods to $mods by 2;
$xmods = '';
manipulate $xvalstring set mods to $xmods by 2;
manipulate $xvalstring set smod to $skillmod by 2;
manipulate $xskillvals set $skillname to $xvalstring by 1;
manipulate $mods get zzz to $z by 3;
foreach in list do tickmod3;
manipulate $skillvals get zzz to $z by 1;
##tickmod3:
$modname = "$for_key";
$modstring = "$for_value";
manipulate $modstring get mobj to $modobj by 4;
if $modobj > 0 then tickmod5 else tickmod6;
manipulate $mods get zzz to $z by 3;
##tickmod5:
if $modobj's host ne $skiller then tickmoddel else tickmodkeep;
##tickmod6:
manipulate $modstring get mdur to $moddur by 4;
if $moddur < 1 then tickmoddel else tickmod7;
##tickmod7:
take 1 from $moddur;
manipulate $modstring get mtick to $modtick by 4;
if $modtick eq '' then continue else tickmodsay1;
manipulate $modstring set mdur to $moddur by 4;
runsub tickmodkeep;
##tickmoddel:
manipulate $modstring get mend to $modend by 4;
manipulate $modstring get mval to $modval by 4;
take $modval from $skillmod;
manipulate $xvalstring set smod to $skillmod by 2;
manipulate $xskillvals set $skillname to $xvalstring by 1;
if $modend eq '' then continue else tickmodsay2;
##tickmodkeep:
manipulate $modstring get mval to $modval by 4;
add $modval to $skillmod;
manipulate $xmods set $modname to $modstring by 3;
manipulate $xvalstring set mods to $xmods by 2;
manipulate $xvalstring set smod to $skillmod by 2;
manipulate $xskillvals set $skillname to $xvalstring by 1;
##tickmodsay1:
include $modtick;
runsub modtickeffect;
##tickmodsay2:
include $modend;
runsub modendeffect;
##tickmodsave:
set $skiller's skillvals to $xskillvals;