From 1707701d62b7031bde44abe1752c662fde2618fd Mon Sep 17 00:00:00 2001 From: Kaan Soral Date: Fri, 15 Dec 2017 22:59:09 +0300 Subject: [PATCH] Update happy_holidays.js --- examples/happy_holidays.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/happy_holidays.js b/examples/happy_holidays.js index 4164f99..b543dcc 100644 --- a/examples/happy_holidays.js +++ b/examples/happy_holidays.js @@ -2,7 +2,8 @@ var attack_mode=true function happy_holidays() { - if(!G.maps.main.xmas_tree) return; + if(!G.maps.main.xmas_tree) return; // If this happens, the event is over + if(character.s.xmas) return; // If you already have the buff, no need to get re-buffed G.maps.main.xmas_tree.return=true; // If first argument of "smart_move" includes "return" // You are placed back to your original point @@ -12,7 +13,7 @@ function happy_holidays() say("Happy Holidays!"); }); } -setInterval(happy_holidays,59*60*1000); // Every 59 minutes +setInterval(happy_holidays,60*1000); // Check every minute happy_holidays(); // Execute once before the first interval is up setInterval(function(){