From 30fe943332dfcf8c20a1ddb6fdd692666226dbe8 Mon Sep 17 00:00:00 2001 From: eathenabot Date: Fri, 23 Mar 2012 04:57:11 +0000 Subject: * Merged changes up to eAthena 15083. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15773 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/map') diff --git a/src/map/script.c b/src/map/script.c index 512a84483..897575a30 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -6353,6 +6353,25 @@ BUILDIN_FUNC(getcharid) return 0; } +/*========================================== + * returns the GID of an NPC + *------------------------------------------*/ +BUILDIN_FUNC(getnpcid) +{ + int num; + + switch (num = script_getnum(st,2)) { + case 0: + script_pushint(st,st->oid); + break; + default: + ShowError("buildin_getnpcid: invalid parameter (%d).\n", num); + script_pushint(st,0); + break; + } + + return 0; +} /*========================================== *指定IDのPT名取得 *------------------------------------------*/ @@ -15911,6 +15930,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF(checkweight,"vi"), BUILDIN_DEF(readparam,"i?"), BUILDIN_DEF(getcharid,"i?"), + BUILDIN_DEF(getnpcid,"i"), BUILDIN_DEF(getpartyname,"i"), BUILDIN_DEF(getpartymember,"i?"), BUILDIN_DEF(getpartyleader,"i?"), -- cgit v1.2.3-70-g09d2