StendhalScripting/LuaAPI: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>AntumDeluge
conditions: add descriptions
imported>AntumDeluge
Line 289: Line 289:
: '''''merchantType:''''' If set to "buyer", will add buyer behavior, otherwise will be "seller".
: '''''merchantType:''''' If set to "buyer", will add buyer behavior, otherwise will be "seller".
: '''''npc:''''' The SpeakerNPC to add the behavior to.
: '''''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).
: '''''prices:''''' List of items & their prices (can be instance of either Map<String, Integer> or a Lua table).
: '''''addOffer:''''' If <code>true</code>, will add default replies for "offer" (default: <code>true</code>).
: '''''addOffer:''''' If <code>true</code>, will add default replies for "offer" (default: <code>true</code>).


Line 295: Line 295:
: Adds seller behavior to a {{StendhalFile|master|src/games/stendhal/server/entity/npc/SpeakerNPC.java|SpeakerNPC}}.
: Adds seller behavior to a {{StendhalFile|master|src/games/stendhal/server/entity/npc/SpeakerNPC.java|SpeakerNPC}}.
: '''''npc:''''' The SpeakerNPC to add the behavior to.
: '''''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).
: '''''prices:''''' List of items & their prices (can be instance of either Map<String, Integer> or a Lua table).
: '''''addOffer:''''' If <code>true</code>, will add default replies for "offer" (default: <code>true</code>).
: '''''addOffer:''''' If <code>true</code>, will add default replies for "offer" (default: <code>true</code>).


Line 301: Line 301:
: Adds buyer behavior to a {{StendhalFile|master|src/games/stendhal/server/entity/npc/SpeakerNPC.java|SpeakerNPC}}.
: Adds buyer behavior to a {{StendhalFile|master|src/games/stendhal/server/entity/npc/SpeakerNPC.java|SpeakerNPC}}.
: '''''npc:''''' The SpeakerNPC to add the behavior to.
: '''''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).
: '''''prices:''''' List of items & their prices (can be instance of either Map<String, Integer> or a Lua table).
: '''''addOffer:''''' If <code>true</code>, will add default replies for "offer" (default: <code>true</code>).
: '''''addOffer:''''' If <code>true</code>, will add default replies for "offer" (default: <code>true</code>).