From faa7a02a489886461cd039cc306f1fc55d81daa5 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Tue, 9 Jan 2007 17:31:13 +0000 Subject: - Changes to script buildin functions: * functions checking if a player is attached as soon as possible. * functions that required a player attached and would crash if none was there terminate the script now. (others keep the current behaviour to maintain full backward compatibility) * removed the unused flag argument in guildskill. * bonus,bonus2,bonus3,bonus4 use the same function now (remains the same script-wise) * added an optional parameter to setcart,setfalcon,setriding so it's possible to remove the cart/falcon/mount or select a specific cart * other cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9636 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 12 + doc/script_commands.txt | 110 +++++---- src/common/socket.c | 2 +- src/map/clif.c | 2 +- src/map/guild.c | 23 +- src/map/guild.h | 2 +- src/map/intif.c | 17 +- src/map/intif.h | 2 +- src/map/itemdb.c | 12 +- src/map/map.h | 15 +- src/map/pc.c | 73 +++--- src/map/pc.h | 8 +- src/map/script.c | 627 +++++++++++++++++++++++++----------------------- src/map/skill.h | 2 +- src/map/status.c | 2 +- 15 files changed, 487 insertions(+), 422 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 575d4c005..82691bf92 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,18 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +2007/01/09 + * Changes to script buildin functions: [FlavioJS] + - functions checking if a player is attached as soon as possible. + - functions that required a player attached and would crash if none was + there terminate the script now. (others keep the current behaviour to + maintain full backward compatibility) + - removed the unused flag argument in guildskill. + - bonus,bonus2,bonus3,bonus4 use the same function now (remains the same + script-wise) + - added an optional parameter to setcart,setfalcon,setriding so it's + possible to remove the cart/falcon/mount or select a specific cart + - other cleanups 2007/01/08 * Hotfix: Freeing of freed pointer when replacing script functions. [Lance] * Unimportant cleanups diff --git a/doc/script_commands.txt b/doc/script_commands.txt index edbeada80..a1b7ea8a9 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -9,7 +9,7 @@ //= Maeki Rika - A section on general concepts and lots of //= other updates and additions. //===== Version =========================================== -//= 2.10.20070101 +//= 2.11.20070109 //========================================================= //= 1.0 - First release, filled will as much info as I could //= remember or figure out, most likely there are errors, @@ -40,6 +40,9 @@ //= 2.9.20061230 - Updated getitem and guardian. [FlavioJS] //= 2.10.20070101 - added sleep,sleep2,awake and updated the variables section. //= [FlavioJS] +//= 2.11.20070109 - removed the unused flag argument in guildskill, added an +//= optional argument to setcart,setfalcon,setriding and other cleanups +//= [FlavioJS] //===== Compatible With =================================== //= LOL, can be used by anyone hopefully //===== Description ======================================= @@ -2578,10 +2581,10 @@ specified amount permanently. The amount can be negative. See 'statusup'. --------------------------------------- -*bonus ,; -*bonus2 ,; -*bonus3 ,; -*bonus4 ,; +*bonus ,; +*bonus2 ,,; +*bonus3 ,,,; +*bonus4 ,,,,; These commands are meant to be used in item scripts. They will probably work outside item scripts, but the bonus will not persist for long. They, as @@ -2618,7 +2621,7 @@ previously, they will now at 0+the level given. --------------------------------------- -*guildskill ,{,} +*guildskill , This command will bump up the specified guild skill by the specified number of levels. This refers to the invoking character and will only work if the invoking @@ -2680,8 +2683,10 @@ Example 2: *getgdskilllv(,) -This function retirns the guild skills for the guild with a specified ID exactly -as 'getskilllv' does. +This function returns the level of the skill of the guild . +If the guild does not have that skill, 0 is returned. +If the guild does not exist, -1 is returned. +Refer to 'db/skill_db.txt' for the full list of skills. (GD_* are guild skills) --------------------------------------- @@ -2712,7 +2717,6 @@ specially when talked to by GMs. --------------------------------------- *end; -*break; This command will stop the execution for this particular script. The two versions are prefectly equivalent. It is the normal way to end a script which @@ -2742,16 +2746,12 @@ Without the use if 'end' it would travel through the labels until the end of the script. If you were lvl 10 or less, you would see all the speech lines, the use of 'end' stops this, and ends the script. -Note: Break won't work anymore, it has been commented out in src/map/script.c: - -// {buildin_end,"break",""}, this might confuse advanced scripting support [Eoe] - --------------------------------------- *checkoption(