Find
You are in a doggy
I'm Doggy the dog. I'm very silly. I love bones, bones, bones and bones. I confess that I love cuddles too.
Created by
xiii
, last updated 01 Aug 2015
Code
##arrives:runsub arrivestest;
##awakes:runsub awakestest;
##use:runsub usetest;
##whistle:runsub whistletest;
##tickloc:runsub whattodo;
##tickhour2:runsub moveme;
##moveme:
find $loc,random doorway;
call "go $found_id";
rem: main parts;
##usetest:
runsub isitme;
if $actoristarget eq 1 then teststrokeplayer else bejalous;
##teststrokeplayer:
runsub lookforplayer;
if $foundplayer > 0 then testknownedplayer else notlove;
##testknownedplayer:
if $foundplayer eq 1 then lovefriend else lovemaster;
##whistletest:
runsub isitme;
if $actoristarget eq 1 then testlookforplayer;
##testlookforplayer:
runsub lookforplayer;
if $foundplayer > 0 then testwhereisinitobj else dosomething;
##testwhereisinitobj:
runsub whereisinitobj;
if $initobjishere eq 0 then moveme else moveears;
##dosomething:
if $initobjishere eq 0 then woofme else moveears;
##arrivestest:
runsub verifynotinbed;
if $isinbed eq 1 then jumpoutbefore else continuearrives;
##jumpoutbefore:
runsub jumpoutbed;
runsub continuearrives;
##continuearrives:
runsub lookforplayer;
if $foundplayer > 0 then testknownedplayer else notlove;
##testknownedplayer:
if $foundplayer eq 1 then lovefriend else lovemaster;
##awakestest:
runsub testwhereisinitobj;
if $initobjishere eq 1 then arrivestest else nothing;
##whattodo:runsub testjumpinbed/2;
##testjumpinbed:
runsub verifynotinbed;
if $isinbed eq 0 then doggyjump else nothing;
##doggyjump:
foreach in $loc do shearchbed;
##shearchbed:
if $for_id's class eq bed then jumpinbed;
rem: technical stuff like tests and variables positionning;
##isitme: get $target;
if $target eq $actor then actoristarget else actorisnottarget;
##actoristarget: var $actoristarget to 1;
##actorisnottarget: var $actoristarget to 0;
##lookforplayer:
var $foundplayer to 0;
load $actor's listoffriends;
foreach in list do isitafriend;
if $foundplayer eq 0 then isitmaster;
##isitafriend: if $list_line eq $init_obj's name then itisafriend;
##itisafriend: var $foundplayer to 1;
##isitmaster: load $actor's mastername;
foreach in list do testmastername;
##testmastername: if $list_line eq $init_obj's name then itismaster
##itismaster: var $foundplayer to 2;
##whereisinitobj:
var $initobjishere to 0;
foreach in $loc do checkinitobj;
##checkinitobj: if $for_id eq $init_obj then initobjishere;
##initobjishere: var $initobjishere to 1;
##verifynotinbed:
var $isinbed to 0;
var $doggyhost to $actor's host;
if $doggyhost's class eq bed then itisinbed;
##itisinbed:
var $isinbed to 1;
rem: actions;
##moveme:
var $temp to $actor's loc;
clear $target,all;
msg $temp,$actor,0,0,'leaves',"[$actor] suddenly pricks up its ears and dissapears";
var $loc to $init_obj's loc;
set $actor's loc to $loc;
rem say 'get',"[$init_obj] summoned [$actor]";
msg $loc,$actor,0,0,'xarrives',"[$actor] arrives running like a fool, wof! zwaof!",$init_obj,$text;
msg $loc,$actor,$actor,0,'force',"force:look $loc";
##arrives:runsub arrivestest;
##awakes:runsub awakestest;
##use:runsub usetest;
##whistle:runsub whistletest;
##tickloc:runsub whattodo;
rem: main parts;
##usetest:
runsub isitme;
if $actoristarget eq 1 then teststrokeplayer else bejalous;
##teststrokeplayer:
runsub lookforplayer;
if $foundplayer > 0 then testknownedplayer else notlove;
##testknownedplayer:
if $foundplayer eq 1 then lovefriend else lovemaster;
##whistletest:
runsub isitme;
if $actoristarget eq 1 then testlookforplayer;
##testlookforplayer:
runsub lookforplayer;
if $foundplayer > 0 then testwhereisinitobj else dosomething;
##testwhereisinitobj:
runsub whereisinitobj;
if $initobjishere eq 0 then moveme else moveears;
##dosomething:
if $initobjishere eq 0 then woofme else moveears;
##arrivestest:
runsub verifynotinbed;
if $isinbed eq 1 then jumpoutbefore else continuearrives;
##jumpoutbefore:
runsub jumpoutbed;
runsub continuearrives;
##continuearrives:
runsub lookforplayer;
if $foundplayer > 0 then testknownedplayer else notlove;
##testknownedplayer:
if $foundplayer eq 1 then lovefriend else lovemaster;
##awakestest:
runsub testwhereisinitobj;
if $initobjishere eq 1 then arrivestest else nothing;
##whattodo:runsub testjumpinbed/2;
##testjumpinbed:
runsub verifynotinbed;
if $isinbed eq 0 then doggyjump else nothing;
##doggyjump:
foreach in $loc do shearchbed;
##shearchbed:
if $for_id's class eq bed then jumpinbed;
rem: technical stuff like tests and variables positionning;
##isitme: get $target;
if $target eq $actor then actoristarget else actorisnottarget;
##actoristarget: var $actoristarget to 1;
##actorisnottarget: var $actoristarget to 0;
##lookforplayer:
var $foundplayer to 0;
load $actor's listoffriends;
foreach in list do isitafriend;
if $foundplayer eq 0 then isitmaster;
##isitafriend: if $list_line eq $init_obj's name then itisafriend;
##itisafriend: var $foundplayer to 1;
##isitmaster: load $actor's mastername;
foreach in list do testmastername;
##testmastername: if $list_line eq $init_obj's name then itismaster
##itismaster: var $foundplayer to 2;
##whereisinitobj:
var $initobjishere to 0;
foreach in $loc do checkinitobj;
##checkinitobj: if $for_id eq $init_obj then initobjishere;
##initobjishere: var $initobjishere to 1;
##verifynotinbed:
var $isinbed to 0;
var $doggyhost to $actor's host;
if $doggyhost's class eq bed then itisinbed;
##itisinbed:
var $isinbed to 1;
rem: actions;
##moveme:
var $temp to $actor's loc;
clear $target,all;
msg $temp,$actor,0,0,'leaves',"[$actor] suddenly pricks up its ears and dissapears";
var $loc to $init_obj's loc;
set $actor's loc to $loc;
rem say 'get',"[$init_obj] summoned [$actor]";
msg $loc,$actor,0,0,'xarrives',"[$actor] arrives running like a fool, waof! waof!",$init_obj,$text;
msg $loc,$actor,$actor,0,'force',"force:look $loc";
##lovefriend:
var $dogfeel to (I am so happy,too much happiness,joy of joys);
var $dogact to (wags its tail,jumps foolishly everywhere,does a nice somersault);
var $dogknows to (I recognize the subtle garlic smell of,my tender nose is overcomed by the strange odour of,i suddenly scent the musty smell of);
clear $target,all;
var $msg to "$dogknows [$init_obj], $dogfeel. wof wof";
say 'nothing',"[$actor] $dogact and say '$msg'";
##lovemaster:
var $dogmastermsg to (it is my beloved master,my dear master,I melt beneath felicity,a gigantic wave of happiness overwhelms me);
var $dogknows to (I recognize the subtle smell of,my tender nose is overcomed by the divine fragrance of,I suddenly go into raptures over the musty smell of);
clear $target,all;
var $msg to "$dogknows [$init_obj], $dogmastermsg. wof and wof";
say 'nothing',"[$actor] wags its tail and say '$msg'";
##notlove:
clear $target,all;
var $msg to (and grumbles 'eurk... it smells like soap',looking in a strange manner);
say 'nothing',"[$actor] sniffs at [$init_obj]'s pants $msg";
##woofme:
msg 0,$actor,0,0,'shout',"you can hear [$actor] woofing far, far away";
##moveears:
msg $loc,$init_obj,$actor,0,'nothing',"[$actor] pricks up its ears and wonders why it should move";
##bejalous: var $msg to (Could you tell me please what can [$init_obj] apreciates in that [$target]?,my beloved master told me I should not be jealous);
say 'nothing',"[$actor] turns round and grumbles '$msg'";
##jumpinbed:
clear $target,all;
set $actor's host to $for_id;set $actor's hosthow to "on";
say 'jump',"[$actor] jumps on [$for_id]";
msg $loc,$actor,$actor,0,'force',"force:look $loc";
##jumpoutbed:
clear $target,all;
say 'jump',"[$actor] jumps out of [$doggyhost]";
##lovefriend:
var $dogfeel to (I am so happy,too much happiness,joy of joys);
var $dogact to (wags its tail,jumps foolishly everywhere,does a nice somersault);
var $dogknows to (I recognize the subtle garlic smell of,my tender nose is overcomed by the strange odour of,i suddenly scent the musty smell of);
clear $target,all;
var $msg to "$dogknows [$init_obj], $dogfeel. wof wof";
say 'nothing',"[$actor] $dogact and say '$msg'";
##lovemaster:
var $dogmastermsg to (it is my beloved master,my dear master,I melt beneath felicity,a gigantic wave of happiness overwhelms me);
var $dogknows to (I recognize the subtle smell of,my tender nose is overcomed by the divine fragrance of,I suddenly go into raptures over the musty smell of);
clear $target,all;
var $msg to "$dogknows [$init_obj], $dogmastermsg. wof and wof";
say 'nothing',"[$actor] wags its tail and say '$msg'";
##notlove:
clear $target,all;
var $msg to (and grumbles 'eurk... it smells like soap',looking in a strange manner);
say 'nothing',"[$actor] sniffs at [$init_obj]'s pants $msg";
##woofme:
msg 0,$actor,0,0,'shout',"you can hear [$actor] woofing far, far away";
##moveears:
msg $loc,$init_obj,$actor,0,'nothing',"[$actor] pricks up its ears and wonders why it should move";
##bejalous: var $msg to (Could you tell me please what can [$init_obj] apreciates in that [$target]?,my beloved master told me I should not be jealous);
say 'nothing',"[$actor] turns round and grumbles '$msg'";
##jumpinbed:
clear $target,all;
set $actor's host to $for_id;set $actor's hosthow to "on";
say 'jump',"[$actor] jumps on [$for_id]";
msg $loc,$actor,$actor,0,'force',"force:look $loc";
##jumpoutbed:
clear $target,all;
say 'jump',"[$actor] jumps out of [$doggyhost]";
a listoffriends
a mastername
a bone for doggy
a bone