From aa1461430c3d7c31bd03eca02c7b91a274351c19 Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Sun, 31 Aug 2014 00:14:21 +0800 Subject: follow up https://github.com/HerculesWS/Hercules/commit/a06e53479131c25ce2343c431c688c57b3bfa2c0 to mimic the *sc_start documentation to rathena and fixed return 0; into return true; thx to Litro for bringing up http://hercules.ws/board/topic/6997-debug-whats-wrong/ --- doc/script_commands.txt | 81 +++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 37 deletions(-) (limited to 'doc/script_commands.txt') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 5fc9d3082..e964385ba 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -5306,48 +5306,55 @@ Used in reset NPC's (duh!). *sc_start4 ,,,,,{,,{,}}; *sc_end {,}; -These command bestow a status effect on the invoking character. This -command is used a lot in the item scripts. +These commands will bestow a status effect on a character. - // This would poison them for 10 min - sc_start SC_Poison,600000,0; +The determines which status is invoked. This can be either a number +or constant, with the common statuses (mostly negative) found in 'db/const.txt' +with the 'SC_' prefix. A full list is located in 'src/map/status.h', though +they are not currently documented. -Effect type is a number of effect, 'db/const.txt' lists the common (mostly -negative) status effect types as constants, starting with 'SC_'. You can -also use this to give someone an effect of a player-cast spell: +The duration of the status is given in , or milleseconds. - // This will bless someone as if with Bless 10: +Certain status changes take an additional parameter , which typically +modifies player stats by the given number or percentage. This differs for each +status, and is sometimes zero. + +Optional value is the chance that the status will be invoked (10000 = 1%). +This is used primarily in item scripts. When used in an NPC script, a flag MUST +be defined for the rate to work. + +Optional value is how the status change start will be handled (a bitmask). + 1: Status change cannot be avoided. + 2: Tick cannot be reduced by stats (default). + 4: sc_data loaded, so no value will be altered. + 8: Rate cannot be reduced. + +If a is given, the status change will be invoked on the specified character +instead of the one attached to the script. This can only be defined after setting +a rate and flag. + +'sc_start2' and 'sc_start4' allow extra parameters to be passed, and are used only +for effects that require them. The meaning of the extra values vary depending on the +effect type. + +'sc_end' will remove a specified status effect. If SC_ALL (-1) is given, it will +perform a complete removal of all statuses (although permanent ones will re-apply). + +Examples: + // This will poison the invoking character for 10 minutes at 50% chance. + sc_start SC_POISON,600000,0,5000; + + // This will bestow the effect of Level 10 Blessing. sc_start 10,240000,10; -Extra argument's meaning differs depending on the effect type, for most -effects caused by a player skill the extra argument means the level of the -skill that would have been used to create that effect, for others it might -have no meaning whatsoever. You can actually bless someone with a 0 bless -spell level this way, which is fun, but weird. - -The GID, if given, will cause the status effect to appear on a specified -character, instead of the one attached to the running script. This has not -been properly tested. - -'sc_start2' is perfectly equivalent, but unlike 'sc_start', a status -change effect will only occur with a specified percentage chance. 10000 -given as the chance is equivalent to a 100% chance, 0 is a zero. - -'sc_start4' is just like sc_start, however it takes four parameters for -the status change instead of one. What these values are depends on the -status change in question. For example, elemental armor defense takes the -following four values: -- val1 is the first element, val2 is the resistance to the element val1. -- val3 is the second element, val4 is the resistance to said element. -eg: sc_start4 SC_ARMOR_RESIST,300000,20,20,20,20; - -'sc_end' will remove a specified status effect. If SC_All is used (-1), it -will do a complete removal of all statuses (although permanent ones will -re-apply). - -You can see the full list of status effects caused by skills in -'src/map/status.h' - they are currently not fully documented, but most of -that should be rather obvious. + // Elemental armor defense takes the following four values: + // val1 is the first element, val2 is the resistance to the element val1. + // val3 is the second element, val4 is the resistance to the element val3. + sc_start4 SC_DefEle,60000,Ele_Fire,20,Ele_Water,-15; + + // This will end the Freezing status for the invoking character. + sc_end SC_FREEZE; + Note: to use SC_NOCHAT you should alter Manner Manner = -5; // Will mute a user for 5 minutes Manner = 0; // Will unmute a user -- cgit v1.2.3-70-g09d2