StendhalScripting/LuaAPI: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>AntumDeluge →logger: clean up |
imported>AntumDeluge →merchants: add descriptions |
||
| Line 267: | Line 267: | ||
Methods: |
Methods: |
||
| ⚫ | |||
; ''<span style="color:green;">merchants:add</span>(merchantType, npc, prices, addOffer)'' |
|||
: Adds merchant behavior to a {{StendhalFile|master|src/games/stendhal/server/entity/npc/SpeakerNPC.java|SpeakerNPC}}. |
|||
| ⚫ | |||
: '''''merchantType:''''' If set to "buyer", will add buyer behavior, otherwise will be "seller". |
|||
: '''''npc:''''' The SpeakerNPC to add the behavior to. |
|||
: '''''prices:''''' List of items & their prices (can be instance of either Map<String, Int> or a Lua table). |
|||
: '''''addOffer:''''' If <code>true</code>, will add default replies for "offer" (default: <code>true</code>). |
|||
| ⚫ | |||
: Adds seller behavior to a {{StendhalFile|master|src/games/stendhal/server/entity/npc/SpeakerNPC.java|SpeakerNPC}}. |
|||
: '''''npc:''''' The SpeakerNPC to add the behavior to. |
|||
: '''''prices:''''' List of items & their prices (can be instance of either Map<String, Int> or a Lua table). |
|||
: '''''addOffer:''''' If <code>true</code>, will add default replies for "offer" (default: <code>true</code>). |
|||
| ⚫ | |||
: Adds buyer behavior to a {{StendhalFile|master|src/games/stendhal/server/entity/npc/SpeakerNPC.java|SpeakerNPC}}. |
|||
: '''''npc:''''' The SpeakerNPC to add the behavior to. |
|||
: '''''prices:''''' List of items & their prices (can be instance of either Map<String, Int> or a Lua table). |
|||
: '''''addOffer:''''' If <code>true</code>, will add default replies for "offer" (default: <code>true</code>). |
|||
== arrays == |
== arrays == |
||