summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-04-04 17:37:26 +0300
committerAndrei Karas <akaras@inbox.ru>2017-04-04 17:37:26 +0300
commitaeffcca0162e0f90fea0ed9ec8797b9c8c2cfb93 (patch)
tree0ac1222ee3fc3794e4e6e0480f1ff926f6872384
parent62d2b32affb15349faea803960fa40dc47123b9a (diff)
downloaddocs-aeffcca0162e0f90fea0ed9ec8797b9c8c2cfb93.tar.gz
docs-aeffcca0162e0f90fea0ed9ec8797b9c8c2cfb93.tar.bz2
docs-aeffcca0162e0f90fea0ed9ec8797b9c8c2cfb93.tar.xz
docs-aeffcca0162e0f90fea0ed9ec8797b9c8c2cfb93.zip
Update docs from hercules.
-rw-r--r--server/monsters/mob_db.txt229
-rw-r--r--server/scripts/constants.md6
-rw-r--r--server/scripts/script_commands.txt55
3 files changed, 279 insertions, 11 deletions
diff --git a/server/monsters/mob_db.txt b/server/monsters/mob_db.txt
new file mode 100644
index 0000000..8cb7a6f
--- /dev/null
+++ b/server/monsters/mob_db.txt
@@ -0,0 +1,229 @@
+//===== Hercules Documentation ===============================
+//= Monster Database
+//===== By: ==================================================
+//= Hercules Dev Team
+//===== Current Version: =====================================
+//= 20170311
+//===== Description: =========================================
+//= Explanation of the mob_db.conf file and structure.
+//============================================================
+
+mob_db: (
+{
+ // ================ Mandatory fields ==============================
+ Id: ID (int)
+ SpriteName: "SPRITE_NAME" (string)
+ Name: "Mob name" (string)
+ // ================ Optional fields ===============================
+ JName: "Mob name" (string)
+ Lv: level (int, defaults to 1)
+ Hp: health (int, defaults to 1)
+ Sp: mana (int, defaults to 0)
+ Exp: basic experience (int, defaults to 0)
+ JExp: job experience (int, defaults to 0)
+ AttackRange: attack range (int, defaults to 1)
+ Attack: [attack1, attack2] (int, defaults to 0)
+ Def: defence (int, defaults to 0)
+ Mdef: magic defence (int, defaults to 0)
+ Stats: {
+ Str: strength (int, defaults to 0)
+ Agi: agility (int, defaults to 0)
+ Vit: vitality (int, defaults to 0)
+ Int: intelligence (int, defaults to 0)
+ Dex: dexterity (int, defaults to 0)
+ Luk: luck (int, defaults to 0)
+ }
+ ViewRange: view range (int, defaults to 1)
+ ChaseRange: chase range (int, defaults to 1)
+ Size: size (string, defaults to "Size_Medium")
+ Race: race (string, defaults to "RC_Formless")
+ Element: (type, level)
+ Mode: {
+ CanMove: true/false (bool, defaults to false)
+ Looter: true/false (bool, defaults to false)
+ Aggressive: true/false (bool, defaults to false)
+ Assist: true/false (bool, defaults to false)
+ CastSensorIdle:true/false (bool, defaults to false)
+ Boss: true/false (bool, defaults to false)
+ Plant: true/false (bool, defaults to false)
+ CanAttack: true/false (bool, defaults to false)
+ Detector: true/false (bool, defaults to false)
+ CastSensorChase: true/false (bool, defaults to false)
+ ChangeChase: true/false (bool, defaults to false)
+ Angry: true/false (bool, defaults to false)
+ ChangeTargetMelee: true/false (bool, defaults to false)
+ ChangeTargetChase: true/false (bool, defaults to false)
+ TargetWeak: true/false (bool, defaults to false)
+ NoKnockback: true/false (bool, defaults to false)
+ SurviveWithoutMaster: true/false (bool, defaults to false)
+ }
+ MoveSpeed: move speed (int, defaults to 0)
+ WalkMask: walk mask (int, defaults to 0)
+ AttackDelay: attack delay (int, defaults to 4000)
+ AttackMotion: attack motion (int, defaults to 2000)
+ DamageMotion: damage motion (int, defaults to 0)
+ SpawnCollisionSize: collision size (int, defaults to -1)
+ SpawnCollisionMask: collision mask (int, defaults to 1)
+ MvpExp: mvp experience (int, defaults to 0)
+ MvpDrops: {
+ AegisName: chance (string: int)
+ // ...
+ }
+ Drops: {
+ AegisName: chance (string: int)
+ // ...
+ }
+ WeaponAttacks: {
+ WeaponType: 10000
+ }
+ SkillAttacks: {
+ SkillName: 10000
+ }
+},
+...
+)
+
+Id: Monster id
+
+Sprite: Monster name as it is named on client.
+ Allowed characters: [A-Za-z0-9_]
+
+Name: Name displaying as output for @ and script commands.
+ This is the name shown when summon a monster with "--en--" as monster name.
+
+JName: Name displaying as output for @ and script commands.
+ When provided, this has preference over Name value.
+ This is the name shown when summon a monster with "--ja--" as monster name.
+
+Lv: Monster level
+ When not specified, becomes 1.
+
+Hp: Monster Hp
+ When not specified, becomes 1.
+
+Sp: Monster Sp
+ When not specified, becomes 0.
+
+Exp: Base Experience given by the monster.
+ When not specified, becomes 0.
+
+JExp: Job Experience given by the monster.
+ When not specified, becomes 0.
+
+AttackRange: Range for monster's attack.
+ When the range between monster and target is greater than 3 the skill is considered long-range,
+ otherwise it's a melee range.
+ When not specified, becomes 1.
+
+Attack: Attack of the monster, represented in two values: attack1 and attack2.
+ attack1 is minimal attack for the monster.
+ attack2, when pre-renewal is set, it's a value that sets maximum attack for monster.
+ Example: Familiar's attack is "Attack: [68, 77]", that is min attack of 68 and max attack of 77.
+ attack2, when renewal is set, it's a value added to attack1 to calculate maximum attack for monster.
+ Example: Familiar's attack is "Attack: [68, 9]", that is min attack of 68 and max attack of 77 (68+9).
+ When not specified, becomes 0.
+
+Def: Monster defense to physical attacks.
+ When not specified, becomes 0.
+
+Mdef: Monster defense to magical attacks.
+ When not specified, becomes 0.
+
+Stats: {
+ Str: monster strength points (When not specified, becomes 0)
+ Agi: monster agility points (When not specified, becomes 0)
+ Vit: monster vitality points (When not specified, becomes 0)
+ Int: monster intelligence points (When not specified, becomes 0)
+ Dex: monster dexterity points (When not specified, becomes 0)
+ Luk: monster luck points (When not specified, becomes 0)
+}
+
+ViewRange: Range for monster's view.
+ Aggressive monsters will attack when Player is inside view range.
+ When not specified, becomes 1.
+
+ChaseRange: Range for monster's chase.
+ Aggressive and attacking monsters will stop chasing when Player gets outside chase range.
+ When not specified, becomes 1.
+
+Size: Sets monster's size. Accepts these constants:
+ "Size_Small"
+ "Size_Medium"
+ "Size_Large"
+ When not specified, becomes "Size_Medium".
+
+Race: Sets monster's race. Accepts these constants:
+ "RC_Formless"
+ "RC_Undead"
+ "RC_Brute"
+ "RC_Plant"
+ "RC_Insect"
+ "RC_Fish"
+ "RC_Demon"
+ "RC_DemiHuman"
+ "RC_Angel"
+ "RC_Dragon"
+ When not specified, becomes "RC_Formless".
+
+Element: Monster's element. Sets element type and level.
+ Required format: ("Element Type", Level).
+ Accepts these constants for Element Type:
+ "Ele_Neutral"
+ "Ele_Water"
+ "Ele_Earth"
+ "Ele_Fire"
+ "Ele_Wind"
+ "Ele_Poison"
+ "Ele_Holy"
+ "Ele_Dark"
+ "Ele_Ghost"
+ "Ele_Undead"
+ Level is an integer. Valid values: 1 ~ 4.
+
+Mode: Monster AI behaviour. If this block is omitted, monster doesn't react to anything.
+ All the settings in this group are boolean values,
+ Default value is false (mode not set) for any missing setting.
+ See /doc/sample/mob_db_mode_list.txt for more information about monsters Mode types.
+
+MoveSpeed: Monster's speed. Sets speed (cells/sec).
+ MoveSpeed is calculated to Hercules with this formula: 1000 / SPEED (CELLS/SEC)
+ When not specified, becomes 0.
+
+AttackDelay: Sets time delay between monster attack. Also refered as aspd.
+ Monster will not be able to do new attack until AttackDelay ends.
+ If AttackMotion is bigger than AttackDelay, monster will need to wait to AttackMotion delay.
+ When not specified, becomes 4000.
+
+AttackMotion: Sets time delay between animation motion.
+ Monster will not be able to do new attack until AttackMotion ends.
+ If AttackDelay is bigger than AttackMotion, monster will need to wait to AttackDelay delay.
+ AttackMotion is calculated to Hercules with this formula: 1000 / ASPD (ATTACKS/SEC)
+ When not specified, becomes 2000.
+
+DamageMotion: Sets time delay between damage motion.
+ When not specified, becomes 2000.
+
+MvpExp: Base Experience given by the monster to the player who inflict more attack.
+ Having any value except 0 will trigger MVP banner to the player who inflict more attack.
+ When not specified, becomes 0.
+
+
+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.
+ Chance is an integer from 1 to 10000 (10000 = 100%).
+ Required format:
+ MvpDrops: {
+ AegisName: chance
+ // ...
+ }
+ When not specified, becomes false.
+
+Drops: Sets monster drops list.
+ Accepted values are AegisName as defined on item_db.conf and a chance.
+ Chance is an integer from 1 to 10000 (10000 = 100%).
+ Required format:
+ Drops: {
+ AegisName: chance
+ // ...
+ }
+ When not specified, becomes false.
diff --git a/server/scripts/constants.md b/server/scripts/constants.md
index 208d6da..22d2854 100644
--- a/server/scripts/constants.md
+++ b/server/scripts/constants.md
@@ -3624,6 +3624,12 @@
- `GETTIME_YEAR`: 7
- `GETTIME_DAYOFYEAR`: 8
+### gettimer
+
+- `TIMER_COUNT`: 0
+- `TIMER_TICK_NEXT`: 1
+- `TIMER_TICK_LAST`: 2
+
### unit types
- `UNITTYPE_PC`: 0
diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt
index 6df1f6e..581ec18 100644
--- a/server/scripts/script_commands.txt
+++ b/server/scripts/script_commands.txt
@@ -4321,7 +4321,7 @@ Example:
---------------------------------------
-*warpguild("<mapname>", <x>, <y>, <guild_id>)
+*warpguild("<mapname>", <x>, <y>, <guild_id>, {"<from_mapname>"})
Warps a guild to specified map and coordinate given the guild id, which
you can get with getcharid(CHAR_ID_GUILD). You can also request another guild id given
@@ -4335,9 +4335,12 @@ SavePoint: All guild members are warped to the save point of the
currently attached player (will fail if there's no player
attached).
+If you specify a from_mapname, warpguild() will only affect those on that map.
+
Example:
warpguild("prontera", x, y, Guild_ID);
+ warpguild("prontera", x, y, Guild_ID, "payon"); // warp member from Payon map only.
---------------------------------------
@@ -6475,17 +6478,14 @@ Size is 0 = normal 1 = small 2 = big.
//=====================================
---------------------------------------
-*addtimer(<ticks>, "NPC::OnLabel")
-*deltimer("NPC::OnLabel")
-*addtimercount("NPC::OnLabel", <ticks>)
+*addtimer(<ticks>, "NPC::OnLabel"{, <account id>})
-These commands will create, destroy, and delay a countdown timer -
-addtimer() to create, deltimer() to destroy and addtimercount() to delay
-it by the specified number of ticks. For all three cases, the event label
-given is the identifier of that timer. The timer runs on the character
-object that is attached to the script, and can have multiple instances.
-When the label is run, it is run as if the player that the timer runs on
-has clicked the NPC.
+This command will create a countdown timer.
+The event label given is the identifier of that timer.
+The timer runs on the character object that is attached to the script,
+and can have multiple instances. If <acccount id> is passed, this player
+will be used instead. When the label is run, it is run as if the player
+that the timer runs on has clicked the NPC.
When this timer runs out, a new execution thread will start in the
specified NPC object at the specified label.
@@ -6509,6 +6509,39 @@ On5secs:
---------------------------------------
+*deltimer("NPC::OnLabel"{, <account id>})
+
+Deletes timers created by addtimer() that matches the given event
+label. Refer to addtimer() for additional information.
+
+---------------------------------------
+
+*addtimercount("NPC::OnLabel", <ticks>{, <account id>})
+
+Delays a timer that was created with addtimer() by <ticks> ticks
+if it matches the given event label. Refer to addtimer() for additional
+information.
+
+---------------------------------------
+
+*gettimer(<type>{, <account id>{, "<event>"}})
+
+Returns informations on timers that were created by addtimer().
+
+valid <type> for gettimer() are:
+
+(0) TIMER_COUNT
+ Will return the total number of timers for the specified or
+ attached player. Can be filtered by <event>.
+(1) TIMER_TICK_NEXT
+ Will return the number of ticks until the next timer runs
+ for the specified or attached player. Can be filtered by <event>.
+(2) TIMER_TICK_LAST
+ Will return the number of ticks until the last timer runs
+ for the specified or attached player. Can be filtered by <event>.
+
+---------------------------------------
+
*initnpctimer({ "<NPC name>" {, <Attach Flag>} } |
{ "<NPC name>" | <Attach Flag> })
*stopnpctimer({ "<NPC name>" {, <Detach Flag>} } |