summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-06-14 21:49:31 +0300
committerAndrei Karas <akaras@inbox.ru>2018-06-14 21:49:31 +0300
commit54b373d4fe3983e51d1a55084b45fe9f72f90a11 (patch)
treea8273680512100e2cf09cbf8d8bb2c4d9a067846
parentb9aaa63b5caa41484dfac98477b8076767fa5b13 (diff)
downloaddocs-54b373d4fe3983e51d1a55084b45fe9f72f90a11.tar.gz
docs-54b373d4fe3983e51d1a55084b45fe9f72f90a11.tar.bz2
docs-54b373d4fe3983e51d1a55084b45fe9f72f90a11.tar.xz
docs-54b373d4fe3983e51d1a55084b45fe9f72f90a11.zip
Update from hercules constants.md and script_commands.txts20180713
-rw-r--r--server/scripts/constants.md17
-rw-r--r--server/scripts/script_commands.txt75
2 files changed, 85 insertions, 7 deletions
diff --git a/server/scripts/constants.md b/server/scripts/constants.md
index f4ffaf2..654e5eb 100644
--- a/server/scripts/constants.md
+++ b/server/scripts/constants.md
@@ -4221,6 +4221,18 @@
- `MST_AROUND4`: 12
- `MST_AROUND`: 12
+### pc block constants, use with *setpcblock* and *checkpcblock*
+
+- `PCBLOCK_NONE`: 0
+- `PCBLOCK_MOVE`: 1
+- `PCBLOCK_ATTACK`: 2
+- `PCBLOCK_SKILL`: 4
+- `PCBLOCK_USEITEM`: 8
+- `PCBLOCK_CHAT`: 16
+- `PCBLOCK_IMMUNE`: 32
+- `PCBLOCK_SITSTAND`: 64
+- `PCBLOCK_COMMANDS`: 128
+
### private airship responds
- `P_AIRSHIP_NONE`: 0
@@ -12292,6 +12304,7 @@
- `Daily_Coin`: 6674
- `XMAS_Cookie`: 6681
- `Bag_Of_Selling_Goods`: 6682
+- `Cash_Hair_Coupon`: 6707
- `Lovely_Stick`: 6712
- `Corrupted_Charm`: 6755
- `ORGANIC_PUMPKIN`: 6804
@@ -15977,6 +15990,9 @@
- `Universal_Catalog_Gold_Box10_`: 16776
- `Universal_Catalog_Gold_Box50`: 16777
- `Sagittarius_Scr_Box`: 16826
+- `Beauty_Gift_Box`: 16843
+- `Clothing_Dye_Box`: 16854
+- `Clothing_Dye_Orig_Box`: 16855
- `Weather_Report_Box`: 16972
- `Yellow_Hat_Box`: 16973
- `Comin_Actor_Box`: 16974
@@ -16146,6 +16162,7 @@
- `INT_Biscuit_Stick_Box`: 17273
- `DEX_Biscuit_Stick_Box`: 17274
- `LUK_Biscuit_Stick_Box`: 17275
+- `Jeremy_Beauty_Coupon_Box`: 17336
- `Cannon_Ball`: 18000
- `Holy_Cannon_Ball`: 18001
- `Dark_Cannon_Ball`: 18002
diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt
index aa0fea3..36c4da3 100644
--- a/server/scripts/script_commands.txt
+++ b/server/scripts/script_commands.txt
@@ -3357,12 +3357,13 @@ Examples:
---------------------------------------
-*getunits(<type>, <variable>, <limit>, "<map>"{, <x1>, <y1>, <x2>, <y2>})
+*getunits(<type>, <variable>, <limit>{, "<map>"{, <x1>, <y1>, <x2>, <y2>}})
This function searches a whole map or area for units and adds their GID to
the provided <variable> array. It filters units by <type> and stops searching
after <limit> units have been found. Set <limit> to false (0) if you wish to
-disable the limit altogether.
+disable the limit altogether. If <map> is omitted, this command will search
+on the whole server (slow). Returns the number of units added to the array.
Type is the type of unit to search for:
@@ -3381,6 +3382,10 @@ Type is the type of unit to search for:
** Do NOT use UNITTYPE_ constants here, they have different values.
+** If battle_config.dynamic_mobs is enabled and no player has entered the map
+ yet, the mobs will not have spawned in the map yet, so getunits() will be
+ unable to find them when searching for BL_MOB.
+
Example:
.@count = getunits((BL_PC | BL_NPC), .@units, false, "prontera");
@@ -6184,12 +6189,15 @@ Examples:
---------------------------------------
-*pcblockmove(<id>, <option>)
+*pcblockmove(<account id>, <option>)
+
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ @ /!\ This command is deprecated @
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-Prevents the given ID from moving when the optionis true , and false
-enables the ID to move again. The ID can either be the GID of a
-monster/NPC or account ID of a character, and will run for the attached
-player if zero is supplied.
+Prevents the player from moving when the option != 0, and 0 enables the
+player to move again. The player has to be the account ID of a character,
+and will run for the attached player if zero is supplied.
Examples:
@@ -6199,6 +6207,53 @@ Examples:
// Enables the current char to move again.
pcblockmove(getcharid(CHAR_ID_ACCOUNT), false);
+---------------------------------------
+
+*setpcblock(<type>,<option>)
+*checkpcblock()
+
+Prevents the player 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 checkpcblock command returned value is a bit mask of the currently
+enabled block flags (or PCBLOCK_NONE when none is set).
+
+The <type> listed are a bit mask of the following:
+ PCBLOCK_NONE (only used by checkpcblock)
+ PCBLOCK_MOVE
+ PCBLOCK_ATTACK
+ PCBLOCK_SKILL
+ PCBLOCK_USEITEM
+ PCBLOCK_CHAT
+ PCBLOCK_IMMUNE
+ PCBLOCK_SITSTAND
+ PCBLOCK_COMMANDS
+
+Examples:
+
+// Make the current attached player invulnerable, same as @monsterignore
+ setpcblock(PCBLOCK_IMMUNE, true);
+
+// Prevents the current char from attacking or using skills
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL, true);
+
+// Re-enables attack, skills and item use
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM, false);
+
+// checkpcblock related checks
+ if ((checkpcblock() & PCBLOCK_IMMUNE) != 0)
+ mes "You are invulnerable!";
+
+ if ((checkpcblock() & (PCBLOCK_MOVE|PCBLOCK_SITSTAND)) == (PCBLOCK_MOVE|PCBLOCK_SITSTAND))
+ mes "You can't walk or sit";
+
+ if ((checkpcblock() & (PCBLOCK_ATTACK|PCBLOCK_SKILL)) == PCBLOCK_NONE)
+ mes "You can attack and use skills";
+
+ if ((checkpcblock() & PCBLOCK_CHAT) == PCBLOCK_NONE)
+ mes "You can't chat";
---------------------------------------
//=====================================
@@ -10007,4 +10062,10 @@ the available flags are:
P_AIRSHIP_ITEM_NOT_ENOUGH
P_AIRSHIP_ITEM_INVALID
+---------------------------------------
+
+*openstylist()
+
+Opens the styling shop on client
+
--------------------------------------- \ No newline at end of file