summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-14 17:51:53 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-14 17:51:53 +0300
commitd6111c5b5b9ba92a94d2a898dbbafdac26ddb31c (patch)
tree599fc1b1c517a69677b8ccff44d11ed37ca8c6fa /doc
parent0a1c3c60191df9135e8c20a74e9e214d50c907f1 (diff)
downloadserverdata-d6111c5b5b9ba92a94d2a898dbbafdac26ddb31c.tar.gz
serverdata-d6111c5b5b9ba92a94d2a898dbbafdac26ddb31c.tar.bz2
serverdata-d6111c5b5b9ba92a94d2a898dbbafdac26ddb31c.tar.xz
serverdata-d6111c5b5b9ba92a94d2a898dbbafdac26ddb31c.zip
Update docs from upstream.
Diffstat (limited to 'doc')
-rw-r--r--doc/item_db.txt1
-rw-r--r--doc/mob_db_mode_list.txt4
-rw-r--r--doc/sample/npc_test_quest.txt8
-rw-r--r--doc/script_commands.txt202
4 files changed, 137 insertions, 78 deletions
diff --git a/doc/item_db.txt b/doc/item_db.txt
index ce2a248c..6b34b8da 100644
--- a/doc/item_db.txt
+++ b/doc/item_db.txt
@@ -36,6 +36,7 @@ item_db: (
BindOnEquip: true/false (boolean, defaults to false)
BuyingStore: true/false (boolean, defaults to false)
Delay: Delay to use item (int, defaults to 0)
+ KeepAfterUse: true/false (boolean, defaults to false)
Trade: { (defaults to no restrictions)
override: GroupID (int, defaults to 100)
nodrop: true/false (boolean, defaults to false)
diff --git a/doc/mob_db_mode_list.txt b/doc/mob_db_mode_list.txt
index 17f25d9b..08abf800 100644
--- a/doc/mob_db_mode_list.txt
+++ b/doc/mob_db_mode_list.txt
@@ -26,7 +26,7 @@ MD_ANGRY | 0x0800 | 2048
MD_CHANGETARGET_MELEE | 0x1000 | 4096
MD_CHANGETARGET_CHASE | 0x2000 | 8192
MD_TARGETWEAK | 0x4000 | 16384
-MD_RANDOMTARGET | 0x8000 | 32768
+MD_RANDOMTARGET | 0x8000 | 32768 (not implemented)
Explanation for modes:
-------------------------------------------------------------------------------
@@ -75,7 +75,7 @@ Target Weak: Allows aggressive monsters to only be aggressive against
For example, a monster of level 104 will not pick fights with a level 99.
Random Target: Picks a new random target in range on each attack / skill.
-
+ (not implemented)
Aegis Mob Types:
-------------------------------------------------------------------------------
diff --git a/doc/sample/npc_test_quest.txt b/doc/sample/npc_test_quest.txt
index fcf6b2a8..90659aa1 100644
--- a/doc/sample/npc_test_quest.txt
+++ b/doc/sample/npc_test_quest.txt
@@ -13,7 +13,7 @@
// 70000,0,1002,3,0,0,0,0,"3 Splats Please!"
prontera,90,95,1 script Jelly 2_F_MAGICMASTER,{
- if(checkquest(70000) == -1) {
+ if (!questprogress(70000)) {
// Quest not yet started.
mes "[Jelly]";
mes "Hey there! Would you help me?";
@@ -30,7 +30,7 @@ prontera,90,95,1 script Jelly 2_F_MAGICMASTER,{
setquest 70000; // Adds the quest to your Quest Window.
close;
}
- } else if(checkquest(70000,HUNTING) == 2) {
+ } else if (questprogress(70000,HUNTING) == 2) {
// All monsters killed.
mes "[Jelly]";
mes "Awesome! Thank you!";
@@ -38,12 +38,12 @@ prontera,90,95,1 script Jelly 2_F_MAGICMASTER,{
dispbottom "You have been rewarded with 10,000 Base Exp.";
completequest 70000; // Sets quest status to "complete".
close;
- } else if(checkquest(70000) == 1) {
+ } else if (questprogress(70000) == 1) {
// Quest is active.
mes "[Jelly]";
mes "Keep going, almost there!";
close;
- } else if(checkquest(70000) == 2) {
+ } else if (questprogress(70000) == 2) {
// Quest finished.
mes "[Jelly]";
mes "Thanks again for doing that for me!";
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index ec827471..3467a536 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -2056,28 +2056,6 @@ else if (<condition 2>) {
---------------------------------------
-*jump_zero (<condition>),<label>;
-
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- @ /!\ This command is deprecated @
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-This command is deprecated and it should not be used in new scripts, as it is
-scheduled to be removed at any time on or after November 27th, 2014. Please
-consider using 'if', 'switch', 'for', 'while', as appropriate.
-
-This command works like an 'if'+'goto' combination in one go. (See 'if').
-If the condition is false (equal to zero) this command will immediately
-jump to the specified label like in 'goto'.
-
-This command should not be used in scripts directly.
-
-The main reason for this command is that other control statements, like
-'switch', 'for' or 'while', are disassembled into simple expressions
-together with this command when a script is parsed.
-
----------------------------------------
-
*while (<condition>) <statement>;
This is probably the simplest and most frequently used loop structure. The
@@ -2944,7 +2922,7 @@ recreate these items perfectly if they are destroyed. Here's what you get:
@inventorylist_id[] - array of item ids.
@inventorylist_amount[] - their corresponding item amounts.
-@inventorylist_equip[] - whether the item is equipped or not.
+@inventorylist_equip[] - will return the slot the item is equipped on, if at all.
@inventorylist_refine[] - for how much it is refined.
@inventorylist_identify[] - whether it is identified.
@inventorylist_attribute[] - whether it is broken.
@@ -2955,8 +2933,8 @@ recreate these items perfectly if they are destroyed. Here's what you get:
made by a specific craftsman.
@inventorylist_expire[] - expire time (Unix time stamp). 0 means never
expires.
-@inventorylist_count - the number of items in these lists.
@inventorylist_bound - whether it is an account bounded item or not.
+@inventorylist_count - the number of items in these lists.
This could be handy to save/restore a character's inventory, since no
other command returns such a complete set of data, and could also be the
@@ -2973,6 +2951,42 @@ runs of 'getinventorylist'.
---------------------------------------
+*getcartinventorylist;
+
+This command sets a bunch of arrays with a complete list of whatever the
+invoking character has in its cart_inventory, including all the data needed to
+recreate these items perfectly if they are destroyed. Here's what you get:
+
+@cartinventorylist_id[] - array of item ids.
+@cartinventorylist_amount[] - their corresponding item amounts.
+@cartinventorylist_refine[] - for how much it is refined.
+@cartinventorylist_identify[] - whether it is identified.
+@cartinventorylist_attribute[] - whether it is broken.
+@cartinventorylist_card1[] - These four arrays contain card data for the
+@cartinventorylist_card2[] items. These data slots are also used to store
+@cartinventorylist_card3[] names inscribed on the items, so you can
+@cartinventorylist_card4[] explicitly check if the character owns an item
+ made by a specific craftsman.
+@cartinventorylist_expire[] - expire time (Unix time stamp). 0 means never
+ expires.
+@cartinventorylist_bound - whether it is an account bounded item or not.
+@cartinventorylist_count - the number of items in these lists.
+
+This could be handy to save/restore a character's cart_inventory, since no
+other command returns such a complete set of data, and could also be the
+only way to correctly handle an NPC trader for carded and named items who
+could resell them - since NPC objects cannot own items, so they have to
+store item data in variables and recreate the items.
+
+Notice that the variables this command generates are all temporary,
+attached to the character, and integer.
+
+Be sure to use @cartinventorylist_count to go through these arrays, and not
+'getarraysize', because the arrays are not automatically cleared between
+runs of 'getcartinventorylist'.
+
+---------------------------------------
+
*cardscnt()
This function will return the number of cards inserted into the weapon
@@ -4809,6 +4823,68 @@ Example:
---------------------------------------
+*checkbound(<item_id>{,<bound_type>{,<refine>{,<attribute>{,<card_1>{,<card_2>{,<card_3>{,<card_4>}}}}}}});
+
+This command allows you to check whether or not the attached player has the specified bound item in their inventory.
+If a bound type is not specified or a bound type of 0 is used, it will search the player's inventory for a bound item
+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
+
+Optional Parameters:
+ bound_type - checks to see if the item has the specified bound type.
+ refine - checks to see if the item is refined to the given number.
+ attribute - whether the item is broken (1) or not (0).
+ card 1,2,3,4 - checks to see if the specified cards are compounded on the item as well.
+
+Example:
+ // This will check if you have a bound (any type) 1205 (Cutter).
+ if (checkbound(1205)) {
+ mes "You have a bound Cutter";
+ } else {
+ mes "You do not have a bound Cutter";
+ }
+ close;
+
+ // This will also check if you have a bound (any type) 1205 (Cutter).
+ if (checkbound(1205,0)) {
+ mes "You have a bound Cutter";
+ } else {
+ mes "You do not have a bound Cutter";
+ }
+ close;
+
+ // This will check if the player doesn't have a bound 1205 (Cutter).
+ if (!checkbound(1205)) {
+ mes "You do not have a bound Cutter";
+ } else {
+ mes "You do have a bound Cutter";
+ }
+ close;
+
+ // This will check if the item found, has a bound type of 2 (guild_bound)
+ if (checkbound(1205) == 2) {
+ mes "You have a guild_bound Cutter";
+ } else {
+ mes "You do not have a guild_bound Cutter.";
+ }
+ close;
+
+ // This will check if you have a 'guild_bound' +7 1205 (Cutter).
+ if (checkbound(1205, 2, 7)) {
+ mes "You have a +7 guild_bound Cutter.";
+ } else {
+ mes "You don't have the required item.";
+ }
+ close;
+---------------------------------------
+
*getnameditem <item id>,<character name|character ID>;
*getnameditem "<item name>",<character name|character ID>;
@@ -5208,6 +5284,7 @@ like storage or cart.
---------------------------------------
*equip <item id>;
+*equip2 <item id>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>;
*autoequip <item id>,<option>;
These commands are to equip a equipment on the attached character.
@@ -5221,7 +5298,11 @@ Examples:
//This will equip a 1104 (falchion) on the character if this is in the
//inventory.
equip 1104;
-
+
+//This will equip a +10 1104 (falchion) on the character if this is in the
+//inventory.
+ equip2 1104,10,0,0,0,0,0;
+
//The invoked character will now automatically equip a falchion when it's
//looted.
autoequip 1104,1;
@@ -8003,8 +8084,7 @@ decision-making for the current pet of the invoking character, and will
NOT have any independent effect by themselves, which is why only one of
them each may be in effect at any time for a specific pet. A pet may
have 'petloot', 'petskillbonus', 'petskillattack' OR 'petpetskillattack2'
-and 'petskillsupport' OR 'petheal' at the same time. 'petheal' is
-deprecated and is no longer used in the default pet scripts.
+and 'petskillsupport' at the same time.
*petskillbonus <bonus type>,<value>,<duration>,<delay>;
@@ -8035,16 +8115,6 @@ time between activations. The skill numbers are as per
It's not quite certain who's stats will be used for the skills cast, the
character's or the pets. Probably, Skotlex can answer that question.
-*petheal <level>,<delay>,<percent hp>,<percent sp>;
-
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- @ /!\ This command is deprecated @
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-The petheal command is deprecated and it should not be used in new scripts, as
-it is scheduled to be removed after November 27th, 2014. Please consider using
-petskillsupport by specifying the AL_HEAL skill id instead.
-
*petskillattack <skill id>,<skill level>,<rate>,<bonusrate>;
*petskillattack "<skill name>",<skill level>,<rate>,<bonusrate>;
*petskillattack2 <skill id>,<damage>,<number of attacks>,<rate>,<bonusrate>;
@@ -8373,11 +8443,32 @@ if (instance_check_party(getcharid(1),2,2,149)) {
mes "All online members are between levels 1-150 and at least two are online.";
close;
} else {
- mes "Sorry, your party does not meet requirements.";
+ mes "Sorry, your party does not meet the requirements.";
close;
}
---------------------------------------
+
+*instance_check_guild(<guild_id>{,<amount>{,<min>{,<max>}}});
+
+This function checks if a guild meets certain requirements, returning 1 if
+all conditions are met and 0 otherwise. it will only check online characters.
+
+amount - number of online guild members (default is 1).
+min - minimum level of all characters in the guild (default is 1).
+max - maximum level of all characters in the guild (default is max level in conf).
+
+Example:
+ if (instance_check_guild(getcharid(2), 2, 1, 150)) {
+ mes "Your guild meets the Memorial Dungeon requirements.",
+ mes "All online members are between levels 1-150 and at least two are online.";
+ close;
+ } else {
+ mes "Sorry, your guild does not meet the requirements.";
+ close;
+ }
+
+---------------------------------------
*instance_set_respawn(<map_name>,<x>,<y>{,<instance_id>});
Updates the 'reload spawn' position of a instance,
@@ -8415,7 +8506,7 @@ that fails, the command returns an empty string instead.
*questinfo <Quest ID>, <Icon> {, <Map Mark Color>{, <Job Class>}};
-This is esentially a combination of checkquest and showevent. Use this only
+This is esentially a combination of questprogress and showevent. Use this only
in an OnInit label. For the Quest ID, specify the quest ID that you want
checked if it has been started yet.
@@ -8491,39 +8582,6 @@ Add quest of the <ID2> to the the quest log, and the state is "active".
---------------------------------------
-*checkquest(<ID>{,PLAYTIME|HUNTING})
-
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- @ /!\ This command is deprecated @
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-This command is deprecated and it should not be used in new scripts, as it
-is scheduled to be removed on or after November 28th, 2014. Please consider
-using questprogress() instead. Or, in special cases, questactive().
-
-If no additional argument supplied, return the state of the quest:
- -1 = Quest not started (not in quest log)
- 0 = Quest has been given, but the state is "inactive"
- 1 = Quest has been given, and the state is "active"
- 2 = Quest completed
-
-If parameter "PLAYTIME" is supplied:
- -1 = Quest not started (not in quest log)
- 0 = the time limit has not yet been reached
- 1 = the time limit has not been reached but the quest is marked as
- complete
- 2 = the time limit has been reached
-
-If parameter "HUNTING" is supplied:
- -1 = Quest not started (not in quest log)
- 0 = you haven't killed all of the target monsters and the time limit
- has not been reached.
- 1 = you haven't killed all of the target monsters but the time limit
- has been reached.
- 2 = you've killed all of the target monsters
-
----------------------------------------
-
*questprogress(<ID>{,PLAYTIME|HUNTING})
If no additional argument supplied, return the state of the quest: