summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/constants.md51
-rw-r--r--doc/pet_db.txt196
-rw-r--r--doc/script_commands.txt94
3 files changed, 309 insertions, 32 deletions
diff --git a/doc/constants.md b/doc/constants.md
index 577517a2a..f0c7f50c8 100644
--- a/doc/constants.md
+++ b/doc/constants.md
@@ -1339,6 +1339,13 @@
- `SC_RESIST_PROPERTY_WIND`: 667
- `SC_CLIENT_ONLY_EQUIP_ARROW`: 668
- `SC_MADOGEAR`: 669
+- `SC_POPECOOKIE`: 670
+- `SC_VITALIZE_POTION`: 671
+- `SC_SKF_MATK`: 672
+- `SC_SKF_ATK`: 673
+- `SC_SKF_ASPD`: 674
+- `SC_SKF_CAST`: 675
+- `SC_ALMIGHTY`: 676
### Emotes
@@ -4650,23 +4657,23 @@
### Server defines
-- `PACKETVER`: 20141022
+- `PACKETVER`: 20190530
- `MAX_LEVEL`: 175
- `MAX_STORAGE`: 600
- `MAX_GUILD_STORAGE`: 600
- `MAX_CART`: 100
-- `MAX_INVENTORY`: 100
+- `MAX_INVENTORY`: 200
- `FIXED_INVENTORY_SIZE`: 100
- `MAX_ZENY`: 2147483647
- `MAX_BANK_ZENY`: 2147483647
- `MAX_BG_MEMBERS`: 30
- `MAX_CHAT_USERS`: 20
- `MAX_REFINE`: 20
-- `MAX_ITEM_ID`: 65535
+- `MAX_ITEM_ID`: 2147483647
- `MAX_MENU_OPTIONS`: 255
- `MAX_MENU_LENGTH`: 2048
-- `MOB_CLONE_START`: 4001
-- `MOB_CLONE_END`: 5000
+- `MOB_CLONE_START`: 21001
+- `MOB_CLONE_END`: 22000
- `MAX_NPC_PER_MAP`: 512
### status options
@@ -4990,6 +4997,9 @@
- `ITEMINFO_ITEM_USAGE_FLAG`: 38
- `ITEMINFO_ITEM_USAGE_OVERRIDE`: 39
- `ITEMINFO_GM_LV_TRADE_OVERRIDE`: 40
+- `ITEMINFO_ID`: 41
+- `ITEMINFO_AEGISNAME`: 42
+- `ITEMINFO_NAME`: 43
### getmercinfo options
@@ -5019,6 +5029,25 @@
- `PETINFO_EVO_EGGID`: 11
- `PETINFO_AUTOFEED`: 12
+### Pet hunger levels
+
+- `PET_HUNGER_STARVING`: 0
+- `PET_HUNGER_VERY_HUNGRY`: 10
+- `PET_HUNGER_HUNGRY`: 25
+- `PET_HUNGER_NEUTRAL`: 75
+- `PET_HUNGER_SATISFIED`: 90
+- `PET_HUNGER_STUFFED`: 100
+
+### Pet intimacy levels
+
+- `PET_INTIMACY_NONE`: 0
+- `PET_INTIMACY_AWKWARD`: 1
+- `PET_INTIMACY_SHY`: 100
+- `PET_INTIMACY_NEUTRAL`: 250
+- `PET_INTIMACY_CORDIAL`: 750
+- `PET_INTIMACY_LOYAL`: 900
+- `PET_INTIMACY_MAX`: 1000
+
### monster skill states
- `MSS_ANY`: -1
@@ -5252,10 +5281,18 @@
### itemskill option flags
- `ISF_NONE`: 0
-- `ISF_IGNORECONDITIONS`: 1
+- `ISF_CHECKCONDITIONS`: 1
- `ISF_INSTANTCAST`: 2
- `ISF_CASTONSELF`: 4
+### Item Bound Types
+
+- `IBT_ANY`: 0
+- `IBT_ACCOUNT`: 1
+- `IBT_GUILD`: 2
+- `IBT_PARTY`: 3
+- `IBT_CHARACTER`: 4
+
### Renewal
- `RENEWAL`: 1
@@ -14763,6 +14800,7 @@
- `Elf_Tear_Curse`: 12880
- `Elf_Tear_Silence`: 12881
- `Elf_Tear_Blind`: 12882
+- `Almighty`: 12883
- `C_Center_Potion`: 12884
- `C_Awakening_Potion`: 12885
- `C_Berserk_Potion`: 12886
@@ -16631,6 +16669,7 @@
- `Tw_Red_Scroll`: 17210
- `Tw_Orange_Scroll`: 17211
- `Tw_Yellow_Scroll`: 17212
+- `Almighty_Box`: 17224
- `C_Center_Potion_Box`: 17226
- `C_Awakening_Potion_Box`: 17227
- `C_Berserk_Potion_Box`: 17228
diff --git a/doc/pet_db.txt b/doc/pet_db.txt
new file mode 100644
index 000000000..140a8309d
--- /dev/null
+++ b/doc/pet_db.txt
@@ -0,0 +1,196 @@
+//===== Hercules Documentation ===============================
+//= Pet Database
+//===== By: ==================================================
+//= Hercules Dev Team
+//===== Current Version: =====================================
+//= 20200102
+//===== Description: =========================================
+//= Explanation of the pet_db.conf file and structure.
+//============================================================
+
+pet_db: (
+{
+ // ================ Mandatory fields ==============================
+ Id: ID (int)
+ Name: "Pet Name" (string)
+ EggItem: "Egg Item Constant" (string)
+ // ================ Optional fields ===============================
+ TamingItem: "Taming Item Constant" (string, defaults to 0)
+ FoodItem: "Food Item Constant" (string, defaults to 537 ("Pet_Food"))
+ AccessoryItem: "Equipment Item Constant" (string, defaults to 0)
+ FoodEffectiveness: hunger points (int, defaults to 80)
+ HungerDelay: hunger time (int, defaults to 60)
+ HungerDecrement: hunger points (int, defaults to 1)
+ Intimacy: {
+ Initial: start intimacy (int, defaults to 250)
+ FeedIncrement: feeding intimacy (int, defaults to 10)
+ OverFeedDecrement: overfeeding intimacy (int, defaults to 100)
+ OwnerDeathDecrement: owner die intimacy (int, defaults to 20)
+ StarvingDelay: starving time (int, defaults to 20)
+ StarvingDecrement: starving intimacy (int, defaults to 20)
+ }
+ CaptureRate: capture rate (int, defaults to 1000)
+ Speed: speed (int, defaults to 150)
+ SpecialPerformance: true/false (boolean, defaults to false)
+ TalkWithEmotes: convert talk (boolean, defaults to false)
+ AttackRate: attack rate (int, defaults to 300)
+ DefendRate: Defence attack (int, defaults to 300)
+ ChangeTargetRate: change target (int, defaults to 800)
+ AutoFeed: true/false (boolean, defaults to false)
+ PetScript: <" Pet Script (can also be multi-line) ">
+ EquipScript: <" Equip Script (can also be multi-line) ">
+ Evolve: {
+ EggID: { (string, Evolved Pet EggID)
+ Name: Amount (items required to perform evolution)
+ ...
+ }
+ }
+},
+...
+)
+
+ * Id:
+ The ID of the monster that should be tamed. See mob_db.conf.
+ * Name:
+ The pet's default name.
+ * EggItem:
+ The name of the pet's egg item. See item_db.conf AegisName field.
+ * TamingItem:
+ The name of the item, which is used to tame the pet.
+ See item_db.conf AegisName field.
+ This field is optional and defaults to 0.
+ * FoodItem:
+ The name of the item, which is used to feed the pet.
+ See item_db.conf AegisName field.
+ This field is optional and defaults to Pet_Food (ID=537).
+ * AccessoryItem:
+ The name of the pet's accesssory item.
+ See item_db.conf AegisName field.
+ This field is optional and defaults to 0.
+ * FoodEffectiveness:
+ This field defines how many hunger points
+ are restored, when feeding the pet.
+ This field is optional and defaults to 80.
+ Minimum value is 1, maximum value is 100.
+ * HungerDelay:
+ This is the interval for consuming hunger points.
+ Every <HungerDelay> seconds, the pet will consume
+ <HungerDecrement> hunger points.
+ In official servers it's 60 seconds for every pet.
+ This field is optional and defaults to 60.
+ Minimum value is 0, maximum value is 2147483.
+ If set to 0, the pet won't consume hunger points.
+ * HungerDecrement:
+ How many hunger points will be consumed every <HungerDelay> seconds.
+ This field is optional and defaults to 1.
+ Minimum value is 0, maximum value is 99.
+ If set to 0, <HungerDelay> is automatically set to 0, too,
+ regardless of what value was defined.
+ * Intimacy: {
+ The <Intimacy> block contains all settings,
+ which affect the pet's intimacy value.
+ * Initial:
+ The amount of intimacy points, the pet will have when tamed.
+ This field is optional and defaults to 250.
+ Minimum value is 1, maximum value is 1000.
+ * FeedIncrement:
+ The amount of intimacy points, gained when feeding the pet.
+ Note: This value is used as base value.
+ The actual added amount depends on the pet's current hunger.
+ This field is optional and defaults to 10.
+ Minimum value is 1, maximum value is 1000.
+ * OverFeedDecrement:
+ The amount of intimacy points, lost when feeding the pet
+ if it isn't hungry.
+ Note: This value is used as base value.
+ The actual removed amount depends on the pet's current hunger.
+ This field is optional and defaults to 100.
+ Minimum value is 0, maximum value is 1000.
+ * OwnerDeathDecrement:
+ The amount of intimacy points, lost when its master dies.
+ This field is optional and defaults to 20.
+ Minimum value is 0, maximum value is 1000.
+ * StarvingDelay:
+ This is the interval for loosing intimacy points,
+ when the pet is starving.
+ The pet is starving, if it has no hunger points left.
+ Every <StarvingDelay> seconds, the pet will lose
+ <StarvingDecrement> intimacy points.
+ In official servers it's 20 seconds for all pets.
+ If <HungerDelay> is set to 0, <StarvingDelay> is set to 0, too,
+ regardless of what value was defined.
+ This field is optional and defaults to 20.
+ Minimum value is 0, maximum value is <HungerDelay>.
+ If set to 0, the pet won't lose intimacy points while starving.
+ * StarvingDecrement:
+ How many intimacy points will be lost every <StarvingDelay> seconds,
+ when the pet is starving.
+ This field is optional and defaults to 20.
+ Minimum value is 0, maximum value is 1000.
+ If set to 0, <StarvingDelay> is automatically set to 0, too,
+ regardless of what value was defined.
+ }
+ * CaptureRate:
+ The chance of success when taming the pet.
+ 10000 equals 100%.
+ This field is optional and defaults to 1000.
+ Minimum value is 1, maximum value is 10000.
+ * Speed:
+ The pet's moving speed.
+ Note: The lower the value, the higher the speed.
+ This field is optional and defaults to 150.
+ Minimum value is 20, maximum value is 1000.
+ * SpecialPerformance:
+ If 'true', the pet is allowed to do its special performance.
+ This field is optional and defaults to 'false'.
+ * TalkWithEmotes:
+ If 'true', the pet is allowed to talk by using emotes.
+ This field is optional and defaults to 'false'.
+ * AttackRate:
+ Chance for supporting when the master attacks a monster.
+ 10000 equals 100%.
+ This field is optional and defaults to 300.
+ Minimum value is 0, maximum value is 10000.
+ * DefendRate:
+ Chance for supporting when the master receives damage from a monster.
+ 10000 equals 100%.
+ This field is optional and defaults to 300.
+ Minimum value is 0, maximum value is 10000.
+ * ChangeTargetRate:
+ Chance for the pet changes its target when supporting.
+ 10000 equals 100%.
+ This field is optional and defaults to 800.
+ Minimum value is 0, maximum value is 10000.
+ * AutoFeed:
+ If 'true', the pet is fed automatically.
+ This field is optional and defaults to 'false'.
+ * PetScript: <"
+ This field is used for pet AI commands. See doc/script_commands.txt.
+ It will be executed every time, the pet's data gets initialized.
+ Everything you can do in a NPC script should work here, too,
+ but using the <EquipScript> field is recommended, when executing
+ other commands than the pet AI ones.
+ This field is optional and has no default value.
+ ">
+ * EquipScript: <"
+ This field is commonly used to apply bonuses to the the pet's master.
+ See doc/item_bonus.md.
+ It will be executed every time, the pet master's status is calculated.
+ Everything you can do in a NPC script should work here, too.
+ This field is optional and has no default value.
+ ">
+ * Evolve: {
+ The <Evolve> block is used to define which pet(s) can be eveolved
+ from the current pet.
+ This block is optional and has no default value.
+ * Evolved_Egg_Item_Name: {
+ The name of the egg item, which will be created when evolving.
+ You can add multiple <Evolved_Egg_Item_Name> blocks.
+ See item_db.conf AegisName field.
+ * Evolve_Item_Name: Amount
+ This is a pair of an item name and the corresponding amount which is
+ required to evolve the pet into <Evolved_Egg_Item_Name>.
+ You can add multiple <Evolve_Item_Name: Amount> pairs.
+ See item_db.conf AegisName field for item names.
+ }
+ }
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 8308f4771..3b77aeb2c 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -3277,6 +3277,7 @@ Example:
---------------------------------------
*getiteminfo(<item ID>, <type>)
+*getiteminfo("<item name>", <type>)
*setiteminfo(<item ID>, <type>, <value>)
This function will look up the item with the specified ID number in the
@@ -3285,6 +3286,9 @@ It will return -1 if there is no such item.
Valid types are:
+ ITEMINFO_ID - Item ID (getiteminfo() only!)
+ ITEMINFO_AEGISNAME - Unique name to reference the item (getiteminfo() only!)
+ ITEMINFO_NAME - Display name (getiteminfo() only!)
ITEMINFO_BUYPRICE - Buy Price
ITEMINFO_SELLPRICE - Sell Price
ITEMINFO_TYPE - Item Type
@@ -5273,11 +5277,11 @@ bound to the target character as specified by the bound type. All items created
in this manner cannot be dropped, sold, vended, auctioned, or mailed, and in
some cases cannot be traded or stored.
-Valid bound types are:
- 1 - Account Bound
- 2 - Guild Bound
- 3 - Party Bound
- 4 - Character Bound
+Valid item bound types are:
+ 1 - IBT_ACCOUNT - Account Bound
+ 2 - IBT_GUILD - Guild Bound
+ 3 - IBT_PARTY - Party Bound
+ 4 - IBT_CHARACTER - Character Bound
---------------------------------------
@@ -5318,12 +5322,12 @@ If a bound type is not specified or a bound type of 0 is used, it will search th
of any type, so long as the other parameters match. In all cases, this command will return the bound type of the
item found, or 0 if the specified item was not found.
-Valid bound types are:
- 0 - All Bound types.
- 1 - Account Bound
- 2 - Guild Bound
- 3 - Party Bound
- 4 - Character Bound
+Valid item bound types are:
+ 0 - IBT_ANY - Any Bound
+ 1 - IBT_ACCOUNT - Account Bound
+ 2 - IBT_GUILD - Guild Bound
+ 3 - IBT_PARTY - Party Bound
+ 4 - IBT_CHARACTER - Character Bound
Optional Parameters:
bound_type - checks to see if the item has the specified bound type.
@@ -5341,7 +5345,7 @@ Example:
close();
// This will also check if you have a bound (any type) 1205 (Cutter).
- if (checkbound(Cutter, 0)) {
+ if (checkbound(Cutter, IBT_ANY)) {
mes("You have a bound Cutter");
} else {
mes("You do not have a bound Cutter");
@@ -5356,8 +5360,8 @@ Example:
}
close();
- // This will check if the item found, has a bound type of 2 (guild_bound)
- if (checkbound(Cutter) == 2) {
+ // This will check if the item found, has a bound type of IBT_GUILD
+ if (checkbound(Cutter) == IBT_GUILD) {
mes("You have a guild_bound Cutter");
} else {
mes("You do not have a guild_bound Cutter.");
@@ -5365,7 +5369,7 @@ Example:
close();
// This will check if you have a 'guild_bound' +7 1205 (Cutter).
- if (checkbound(Cutter, 2, 7)) {
+ if (checkbound(Cutter, IBT_GUILD, 7)) {
mes("You have a +7 guild_bound Cutter.");
} else {
mes("You don't have the required item.");
@@ -5659,18 +5663,20 @@ usable items. It will not work properly if there is a visible dialog
window or menu.
If the skill is self or auto-targeting, it will be used immediately.
Otherwise, a target cursor is shown.
-Optional value <flag> is a bitmask to manipulate how the skill is casted.
+By default, all skill requirements are ignored.
+Optional argument <flag> is a bitmask to manipulate how the skill is cast.
Since <flag> is a bitmask, the flags can be summed up.
Possible flags are:
- - 0x00 - ISF_NONE - Skill is casted as if has been used from skill tree.
+ - 0x00 - ISF_NONE - Skill is cast as if it has been used from skill tree.
(Same like <flag> was omitted.)
- - 0x01 - ISF_IGNORECONDITIONS - Skill requirements are ignored and not consumed
- - 0x02 - ISF_INSTANTCAST - Skill is casted instantaneously.
- - 0x04 - ISF_CASTONSELF - Skill is forcefully casted on invoking character,
+ - 0x01 - ISF_CHECKCONDITIONS - Skill requirements are checked and consumed.
+ (SP are never checked/consumed.)
+ - 0x02 - ISF_INSTANTCAST - Skill is cast instantaneously.
+ - 0x04 - ISF_CASTONSELF - Skill is forcefully cast on invoking character,
without showing the target selection cursor.
Important: Items which use itemskill() should be of type IT_USABLE.
- If the item type is IT_DELAYCONSUME and ISF_IGNORECONDITIONS is set,
+ If the item type is IT_DELAYCONSUME and ISF_CHECKCONDITIONS isn't set,
the item won't be consumed when using the item!
// When Anodyne is used, it will cast Endure, Level 1, as if the actual skill
@@ -5678,8 +5684,8 @@ Important: Items which use itemskill() should be of type IT_USABLE.
itemskill(SM_ENDURE, 1);
// Instantaneously cast Level 10 Increase Agility on invoking character,
-// without checking/consuming skill requirements.
- itemskill(AL_INCAGI, 10, ISF_IGNORECONDITIONS | ISF_INSTANTCAST | ISF_CASTONSELF);
+// with checking/consuming skill requirements (15 HP).
+ itemskill(AL_INCAGI, 10, ISF_CHECKCONDITIONS | ISF_INSTANTCAST | ISF_CASTONSELF);
// Instaed of using the constants, one could also do it like this:
itemskill(AL_INCAGI, 10, 7);
@@ -6569,17 +6575,22 @@ Examples:
---------------------------------------
-*setpcblock(<type>,<option>)
-*checkpcblock()
+*setpcblock(<type>, <option>{, <account id>})
+*checkpcblock({<account id>})
-Prevents the player from doing the following action.
+Prevents a character from doing the following action.
For setpcblock, when the <option> is true(1) will block them, and false(0)
will allow those actions again.
+The setpcblock command returns 1 on success or 0 if no character was attached.
+
The checkpcblock command returned value is a bit mask of the currently
enabled block flags (or PCBLOCK_NONE when none is set).
+Parameter <account id> is optional for both commands.
+If omitted, the currently attached character is used.
+
The <type> listed are a bit mask of the following:
PCBLOCK_NONE (only used by checkpcblock)
PCBLOCK_MOVE
@@ -6987,6 +6998,37 @@ Examples:
---------------------------------------
+*unitiswalking({<GID>})
+
+This command checks, if a unit is walking or not.
+If <GID> is omitted, the currently attached character is used.
+Returns 1 if the unit is walking, 0 if the unit is not walking and -1 on error.
+
+Note: There's no differentiation between script and client initiated walking.
+
+Example:
+
+prontera,155,185,5 script Check Walking 1_F_MARIA,{
+ mes("Enter character name.");
+ mes("");
+ input(.@name$);
+ .@GID = getcharid(CHAR_ID_ACCOUNT, .@name$);
+ if (.@GID != 0) {
+ .@iswalking = unitiswalking(.@GID);
+ if (.@iswalking == 1)
+ mesf("%s is walking.", .@name$);
+ else if (.@iswalking == 0)
+ mesf("%s is not walking.", .@name$);
+ else
+ mesf("Can't get %s's walking state.", .@name$);
+ } else {
+ mesf("%s not found!", .@name$);
+ }
+ close();
+}
+
+---------------------------------------
+
*unitkill(<GID>)
*unitwarp(<GID>, <Mapname>, <x>, <y>)
*unitattack(<GID>, <Target ID>)