summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt6
-rw-r--r--db/const.txt31
-rw-r--r--src/map/script.c20
3 files changed, 41 insertions, 16 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index ae28cf207..13942be3c 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -2,6 +2,12 @@ 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.
+2006/04/27
+ * Added 3rd argument to script command 'setmapflag' thx to Jbain [Lupus]
+ setmapflag "prontera.gat",mf_pvp;
+ setmapflag "prontera.gat",mf_jexp,100;
+ Now you can dinamically increase/decrease EXP rate on set maps
+ e.g. you can lower EXP on the cmd_fild02 ^_-
2006/04/26
* Updated sql-files/item_db.sql to current. [Skotlex]
* Item use interval is set to a default of 100ms now since that should be
diff --git a/db/const.txt b/db/const.txt
index 9cb0906ab..195b9ed81 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -111,20 +111,23 @@ mf_rain 20
mf_indoors 21
mf_nogo 22
mf_clouds 23
-mf_fireworks 24
-mf_gvg_castle 25
-mf_gvg_dungeon 26
-mf_nightenabled 27
-mf_nobaseexp 28
-mf_nojobexp 29
-mf_nomobloot 30
-mf_nomvploot 31
-mf_noreturn 32
-mf_nowarpto 33
-mf_nonightmaredrop 34
-mf_restricted 35
-mf_nocommand 36
-mf_nodrop 37
+mf_clouds2 24
+mf_fireworks 25
+mf_gvg_castle 26
+mf_gvg_dungeon 27
+mf_nightenabled 28
+mf_nobaseexp 29
+mf_nojobexp 30
+mf_nomobloot 31
+mf_nomvploot 32
+mf_noreturn 33
+mf_nowarpto 34
+mf_nonightmaredrop 35
+mf_restricted 36
+mf_nocommand 37
+mf_nodrop 38
+mf_jexp 39
+mf_bexp 40
cell_wall 1
cell_water 3
diff --git a/src/map/script.c b/src/map/script.c
index 81b98fa55..40cb81e93 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -607,7 +607,7 @@ struct {
{buildin_detachrid,"detachrid",""},
{buildin_isloggedin,"isloggedin","i"},
{buildin_setmapflagnosave,"setmapflagnosave","ssii"},
- {buildin_setmapflag,"setmapflag","si"},
+ {buildin_setmapflag,"setmapflag","si*"},
{buildin_removemapflag,"removemapflag","si"},
{buildin_pvpon,"pvpon","s"},
{buildin_pvpoff,"pvpoff","s"},
@@ -6629,7 +6629,7 @@ enum { MF_NOMEMO,MF_NOTELEPORT,MF_NOSAVE,MF_NOBRANCH,MF_NOPENALTY,MF_NOZENYPENA
MF_NOWARP,MF_FREE,MF_NOICEWALL,MF_SNOW,MF_FOG,MF_SAKURA,MF_LEAVES,MF_RAIN,
MF_INDOORS,MF_NOGO,MF_CLOUDS,MF_CLOUDS2,MF_FIREWORKS,MF_GVG_CASTLE,MF_GVG_DUNGEON,MF_NIGHTENABLED,
MF_NOBASEEXP, MF_NOJOBEXP, MF_NOMOBLOOT, MF_NOMVPLOOT, MF_NORETURN, MF_NOWARPTO, MF_NIGHTMAREDROP,
- MF_RESTRICTED, MF_NOCOMMAND, MF_NODROP };
+ MF_RESTRICTED, MF_NOCOMMAND, MF_NODROP, MF_JEXP, MF_BEXP };
int buildin_setmapflagnosave(struct script_state *st)
{
@@ -6658,9 +6658,13 @@ int buildin_setmapflag(struct script_state *st)
{
int m,i;
char *str;
+ char *val;
str=conv_str(st,& (st->stack->stack_data[st->start+2]));
i=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ if(st->end>st->start+4){
+ val=conv_str(st,& (st->stack->stack_data[st->start+4]));
+ }
m = map_mapname2mapid(str);
if(m >= 0) {
switch(i) {
@@ -6775,6 +6779,12 @@ int buildin_setmapflag(struct script_state *st)
case MF_NOCOMMAND:
map[m].flag.nocommand=1;
break;
+ case MF_JEXP:
+ map[m].jexp = (atoi(val) < 0) ? 100 : atoi(val);
+ break;
+ case MF_BEXP:
+ map[m].bexp = (atoi(val) < 0) ? 100 : atoi(val);
+ break;
}
}
@@ -6905,6 +6915,12 @@ int buildin_removemapflag(struct script_state *st)
case MF_NOCOMMAND:
map[m].flag.nocommand=0;
break;
+ case MF_JEXP:
+ map[m].jexp=100;
+ break;
+ case MF_BEXP:
+ map[m].bexp=100;
+ break;
}
}