shop.txt: Difference between revisions

From OpenKore Wiki
Jump to navigation Jump to search
m (Reverted edits by Afuvuco (Talk) to last revision by Mushrom)
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
If your character has the Vending Skill, Kore can setup a shop and vend items. The file '''shop.txt''' allows you to specify the shop name and the items to be put in the shop with the corresponding price and amount when Kore opens your shop.
Shop name, items to be put in the shop and corresponding prices to be used when opening your shop [[shopAuto_open|automatically]] or [[openshop|manually]]. Your character probably needs [http://irowiki.org/wiki/Vending Vending] skill to be able to do that.
 
You can open a shop manually by typing the openshop command in the console. You can also setup Kore to automatically open a shop when it has been idle for a certain amount of time (see [[shopAuto_open]] in config.txt). It is advisable to disable all other actions like random walk, auto-attack, auto-skill use, item auto-gather, etc. while vending.


== Syntax ==
== Syntax ==
The first line in this file is the shop '''title'''. A shop title is required: you cannot have a shop without a '''title'''. The subsequent lines specify the items that you want to put in your shop. Those lines observe the following format:  
The first line in this file is the shop '''title'''. A shop title is required: you cannot have a shop without a '''title'''. The subsequent lines specify the items that you want to put in your shop. Those lines observe the following format:  


  <item name> (TAB(s)) <price> (TAB(s)) <amount>
  <item name><TAB><price>[..<max price>]<TAB>[<amount>]


=== Details ===
=== Details ===
----
----


; <[[References#Item Names|item name]]>
; <[[References#Item_Names|item name]]>
: This is the full name of an item as it exactly appears in the cart list.
: This is the full name of an item as it exactly appears in the cart list.


Line 18: Line 16:
: This is the price of the item. This value can have commas (e.g. 2,000). If it has commas, it must appear at the right places. This can be useful to prevent you from accidentally specifying the wrong price for an item.
: This is the price of the item. This value can have commas (e.g. 2,000). If it has commas, it must appear at the right places. This can be useful to prevent you from accidentally specifying the wrong price for an item.


; [..<max price>]
: Report the max price is optional. If not informed, the item will be always sold at the same price of field "price". If informed, the item will be sold between "price" and "max price".


; <amount>
; [<amount>]
: This specifies the amount of a stackable item to vend. This value is optional. If it is not given, the maximum amount of that item will be put in the shop.  
: This specifies the amount of a stackable item to vend. This value is optional. If it is not given, the maximum amount of that item will be put in the shop.  


Line 32: Line 32:
  Andre Card 150,000 2
  Andre Card 150,000 2


Example to sell the 3 Coconut with variable priced between 1,000z and 2,000z
My Little Shop
Coconut 1,000..2,000 3


If you want to sell two 3-slotted Stilettos, for 50,000z each. This example is '''wrong''':
If you want to sell two 3-slotted Stilettos, for 50,000z each. This example is '''wrong''':
Line 44: Line 47:




[[Category:Control]]
[[Category:control]]

Latest revision as of 23:50, 26 April 2021

Shop name, items to be put in the shop and corresponding prices to be used when opening your shop automatically or manually. Your character probably needs Vending skill to be able to do that.

Syntax

The first line in this file is the shop title. A shop title is required: you cannot have a shop without a title. The subsequent lines specify the items that you want to put in your shop. Those lines observe the following format:

<item name><TAB><price>[..<max price>]<TAB>[<amount>]

Details


<item name>
This is the full name of an item as it exactly appears in the cart list.


<price>
This is the price of the item. This value can have commas (e.g. 2,000). If it has commas, it must appear at the right places. This can be useful to prevent you from accidentally specifying the wrong price for an item.
[..<max price>]
Report the max price is optional. If not informed, the item will be always sold at the same price of field "price". If informed, the item will be sold between "price" and "max price".
[<amount>]
This specifies the amount of a stackable item to vend. This value is optional. If it is not given, the maximum amount of that item will be put in the shop.

Note. You can't use this for non-stackable items (like armors). If you want to sell multiple armors, you must put multiple entries in your shop.txt.


Examples

The following example will create a shop called "My Little Shop", with all Red Potions that you have in cart, for 39z each, and two Andre Cards, for 150,000z each.

My Little Shop
Red Potion	39
Andre Card	150,000	2

Example to sell the 3 Coconut with variable priced between 1,000z and 2,000z

My Little Shop
Coconut	1,000..2,000	3

If you want to sell two 3-slotted Stilettos, for 50,000z each. This example is wrong:

My Little Shop
Stiletto [3]    50,000	2


Stilettos (weapons) are non-stackable items. This is the correct example:

My Little Shop
Stiletto [3] 	50,000	1
Stiletto [3] 	50,000	1