summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-15 22:16:23 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-15 22:16:23 -0200
commitbf44d9d4b5593fa59aa63e5d4384d88693c76445 (patch)
tree80b083ab2a0ba2aa08d0493b5e23b12cbfe9cd92
parenta37171a9f46a5417f06d47e98acebde0d504d4e2 (diff)
downloadserverdata-bf44d9d4b5593fa59aa63e5d4384d88693c76445.tar.gz
serverdata-bf44d9d4b5593fa59aa63e5d4384d88693c76445.tar.bz2
serverdata-bf44d9d4b5593fa59aa63e5d4384d88693c76445.tar.xz
serverdata-bf44d9d4b5593fa59aa63e5d4384d88693c76445.zip
...bugs...
-rw-r--r--npc/003-3/malindou.txt2
-rw-r--r--npc/019-4-1/chief.txt5
-rw-r--r--npc/functions/math.txt2
3 files changed, 5 insertions, 4 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 4a6f0c1c9..670dcc3e2 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -152,7 +152,7 @@ OnInit:
}
// Current UPDATE value: Sab Dez 15 21:45:15 -02 2018
// Upgrade every Wooden Sword in a Bug Slayer
- if ($UPDATE < 1544917516) {
+ if ($UPDATE < 1544917515) {
query_sql("UPDATE `inventory` 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+"'");
diff --git a/npc/019-4-1/chief.txt b/npc/019-4-1/chief.txt
index 3b6125d89..bf3fb5e1d 100644
--- a/npc/019-4-1/chief.txt
+++ b/npc/019-4-1/chief.txt
@@ -72,7 +72,7 @@ L_Reward:
// #4 - #5: Extra xmas gift
/* You get Christmas Gift Box, which contain rares */
- .@gifts=min(15, log2($XMAS_GIFTS/100));
+ .@gifts=min(15, log2(($XMAS_GIFTS/100)+1)));
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,7 +152,7 @@ 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=min(15, log2($XMAS_GIFTS/100));
+ .@gifts=min(15, log2(($XMAS_GIFTS/100)+1));
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!", .@gifts-.@q), 1;
@@ -195,6 +195,7 @@ L_Loop:
.@am=countitem(ClosedChristmasBox);
delitem ClosedChristmasBox, .@am;
.@q=getq2(SQuest_Christmas);
+ $XMAS_GIFTS+=.@am;
setq2 SQuest_Christmas, .@q+.@am;
break;
case 2: ScoreXMAS(); goto L_Loop; break;
diff --git a/npc/functions/math.txt b/npc/functions/math.txt
index a7be729a3..3c2c935d9 100644
--- a/npc/functions/math.txt
+++ b/npc/functions/math.txt
@@ -53,7 +53,7 @@ function script log2 {
if (2**.@i == .@v) {
.@ok=1;
// inexact match, or limit exceeded
- } if (2**.@i >= .@v || .@i > 20) {
+ } else if (2**.@i >= .@v || .@i > 20) {
.@ok=1;
.@i-=1; // round down
// not yet