stendhal/doc/mkdocs/lua/objects/actions.md
2023-05-17 02:08:58 -07:00

2 KiB


Contents

[TOC]


Introduction

Object instance: actions


Description

Creates ChatAction instances.


Methods


actions:clearQuest

actions:clearQuest(questSlot)

  • Removes quest slot from player. This is needed because it's impossible to pass nil values in a Lua table.
  • Parameters:
    • questSlot: Quest string identifier.
  • Returns: New SetQuestAction that sets quest state to nil.
  • TODO:

actions:create

actions:create (func)
actions:create (func, args)
  • Creates a custom ChatAction.
  • Parameters:
    • func: (function) Function to be executed when ChatAction.fire is called.
    • args: (table) Table of objects passed to the constructor.
  • Returns: New ChatAction instance or nil if failed.

actions:multiple

actions:multiple (actionList)
  • Helper method for creating a MultipleActions instance.
  • Parameters:
  • Returns: New MultipleActions instance.