summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-26 21:52:04 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-26 21:52:04 -0200
commitb80f1aabc1e7fa5755bd3e0a5958787cda426a76 (patch)
tree4a97f42e2cac038b43424ce205d635c900069c17 /npc
parent025844f134357d5bf6d339851a5afe734ea04408 (diff)
downloadserverdata-b80f1aabc1e7fa5755bd3e0a5958787cda426a76.tar.gz
serverdata-b80f1aabc1e7fa5755bd3e0a5958787cda426a76.tar.bz2
serverdata-b80f1aabc1e7fa5755bd3e0a5958787cda426a76.tar.xz
serverdata-b80f1aabc1e7fa5755bd3e0a5958787cda426a76.zip
Change bow ID to something more logic.
Diffstat (limited to 'npc')
-rw-r--r--npc/003-3/malindou.txt18
-rw-r--r--npc/functions/util.txt15
2 files changed, 33 insertions, 0 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 3655d3eaa..1a1d64f7a 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -183,6 +183,24 @@ OnInit:
debugmes "* Fix critical bug with Nard (not needed on Main Server)";
debugmes "";
}
+ // Current UPDATE value: Qua Dez 26 21:45:10 -02 2018
+ // Update players position
+ if ($UPDATE < 1545867910) {
+ ReplaceItemFromEveryPlayer(6000, 9990);
+ ReplaceItemFromEveryPlayer(6001, 9991);
+ ReplaceItemFromEveryPlayer(6004, 9994);
+ ReplaceItemFromEveryPlayer(6005, 9995);
+
+ ReplaceItemFromEveryPlayer(9990, 6001);
+ ReplaceItemFromEveryPlayer(9991, 6000);
+ ReplaceItemFromEveryPlayer(9994, 6005);
+ ReplaceItemFromEveryPlayer(9995, 6004);
+
+ $UPDATE=1545867910;
+ debugmes "";
+ debugmes "* Update Bows IDs";
+ debugmes "";
+ }
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 589a73262..99ba16bfc 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -44,6 +44,21 @@ function script DelQuestFromEveryPlayer {
return;
}
+// Transforms an item in something else.
+// ReplaceItemFromEveryPlayer( OldID, NewID )
+function script ReplaceItemFromEveryPlayer {
+ if (getarg(0, -1) < 0)
+ return;
+ debugmes("* Server update: %d item was replaced by %d");
+ query_sql("UPDATE `inventory` SET `nameid`='"+getarg(1)+"' WHERE `nameid`="+getarg(0));
+ query_sql("UPDATE `cart_inventory` SET `nameid`='"+getarg(1)+"' WHERE `nameid`="+getarg(0));
+ query_sql("UPDATE `storage` SET `nameid`='"+getarg(1)+"' WHERE `nameid`="+getarg(0));
+ query_sql("UPDATE `guild_storage` SET `nameid`='"+getarg(1)+"' WHERE `nameid`="+getarg(0));
+ query_sql("UPDATE `rodex_items` SET `nameid`='"+getarg(1)+"' WHERE `nameid`="+getarg(0));
+ query_sql("UPDATE `auction` SET `nameid`='"+getarg(1)+"' WHERE `nameid`="+getarg(0));
+ return;
+}
+
/////////////////////////////////////////////////////////////////////////////////
// Returns Nard reputation for discounts