-
-
Notifications
You must be signed in to change notification settings - Fork 198
In Game Store XML Configuration
Now, the game store can be configured with a simple XML file called gamestore.xml located in /data/XML/
folder instead of a Lua's JSON-like object. The structure of this new XML file consists of the following 3 main elements:
<?xml version="1.0" encoding="UTF-8"?>
<gamestore>
<category name="Your category name" description="Sample description" ... >
<offer name="offer sample" type="item" price="30"... />
...
...
</category>
...
</gamestore>
The base tag, must be opened at the beginning of the file and closed at the end. Similar to the base tags of other files like mounts.xml, quests.xml, etc.
The category tag is used to declare a category in game. Has name
, description
, state
and icons
attributes
- name - [required] - defines a name to your category
- description - [optional] - category description
-
state - [optional, defaults to
"normal"
]- supported states:
"new"
,"normal"
,"limitedtime"
and"sale"
- supported states:
-
icons - [optional, defaults to
"default.png"
]- You can define multiple icons using a pipe
|
to separate them e.g.:icons="icon1.png|icon2.png"
- An arrow to browsing through the icons will appear in the client if you define more than 1 icon
- You can define multiple icons using a pipe
<category name="Extra Services" description="Extra Service to change your character attributes." state="normal" icons="extraservice_icon_1.png|extraservice_icon_2.png">
<offer ... />
<offer ... />
</category>
<category name="Outfits" description="Look cooler!" icons="outfits1.png|outfits2.png|outfits3.png">
<offer .../>
</category>
<category name="Premium time">
<offer ... />
</category>
The category tag is used to declare a category in game. Has the base attributes name
, description
, type
, state
, price
and icons
. And specialized attributes depending on the type
used.
- name - [required] - defines a name that will appear in the menu.
- description - [optional] - Description that will be shown if the user click in the "details" button
-
state - [optional, defaults to
"normal"
]- supported states:
"new"
,"normal"
,"limitedtime"
and"sale"
-
sale
offers currently fallback tonormal
offers due to the incomplete implementation of the sale feature (:P), It'll be implemented soon. 🤞
-
- supported states:
- price - [required] - The price of the offer
-
icons - [optional, defaults to
"default.png"
]- as well as in
<category>
tags, you can define multiple icons using a pipe|
separator
- as well as in
-
type - [required] - Define the type of the offer
- supported types:
"namechange"
,"sexchange"
,"promotion"
,"bless"
,"teleport"
,"item"
,"stackableitem"
,"wrapitem"
,"mount"
,"outfit"
,"addon"
and"premiumtime"
- supported types:
Based on which type
attribute is set, some attributes must be provided.
- No additional attributes needed.
-
blessnumber - [required]
- you can specify multiple blesses using a pipe
|
separator.
- you can specify multiple blesses using a pipe
Examples:
<offer name="The Spiritual Shielding" type="bless" blessnumber="1" price="30" icons="spiritualshielding.png"/>
<offer name="[PACK] Second and third bless" description="The Embrace of Open Tibia + The Fire of the Suns" type="bless" blessnumber="2|3" price="55" state="sale" icons="embrace_and_suns.png"/>
The offer can be a "teleport-to-position", if a position is specified, or a "teleport-to-temple" if any coordinate is zero or wasn't specified.
-
x - [optional, defaults to
"0"
] - the x coordinate to teleport to. -
y - [optional, defaults to
"0"
] - the y coordinate to teleport to. -
z - [optional, defaults to
"0"
] - the z coordinate to teleport to.
Examples:
<offer name="Teleport home" description="Go back to your home temple in an instant." price="20" state="new" type="teleport" icons="teleporttemple.png" />
<offer name="Teleport to that dungeon." description="Go to a specific location" price="100" type="teleport" x="500" y="1000" z="7" icons="teleportxyz.png" />
- mountid - [required] - The id of the mount as specified in mounts.xml (not the clientid).
Examples:
<offer name="Lady Bug Mount" type="mount" mountid="27" description="Buying this mount will help our server survive!" price="750" icons="ladybugmount.png" />
all of "item", "wrapitem" and "stackableitem" types use the same structure.
-
productid - [required] - The id of the item as specified in items.xml.
-
PS.: with
wrapitem
use the id of the REAL item, not the box. The OTX server handles the box part.
-
PS.: with
- count - [required] - The quantity of items that the offer sells.
Examples:
<offer name="Spellbook of Vigilance" type="item" price="60" productid="18401" count="1" icons="spellbook_vigilance.png" />
<offer name="Chameleon Rune" description="Fool your friends with an item outfit!" type="stackableitem" price="10" productid="2291" count="20" icons="chameleon_rune.png" />
- malelooktype - [required] - The looktype of the male outfit as specified in outfits.xml.
- femalelooktype - [required] - The looktype of the female outfit as specified in outfits.xml.
-
addons - [optional, defaults to
"0"
] - set if you want that any addon accompany the offer- 0 or nothing: - only the outfit
- 1: - The outfit + addon 1.
- 2: - The outfit + addon 2.
- 3: - The full outfit with both addons.
Examples:
<offer name="Sea Dog Outfit" description="Do what ya want 'cuz a pirate's free!" type="outfit" malelooktype="750" femalelooktype="749" price="200" icons="seadog_male.png|seadog_female.png" />
<offer name="Full Sea Dog Outfit" description="Yar har, fiddle-dee-dee!!" type="outfit" addon="3" malelooktype="750" femalelooktype="749" price="360" icons="seadogfull.png" />
unlike the type="outfit" offer, the addon attribute must be set and cannot be zero.
- malelooktype - [required] - The looktype of the male outfit as specified in outfits.xml.
- femalelooktype - [required] - The looktype of the female outfit as specified in outfits.xml.
-
addons - [required] - addon or addons that
- 1: - addon 1.
- 2: - addon 2.
- 3: - both addons.
Example:
<offer name="Sea Dog Addon 1" description="You arr a pirate!" type="addon" malelooktype="750" femalelooktype="749" addon="1" price="100" icons="seadogaddon1.png" />
Adds premium time days to the user account.
- days - [required] - How many days of premium time to add to player's account.
Examples:
<offer name="30 days of Premium Time" description="get a month (30 days) of premium time." price="250" type="premiumtime" days="30" icons="premium30.png"/>
<offer name="90 days of Premium Time" description="90 days of premium time." price="400" state="sale" type="premiumtime" days="90" icons="premium90sale.png"/>