diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c index dfa8c14ce..7d0d9df74 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8601,7 +8601,12 @@ BUILDIN_FUNC(donpcevent) { const char* event = script_getstr(st,2); check_event(st, event); - npc_event_do(event); + if( !npc_event_do(event) ) { + struct npc_data * nd = map_id2nd(st->oid); + ShowDebug("NPCEvent '%s' not found! (source: %s)\n",event,nd?nd->name:"Unknown"); + script_pushint(st, 0); + } else + script_pushint(st, 1); return 0; } |