summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/constants.md17
-rw-r--r--doc/permissions.md1
-rw-r--r--doc/script_commands.txt121
3 files changed, 129 insertions, 10 deletions
diff --git a/doc/constants.md b/doc/constants.md
index d5dbf7afd..48564573d 100644
--- a/doc/constants.md
+++ b/doc/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/doc/permissions.md b/doc/permissions.md
index 7d29b59fd..a8794ecae 100644
--- a/doc/permissions.md
+++ b/doc/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/doc/script_commands.txt b/doc/script_commands.txt
index 516454365..5cc3ea186 100644
--- a/doc/script_commands.txt
+++ b/doc/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
@@ -3192,6 +3207,30 @@ runs of getcartinventorylist().
---------------------------------------
+*setfavoriteitemidx(<idx>, <flag>)
+
+This function will set an item in inventory as favorite or not.
+If its favorite item, it will be moved to favorite tab, else move out from favorite tab.
+Note: Cant change favorite flag of an equipped item.
+
+Valid Parameters:
+ <idx> - inventory index, refer *getinventorylist()
+ <flag> - true/false (true = favorite item, false = otherwise)
+
+---------------------------------------
+
+*autofavoriteitem(<item_id>, <flag>)
+
+This function will auto set an item as favorite when <item_id> is obtained.
+If its favorite item, it will be auto moved to favorite tab, else move out from favorite tab.
+This setting affect not only attached player, but also everyone player globally.
+
+Valid Parameters:
+ <item_id> - item ID
+ <flag> - true/false (true = favorite item, false = otherwise)
+
+---------------------------------------
+
*cardscnt()
This function will return the number of cards inserted into the weapon
@@ -3396,11 +3435,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 +3825,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 +5397,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 +5827,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 +5892,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 +6599,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 +8364,7 @@ Valid <permission> are:
PERM_DISABLE_STORE
PERM_DISABLE_EXP
PERM_DISABLE_SKILL_USAGE
+ PERM_BYPASS_NOSTORAGE
Example:
@@ -8536,6 +8625,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 +10489,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 +10507,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 +10524,7 @@ Works for 20181212 zero clients
---------------------------------------
-*expandInventory(<value>)
+*expandinventory(<value>)
Adjust player inventory to given value.
Maximum inventory size is MAX_INVENTORY.
@@ -10434,7 +10535,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.