summaryrefslogtreecommitdiff
path: root/npc/003-3
diff options
context:
space:
mode:
Diffstat (limited to 'npc/003-3')
-rw-r--r--npc/003-3/malindou.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 678bc675d..00aeaad11 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -229,6 +229,33 @@ OnInit:
debugmes "* Update Quiver IDs";
debugmes "";
}
+ // Current UPDATE value: Ter Jan 15 02:07:40 -02 2019
+ // Reset all thief/merc ranks back to 1.
+ // If
+ if ($UPDATE < 1547525260) {
+
+ // Already rank 2? Give enough exp to get rank 2 easily.
+ query_sql("UPDATE `char_reg_num_db` SET `value` = '30' WHERE `char_reg_num_db`.`key`='THIEF_EXP' AND `char_reg_num_db`.`char_id` IN (SELECT `char_reg_num_db`.`char_id` WHERE `char_reg_num_db`.`key` = 'THIEF_RANK' AND `char_reg_num_db`.`value`>='2')");
+ // Didn't wanted to rank up? Reset exp to 30!
+ query_sql("UPDATE `char_reg_num_db` SET `value` = '30' WHERE `char_reg_num_db`.`key`='THIEF_EXP' AND `char_reg_num_db`.`value` >= '32' AND `char_reg_num_db`.`char_id` IN (SELECT `char_reg_num_db`.`char_id` WHERE `char_reg_num_db`.`key` = 'THIEF_RANK' AND `char_reg_num_db`.`value`<='1')");
+ // Already rank 2? Return to rank 1.
+ query_sql("UPDATE `char_reg_num_db` SET `value` = '1' WHERE `char_reg_num_db`.`key`='THIEF_RANK' AND `char_reg_num_db`.`value` >= '2'");
+
+ // The same thing, now for merchants
+
+ // Already rank 2? Give enough exp to get rank 2 easily.
+ query_sql("UPDATE `char_reg_num_db` SET `value` = '30' WHERE `char_reg_num_db`.`key`='MERC_EXP' AND `char_reg_num_db`.`char_id` IN (SELECT `char_reg_num_db`.`char_id` WHERE `char_reg_num_db`.`key` = 'MERC_RANK' AND `char_reg_num_db`.`value`>='2')");
+ // Didn't wanted to rank up? Reset exp to 30!
+ query_sql("UPDATE `char_reg_num_db` SET `value` = '30' WHERE `char_reg_num_db`.`key`='MERC_EXP' AND `char_reg_num_db`.`value` >= '32' AND `char_reg_num_db`.`char_id` IN (SELECT `char_reg_num_db`.`char_id` WHERE `char_reg_num_db`.`key` = 'MERC_RANK' AND `char_reg_num_db`.`value`<='1')");
+ // Already rank 2? Return to rank 1.
+ query_sql("UPDATE `char_reg_num_db` SET `value` = '1' WHERE `char_reg_num_db`.`key`='MERC_RANK' AND `char_reg_num_db`.`value` >= '2'");
+
+ $UPDATE=1547525260;
+ debugmes "";
+ debugmes "* Merc/Thief ranks reset to 1";
+ debugmes "Improving past rank 2 helps on minigame";
+ debugmes "";
+ }