From a37171a9f46a5417f06d47e98acebde0d504d4e2 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 15 Dec 2018 22:09:02 -0200 Subject: Slay bugs --- npc/003-3/malindou.txt | 8 ++++---- npc/019-4-1/chief.txt | 12 ++++++------ npc/019-4-1/golbarez.txt | 1 + 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index bce70f45d..4a6f0c1c9 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -152,11 +152,11 @@ OnInit: } // Current UPDATE value: Sab Dez 15 21:45:15 -02 2018 // Upgrade every Wooden Sword in a Bug Slayer - if ($UPDATE < 1544917515) { + if ($UPDATE < 1544917516) { query_sql("UPDATE `inventory` SET `nameid` = '"+BugSlayer+"' WHERE `inventory`.`nameid`='"+WoodenSword+"'"); - query_sql("UPDATE `storage` SET `nameid` = '"+BugSlayer+"' WHERE `inventory`.`nameid`='"+WoodenSword+"'"); - query_sql("UPDATE `cart_inventory` SET `nameid` = '"+BugSlayer+"' WHERE `inventory`.`nameid`='"+WoodenSword+"'"); - query_sql("UPDATE `guild_storage` SET `nameid` = '"+BugSlayer+"' WHERE `inventory`.`nameid`='"+WoodenSword+"'"); + query_sql("UPDATE `storage` SET `nameid` = '"+BugSlayer+"' WHERE `storage`.`nameid`='"+WoodenSword+"'"); + query_sql("UPDATE `cart_inventory` SET `nameid` = '"+BugSlayer+"' WHERE `cart_inventory`.`nameid`='"+WoodenSword+"'"); + query_sql("UPDATE `guild_storage` SET `nameid` = '"+BugSlayer+"' WHERE `guild_storage`.`nameid`='"+WoodenSword+"'"); $UPDATE=1544917515; debugmes ""; debugmes "* Replaced Wooden Swords with Bug Slayer"; diff --git a/npc/019-4-1/chief.txt b/npc/019-4-1/chief.txt index 2e435260f..3b6125d89 100644 --- a/npc/019-4-1/chief.txt +++ b/npc/019-4-1/chief.txt @@ -43,14 +43,14 @@ } // Last year - if (getq3(SQuest_Christmas) == gettime(GETTIME_YEAR)-1) + if (getq(SQuest_Christmas) == gettime(GETTIME_YEAR)-1) goto L_Reward; // Not on season if ($EVENT$ != "Christmas") goto L_OutOfSeason; // Start Event for the first time - if (getq3(SQuest_Christmas) < gettime(GETTIME_YEAR)) - setq SQuest_Christmas, 1, 0, gettime(GETTIME_YEAR); + if (getq(SQuest_Christmas) < gettime(GETTIME_YEAR)) + setq SQuest_Christmas, gettime(GETTIME_YEAR), 0, 0; // Main Loop goto L_Main; @@ -72,7 +72,7 @@ L_Reward: // #4 - #5: Extra xmas gift /* You get Christmas Gift Box, which contain rares */ - .@gifts=min(15, log2(gifts/100)); + .@gifts=min(15, log2($XMAS_GIFTS/100)); if (.@q1 > .@gifts) getitem XmasGift, .@gifts; .@nb = query_sql("SELECT c.name FROM `quest` AS i, `char` AS c WHERE i.quest_id="+SQuest_Christmas+" AND i.char_id=c.char_id ORDER BY i.count2 DESC LIMIT 5", .@name$); @@ -152,10 +152,10 @@ L_Main: mesq l("We only managed to recover @@ stolen @@ thus far...", $XMAS_GIFTS, getitemlink(ClosedChristmasBox)); // Same formula from 2007 event. (max: 3.276.800 boxes delivered, an ABSURD amount) // You need to give at least this many boxes yourself to be eligible for rewards, though. - .@gifts=max(15, log2(gifts/100)); + .@gifts=min(15, log2($XMAS_GIFTS/100)); mesq l("If things keep like this, we will only manage to give @@ gifts to every player...", .@gifts); if (.@q < .@gifts) - mesc l("WARNING: You must give at least @@ boxes more before event ends to be eligible for a reward!", .@q-.@gifts), 1; + mesc l("WARNING: You must give at least @@ boxes more before event ends to be eligible for a reward!", .@gifts-.@q), 1; next; if (.@q) { mesn; diff --git a/npc/019-4-1/golbarez.txt b/npc/019-4-1/golbarez.txt index 91265be06..c64079503 100644 --- a/npc/019-4-1/golbarez.txt +++ b/npc/019-4-1/golbarez.txt @@ -5,6 +5,7 @@ // Description: // Christmas quest. ported from 2010 and adapted for TMW2:ML. // Original Name: Golbenez +// Year, Gifts, GP 019-4-1,30,45,0 script Golbarez NPC_LOF_RICH,{ if ($EVENT$ != "Christmas") -- cgit v1.2.3-60-g2f50