diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-07-16 20:56:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-16 20:56:06 +0300 |
commit | e4d866b4dcc1fc762321137962b604e0364b931a (patch) | |
tree | 2a1dadd51a8c67aa19fd7fabf7d6a11a157bcc22 /doc/script_commands.txt | |
parent | aeba9e42ced67361ffbd97694fbe91b20007e6f2 (diff) | |
download | serverdata-e4d866b4dcc1fc762321137962b604e0364b931a.tar.gz serverdata-e4d866b4dcc1fc762321137962b604e0364b931a.tar.bz2 serverdata-e4d866b4dcc1fc762321137962b604e0364b931a.tar.xz serverdata-e4d866b4dcc1fc762321137962b604e0364b931a.zip |
Update configuration files and docs from hercules.
Update hercules url.
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r-- | doc/script_commands.txt | 99 |
1 files changed, 76 insertions, 23 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt index c3c0f7ab..378a29f1 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. --------------------------------------- +*charid2sd(<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,6 +4109,13 @@ chat window. --------------------------------------- +*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>; This command will take the invoking character to the specified map, and if @@ -4504,16 +4518,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 @@ -5905,7 +5922,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 @@ -7211,7 +7228,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 @@ -7647,10 +7664,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 @@ -7660,6 +7690,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); @@ -7785,7 +7819,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. @@ -7798,7 +7832,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>") |