diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-05-13 23:16:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-05-13 23:16:41 +0300 |
commit | cfbd3a2dee418f32660642a616a2e2e83ea69932 (patch) | |
tree | 3158c9acf42010a76eaf653faf417b97e69e5b48 | |
parent | fc2fda19f95c14b01716b72d92599c392f0dd72d (diff) | |
download | docs-cfbd3a2dee418f32660642a616a2e2e83ea69932.tar.gz docs-cfbd3a2dee418f32660642a616a2e2e83ea69932.tar.bz2 docs-cfbd3a2dee418f32660642a616a2e2e83ea69932.tar.xz docs-cfbd3a2dee418f32660642a616a2e2e83ea69932.zip |
Update from hercules
New and changed docs.
-rw-r--r-- | server/gm/atcommands.txt | 20 | ||||
-rw-r--r-- | server/items/option_drop_group.md | 97 | ||||
-rw-r--r-- | server/monsters/mob_db.txt | 63 | ||||
-rw-r--r-- | server/scripts/constants.md | 130 | ||||
-rw-r--r-- | server/scripts/script_commands.txt | 70 |
5 files changed, 301 insertions, 79 deletions
diff --git a/server/gm/atcommands.txt b/server/gm/atcommands.txt index b455d91..dd8ad09 100644 --- a/server/gm/atcommands.txt +++ b/server/gm/atcommands.txt @@ -692,9 +692,23 @@ Repairs all broken items in your inventory. --------------------------------------- -@dropall - -Drops all inventory and equipped items onto the floor. +@dropall {<item type>} + +Drops all items based on the item type. + +Valid item types: + -1 = All Items (default) + 0 = Healing Items + 2 = Useable Items + 3 = Etc Items + 4 = Weapons + 5 = Armors + 6 = Cards + 7 = Pet Eggs + 8 = Pet Armors + 10 = Ammunition Items + 11 = Delayed-Consumable Items + 18 = Cash Items --------------------------------------- diff --git a/server/items/option_drop_group.md b/server/items/option_drop_group.md new file mode 100644 index 0000000..325cf9f --- /dev/null +++ b/server/items/option_drop_group.md @@ -0,0 +1,97 @@ +# Option Drop Group Database + +## Description +Explanation of the `db/option_drop_groups.conf` file and structure. + +This database file allows the creation of groups of random options +that will be added to certain equipments when dropped. After creating +a group in this database file, you may set up drops in `mob_db` to use +it in order to get items with these options. For more information on +adding option drop groups to `mob_db`, check `doc/mob_db.txt` documentation file. + +Each item may have up to `MAX_ITEM_OPTION` options at the same time, +in this document, each of these independent options will be called +`option slot`. One drop group will define the possibilities of random +options for each of these slots. + +## Entries Format + +``` +<Group Name Constant>: ( + { // Option Slot 1 + Rate: (int) chance of filling option slot 1 (100 = 1%) + + // Possible options for slot 1 + // min/max value : int, defaults to 0 + // chance : int, 100 = 1% if not set, will be 100%/number of possibiltiies + OptionName: value + // or + OptionName: [min value, max value] + // or + OptionName: [min value, max value, chance] + // ... (as many as you want) + }, + // ... (up to MAX_ITEM_OPTION) +), +``` + +### `Group Name Constant` +This is the group name, it is how this group is referenced in other files +(e.g. mob_db). It must be globally unique, as it is a server constant, and +must contain only letters, numbers and " _ ". + +### `Rate` +This is the chance of this option slot to drop. In other words, this is the +chance of getting this slot filled with something, where something is given +by the list of `OptionName` that follows. + +Rate is an integer value where 100 means 1%. + +### `OptionName` +Adds `OptionName` as one option that may fill this slot when it drops. + +The details of this option may be specified in one of 3 ways: + +#### `OptionName: value` +The chance of this option being picked is auto calculated (see below), +and if this option is chosen, its value will be `value`. + +#### `OptionName: [min, max]` +The chance of this option being picked is auto calculated (see below), +and if this option is chosen, its value will be a random integer between +`min` and `max` (both included). + +#### `OptionName: [min, max, chance]` +The chance of this option being picked is `chance`, and if this option is chosen, +its value will be a random integer between `min` and `max` (both included). + +#### Auto calculated chances +When chance is not specified in an option, it will be auto calculated by +the server as being `100%/num`, when `num` is the number of possibilities +in this option slot. + +For example, if you specify 3 possible options, all of them without +a `chance` defined, all of them will have 33.33% chance of being +picked (100%/3). If you set the chance of one of them to 50%, you +will have one option with 50% chance, and each of the others with +33.33% chance. + +## Example +``` +MYITEM: ( + { // Option Slot 1 + Rate: 10000 // It has 100% of chance of being filled + + // This slot may have one of the following options: + WEAPON_ATTR_WIND: 5, // WEAPON_ATTR_WIND Lv5 (33.33%) + WEAPON_ATTR_GROUND: [2, 4] // WEAPON_ATTR_GROUND Lv 2~4 (33.33%) + WEAPON_ATTR_POISON: [1, 4, 8000] // WEAPON_ATTR_POISON Lv 1~4 (80%) + }, + { // Option Slot 2 + Rate: 5000 // It has 50% of chance of being filled + + // If filled, may have one of the following options: + WEAPON_ATTR_WATER: 4 // WEAPON_ATTR_WATER Lv4 (100%) + } +) +``` diff --git a/server/monsters/mob_db.txt b/server/monsters/mob_db.txt index 8cb7a6f..bbba7ca 100644 --- a/server/monsters/mob_db.txt +++ b/server/monsters/mob_db.txt @@ -71,6 +71,8 @@ mob_db: ( } Drops: { AegisName: chance (string: int) + // or + AegisName: (chance, "Option Drop Group") // ... } WeaponAttacks: { @@ -209,21 +211,54 @@ MvpExp: Base Experience given by the monster to the player who inflict more atta MvpDrops: Sets monster mvp drops list. Requires to have MvpExp to trigger. - Accepted values are AegisName as defined on item_db.conf and a chance. + There are two ways to define a drop: + 1) The first one is used for simple drops and uses the item AegisName + as defined on item_db.conf and a chance. + Format: + AegisName: chance Chance is an integer from 1 to 10000 (10000 = 100%). - Required format: - MvpDrops: { - AegisName: chance - // ... - } - When not specified, becomes false. + 2) The second way to define a drop allows setting a random option drop + group to be used by this drop. + Format: + AegisName: (chance, "Option Drop Group") + + The item drop chance refers to the chance of dropping this item, same as chance in the first option. + the "Option Drop Group" parameter refers to an entry on option_drop_group database file. The specified + entry will be used when this item is dropped in order to add random options to the dropped equipment. + + A monster drop list may use both format for different items. + Required Format: + Drops: { + AegisName: chance + // or + AegisName: (chance, "Option Drop Group") + } + + When not specified, becomes false (no drops). Drops: Sets monster drops list. - Accepted values are AegisName as defined on item_db.conf and a chance. + There are two ways to define a drop: + 1) The first one is used for simple drops and uses the item AegisName + as defined on item_db.conf and a chance. + Format: + AegisName: chance Chance is an integer from 1 to 10000 (10000 = 100%). - Required format: - Drops: { - AegisName: chance - // ... - } - When not specified, becomes false. + + 2) The second way to define a drop allows setting a random option drop + group to be used by this drop. + Format: + AegisName: (chance, "Option Drop Group") + + The item drop chance refers to the chance of dropping this item, same as chance in the first option. + the "Option Drop Group" parameter refers to an entry on option_drop_group database file. The specified + entry will be used when this item is dropped in order to add random options to the dropped equipment. + + A monster drop list may use both format for different items. + Required Format: + Drops: { + AegisName: chance + // or + AegisName: (chance, "Option Drop Group") + } + + When not specified, becomes false (no drops). diff --git a/server/scripts/constants.md b/server/scripts/constants.md index aedb175..d5dbf7a 100644 --- a/server/scripts/constants.md +++ b/server/scripts/constants.md @@ -3762,66 +3762,6 @@ - `SEX_MALE`: 1 - `SEX_ANY`: 2 -### Script Unit Data Types - -- `UDT_TYPE`: 0 -- `UDT_SIZE`: 1 -- `UDT_LEVEL`: 2 -- `UDT_HP`: 3 -- `UDT_MAXHP`: 4 -- `UDT_SP`: 5 -- `UDT_MAXSP`: 6 -- `UDT_MASTERAID`: 7 -- `UDT_MASTERCID`: 8 -- `UDT_MAPIDXY`: 9 **(DEPRECATED)** -- `UDT_WALKTOXY`: 10 **(DEPRECATED)** -- `UDT_SPEED`: 11 -- `UDT_MODE`: 12 -- `UDT_AI`: 13 -- `UDT_SCOPTION`: 14 -- `UDT_SEX`: 15 -- `UDT_CLASS`: 16 -- `UDT_HAIRSTYLE`: 17 -- `UDT_HAIRCOLOR`: 18 -- `UDT_HEADBOTTOM`: 19 -- `UDT_HEADMIDDLE`: 20 -- `UDT_HEADTOP`: 21 -- `UDT_CLOTHCOLOR`: 22 -- `UDT_SHIELD`: 23 -- `UDT_WEAPON`: 24 -- `UDT_LOOKDIR`: 25 -- `UDT_CANMOVETICK`: 26 -- `UDT_STR`: 27 -- `UDT_AGI`: 28 -- `UDT_VIT`: 29 -- `UDT_INT`: 30 -- `UDT_DEX`: 31 -- `UDT_LUK`: 32 -- `UDT_ATKRANGE`: 33 -- `UDT_ATKMIN`: 34 -- `UDT_ATKMAX`: 35 -- `UDT_MATKMIN`: 36 -- `UDT_MATKMAX`: 37 -- `UDT_DEF`: 38 -- `UDT_MDEF`: 39 -- `UDT_HIT`: 40 -- `UDT_FLEE`: 41 -- `UDT_PDODGE`: 42 -- `UDT_CRIT`: 43 -- `UDT_RACE`: 44 -- `UDT_ELETYPE`: 45 -- `UDT_ELELEVEL`: 46 -- `UDT_AMOTION`: 47 -- `UDT_ADELAY`: 48 -- `UDT_DMOTION`: 49 -- `UDT_HUNGER`: 50 -- `UDT_INTIMACY`: 51 -- `UDT_LIFETIME`: 52 -- `UDT_MERC_KILLCOUNT`: 53 -- `UDT_STATADD`: 54 -- `UDT_ROBE`: 55 -- `UDT_BODY2`: 56 - ### HatEffect Constants - `HAT_EF_BLOSSOM_FLUTTERING`: 1 @@ -4262,6 +4202,15 @@ - `MAPINFO_SIZE_Y`: 3 - `MAPINFO_ZONE`: 4 +### consolemes options + +- `CONSOLEMES_DEBUG`: 0 +- `CONSOLEMES_ERROR`: 1 +- `CONSOLEMES_WARNING`: 2 +- `CONSOLEMES_INFO`: 3 +- `CONSOLEMES_STATUS`: 4 +- `CONSOLEMES_NOTICE`: 5 + ### set/getiteminfo options - `ITEMINFO_BUYPRICE`: 0 @@ -4446,6 +4395,67 @@ - `NST_CUSTOM`: 3 - `NST_BARTER`: 4 +### script unit data types + +- `UDT_TYPE`: 0 +- `UDT_SIZE`: 1 +- `UDT_LEVEL`: 2 +- `UDT_HP`: 3 +- `UDT_MAXHP`: 4 +- `UDT_SP`: 5 +- `UDT_MAXSP`: 6 +- `UDT_MASTERAID`: 7 +- `UDT_MASTERCID`: 8 +- `UDT_MAPIDXY`: 9 **(DEPRECATED)** +- `UDT_WALKTOXY`: 10 **(DEPRECATED)** +- `UDT_SPEED`: 11 +- `UDT_MODE`: 12 +- `UDT_AI`: 13 +- `UDT_SCOPTION`: 14 +- `UDT_SEX`: 15 +- `UDT_CLASS`: 16 +- `UDT_HAIRSTYLE`: 17 +- `UDT_HAIRCOLOR`: 18 +- `UDT_HEADBOTTOM`: 19 +- `UDT_HEADMIDDLE`: 20 +- `UDT_HEADTOP`: 21 +- `UDT_CLOTHCOLOR`: 22 +- `UDT_SHIELD`: 23 +- `UDT_WEAPON`: 24 +- `UDT_LOOKDIR`: 25 +- `UDT_CANMOVETICK`: 26 +- `UDT_STR`: 27 +- `UDT_AGI`: 28 +- `UDT_VIT`: 29 +- `UDT_INT`: 30 +- `UDT_DEX`: 31 +- `UDT_LUK`: 32 +- `UDT_ATKRANGE`: 33 +- `UDT_ATKMIN`: 34 +- `UDT_ATKMAX`: 35 +- `UDT_MATKMIN`: 36 +- `UDT_MATKMAX`: 37 +- `UDT_DEF`: 38 +- `UDT_MDEF`: 39 +- `UDT_HIT`: 40 +- `UDT_FLEE`: 41 +- `UDT_PDODGE`: 42 +- `UDT_CRIT`: 43 +- `UDT_RACE`: 44 +- `UDT_ELETYPE`: 45 +- `UDT_ELELEVEL`: 46 +- `UDT_AMOTION`: 47 +- `UDT_ADELAY`: 48 +- `UDT_DMOTION`: 49 +- `UDT_HUNGER`: 50 +- `UDT_INTIMACY`: 51 +- `UDT_LIFETIME`: 52 +- `UDT_MERC_KILLCOUNT`: 53 +- `UDT_STATPOINT`: 54 +- `UDT_ROBE`: 55 +- `UDT_BODY2`: 56 +- `UDT_GROUP`: 57 + ### Renewal - `RENEWAL`: 1 diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt index b53dda2..5164543 100644 --- a/server/scripts/script_commands.txt +++ b/server/scripts/script_commands.txt @@ -1231,7 +1231,7 @@ you have to set it back to black unless you want all the rest of the text be in that color: mes("This is ^FF0000 red ^000000 and this is ^00FF00 green, ^000000 so."); - mes(callfunc("F_MesColor", C_BLUE) +"This message is now in BLUE"); + mesf("%sThis message is now in BLUE.", F_MesColor(C_BLUE)); Notice that the text coloring is handled purely by the client. If you use non-English characters, the color codes might get screwed if they stick to @@ -1255,6 +1255,14 @@ This will allow you to visit 'Google' with the in-game browser using default dim Clicking 'Bing!' will open the in-game browser using the specified dimensions. (800x600) +If you're using client from 2013-01-30 onwards, you can also use <ITEMLINK> to show +the item's description. Gravity changed this into <ITEM> since 2015-07-29 onwards. + + mes("Bring me an <ITEM>Apple<INFO>512</INFO></ITEM>."); + mesf("Bring me an %s.", F_MesItemInfo(Apple)); + +This will show the item name and a clickable link for the item description. + --------------------------------------- *mesf("<format>"{, <param>{, <param>{, ...}}}) @@ -3129,7 +3137,8 @@ recreate these items perfectly if they are destroyed. Here's what you get: made by a specific craftsman. @inventorylist_expire[] - expire time (Unix time stamp). 0 means never expires. -@inventorylist_bound - whether it is an account bounded item or not. +@inventorylist_bound[] - whether it is an account bounded item or not. +@inventorylist_favorite[] - whether it is favorite (inside favorite tab) or not. @inventorylist_count - the number of items in these lists. This could be handy to save/restore a character's inventory, since no @@ -7775,6 +7784,10 @@ solution rather than sending the map and the monster_id. *debugmes("<format string>"{, <param>{, ...}}) + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + @ /!\ This command is deprecated @ + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + This command will print a message in the server console (map-server window), after applying the same format-string replacements as sprintf(). It will not be displayed anywhere else. Returns true on success. @@ -7788,6 +7801,29 @@ Example: --------------------------------------- +*consolemes("<type>", "<format string>"{,<param>{, ...}}) + +This command will print a message in the server console (map-server window), +after applying the same format-string replacements as sprintf(). It will not be +displayed anywhere else. Returns true on success. + +List of available <type> are: + CONSOLEMES_DEBUG = 0 + CONSOLEMES_ERROR = 1 + CONSOLEMES_WARNING = 2 + CONSOLEMES_INFO = 3 + CONSOLEMES_STATUS = 4 + CONSOLEMES_NOTICE = 5 + +Example: + + // Displays "NAME has clicked me!" in the map-server window. + consolemes(CONSOLEMES_DEBUG, "%s has clicked me!", strcharinfo(PC_NAME)); + + consolemes(CONSOLEMES_DEBUG, "\033[0;32mHello World"); // supports ANSI escape sequences + +--------------------------------------- + *logmes("<message>"{, <log type>}) This command will write the message given to the map server log files, as @@ -10138,6 +10174,7 @@ Applicable Data Types (available as constants) - UDT_LIFETIME: LifeTime - for summons. UDT_MERC_KILLCOUNT: Kill count for mercenaries UDT_STATADD: Status Points - for NPCs. + UDT_GROUP: group id returns 0 if value could not be set, 1 if successful. @@ -10200,6 +10237,7 @@ Applicable Data types (available as constants) - UDT_INTIMACY: Intimacy Rate - for summons. UDT_LIFETIME: LifeTime - for summons. UDT_MERC_KILLCOUNT: Kill count for mercenaries. + UDT_GROUP: group id returns -1 if value could not be retrieved. @@ -10403,3 +10441,31 @@ This value always smaller or equal to MAX_INVENTORY. Size can be changed by group of functions expandInventory* --------------------------------------- + +*getunittitle(<GID>) + +Return unit title string. +Works for 20180207 main clients, 20171129 re clients, 20171130 zero clients + +--------------------------------------- + +*setunittitle(<GID>, <title>) + +Set unit title string. +Invisible for players, because current implimentation using title id only. +Works for 20180207 main clients, 20171129 re clients, 20171130 zero clients + +--------------------------------------- + +*closeroulette() + +Force close roulette window. +Works for 20141008 main clients, 20140903 re, any zero. + +--------------------------------------- +*openrefineryui() + +Opens refinery user interface for the player +returns true on success and false on failure + +--------------------------------------- |