StendhalScripting/LuaAPI: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>AntumDeluge
merchants: add descriptions
imported>AntumDeluge
actions: add descriptions
Line 257: Line 257:


Methods:
Methods:

* ''<span style="color:green;">actions.create</span>(function)''
** <span style="color:darkblue; font-style:italic;">function:</span> A Lua function to be executed when <code>ChatAction.fire</code> is called.
; ''<span style="color:green;">actions:create</span>(function)''
: Creates a custom {{StendhalFile|master|src/games/stendhal/server/entity/npc/ChatAction.java|ChatAction}}.
* ''<span style="color:green;">actions.multiple</span>(actionList)''
: '''''function:''''' A Lua function to be executed when <code>ChatAction.fire</code> is called.
** <span style="color:darkblue; font-style:italic;">actionList:</span> A Lua table containing ChatAction instances.
: ''returns:'' New <code>ChatAction</code> instance.

; ''<span style="color:green;">actions:multiple</span>(actionList)''
: Helper method for creating a {{StendhalFile|master|src/games/stendhal/server/entity/npc/action/MultipleActions.java|MultipleActions}} instance.
: '''''actionList:''''' A Lua table containing ChatAction instances.
: ''returns:'' New <code>MultipleActions</code> instance.


== merchants ==
== merchants ==