Class: DpLiving
SOURCE LOCATION: /dpuniverse/std/DpLiving.php
Class Overview
|
An object which is "alive", common code shared between users and NPCs
Creates the following DutchPIPE properties:
- boolean isLiving - Set to TRUE
- string displayMode - "graphical" or "abstract"
- integer sessionAge - Age in seconds of this object
- integer weightCarry - Combined weight of objects in our inventory
- integer maxWeightCarry - Maximum weight this object can carry
- integer volumeCarry - Combined volume of objects in our inventory
- integer maxVolumeCarry - Maximum volume this object can carry
- string actionFailure - Last action error message, "Read what?"
- string actionDefaultFailure - Default action error message, "What?"
- int lastActionTime - UNIX time stamp of last action performed
- string inputMode - Input area mode, 'say' or 'cmd'
DpProperties
|
--DpObject
|
--DpLiving
|
METHODS:
|
Direct Descendants
| DpUser |
A user object, the object representing a real user
|
| DpNpc |
A 'non playing character', a bot
|
Methods Summary
| boolean |
actionCheer() |
Makes this living object cheer wildly |
| boolean |
actionDance() |
Makes this living object take another living object for a dance |
| boolean |
actionDrop() |
Drops an object in the user's environment |
| boolean |
actionEmote() |
Makes this living object communicate a custom message to its environment |
| boolean |
actionExamine() |
Makes this living object examine an object |
| boolean |
actionGive() |
Makes this living object give an object to another living object |
| boolean |
actionGrin() |
Makes this living object grin evilly |
| boolean |
actionHighFive() |
Makes this living object slap a high-five with another living object |
| boolean |
actionHug() |
Makes this living object hug another living object |
| boolean |
actionInventory() |
Shows this living object a list of objects it is carrying |
| boolean |
actionKiss() |
Makes this living object give another living object a passionate kiss |
| boolean |
actionLaugh() |
Makes this living object fall down on the floor laughing |
| boolean |
actionNod() |
Makes this living object nod solemnly |
| boolean |
actionPat() |
Makes this living object pat another living object on the head |
| boolean |
actionSay() |
Makes this living object say something |
| boolean |
actionShout() |
Makes this living object shout something to everyone on the site |
| boolean |
actionSmile() |
Makes this living object smile happily |
| boolean |
actionTake() |
Makes this living object take an object |
| boolean |
actionTell() |
Makes this living object tell something to another user object |
| void |
createDpLiving() |
Sets this living object up at the time it is created |
| string |
getSessionAge() |
Gets the livings's age since it was created as an object in a string |
| boolean |
performAction() |
Tries to perform the action given by the living object |
Methods
boolean actionCheer(
string
$verb , string
$noun
)
Makes this living object cheer wildly
| PARAMETERS: |
string |
$verb |
the action, "cheer" |
| string |
$noun |
who to cheer on, could be empty |
| RETURNS: | boolean | TRUE |
boolean actionDance(
string
$verb , string
$noun
)
Makes this living object take another living object for a dance
| PARAMETERS: |
string |
$verb |
the action, "dance" |
| string |
$noun |
who to dance with, could be empty |
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
boolean actionDrop(
string
$verb , string
$noun , [
$silently = FALSE]
)
Drops an object in the user's environment
| PARAMETERS: |
string |
$verb |
the action, "drop" |
| string |
$noun |
what to drop, could be empty |
| |
$silently |
|
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
boolean actionEmote(
string
$verb , string
$noun
)
Makes this living object communicate a custom message to its environment
| PARAMETERS: |
string |
$verb |
the action, "emote" |
| string |
$noun |
string to "emote" |
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
| REDEFINED AS: |
DpUser::actionEmote(): Makes this user communicate a custom message to its environment
|
boolean actionExamine(
string
$verb , string
$noun
)
Makes this living object examine an object
| PARAMETERS: |
string |
$verb |
the action, "examine" |
| string |
$noun |
what to examine, could be empty |
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
boolean actionGive(
string
$verb , string
$noun
)
Makes this living object give an object to another living object
| PARAMETERS: |
string |
$verb |
the action, "give" |
| string |
$noun |
what and who to give, could be empty |
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
| SEE: | actionGiveOperant() |
boolean actionGrin(
string
$verb , string
$noun
)
Makes this living object grin evilly
| PARAMETERS: |
string |
$verb |
the action, "grin" |
| string |
$noun |
empty string |
| RETURNS: | boolean | TRUE |
actionHighFive [line 1015]
boolean actionHighFive(
string
$verb , string
$noun
)
Makes this living object slap a high-five with another living object
| PARAMETERS: |
string |
$verb |
the action, "high5" |
| string |
$noun |
who to high5, could be empty |
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
boolean actionHug(
string
$verb , string
$noun
)
Makes this living object hug another living object
| PARAMETERS: |
string |
$verb |
the action, "hug" |
| string |
$noun |
who to hug, could be empty |
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
actionInventory [line 600]
boolean actionInventory(
string
$verb , string
$noun
)
Shows this living object a list of objects it is carrying
| PARAMETERS: |
string |
$verb |
the action, "inventory" |
| string |
$noun |
empty string |
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
boolean actionKiss(
string
$verb , string
$noun
)
Makes this living object give another living object a passionate kiss
| PARAMETERS: |
string |
$verb |
the action, "kiss" |
| string |
$noun |
who to kiss, could be empty |
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
boolean actionLaugh(
string
$verb , string
$noun
)
Makes this living object fall down on the floor laughing
| PARAMETERS: |
string |
$verb |
the action, "laugh" |
| string |
$noun |
empty string |
| RETURNS: | boolean | TRUE |
boolean actionNod(
string
$verb , string
$noun
)
Makes this living object nod solemnly
| PARAMETERS: |
string |
$verb |
the action, "nod" |
| string |
$noun |
empty string |
| RETURNS: | boolean | TRUE |
boolean actionPat(
string
$verb , string
$noun
)
Makes this living object pat another living object on the head
| PARAMETERS: |
string |
$verb |
the action, "pat" |
| string |
$noun |
who to pat, could be empty |
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
boolean actionSay(
string
$verb , string
$noun
)
Makes this living object say something
| PARAMETERS: |
string |
$verb |
the action, "say" |
| string |
$noun |
what to say, could be empty |
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
boolean actionShout(
string
$verb , string
$noun
)
Makes this living object shout something to everyone on the site
| PARAMETERS: |
string |
$verb |
the action, "shout" |
| string |
$noun |
what to shout, could be empty |
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
| REDEFINED AS: |
DpUser::actionShout(): Makes this user shout something to everyone on the site
|
boolean actionShrug(
string
$verb , string
$noun
)
Makes this living object shrug
| PARAMETERS: |
string |
$verb |
the action, "laugh" |
| string |
$noun |
empty string |
| RETURNS: | boolean | TRUE |
boolean actionSmile(
string
$verb , string
$noun
)
Makes this living object smile happily
| PARAMETERS: |
string |
$verb |
the action, "smile" |
| string |
$noun |
empty string |
| RETURNS: | boolean | TRUE |
boolean actionTake(
string
$verb , string
$noun
)
Makes this living object take an object
| PARAMETERS: |
string |
$verb |
the action, "take" |
| string |
$noun |
what to take, could be empty |
| RETURNS: | boolean | TRUE for action completed, FALSE otherwise |
boolean actionTell(
string
$verb , string
$noun
)
Makes this living object tell something to another user object
| PARAMETERS: |
string |
$verb |
the action, "tell" |
| string | |
|