diff options
author | valaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-15 11:43:26 +0000 |
---|---|---|
committer | valaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-15 11:43:26 +0000 |
commit | e5b2c0f41c5705821dbf9c36c3e82228941c974a (patch) | |
tree | e284e112e1d3055da1a0911f31cbb5ad09b14f39 /src | |
parent | c58bb078d04786aae68073997c7cc76f646136dc (diff) | |
download | hercules-e5b2c0f41c5705821dbf9c36c3e82228941c974a.tar.gz hercules-e5b2c0f41c5705821dbf9c36c3e82228941c974a.tar.bz2 hercules-e5b2c0f41c5705821dbf9c36c3e82228941c974a.tar.xz hercules-e5b2c0f41c5705821dbf9c36c3e82228941c974a.zip |
* Added addtoskill script command for (levels can stack on top of existing levels). [Valaris]
Use same usage as skill script command.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@192 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/script.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index 61f5fd920..b0f495d55 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -156,6 +156,7 @@ int buildin_bonus(struct script_state *st); int buildin_bonus2(struct script_state *st); int buildin_bonus3(struct script_state *st); int buildin_skill(struct script_state *st); +int buildin_addtoskill(struct script_state *st); // [Valaris] int buildin_guildskill(struct script_state *st); int buildin_getskilllv(struct script_state *st); int buildin_getgdskilllv(struct script_state *st); @@ -363,6 +364,7 @@ struct { {buildin_bonus2,"bonus2","iii"}, {buildin_bonus3,"bonus3","iiii"}, {buildin_skill,"skill","ii*"}, + {buildin_addtoskill,"addtoskill","ii*"}, // [Valaris] {buildin_guildskill,"guildskill","ii"}, {buildin_getskilllv,"getskilllv","i"}, {buildin_getgdskilllv,"getgdskilllv","ii"}, @@ -3149,6 +3151,23 @@ int buildin_skill(struct script_state *st) return 0; } + +// add x levels of skill (stackable) [Valaris] +int buildin_addtoskill(struct script_state *st) +{ + int id,level,flag=2; + struct map_session_data *sd; + + id=conv_num(st,& (st->stack->stack_data[st->start+2])); + level=conv_num(st,& (st->stack->stack_data[st->start+3])); + if( st->end>st->start+4 ) + flag=conv_num(st,&(st->stack->stack_data[st->start+4]) ); + sd=script_rid2sd(st); + pc_skill(sd,id,level,flag); + + return 0; +} + /*========================================== * ギルドスキル取得 *------------------------------------------ |