diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-11-06 16:06:56 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-11-06 16:06:56 -0300 |
commit | 23b797e25ebdbe1af200bdc0f10f62e22b966e52 (patch) | |
tree | 6558e8ee1afb8dad7fd284d86a83b76ce35bae65 | |
parent | f7dc10cf26e1b746ba6524255bcf8713ded841b1 (diff) | |
download | serverdata-23b797e25ebdbe1af200bdc0f10f62e22b966e52.tar.gz serverdata-23b797e25ebdbe1af200bdc0f10f62e22b966e52.tar.bz2 serverdata-23b797e25ebdbe1af200bdc0f10f62e22b966e52.tar.xz serverdata-23b797e25ebdbe1af200bdc0f10f62e22b966e52.zip |
You can now also invoke the quest deletor from script runtime.
-rw-r--r-- | npc/functions/util.txt | 11 |
1 files changed, 11 insertions, 0 deletions
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; } |