diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index bdf8bb2..618f89c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -401,3 +401,33 @@ BUILDIN(countItemColor) script_pushint(st, count); return true; } + +BUILDIN(miscEffect) +{ + int type = script_getnum(st, 2); + struct block_list *bl = NULL; + + if (script_hasdata(st, 3)) + { + if (script_isstring(st, 3)) + { + TBL_PC *sd = map->nick2sd(script_getstr(st, 3)); + if (sd) + bl = &sd->bl; + } + else if (script_isint(st, 3)) + { + bl = map->id2bl(script_getnum(st, 3)); + } + } + + if (!bl) + { + TBL_PC *sd = script->rid2sd (st); + if (sd) + bl = &sd->bl; + } + if (bl) + clif->specialeffect(bl, type, AREA); + return true; +} |