summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-18 14:12:10 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-18 14:12:10 +0300
commit0bd89936291cbc3c0fc1efcd089af128994c3724 (patch)
tree58541d741f73c0ed96e817a4a0214afb6ece5ab2 /doc
parent7e4b4add06875f890020733a7da32c38711f120e (diff)
downloadserverdata-0bd89936291cbc3c0fc1efcd089af128994c3724.tar.gz
serverdata-0bd89936291cbc3c0fc1efcd089af128994c3724.tar.bz2
serverdata-0bd89936291cbc3c0fc1efcd089af128994c3724.tar.xz
serverdata-0bd89936291cbc3c0fc1efcd089af128994c3724.zip
update docs from upstream.
Diffstat (limited to 'doc')
-rw-r--r--doc/item_bonus.txt6
-rw-r--r--doc/item_db.txt1
-rw-r--r--doc/script_commands.txt233
3 files changed, 101 insertions, 139 deletions
diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt
index 1f96362d1..c93149b1c 100644
--- a/doc/item_bonus.txt
+++ b/doc/item_bonus.txt
@@ -415,4 +415,8 @@ bonus2 bSkillVariableCast,s,x; Increases variable cast time of skill s by x mil
bonus2 bVariableCastrate,s,x; Increases variable cast time of skill s by x%. (supports skill names.)
bonus2 bFixedCastrate,s,x; Increases fixed cast time of skill s by x%. (supports skill names.)
bonus4 bSetDefRace,r,n,t,y; Set DEF to y of an enemy of race r at n% for t milliseconds with normal attack
-bonus4 bSetMDefRace,r,n,t,y; Set MDEF to y of an enemy of race r at n% for t milliseconds with normal attack \ No newline at end of file
+bonus4 bSetMDefRace,r,n,t,y; Set MDEF to y of an enemy of race r at n% for t milliseconds with normal attack
+bonus2 bAddRaceTolerance,n,x; Add x% tolerance against race n (Renewal Only)
+ n: 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect,
+ 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon,
+ 10=Boss monster, 11=Other than (normal monster) boss monster \ No newline at end of file
diff --git a/doc/item_db.txt b/doc/item_db.txt
index 9b2d97311..6b34b8daf 100644
--- a/doc/item_db.txt
+++ b/doc/item_db.txt
@@ -36,7 +36,6 @@ 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)
- FloorLifeTime: Delay to remove item from ground (int, default flooritem_lifetime)
KeepAfterUse: true/false (boolean, defaults to false)
Trade: { (defaults to no restrictions)
override: GroupID (int, defaults to 100)
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 3467a5366..54d62b045 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -259,7 +259,8 @@ direction across Y. Walking into that area will trigger the NPC. If no
'OnTouch:' special label is present in the NPC code, the execution will
start from the beginning of the script, otherwise, it will start from the
'OnTouch:' label. Monsters can also trigger the NPC, though the label
-'OnTouchNPC:' is used in this case.
+'OnTouchNPC:' is used in this case. If player left area npc will called
+if present label 'OnUnTouch'.
The code part is the script code that will execute whenever the NPC is
triggered. It may contain commands and function calls, descriptions of
@@ -1040,6 +1041,12 @@ OnTouch_:
Similar to OnTouch, but will only run one instance. Another character is
chosen once the triggering character leaves the area.
+OnUnTouch:
+
+This label will be executed if plater leave trigger area is defined for the NPC
+object it's in. If it isn't present, nothing will happend.
+The RID of the triggering character object will be attached.
+
OnPCLoginEvent:
OnPCLogoutEvent:
OnPCBaseLvUpEvent:
@@ -3226,15 +3233,22 @@ let you enter.
---------------------------------------
-*getareausers("<map name>",<x1>,<y1>,<x2>,<y2>)
+*getareausers({"<map name>",}{<x1>,<y1>,<x2>,<y2>})
+*getareausers({"<map name>",}{<radius>})
This function will return the count of connected characters which are
-located within the specified area - an x1/y1-x2/y2 square - on the
-specified map.
+located within the specified area. Area can be x1/y1-x2/y2 square,
+or radius from npc position. If map name missing, used attached player map.
This is useful for maps that are split into many buildings, such as all
the "*_in" maps, due to all the shops and houses.
+Examples:
+ // return players in area npc area on current map.
+ .@num = getareausers();
+ // return players in square (1, 1) - (10, 10)
+ .@num = "players: " + getareausers(1, 1, 10, 10);
+
---------------------------------------
*getusersname;
@@ -3890,79 +3904,6 @@ regardless of color.
---------------------------------------
-*setriding {<flag>};
-*checkriding()
-
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- @ /!\ 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 30th, 2014. Please consider
-using setmount and checkmount() instead.
-
-If <flag> is 0 this command will remove the mount from the character.
-Otherwise it gives the invoking character a PecoPeco (if they are a Knight
-series class), a GrandPeco (if they are a Crusader series class), or
-a Gryphon (if they are a Royal Guard). Unlike 'setfalcon' and 'setcart'
-this will not work at all if they aren't of a class which can ride.
-Note: the character needs to have the skill KN_RIDING to gain a mount.
-
-The accompanying function will return 1 if the invoking character is
-riding a bird and 0 if they aren't.
-
- if (checkriding()) mes "PLEASE leave your bird outside! No riding birds on the floor here!";
-
----------------------------------------
-
-*setdragon {<color>};
-*checkdragon()
-
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- @ /!\ 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 30th, 2014. Please consider
-using setmount and checkmount() instead.
-
-The 'setdragon' function toggles mounting a dragon for the invoking
-character. It will return 1 if successful, 0 otherwise.
-
-If the character can mount a dragon, the <color> options are:
- 1 - Green Dragon (default when omitted)
- 2 - Brown Dragon
- 3 - Gray Dragon
- 4 - Blue Dragon
- 5 - Red Dragon
-
-Note: the character must be a Rune Knight and have the skill
- RK_DRAGONTRAINING to gain a mount.
-
-The accompanying function will return 1 if the invoking character is
-riding a dragon and 0 if they aren't.
-
----------------------------------------
-
-*setmadogear {<flag>};
-*checkmadogear()
-
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- @ /!\ 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 30th, 2014. Please consider
-using setmount and checkmount() instead.
-
-If <flag> is 0 this command will remove the mount from the character.
-Otherwise it gives the invoking character a Mado (if they are a Mechanic).
-
-The accompanying function will return 1 if the invoking character has a
-Mado and 0 if they don't.
-
----------------------------------------
-
*setcashmount;
*hascashmount()
@@ -4026,16 +3967,20 @@ if War of Emperium is on and 0 if it isn't.
---------------------------------------
*isnight()
-*isday()
-These functions will return 1 or 0 depending on whether the server is in
-night mode or day mode. 'isnight' returns 1 if it's night and 0 if it
-isn't, 'isday' the other way around. They can be used interchangeably,
-pick the one you like more:
+This functions will return true or false depending on whether the server is in
+night mode or day mode:
- // These two are equivalent:
- if (isday()) mes "I only prowl in the night.";
- if (isnight()!=1) mes "I only prowl in the night.";
+ if (!isnight()) mes "I only prowl in the night.";
+
+*isday()
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ @ /!\ This command is deprecated @
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+This command is deprecated and it should not be used in new scripts, as it
+is likely to be removed at a later time. Please consider using !isnight()
+instead.
---------------------------------------
@@ -4298,16 +4243,6 @@ character respawn where no teleportation is otherwise possible.
savepoint "place",350,75;
-*save "<map name>",<x>,<y>;
-
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- @ /!\ 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 December 2nd, 2014. Please consider
-using savepoint() instead.
-
---------------------------------------
*heal <hp>,<sp>;
@@ -5351,7 +5286,9 @@ This command will destroy whatever is currently equipped in the invoking
character's specified equipment slot. For a full list of possible equipment
slots see 'getequipid'.
-This command will return 1 if an item was deleted and 0 otherwise.
+It is always a good idea to check if the player actually has the item you want
+before you use this command. If you try to delete in a position that the player
+has no gear, script will be terminated with an error.
---------------------------------------
//=====================================
@@ -6355,21 +6292,6 @@ A debug message also shows on the console when no events are triggered.
---------------------------------------
-*cmdothernpc "<npc name>","<command>";
-
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- @ /!\ 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 December 2nd, 2014. Please consider
-using donpcevent() instead.
-
-This is simply "donpcevent <npc name>::OnCommand<command>".
-It is an approximation of official server script language's 'cmdothernpc'.
-
----------------------------------------
-
*npctalk "<message>";
This command will display a message to the surrounding area as if the NPC
@@ -6853,21 +6775,6 @@ Normally, whenever a waiting room was created to make sure that only one
character is, for example, trying to pass a job quest trial, and no other
characters are present in the room to mess up the script.
-*enablearena;
-*disablearena;
-
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- @ /!\ 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 December 2nd, 2014. Please consider
-using enablewaitingroomevent and disablewaitingroomevent instead.
-
-The 'enablearena'/'disablearena' commands are just aliases with no
-parameter. These are supposedly left here for compatibility with official
-server scripts, but no Hercules script uses these at the moment.
-
---------------------------------------
*getwaitingroomstate(<information type>{,"<NPC object name>"})
@@ -7216,6 +7123,20 @@ be the NPC with the said name.
---------------------------------------
+*channelmes("<#channel>", "<message>");
+
+This command will send a message to the specified chat channel.
+
+The sent message will not include any character's names.
+
+For special channels, such as #map and #ally, the attached RID's map or guild
+will be used.
+
+If the channel doesn't exist (or, in the case of a character-specific channel,
+no RID is attached), false will be returned. In case of success, true is
+returned.
+
+---------------------------------------
*rand(<number>{,<number>});
This function returns a number ...
@@ -7558,6 +7479,46 @@ config, and will not work properly if the NPC has a mob sprite.
---------------------------------------
+*setnpcdistance <distance>
+
+This command can reduce distance from where npc can be clicked.
+Usefull to use from OnInit event.
+
+ // Set distance to one tile on server load
+ OnInit:
+ setnpcdistance 1;
+
+---------------------------------------
+
+*getnpcdir {<name>};
+
+Return current npc direction for parameter "name" or for attached npc
+if it missing. If name missing and not attached npc, return -1.
+
+Example:
+ .@dir = getnpcdir();
+
+---------------------------------------
+
+*setnpcdir {<name>,} <direction>;
+
+Set npc direction. If npc name missing, will be used attached npc.
+
+Example:
+ setnpcdir 2;
+
+---------------------------------------
+
+*getnpcclass {<name>};
+
+Return npc class/sprite id for npc with given name or for attached npc.
+If name missing and no attached npc, return -1.
+
+Example:
+ .@class = getnpcclass();
+
+---------------------------------------
+
*day;
*night;
@@ -8083,8 +8044,8 @@ meant to be executed from pet scripts. They will modify the pet AI
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' at the same time.
+have 'petloot', 'petskillbonus', 'petskillattack' and 'petskillsupport' at the
+same time.
*petskillbonus <bonus type>,<value>,<duration>,<delay>;
@@ -8115,16 +8076,14 @@ 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.
-*petskillattack <skill id>,<skill level>,<rate>,<bonusrate>;
-*petskillattack "<skill name>",<skill level>,<rate>,<bonusrate>;
-*petskillattack2 <skill id>,<damage>,<number of attacks>,<rate>,<bonusrate>;
-*petskillattack2 "<skill name>",<damage>,<number of attacks>,<rate>,<bonusrate>;
+*petskillattack <skill id>,<damage>,<number of attacks>,<rate>,<bonusrate>;
+*petskillattack "<skill name>",<damage>,<number of attacks>,<rate>,<bonusrate>;
-These two commands will make the pet cast an attack skill on the enemy the
-pet's owner is currently fighting. Skill IDs and levels are as per
-'petskillsupport'.
-'petskillattack2' will make the pet cast the skill with a fixed amount of
-damage inflicted and the specified number of attacks.
+This command will make the pet cast an attack skill on the enemy the pet's
+owner is currently fighting. Skill IDs and levels are as per 'petskillsupport'.
+If <number of attacks> is specified different than 0, it will make the pet cast
+the skill with a fixed amount of damage inflicted and the specified number of
+attacks. A value of zero uses the skill's defaults.
All commands with delays and durations will only make the behavior active
for the specified duration of seconds, with a delay of the specified