Find
You are looking at an average german shepherd who's name is Tom
I have moved from Nintendogs to COW and Chaotic Bob is still my master. Ruff!
Created by
Chaotic Bob
, last updated 19 Jan 2007
Code
##say:
runsub master;
##master:
rem - first make sure we are seeing what we expect - remark it out when you dont need it any more;
say 'msg',"[$actor] . o 0 (
did [$init_obj] just say '$init_cmd'
)";
rem - then use | not , to delmit the choices (Im working on a fix so , work as well.. but not finished yet);
if $init_cmd like (collapse|come|sick 'em) then whoisit else end;
##whoisit:
rem - finally, use the $init_obj's name not just the $init_obj (the objects ID) and use 'like' not 'eq' as this will find a match anywhere not an exact match;
if $init_obj's name like (Chaotic Bob|wolis) then whichone else ruff;
##whichone:
if $init_cmd like "collapse" then dirt else continue;
##dirt:
say 'msg',"[$actor] eagerly barks and falls on his stomach";
##ruff:
say 'msg',"[$actor] growls fiercely at [$init_obj]";
##arf:
say 'msg',"[$actor] wags his tail happily";
##continue:
if $init_cmd like "sick 'em" the attackwho else continue2;
##continue2:
if $init_cmd like "come" then chase else confused;
##confused:
say 'msg',"[$actor] looks confused, why not try again?";
##attackwho:
find $loc, random not me not "Chaotic Bob" not doorway;
say 'msg',"[$actor] viciously attacks $found_id";
##chase:
call "follow $init_obj";