summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt116
1 files changed, 92 insertions, 24 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 54d62b045..e190c5cff 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -1340,7 +1340,7 @@ Examples:
setd ".@var$", "Poporing";
mes .@var$; // Displays "Poporing".
- setd ".@" + $var$ + "123$", "Poporing is cool";
+ setd ".@" + .@var$ + "123$", "Poporing is cool";
mes .@Poporing123$; // Displays "Poporing is cool".
---------------------------------------
@@ -2322,6 +2322,14 @@ Whatever it returns is determined by type.
---------------------------------------
+*charid2rid(<char id>)
+
+This function returns the RID of the character with the given character ID.
+
+If the character is offline or doesn't exist, 0 is returned.
+
+---------------------------------------
+
*getarraysize(<array name>)
This function returns highest index of the array that is filled.
@@ -3973,15 +3981,6 @@ night mode or day mode:
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.
-
---------------------------------------
*checkre(<type>)
@@ -3997,6 +3996,14 @@ by the type parameter.
4 - RENEWAL_LVDMG (renewal level modifier on damage)
5 - RENEWAL_EDP (renewal enchant deadly poison algorithm)
6 - RENEWAL_ASPD (renewal ASPD)
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ @ /!\ 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 the respective
+constants RENEWAL, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, RENEWAL_LVDMG,
+RENEWAL_EDP, RENEWAL_ASPD instead.
---------------------------------------
//=====================================
@@ -4102,7 +4109,14 @@ chat window.
---------------------------------------
-*warp "<map name>",<x>,<y>;
+*showscript "<message>"{,<GID>};
+
+Makes attached player or GID says a message like shouting a skill name, the message
+will be seen to everyone around but not in chat window.
+
+---------------------------------------
+
+*warp "<map name>",<x>,<y>{,<flag>};
This command will take the invoking character to the specified map, and if
wanted, specified coordinates too, but these can be random.
@@ -4125,6 +4139,10 @@ There are also three special 'map names' you can use:
"Random" will warp the player randomly on the current map.
"Save" and "SavePoint" will warp the player back to their save point.
+If flag parameter is set to 0, after player warped will be not stopped
+currend running npc script. Running script after warp can be issue for
+Gravity client if warp to other maps.
+
---------------------------------------
*areawarp "<from map name>",<x1>,<y1>,<x2>,<y2>,"<to map name>",<x3>,<y3>{,<x4>,<y4>};
@@ -4504,16 +4522,19 @@ the look value).
Here are the possible look types:
-0 - Base sprite
-1 - VAR_HEAD - Hairstyle
-2 - VAR_WEAPON - Weapon
-3 - VAR_HEAD_TOP - Head top
-4 - VAR_HEAD_MID - Head mid
-5 - VAR_HEAD_BOTTOM - Head bottom
-6 - VAR_HEADPALETTE - Hair color
-7 - VAR_BODYPALETTE - Clothes color
-8 - VAR_SHIELD - Shield
-9 - VAR_SHOES - Shoes
+ 0 - LOOK_BASE Base sprite
+ 1 - LOOK_HAIR Hairstyle
+ 2 - LOOK_WEAPON Weapon
+ 3 - LOOK_HEAD_BOTTOM Head bottom
+ 4 - LOOK_HEAD_TOP Head top
+ 5 - LOOK_HEAD_MID Head mid
+ 6 - LOOK_HAIR_COLOR Hair color
+ 7 - LOOK_CLOTHES_COLOR Clothes color
+ 8 - LOOK_SHIELD Shield
+ 9 - LOOK_SHOES Shoes
+ 10 - LOOK_BODY Body(N/A)
+ 11 - LOOK_FLOOR FLOOR(N/A)
+ 12 - LOOK_ROBE Robe
Whatever 'shoes' means is anyone's guess, ask Gravity - the client does
nothing with this value. It still wants it from the server though, so it
@@ -4563,6 +4584,17 @@ client for getting Hercules).
if ( get_version() >= 15000 )
mes "Welcome to Hercules!";
+
+---------------------------------------
+
+*montransform <monster id>,<duration>{,<sc_type>{,<val1>{,<val2>{,<val3>{,<val4>}}}}};
+*montransform "<monster name>",<duration>{,<sc_type>{,<val1>{,<val2>{,<val3>{,<val4>}}}}};
+
+This command can transform your character into monster and you can still
+use all your skills like a normal character.
+Can only be removed when your killed or if you die or if duration is over.
+
+for sc_type,val1,val2,val3,val4, see 'sc_start','sc_start2','sc_start4' commands.
---------------------------------------
//=====================================
@@ -5894,7 +5926,7 @@ controlling each of the spawned mobs with the unit* commands shown below.
For example:
// We'll make a poring which will automatically attack invoking player:
- .@mobGID = monster "Prontera",150,150,"Poring",PORING,1; // PORING is defined in the mob db and its value is 1002
+ .@mobGID = monster("prontera",150,150,"Poring",PORING,1); // PORING is defined in the mob db and its value is 1002
unitattack .@mobGID, getcharid(3); // Attacker GID, attacked GID
The way you can get the GID of more than only one monster is looping
@@ -7200,7 +7232,7 @@ determines the placement of the illustration and takes following values:
3 - middle of screen in a movable window with an empty title bar
4 - middle of screen without the window header, but still movable
-The picture is read from data\texture\???????\illust, from both the
+The picture is read from data\texture\유저인터페이스\illust, from both the
GRF archive and data folder, and is required to be a bitmap. The file
extension .bmp can be omitted. Magenta color (#ff00ff) is considered
transparent. There is no limit placed on the size of the illustrations
@@ -7636,10 +7668,23 @@ Example:
---------------------------------------
+*log10(<number>)
+
+Returns log base 10 of the number.
+
+Note: The value is truncated to integer.
+
+Example:
+ .@i = log10(100); // .@i will be 2
+
+---------------------------------------
+
*sqrt(<number>)
Returns square-root of number.
+Note: The value is truncated to integer.
+
Example:
.@i = sqrt(25); // .@i will be 5
@@ -7649,6 +7694,10 @@ Example:
Returns distance between 2 points.
+Note: When Hercules is configured to use circular areas, the Euclidean distance
+is returned, otherwise the Chebyshev distance. The value is truncated to
+integer.
+
Example:
.@i = distance(100,200,101,202);
@@ -7774,7 +7823,7 @@ mes axtoi("11"); // Displays 17 (1 = 1, 10 = 16)
---------------------------------------
-*compare(<string>,<substring>)
+*compare("<string>","<substring>")
This command returns 1 or 0 when the substring is in the main string (1)
or not (0). This command is not case sensitive.
@@ -7787,7 +7836,26 @@ Examples:
//dothat; will not be executed ('Blood butterfly' does not contain 'Bloody').
if (compare("Blood Butterfly","Bloody"))
dothat;
+
+---------------------------------------
+
+*strcmp("<string>","<string>")
+This command compares two strings and is similar to strcmp in C.
+
+Return Values:
+ >0 : String 1 > String 2
+ 0 : Strings are equal
+ <0 : String 1 < String 2
+
+Examples:
+ .@a = strcmp("abcdef","ABCDEF");
+ if (.@a > 0){
+ mes ".@a is greater than 0."; //Output is this.
+ }else{
+ mes ".@a is less or equal to 0";
+ }
+
---------------------------------------
*getstrlen("<string>")