diff --git a/doc/actions_and_tasks.txt b/doc/actions_and_tasks.txt new file mode 100644 index 0000000..56c79f7 --- /dev/null +++ b/doc/actions_and_tasks.txt @@ -0,0 +1,35 @@ +Actions and Tasks +Advanced_NPC Alpha-2 (DEV) +========================== + +IMPORTANT: In this documentation is only the explanation of the particular operation of each predefined +action and task. Read reference documentation for details about API operation at `API.txt`. + +Action (`add_action`) +--------------------- + +* `SET_INTERVAL` : Set the interval at which the `action` are executed. + args = { + interval = 1, -- A decimal number, in seconds (default is 1 second) + freeze = false, -- if true, mobs_redo API will not execute until interval is set + } + +* `FREEZE` : This action allows to stop/execute mobs_redo API. + This is good for stopping the NPC from fighting, wandering, etc. + Arguments table definition + { + freeze = false, -- Boolean, if true, mobs_redo API will not execute. + } + +Tasks (`add_task`) +------------------ + +* `USE_BED` : Sequence of actions that allows the NPC to use a bed. + Arguments table definition + { + pos = {x=0,y=0,z=0}, -- Position of bed to be used. + action = action, --[[ + ^ Whether to get up or lay on bed + ^ Defined in npc.actions.const.beds.action + ^ Example: npc.actions.const.beds.action.LAY ]] + }