diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-06-26 21:38:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-06-26 21:38:58 +0300 |
commit | 47126c81ddcc411263a551fdc5245d3b3d65ce24 (patch) | |
tree | 046d444a507665516b69a21e1e7d0186cea446d2 /server | |
parent | e3d6159341d9ae4cf85eea8b5b732d3164e75057 (diff) | |
download | docs-47126c81ddcc411263a551fdc5245d3b3d65ce24.tar.gz docs-47126c81ddcc411263a551fdc5245d3b3d65ce24.tar.bz2 docs-47126c81ddcc411263a551fdc5245d3b3d65ce24.tar.xz docs-47126c81ddcc411263a551fdc5245d3b3d65ce24.zip |
Update from herculess20190819
Diffstat (limited to 'server')
-rw-r--r-- | server/items/permissions.md | 1 | ||||
-rw-r--r-- | server/scripts/constants.md | 17 | ||||
-rw-r--r-- | server/scripts/script_commands.txt | 97 |
3 files changed, 105 insertions, 10 deletions
diff --git a/server/items/permissions.md b/server/items/permissions.md index 7d29b59..a8794ec 100644 --- a/server/items/permissions.md +++ b/server/items/permissions.md @@ -48,4 +48,5 @@ disable_pickup | Ability to disable the player from picking up any i disable_exp | Ability to disable the player from gaining any experience point. disable_store | Ability to disable the player from using/openning npc and player stores. disable_skill_usage | Ability to disable the player from using any skill. +bypass_nostorage | Ability to bypass the nostorage and nogstorage mapflag. diff --git a/server/scripts/constants.md b/server/scripts/constants.md index d5dbf7a..4856457 100644 --- a/server/scripts/constants.md +++ b/server/scripts/constants.md @@ -362,6 +362,8 @@ - `mf_noviewid`: 56 - `mf_pairship_startable`: 57 - `mf_pairship_endable`: 58 +- `mf_nostorage`: 59 +- `mf_nogstorage`: 60 ### Cell Properties @@ -3934,6 +3936,7 @@ - `MAX_MENU_LENGTH`: 2048 - `MOB_CLONE_START`: 4001 - `MOB_CLONE_END`: 5000 +- `MAX_NPC_PER_MAP`: 512 ### status options @@ -4123,6 +4126,7 @@ - `PERM_DISABLE_STORE`: 16777216 - `PERM_DISABLE_EXP`: 33554432 - `PERM_DISABLE_SKILL_USAGE`: 67108864 +- `PERM_BYPASS_NOSTORAGE`: 134217728 ### Data types @@ -4201,6 +4205,7 @@ - `MAPINFO_SIZE_X`: 2 - `MAPINFO_SIZE_Y`: 3 - `MAPINFO_ZONE`: 4 +- `MAPINFO_NPC_COUNT`: 5 ### consolemes options @@ -4456,6 +4461,12 @@ - `UDT_BODY2`: 56 - `UDT_GROUP`: 57 +### getguildonline types + +- `GUILD_ONLINE_ALL`: 0 +- `GUILD_ONLINE_VENDOR`: 1 +- `GUILD_ONLINE_NO_VENDOR`: 2 + ### Renewal - `RENEWAL`: 1 @@ -17895,6 +17906,12 @@ - `Chest_Of_Death`: 22679 - `Solo_Christmas_Gift`: 22685 - `Solo_Cookie`: 22686 +- `STR_Soul_Potion`: 22702 +- `AGI_Soul_Potion`: 22703 +- `VIT_Soul_Potion`: 22704 +- `INT_Soul_Potion`: 22705 +- `DEX_Soul_Potion`: 22706 +- `LUK_Soul_Potion`: 22707 - `Bullet_Case_Blood_`: 22737 - `Bullet_Case_Silver_`: 22738 - `Sphere_Case_Wind_`: 22739 diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt index 5164543..a08d8a7 100644 --- a/server/scripts/script_commands.txt +++ b/server/scripts/script_commands.txt @@ -1301,6 +1301,21 @@ and the script will terminate. --------------------------------------- +*mesclear(); + +This command will clear the dialog text and continue the script without player interaction. + +Example: + mes("This is how the 'mesclear' script command works."); + sleep2 3000; + mesclear(); // This will clear the dialog and continue to the next one. + mes("I will show you again."); + sleep2 3000; + mesclear(); // This will clear the dialog and continue to the next one. + mes("Bye!"); + +--------------------------------------- + *close() This command will create a 'close' button in the message window for the @@ -3396,11 +3411,12 @@ argument is omitted, it will try to use the map of the attached NPC, or the map of the attached player if the NPC can't be found. Valid <info> are: - MAPINFO_NAME name of the map - MAPINFO_ID numeric ID of the map - MAPINFO_ZONE name of the zone used by the map - MAPINFO_SIZE_X width of the map (cells on the x axis) - MAPINFO_SIZE_Y height of the map (cells on the y axis) + MAPINFO_NAME name of the map + MAPINFO_ID numeric ID of the map + MAPINFO_ZONE name of the zone used by the map + MAPINFO_SIZE_X width of the map (cells on the x axis) + MAPINFO_SIZE_Y height of the map (cells on the y axis) + MAPINFO_NPC_COUNT total number of NPC in the map Examples: getmapinfo(MAPINFO_ID, "map name"); // ID from name @@ -3785,6 +3801,18 @@ getarraysize(), because it is not cleared between runs of getguildmember(). For usage examples, see getpartymember(). --------------------------------------- + +*getguildonline(<guild id>{, <type>}); + +Returns the amount of players online in the specified guild id. +Returns -1 if the guild was not found. + +Valid <type> are: + GUILD_ONLINE_ALL Returns the total amount of players online in the guild. + GUILD_ONLINE_VENDOR Returns the total amount of vendors online in the guild. + GUILD_ONLINE_NO_VENDOR Returns the total amount of non-vendors online in the guild. + +--------------------------------------- //===================================== 2.2 - End of Guild-Related Commands //===================================== @@ -5345,6 +5373,34 @@ Check getitem2() to understand its expanded parameters. --------------------------------------- +*delitemidx(<index>{, <amount>{, <account id>}}) + +This command will remove an item at the given inventory index. Unlike the +'delitem()' counterpart, this doesn't check invalid Item ID, making it useful to remove +invalid item IDs in player's inventory. + +If <amount> is not specified, this will remove all of the items at the specified index. +Note that items with the 'ForceSerial' flag, not yet merged through 'mergeitem()', will only +be removed at the given index. + +The only way to get the inventory index is by using 'getinventorylist()'. After deleting +an item at the given index, that index can remain empty until the player relogs, so you +should recall 'getinventorylist()' again. If you try to delete an item at an invalid index, the +script will terminate with an error. + +This command is also useful to remove rental/bound items because 'delitem()' +does not discriminate at choosing which item to remove. + +Example: + + // This will remove all invalid Item ID in player's inventory + getinventorylist(); + for (.@i = 0; .@i < @inventorylist_count; ++.@i) + if (getiteminfo(@inventorylist_id[.@i], ITEMINFO_TYPE) == -1) + delitemidx(@inventorylist_idx[.@i]); + +--------------------------------------- + *countitem(<item id>) *countitem("<item name>") @@ -5747,6 +5803,10 @@ storage window, to avoid any disruption when both windows overlap. openstorage(); end; +The mapflag 'nostorage' when set to type '2' (or 3), will not open the +account storage. Unless the character group has the permission 'bypass_nostorage'. +In case blocked by mapflag, returns 0. + --------------------------------------- *openmail() @@ -5808,6 +5868,10 @@ time. This will also fail and return 2 if the attached character does not belong to any guild. +The mapflag 'nogstorage' when set to type '2' (or 3), will not open the +guild storage. Unless the character group has the permission 'bypass_nostorage'. +In case blocked by mapflag, returns 1. + --------------------------------------- *guildchangegm(<guild id>, <new master's name>) @@ -6511,7 +6575,7 @@ This command will kill all monsters that were spawned with monster() or areamonster() and have a specified event label attached to them. Commonly used to get rid of remaining quest monsters once the quest is complete. -If the label is given as "All", all monsters which have their respawn +If the label is given as "all", all monsters which have their respawn times set to -1 (like all the monsters summoned with 'monster' or 'areamonster' script command, and all monsters summoned with GM commands, but no other ones - that is, all non-permanent monsters) on the specified @@ -8276,6 +8340,7 @@ Valid <permission> are: PERM_DISABLE_STORE PERM_DISABLE_EXP PERM_DISABLE_SKILL_USAGE + PERM_BYPASS_NOSTORAGE Example: @@ -8536,6 +8601,18 @@ Example: --------------------------------------- +*cap_value(<number>, <min>, <max>) + +Returns the number but capped between <min> and <max>. + +Example: + // capped between 0 ~ 100 + .@value = cap_value(10, 0, 100); // .@value will be equal to 10 + .@value = cap_value(1000, 0, 100); // .@value will be equal to 100 + .@value = cap_value(-10, 3, 100); // .@value will be equal to 3 + +--------------------------------------- + *md5("<string>") Returns the md5 checksum of a number or string. @@ -10388,7 +10465,7 @@ Works for 20170830 RE and main and for any zero clients --------------------------------------- -*expandInventoryAck(<result>{, <itemId>}) +*expandinventoryack(<result>{, <itemId>}) Send initial inventory expansion result. Normally this function should be called from script label @@ -10406,7 +10483,7 @@ Works for 20181212 zero clients --------------------------------------- -*expandInventoryResult(<result>) +*expandinventoryresult(<result>) Send final inventory expansion result. Normally this function should be called from script label @@ -10423,7 +10500,7 @@ Works for 20181212 zero clients --------------------------------------- -*expandInventory(<value>) +*expandinventory(<value>) Adjust player inventory to given value. Maximum inventory size is MAX_INVENTORY. @@ -10434,7 +10511,7 @@ Current max inventory size can be read by function getInventorySize(). --------------------------------------- -*getInventorySize() +*getinventorysize() Return current player max inventory size. This value always smaller or equal to MAX_INVENTORY. |