summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWildX <wildx@evolonline.org>2019-04-28 17:30:29 +0000
committerWildX <wildx@evolonline.org>2019-04-28 17:30:29 +0000
commite478440a8fb70fa0cbc67020f68a849de9949365 (patch)
treeac29fb2f741bc52daa3f53865b990490503332d7
parentfa061c5c0d2c77d9d9276f61a71f20b6c0ad4843 (diff)
parent700f027d7eeaec81f09527fe89704541a065f1f8 (diff)
downloadserverdata-e478440a8fb70fa0cbc67020f68a849de9949365.tar.gz
serverdata-e478440a8fb70fa0cbc67020f68a849de9949365.tar.bz2
serverdata-e478440a8fb70fa0cbc67020f68a849de9949365.tar.xz
serverdata-e478440a8fb70fa0cbc67020f68a849de9949365.zip
Merge branch 'jesusalva/cookie' into 'master'
Prevent Cookies from being used for "too long" Closes evol-all#58 See merge request evol/serverdata!182
-rw-r--r--db/re/item_db.conf12
-rw-r--r--npc/items/cookie.txt18
-rw-r--r--npc/scripts.conf1
3 files changed, 30 insertions, 1 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index 40f51c00..7dec6d2b 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -612,8 +612,18 @@ item_db: (
Trade: {
nodrop: true
noselltonpc: true
+ nogstorage: true
+ nomail: true
}
- Sprite: 0
+ OnEquipScript: <"
+ if (gettimetick(2) < COOKIE_COOLDOWN) {
+ unequip(EQI_HEAD_MID);
+ //dispbottom l("You need to wait @@ more before equipping this again.", FuzzyTime(COOKIE_COOLDOWN));
+ end;
+ }
+ COOKIE_COOLDOWN=gettimetick(2)+600;
+ addtimer 60000, "#DeliciousCookie::OnUnequip";
+ ">
},
{
Id: 518
diff --git a/npc/items/cookie.txt b/npc/items/cookie.txt
new file mode 100644
index 00000000..80ff591e
--- /dev/null
+++ b/npc/items/cookie.txt
@@ -0,0 +1,18 @@
+// Evol script.
+// Author:
+// Jesusalva
+// Reid (?)
+// Description:
+// Prevents cookie from being used for too long
+
+- script #DeliciousCookie NPC_HIDDEN,{
+ end;
+
+OnPCLogoutEvent:
+OnUnequip:
+ if (getequipid(EQI_HEAD_MID) == DeliciousCookie)
+ unequip(EQI_HEAD_MID);
+ end;
+
+}
+
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 1b7e85e6..f593cade 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -98,6 +98,7 @@
"npc/functions/quest-debug/042-General_Brotherhood.txt",
// Item functions
+"npc/items/cookie.txt",
"npc/items/croconut.txt",
"npc/items/shovel.txt",
"npc/items/rand_sc_heal.txt",