diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-02-04 18:23:57 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-02-04 18:23:57 +0000 |
commit | 8214af442ea63919d69d368221ae2d61456488b9 (patch) | |
tree | 9efad3f11ace58a29ad05c0c3c9e9fa31964def8 /src/map/script.c | |
parent | 46ca642c09468dbc52ca390c8f1d368e7ffa2966 (diff) | |
download | hercules-8214af442ea63919d69d368221ae2d61456488b9.tar.gz hercules-8214af442ea63919d69d368221ae2d61456488b9.tar.bz2 hercules-8214af442ea63919d69d368221ae2d61456488b9.tar.xz hercules-8214af442ea63919d69d368221ae2d61456488b9.zip |
- Some code cleanups.
- Added new Cell types (NoChat and NoDamage)
- Added JobChangeLevel and FreeSKPoints to #stats
- Added a Crash protection in clif_send with invalid fd values.
- Merged a missing update in TK Mission.
- Added script command 'getmapflag'
- Merged some new Status Change to Stable.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12175 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index 8e0125cf1..e907da19d 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8810,6 +8810,67 @@ BUILDIN_FUNC(setmapflagnosave) return 0; } +BUILDIN_FUNC(getmapflag) +{ + int m,i; + const char *str; + + str=script_getstr(st,2); + i=script_getnum(st,3); + + m = map_mapname2mapid(str); + if(m >= 0) { + switch(i) { + case MF_NOMEMO: script_pushint(st,map[m].flag.nomemo); break; + case MF_NOTELEPORT: script_pushint(st,map[m].flag.noteleport); break; + case MF_NOBRANCH: script_pushint(st,map[m].flag.nobranch); break; + case MF_NOPENALTY: script_pushint(st,map[m].flag.noexppenalty); break; + case MF_NOZENYPENALTY: script_pushint(st,map[m].flag.nozenypenalty); break; + case MF_PVP: script_pushint(st,map[m].flag.pvp); break; + case MF_PVP_NOPARTY: script_pushint(st,map[m].flag.pvp_noparty); break; + case MF_PVP_NOGUILD: script_pushint(st,map[m].flag.pvp_noguild); break; + case MF_GVG: script_pushint(st,map[m].flag.gvg); break; + case MF_GVG_NOPARTY: script_pushint(st,map[m].flag.gvg_noparty); break; + case MF_GVG_DUNGEON: script_pushint(st,map[m].flag.gvg_dungeon); break; + case MF_GVG_CASTLE: script_pushint(st,map[m].flag.gvg_castle); break; + case MF_NOTRADE: script_pushint(st,map[m].flag.notrade); break; + case MF_NODROP: script_pushint(st,map[m].flag.nodrop); break; + case MF_NOSKILL: script_pushint(st,map[m].flag.noskill); break; + case MF_NOWARP: script_pushint(st,map[m].flag.nowarp); break; + case MF_NOICEWALL: script_pushint(st,map[m].flag.noicewall); break; + case MF_SNOW: script_pushint(st,map[m].flag.snow); break; + case MF_CLOUDS: script_pushint(st,map[m].flag.clouds); break; + case MF_CLOUDS2: script_pushint(st,map[m].flag.clouds2); break; + case MF_FOG: script_pushint(st,map[m].flag.fog); break; + case MF_FIREWORKS: script_pushint(st,map[m].flag.fireworks); break; + case MF_SAKURA: script_pushint(st,map[m].flag.sakura); break; + case MF_LEAVES: script_pushint(st,map[m].flag.leaves); break; + case MF_RAIN: script_pushint(st,map[m].flag.rain); break; + case MF_INDOORS: script_pushint(st,map[m].flag.indoors); break; + case MF_NIGHTENABLED: script_pushint(st,map[m].flag.nightenabled); break; + case MF_NOGO: script_pushint(st,map[m].flag.nogo); break; + case MF_NOBASEEXP: script_pushint(st,map[m].flag.nobaseexp); break; + case MF_NOJOBEXP: script_pushint(st,map[m].flag.nojobexp); break; + case MF_NOMOBLOOT: script_pushint(st,map[m].flag.nomobloot); break; + case MF_NOMVPLOOT: script_pushint(st,map[m].flag.nomvploot); break; + case MF_NORETURN: script_pushint(st,map[m].flag.noreturn); break; + case MF_NOWARPTO: script_pushint(st,map[m].flag.nowarpto); break; + case MF_NIGHTMAREDROP: script_pushint(st,map[m].flag.pvp_nightmaredrop); break; + case MF_RESTRICTED: script_pushint(st,map[m].flag.restricted); break; + case MF_NOCOMMAND: script_pushint(st,map[m].nocommand); break; + case MF_JEXP: script_pushint(st,map[m].jexp); break; + case MF_BEXP: script_pushint(st,map[m].bexp); break; + case MF_NOVENDING: script_pushint(st,map[m].flag.novending); break; + case MF_LOADEVENT: script_pushint(st,map[m].flag.loadevent); break; + case MF_NOCHAT: script_pushint(st,map[m].flag.nochat); break; + case MF_PARTYLOCK: script_pushint(st,map[m].flag.partylock); break; + case MF_GUILDLOCK: script_pushint(st,map[m].flag.guildlock); break; + } + } + + return 0; +} + BUILDIN_FUNC(setmapflag) { int m,i; @@ -13163,6 +13224,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF(detachrid,""), BUILDIN_DEF(isloggedin,"i?"), BUILDIN_DEF(setmapflagnosave,"ssii"), + BUILDIN_DEF(getmapflag,"si"), BUILDIN_DEF(setmapflag,"si*"), BUILDIN_DEF(removemapflag,"si"), BUILDIN_DEF(pvpon,"s"), |