
- Added option to disable hash check by GM group_id (specify 'disabled' as hash for a certain group_id to let them log in with any client, even if 'client_hash_check' is enabled. - Updated and reworded related documentation for the feature. Improvements on script command 'axtoi'; added 'strtol'. (Hercules 1cf7c1e) - Added script command 'strtol' (conforming to the ISO C90 function). - Modified script command 'axtoi' to internally use 'strtol' instead of an unnecessary separate implementation. Cleaned up many sections of script documentation, and modernized syntax in examples. Added documentation for 'rentitem2' and 'makeitem2'. (follow-up 339c0a8) Added 'true' (1) and 'false' (2) as script constants. 'freeloop' argument is now optional, and will only return the value of freeloop if no argument is given. (tid:92470) http://rathena.org/board/topic/92470-freeloop-optional-argument/ Added a missing mapflag to custom 'devil_square' script. (bugreport:8611) http://rathena.org/board/tracker/issue-8611-devil-square-bug/ Signed-off-by: Euphy <euphy.raliel@rathena.org>
134 lines
4.9 KiB
Plaintext
134 lines
4.9 KiB
Plaintext
//===== rAthena Documentation ================================
|
|
//= Item Database
|
|
//===== By: ==================================================
|
|
//= rAthena Dev Team
|
|
//===== Last Updated: ========================================
|
|
//= 20131223
|
|
//===== Description: =========================================
|
|
//= Explanation of the item_group.txt file and structure.
|
|
//============================================================
|
|
|
|
Items within an item group can be retrieved through the 'getrandgroupitem'
|
|
and 'getgroupitem' script commands. The table below explains which fields are
|
|
accessed in each.
|
|
|
|
+===============+====================+================+
|
|
| Field | 'getrandgroupitem' | 'getgroupitem' |
|
|
+===============+====================+================+
|
|
| GroupID | YES | YES |
|
|
+===============+====================+================+
|
|
| ItemID | YES | YES |
|
|
+===============+====================+================+
|
|
| Rate | YES | YES |
|
|
+===============+====================+================+
|
|
| Amount | no | YES |
|
|
+===============+====================+================+
|
|
| Random | no | YES |
|
|
+===============+====================+================+
|
|
| isAnnounced | no | YES |
|
|
+===============+====================+================+
|
|
| Duration | no | YES |
|
|
+===============+====================+================+
|
|
| isNamed | no | YES |
|
|
+===============+====================+================+
|
|
| isBound | no | YES |
|
|
+===============+====================+================+
|
|
|
|
---------------------------------------
|
|
|
|
GroupID: See the "Item Group ID" section in 'db/const.txt'.
|
|
Supports IG_* constants.
|
|
|
|
---------------------------------------
|
|
|
|
ItemID: Available item_id that will be obtained from this item group.
|
|
Supports AegisName of the item.
|
|
|
|
---------------------------------------
|
|
|
|
Rate: Probability to get the item. Not a percentage value!
|
|
|
|
Examples:
|
|
IG_MyItemGroup,Knife,5
|
|
IG_MyItemGroup,Dagger,1
|
|
|
|
- Knife has chance 5/6 (83.3%) to be obtained
|
|
- Dagger has chance 1/6 (16.7%) to be obtained
|
|
|
|
---------------------------------------
|
|
|
|
Amount: Amount of item that will be obtained.
|
|
|
|
---------------------------------------
|
|
|
|
Random: Set this to '0' and the item will always be obtained ("must" item).
|
|
Random value will allocates where the item will be stored at random group.
|
|
(max. random group is 4, defined as MAX_ITEMGROUP_RANDGROUP in 'src/map/itemdb.c'.)
|
|
|
|
Example:
|
|
IG_MyItemGroup,Knife,0,1,0 //a "must" item
|
|
IG_MyItemGroup,Dagger,0,1,0 //a "must" item
|
|
IG_MyItemGroup,Stiletto,5,1,1 //random at group 1
|
|
IG_MyItemGroup,Stiletto_,2,1,1 //random at group 1
|
|
IG_MyItemGroup,Stiletto,5,1,2 //random at group 2
|
|
IG_MyItemGroup,Dagger_,4,1,2 //random at group 2
|
|
|
|
-> usage: 'getgroupitem(IG_MyItemGroup);'
|
|
- Player always gets 1x Knife and 1x Dagger
|
|
- Player has chance to get 1x Stiletto by chance 5/7 from group 1
|
|
- Player has chance to get 1x Stiletto_ by chance 2/7 from group 1
|
|
- Player has chance to get 1x Stiletto by chance 5/9 from group 2
|
|
- Player has chance to get 1x Dagger_ by chance 4/9 from group 2
|
|
|
|
-----------------------------------------
|
|
|
|
If the 'Rate' for random '0' is not 0 (more than 0), that means this item
|
|
also can be obtained as random item.
|
|
If you want the "must" item only can be obtained without random chance,
|
|
change the 'Rate' for this item to 0.
|
|
|
|
Example:
|
|
IG_MyItemGroup2,Knife,0,1,0
|
|
IG_MyItemGroup2,Dagger,5,1,0
|
|
IG_MyItemGroup2,Stiletto,2,1,1
|
|
|
|
-> usage: 'getgroupitem(IG_MyItemGroup2);'
|
|
- 1x Knife always be obtained
|
|
- 1x Dagger always be obtained and also has chance to get 1 more by
|
|
chance 5/7
|
|
- 1x Stiletto can be obtained by chance 2/7
|
|
result -> player will get 1x Knife, 1x Dagger, and 1x Dagger or 1x Stiletto
|
|
|
|
-> usage: 'getrandgroupitem(IG_MyItemGroup2,1);' (Ignores 'Amount' field)
|
|
- 1x Knife never be obtained!
|
|
- 1x Dagger can be obtained by chance 5/7
|
|
- 1x Stiletto can be obtained by chance 2/7
|
|
result -> player will get only 1x Dagger or 1x Stiletto
|
|
|
|
---------------------------------------
|
|
|
|
isAnnounced: If player obtained this item, it will be broadcast to the server.
|
|
"[Player] has won [Item] from 'Box'"
|
|
|
|
---------------------------------------
|
|
|
|
Duration: Makes the item a rental item, which will be expire in the given amount
|
|
of minutes. Not intended for use with stackable items.
|
|
|
|
---------------------------------------
|
|
|
|
isNamed: Inscribes the item with the obtainer's name.
|
|
|
|
---------------------------------------
|
|
|
|
isBound: Binds the obtained item.
|
|
See 'getitembound' in 'doc/script_commands.txt' for valid bound types.
|
|
|
|
---------------------------------------
|
|
|
|
Supports to import other file, usage:
|
|
import: db/path/filename.txt
|
|
|
|
Example:
|
|
import: db/re/item_bluebox.txt
|