DtlTraders/patterns: Difference between revisions
Line 60: | Line 60: | ||
<div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:solid 1px"><!-- Cell --> | <div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:solid 1px"><!-- Cell --> | ||
<p style="margin:0px;padding:2px 10px"><code style="margin:0px;display:block">wool:14</code></p> | <p style="margin:0px;padding:2px 10px"><code style="margin:0px;display:block">wool:14</code></p> | ||
</div> | |||
</div> | |||
<!-- name --> | |||
<div style="display:table;width:100%"> | |||
<div style="display:table-cell;width:160px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Name</code></p> | |||
</div> | |||
<div style="display:table-cell;width:110px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">n</code></p> | |||
</div> | |||
<div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">matches the item by the given name, <strong>priority: 300</strong></code></p> | |||
</div> | |||
<div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets the item name, <b>default: nothing</b></code></p> | |||
</div> | |||
<div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">n:A Item</code></p> | |||
</div> | </div> | ||
</div> | </div> | ||
Line 101: | Line 120: | ||
</div> | </div> | ||
<!-- | <!-- tier --> | ||
<div style="display:table;width:100%"> | <div style="display:table;width:100%"> | ||
<div style="display:table-cell;width:160px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:160px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block"> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">Tier</code></p> | ||
</div> | </div> | ||
<div style="display:table-cell;width:110px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:110px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block"> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">t</code></p> | ||
</div> | </div> | ||
<div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block"> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">Matches items only in the given <strong>item</strong> tier, <b>priority: 25</b></code></p> | ||
</div> | </div> | ||
<div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block"> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">not used</code></p> | ||
</div> | </div> | ||
<div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block"> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">t:vip_tier</code></p> | ||
</div> | </div> | ||
</div> | </div> | ||
<!-- | <!-- color --> | ||
<div style="display:table;width:100%"> | <div style="display:table;width:100%"> | ||
<div style="display:table-cell;width:160px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:160px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block"> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">Color</code></p> | ||
</div> | </div> | ||
<div style="display:table-cell;width:110px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:110px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block"> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">c</code></p> | ||
</div> | </div> | ||
<div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block"> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">matches by the given color, <strong>priority: 5</strong>, <strong>leather armor only</strong></code></p> | ||
</div> | </div> | ||
<div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets the | <p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets the color for a leather armor item. Uses RGB values separated by <strong>^</strong>, <strong>leather armor only</strong></code></p> | ||
</div> | </div> | ||
<div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block"> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">c:255^210^24</code></p> | ||
</div> | </div> | ||
</div> | </div> | ||
Line 148: | Line 167: | ||
</div> | </div> | ||
<div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block"> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">Checks if the item has the same enchants, <strong>priority: 5</strong></code></p> | ||
</div> | </div> | ||
<div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
Line 167: | Line 186: | ||
</div> | </div> | ||
<div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block"> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">Checks if the item has the same stored enchants, <strong>priority: 5</strong></code></p> | ||
</div> | </div> | ||
<div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets enchantments for a enchanted book item, <b>default: none</b></code></p> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets enchantments for a enchanted book item, <b>default: none</b>, <strong>enchanted book only</strong></code></p> | ||
</div> | </div> | ||
<div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | <div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | ||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">se:smite/7</code></p> | <p style="margin:0px"><code style="padding: 5px 10px;display:block">se:smite/7</code></p> | ||
</div> | |||
</div> | |||
<!-- price --> | |||
<div style="display:table;width:100%"> | |||
<div style="display:table-cell;width:160px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Price</code></p> | |||
</div> | |||
<div style="display:table-cell;width:110px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">p</code></p> | |||
</div> | |||
<div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets the price for each matching item, overriding lower priority matches</code></p> | |||
</div> | |||
<div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets the price for the given item, <b>default: pattern price</b></code></p> | |||
</div> | |||
<div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">p:12.22</code></p> | |||
</div> | |||
</div> | |||
<!-- multiplier --> | |||
<div style="display:table;width:100%"> | |||
<div style="display:table-cell;width:160px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Multiplier</code></p> | |||
</div> | |||
<div style="display:table-cell;width:110px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">m</code></p> | |||
</div> | |||
<div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets the multiplier for each matching item, overriding lower priority matches</code></p> | |||
</div> | |||
<div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets the multiplier for the given item, <b>default: pattern multiplier</b></code></p> | |||
</div> | |||
<div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">m:0.9</code></p> | |||
</div> | |||
</div> | |||
<!-- fireworks --> | |||
<div style="display:table;width:100%"> | |||
<div style="display:table-cell;width:160px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Firework</code></p> | |||
</div> | |||
<div style="display:table-cell;width:110px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">f</code></p> | |||
</div> | |||
<div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">not used</code></p> | |||
</div> | |||
<div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets firework data for a firework item, <strong>firework only</strong></code></p> | |||
</div> | |||
<div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">---</code></p> | |||
</div> | |||
</div> | |||
<!-- global limit --> | |||
<div style="display:table;width:100%"> | |||
<div style="display:table-cell;width:160px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Global limit</code></p> | |||
</div> | |||
<div style="display:table-cell;width:110px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">gl</code></p> | |||
</div> | |||
<div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">not used</code></p> | |||
</div> | |||
<div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets a limit for this item, <strong>default: none</strong></code></p> | |||
</div> | |||
<div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">gl:limit/timeout</code></p> | |||
</div> | |||
</div> | |||
<!-- player limit --> | |||
<div style="display:table;width:100%"> | |||
<div style="display:table-cell;width:160px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Player limit</code></p> | |||
</div> | |||
<div style="display:table-cell;width:110px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">pl</code></p> | |||
</div> | |||
<div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">not used</code></p> | |||
</div> | |||
<div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets a limit for each player for this item, <strong>default: none</strong></code></p> | |||
</div> | |||
<div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">pl:limit/timeout</code></p> | |||
</div> | |||
</div> | |||
<!-- Slot --> | |||
<div style="display:table;width:100%"> | |||
<div style="display:table-cell;width:160px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Slot</code></p> | |||
</div> | |||
<div style="display:table-cell;width:110px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">s</code></p> | |||
</div> | |||
<div style="display:table-cell;width:220px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Not used</code></p> | |||
</div> | |||
<div style="display:table-cell;width:280px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">Sets the slot for the item, <b>default: first empty</b></code></p> | |||
</div> | |||
<div style="display:table-cell;width:120px;background-color: #F9F9F9;border-top:dashed 1px red"><!-- Cell --> | |||
<p style="margin:0px"><code style="padding: 5px 10px;display:block">s:22</code></p> | |||
</div> | </div> | ||
</div> | </div> |
Revision as of 20:18, 8 April 2013
Overview
Every pattern is saved in the patterns.yml file located in the plugin's main folder. (plugins/DtlCitizensTrader)
You can change the directory in the configuration file.
There are 2 types of patterns:
- Pricing patterns
Sets item prices and pricing tiers.
- Item patterns
Will add certain items to the trader's stock, also has item tiers.
Incoming a third pattern type with 2.6 (long way to it):
- random patterns Those will allow to set maximum items a trader can have showd in stock (like 10 of 20), also set timeouts, "spawn chance", amount and price chances that will be used on each item when it's timeout passed.
All patterns are based on one syntax that is used to build item scripts. Those scripts are used by each pattern type, just each pattern type uses it in another way.
Item syntax
This sound horrible, I know, but it's best way to explain it in two words :D
Every item within a pattern is build up by some keywords and flags you may use, many options you can't achieve with a basic trader setup are here allowed, but you need to be careful.
Keywords
Item setting
Keyword
Price pattern
Item pattern
Example
ID and data
id[:data]
Looks for items with the given id and/or data, priority: 130
Sets the item id, and when set also the data default: required!
wool:14
Name
n
matches the item by the given name, priority: 300
Sets the item name, default: nothing
n:A Item
Item amount
a
Looks for items with the given amount, priority: 5
Sets one or more amounts for an item, default: 1
a:1,2,4
Durability
d
Looks for items with the given or higher durability, priority: 45
Sets the items durability, default: 0
d:22
Tier
t
Matches items only in the given item tier, priority: 25
not used
t:vip_tier
Color
c
matches by the given color, priority: 5, leather armor only
Sets the color for a leather armor item. Uses RGB values separated by ^, leather armor only
c:255^210^24
Enchants
e
Checks if the item has the same enchants, priority: 5
Sets enchantments for an item, default: none
e:smite/3
Stored enchants
se
Checks if the item has the same stored enchants, priority: 5
Sets enchantments for a enchanted book item, default: none, enchanted book only
se:smite/7
Price
p
Sets the price for each matching item, overriding lower priority matches
Sets the price for the given item, default: pattern price
p:12.22
Multiplier
m
Sets the multiplier for each matching item, overriding lower priority matches
Sets the multiplier for the given item, default: pattern multiplier
m:0.9
Firework
f
not used
Sets firework data for a firework item, firework only
---
Global limit
gl
not used
Sets a limit for this item, default: none
gl:limit/timeout
Player limit
pl
not used
Sets a limit for each player for this item, default: none
pl:limit/timeout
Slot
s
Not used
Sets the slot for the item, default: first empty
s:22
DtlTraders | |
---|---|
Configuration | Commands | Permissions |
Usage | Patterns |
Types |