From 93b84b9cb16fb9335269bf486cc4c1f9105b9cd6 Mon Sep 17 00:00:00 2001 From: brianluau Date: Wed, 6 Apr 2011 23:49:05 +0000 Subject: - Changed 'specialeffect' when is SELF, it will display the effect to the attached RID (if there is one) instead of the npc. (topic:243842) - Changed 'movenpc' to accept an optional argument for direction. (topic:206973) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14776 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/script.c b/src/map/script.c index 72e99e8ef..4e874b5f0 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -11438,7 +11438,15 @@ BUILDIN_FUNC(specialeffect) clif_specialeffect(&nd->bl, type, target); } else - clif_specialeffect(bl, type, target); + { + if (target == SELF) { + TBL_PC *sd=script_rid2sd(st); + if (sd) + clif_specialeffect_single(bl,type,sd->fd); + } else { + clif_specialeffect(bl, type, target); + } + } return 0; } @@ -11771,6 +11779,8 @@ BUILDIN_FUNC(movenpc) if ((nd = npc_name2id(npc)) == NULL) return -1; + if (script_hasdata(st,5)) + nd->ud.dir = script_getnum(st,5); npc_movenpc(nd, x, y); return 0; } @@ -15081,7 +15091,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF(mapwarp,"ssii??"), // Added by RoVeRT BUILDIN_DEF(atcommand,"s"), // [MouseJstr] BUILDIN_DEF(charcommand,"s"), // [MouseJstr] - BUILDIN_DEF(movenpc,"sii"), // [MouseJstr] + BUILDIN_DEF(movenpc,"sii?"), // [MouseJstr] BUILDIN_DEF(message,"ss"), // [MouseJstr] BUILDIN_DEF(npctalk,"s"), // [Valaris] BUILDIN_DEF(mobcount,"ss"), -- cgit v1.2.3-70-g09d2