From 23b797e25ebdbe1af200bdc0f10f62e22b966e52 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 6 Nov 2019 16:06:56 -0300 Subject: You can now also invoke the quest deletor from script runtime. --- npc/functions/util.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'npc/functions/util.txt') diff --git a/npc/functions/util.txt b/npc/functions/util.txt index f89c3a992..aa0ad8249 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -81,6 +81,17 @@ function script DelQuestFromEveryPlayer { return; query_sql("DELETE FROM `quest` WHERE `quest_id`="+getarg(0)); + + // Del quests which SQL can't reach + .@a=playerattached(); + if (.@a) detachrid(); + .@c = getunits(BL_PC, .@players, MAX_CYCLE_PC); + for (.@i = 0; .@i < .@c; .@i++) { + attachrid(.@players[.@i]); + setq(getarg(0), 0, 0, 0, 0); + detachrid(); + } + if (.@a) attachrid(.@a); return; } -- cgit v1.2.3-60-g2f50