summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-22 18:16:49 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-22 18:16:49 -0200
commit83c173d28418b8d951769abdb53b6f8a1c257dca (patch)
tree87e9121441ea052c67b8cac0896c8067fb846ddc
parentb22cf43148028f4e113607ccd500dac4a012edcd (diff)
downloadserverdata-83c173d28418b8d951769abdb53b6f8a1c257dca.tar.gz
serverdata-83c173d28418b8d951769abdb53b6f8a1c257dca.tar.bz2
serverdata-83c173d28418b8d951769abdb53b6f8a1c257dca.tar.xz
serverdata-83c173d28418b8d951769abdb53b6f8a1c257dca.zip
Helper funcion: DelAccRegFromEveryPlayer( KEY )
-rw-r--r--npc/commands/event.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index 9113fac8a..44a00192a 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -14,6 +14,18 @@ function script DelItemFromEveryPlayer {
return;
}
+// Delete an acc_reg entry from all players. Full arrays only. Affect num and str db.
+// WARNING, irreversible and dangerous!
+// DelAccRegFromEveryPlayer( KEY )
+function script DelAccRegFromEveryPlayer {
+ if (getarg(0, -1) < 0)
+ return;
+
+ query_sql("DELETE FROM `acc_reg_num_db` WHERE `key`="+getarg(0));
+ query_sql("DELETE FROM `acc_reg_str_db` WHERE `key`="+getarg(0));
+ return;
+}
+
// Christmas cannot be on GlobalEventMenu because it affects seasons system
function script sChristmas {
// Add Christmas drops