summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvalaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-15 11:43:26 +0000
committervalaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-15 11:43:26 +0000
commite5b2c0f41c5705821dbf9c36c3e82228941c974a (patch)
treee284e112e1d3055da1a0911f31cbb5ad09b14f39
parentc58bb078d04786aae68073997c7cc76f646136dc (diff)
downloadhercules-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
-rw-r--r--Changelog.txt2
-rw-r--r--src/map/script.c19
2 files changed, 21 insertions, 0 deletions
diff --git a/Changelog.txt b/Changelog.txt
index aa7644d19..0385070f2 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,7 @@
Date Added
11/15
+ * Added addtoskill script command for (levels can stack on top of existing levels). [Valaris]
+ Use same usage as skill script command.
* Added -ffast-math argument to makefile to increase performance, thanks to kashy. [Valaris]
* Added small and big mob sprite spawning. [Valaris]
-Added @monstersmall and @monsterbig commands.
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;
+}
+
/*==========================================
* ギルドスキル取得
*------------------------------------------