item_group.txt 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. //===== rAthena Documentation ================================
  2. //= Item Database
  3. //===== By: ==================================================
  4. //= rAthena Dev Team
  5. //===== Last Updated: ========================================
  6. //= 20131223
  7. //===== Description: =========================================
  8. //= Explanation of the item_group.txt file and structure.
  9. //============================================================
  10. Items within an item group can be retrieved through the 'getrandgroupitem'
  11. and 'getgroupitem' script commands. The table below explains which fields are
  12. accessed in each.
  13. +===============+====================+================+
  14. | Field | 'getrandgroupitem' | 'getgroupitem' |
  15. +===============+====================+================+
  16. | GroupID | YES | YES |
  17. +===============+====================+================+
  18. | ItemID | YES | YES |
  19. +===============+====================+================+
  20. | Rate | YES | YES |
  21. +===============+====================+================+
  22. | Amount | no | YES |
  23. +===============+====================+================+
  24. | Random | no | YES |
  25. +===============+====================+================+
  26. | isAnnounced | no | YES |
  27. +===============+====================+================+
  28. | Duration | no | YES |
  29. +===============+====================+================+
  30. | isNamed | no | YES |
  31. +===============+====================+================+
  32. | isBound | no | YES |
  33. +===============+====================+================+
  34. ---------------------------------------
  35. GroupID: See the "Item Group ID" section in 'db/const.txt'.
  36. Supports IG_* constants.
  37. ---------------------------------------
  38. ItemID: Available item_id that will be obtained from this item group.
  39. Supports AegisName of the item.
  40. ---------------------------------------
  41. Rate: Probability to get the item. Not a percentage value!
  42. Examples:
  43. IG_MyItemGroup,Knife,5
  44. IG_MyItemGroup,Dagger,1
  45. - Knife has chance 5/6 (83.3%) to be obtained
  46. - Dagger has chance 1/6 (16.7%) to be obtained
  47. ---------------------------------------
  48. Amount: Amount of item that will be obtained.
  49. ---------------------------------------
  50. Random: Set this to '0' and the item will always be obtained ("must" item).
  51. Random value will allocates where the item will be stored at random group.
  52. (max. random group is 4, defined as MAX_ITEMGROUP_RANDGROUP in 'src/map/itemdb.c'.)
  53. Example:
  54. IG_MyItemGroup,Knife,0,1,0 //a "must" item
  55. IG_MyItemGroup,Dagger,0,1,0 //a "must" item
  56. IG_MyItemGroup,Stiletto,5,1,1 //random at group 1
  57. IG_MyItemGroup,Stiletto_,2,1,1 //random at group 1
  58. IG_MyItemGroup,Stiletto,5,1,2 //random at group 2
  59. IG_MyItemGroup,Dagger_,4,1,2 //random at group 2
  60. -> usage: 'getgroupitem(IG_MyItemGroup);'
  61. - Player always gets 1x Knife and 1x Dagger
  62. - Player has chance to get 1x Stiletto by chance 5/7 from group 1
  63. - Player has chance to get 1x Stiletto_ by chance 2/7 from group 1
  64. - Player has chance to get 1x Stiletto by chance 5/9 from group 2
  65. - Player has chance to get 1x Dagger_ by chance 4/9 from group 2
  66. -----------------------------------------
  67. If the 'Rate' for random '0' is not 0 (more than 0), that means this item
  68. also can be obtained as random item.
  69. If you want the "must" item only can be obtained without random chance,
  70. change the 'Rate' for this item to 0.
  71. Example:
  72. IG_MyItemGroup2,Knife,0,1,0
  73. IG_MyItemGroup2,Dagger,5,1,0
  74. IG_MyItemGroup2,Stiletto,2,1,1
  75. -> usage: 'getgroupitem(IG_MyItemGroup2);'
  76. - 1x Knife always be obtained
  77. - 1x Dagger always be obtained and also has chance to get 1 more by
  78. chance 5/7
  79. - 1x Stiletto can be obtained by chance 2/7
  80. result -> player will get 1x Knife, 1x Dagger, and 1x Dagger or 1x Stiletto
  81. -> usage: 'getrandgroupitem(IG_MyItemGroup2,1);' (Ignores 'Amount' field)
  82. - 1x Knife never be obtained!
  83. - 1x Dagger can be obtained by chance 5/7
  84. - 1x Stiletto can be obtained by chance 2/7
  85. result -> player will get only 1x Dagger or 1x Stiletto
  86. ---------------------------------------
  87. isAnnounced: If player obtained this item, it will be broadcast to the server.
  88. "[Player] has won [Item] from 'Box'"
  89. ---------------------------------------
  90. Duration: Makes the item a rental item, which will be expire in the given amount
  91. of minutes. Not intended for use with stackable items.
  92. ---------------------------------------
  93. isNamed: Inscribes the item with the obtainer's name.
  94. ---------------------------------------
  95. isBound: Binds the obtained item.
  96. See 'getitembound' in 'doc/script_commands.txt' for valid bound types.
  97. ---------------------------------------
  98. Supports to import other file, usage:
  99. import: db/path/filename.txt
  100. Example:
  101. import: db/re/item_bluebox.txt