summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
+}
+
/*==========================================
* ギルドスキル取得
*------------------------------------------