From 5bef19e0d97e14626b4608c1d0614919ca343f37 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 13 Jul 2018 22:11:57 +0300 Subject: Update from hercules. constants and script commands. --- server/scripts/constants.md | 29 +++++++++ server/scripts/script_commands.txt | 121 +++++++++++++++++++++++++++---------- 2 files changed, 117 insertions(+), 33 deletions(-) diff --git a/server/scripts/constants.md b/server/scripts/constants.md index 654e5eb..5650488 100644 --- a/server/scripts/constants.md +++ b/server/scripts/constants.md @@ -13318,6 +13318,35 @@ - `Brownie_Egg`: 9060 - `Marin_Egg`: 9061 - `Novice_Poring_Egg`: 9062 +- `Mastering_Egg`: 9069 +- `Savage_Egg`: 9070 +- `Grand_Peco_Peco_Egg`: 9071 +- `High_Orc_Egg`: 9087 +- `Angeling_Egg`: 9088 +- `Am_Mut_Egg`: 9089 +- `Little_Isis_Egg`: 9090 +- `Choco_Egg`: 9091 +- `Eggring_Egg`: 9092 +- `Hyegun_Egg`: 9093 +- `Leaf_Lunatic_Egg`: 9094 +- `Nine_Tails_Egg`: 9095 +- `Cat_o_Nine_Tails_Egg`: 9096 +- `Diabolic_Egg_`: 9097 +- `Earth_Deleter_Egg`: 9098 +- `Teddy_Bear_Egg`: 9099 +- `Gremlin_Egg`: 9100 +- `Scatelon_Egg`: 9101 +- `Mummy_Egg`: 9102 +- `Willow_Egg`: 9103 +- `Roween_Egg`: 9104 +- `Hodremlin_Egg`: 9105 +- `Metaller_Egg`: 9106 +- `Ancient_Mummy_Egg`: 9107 +- `Abandoned_Teddy_Bear_Egg`: 9108 +- `Sweet_Drops_Egg`: 9109 +- `Phreeoni_Egg`: 9111 +- `Moonlight_Flower_Egg`: 9112 +- `Skelion_Egg`: 9113 - `Skull_Helm`: 10001 - `Monster_Oxygen_Mask`: 10002 - `Transparent_Headgear`: 10003 diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt index 36c4da3..2653f05 100644 --- a/server/scripts/script_commands.txt +++ b/server/scripts/script_commands.txt @@ -2473,6 +2473,7 @@ arrays: --------------------------------------- *readparam({, ""}) +*readparam({, }) This function will return the basic stats of an invoking character, referred to by the parameter number. Instead of a number, you can use a @@ -2509,6 +2510,21 @@ Example 3: // Display your current weight mes("Your current weight is "+ (Weight/10) + "/" + (MaxWeight/10)); +--------------------------------------- + +*setparam(, {, ""}) +*setparam(, {, }) + +Sets a parameter on the given player. See readparam() for more info about +parameters. Keep in mind that not all read-able parameters are also set-able. + +Parameters that can be modified include: + +StatusPoint, BaseLevel, SkillPoint, Zeny, Sex, Weight, MaxWeight, JobLevel, +BaseExp, JobExp, Hp, MaxHp, Sp, MaxSp, Karma, Manner, Fame, bVit, bDex, bAgi, +bStr, bInt, bLuk + + --------------------------------------- *getcharid({, ""}) @@ -2756,7 +2772,9 @@ save points. Available information types are: --------------------------------------- -*getcharip({""||}) +*getcharip({""}) +*getcharip({}) +*getcharip({}) This function will return the IP address of the invoking character, or, if a player is specified, of that character. A blank string is returned if no @@ -3413,7 +3431,8 @@ behave specially when talked to by GMs. --------------------------------------- -*setgroupid({, ""|}) +*setgroupid({, ""}) +*setgroupid({, }) This function will temporary adjust the id of player group the account to which the player specified if the new group id is available. @@ -4372,7 +4391,7 @@ offline in the mean time, attachrid() returns false, otherwise true. --------------------------------------- -*rid2name() +*rid2name() Converts rid to name. Note: The player/monster/NPC must be online/enabled. Good for PCKillEvent where you can convert 'killedrid' to the name of the @@ -4616,13 +4635,12 @@ effects. --------------------------------------- -*recovery() -*recovery() +*recovery({}) *recovery(""{, , , , }) -In its first form, this command will revive and restore full HP and SP to all -characters currently connected to the server. In its second form, it will only -affect the target player. In its third form it will affect a whole map or area. +This command will revive and restore full HP and SP to all characters currently +connected to the server. If an account id is supplied, it will instead only +affect this character. If a map is supplied it will affect a whole map or area. --------------------------------------- @@ -5138,8 +5156,10 @@ Example: close(); --------------------------------------- -*getnameditem(, ) -*getnameditem("", ) +*getnameditem(, "") +*getnameditem(, ) +*getnameditem("", "") +*getnameditem("", ) Create an item signed with the given character's name. @@ -5303,7 +5323,7 @@ Check getitem2() to understand the arguments of the function. --------------------------------------- -*groupranditem() +*groupranditem() Returns the item_id of a random item picked from the item container specified. There are different item containers and they are specified in 'db/(pre-)re/item_group.conf'. @@ -5313,7 +5333,7 @@ Example: --------------------------------------- -*getrandgroupitem(, ) +*getrandgroupitem(, ) Similar to the above example, this command allows players to obtain the specified quantity of a random item from the container. The different containers @@ -6195,7 +6215,7 @@ Examples: @ /!\ This command is deprecated @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -Prevents the player from moving when the option != 0, and 0 enables the +Prevents the player from moving when the option != 0, and 0 enables the player to move again. The player has to be the account ID of a character, and will run for the attached player if zero is supplied. @@ -6611,18 +6631,49 @@ Examples: *unitwarp(, , , ) *unitattack(, ) *unitstop() -*unittalk(, ) +*unittalk(, {, show_name{, {, }}}) *unitemote(, ) Okay, these commands should be fairly self explaining. For the emotions, you can look in db/constants.conf for prefixes with e_ PS: unitwarp() supports a of zero, which causes the executor of the +PS: unittalk() can receive 3 extra parameters: + show_name: + true: Shows Unit name like "UnitName : Message" (default) + false: Hides Unit name + send_target: + AREA_CHAT_WOC: sends the message to everyone in view range including the attached unit (default) + SELF: sends the message to the given unit gid only + target_id: + if send_target is set to SELF, the message will be shown by the given gid, + target_id allows changing the unit that will see the message. script to be affected. This can be used with OnTouchNPC to warp monsters: OnTouchNPC: unitwarp(0, "this", -1, -1); + // hide the npc name from the text + unittalk(getnpcid(0), "foobar", false); + + // display by npc to everyone + unittalk(getnpcid(0), "foobar", true); + + // display by npc to npc + unittalk(getnpcid(0), "foobar", true, SELF); + + // display the text by the npc to the attached player only + unittalk(getnpcid(0), "foobar", true, SELF, playerattached()); + + // display by player to everyone + unittalk(playerattached(), "foobar", true); + + // display by player to himself only + unittalk(playerattached(), "foobar", true, SELF); + + // display the text by the 1st player to the attached player only + unittalk(getcharid(CHAR_ID_ACCOUNT, "Name"), "foobar", true, SELF, playerattached()); + --------------------------------------- *disablenpc("") @@ -6730,12 +6781,16 @@ A debug message also shows on the console when no events are triggered. --------------------------------------- -*npctalk(""{, ""}) +*npctalk(""{, ""{, }}) + +show_npcname values: + true: shows npc name (default) + false: hide npc name This command will display a message to the surrounding area as if the NPC object running it was a player talking - that is, above their head and in -the chat window. The display name of the NPC will get appended in front of -the message to complete the effect. +the chat window. If show_npcname is true the name of the NPC will get appended in front of +the message, otherwise the npc name will not be shown. // This will make everyone in the area see the NPC greet the character // who just invoked it. @@ -6823,12 +6878,12 @@ valid for gettimer() are: --------------------------------------- -*initnpctimer({ "" {, } } | - { "" | }) -*stopnpctimer({ "" {, } } | - { "" | }) -*startnpctimer({ "" {, } } | - { "" | }) +*initnpctimer({""{, }}) +*initnpctimer({}) +*stopnpctimer({""{, }}) +*stopnpctimer({}}) +*startnpctimer({""{, }}) +*startnpctimer({}) *setnpctimer({, ""}) *getnpctimer({, ""}) *attachnpctimer({""}) @@ -9369,19 +9424,19 @@ Add quest of the to the the quest log, and the state is "active". --------------------------------------- -*questprogress({, PLAYTIME|HUNTING}) +*questprogress({, }) If no additional argument supplied, return the state of the quest: 0 = Quest not started (not in quest log) 1 = Quest has been given 2 = Quest completed -If parameter PLAYTIME is supplied: +If PLAYTIME is supplied: 0 = Quest not started (not in quest log) 1 = The time limit has not yet been reached 2 = The time limit has been reached -If parameter HUNTING is supplied: +If HUNTING is supplied: 0 = Quest not started (not in quest log) 1 = Player hasn't killed all of the target monsters 2 = Player has killed all of the target monsters @@ -9734,11 +9789,11 @@ true otherwise. --------------------------------------- -*queueopt(, , {Optional