Update happy_holidays.js

This commit is contained in:
Kaan Soral
2018-12-15 05:10:13 +03:00
committed by GitHub
parent 9c487c7e10
commit 787b1481fe
+3 -7
View File
@@ -2,12 +2,12 @@ var attack_mode=true
function happy_holidays() function happy_holidays()
{ {
if(!G.maps.main.xmas_tree) return; // If this happens, the event is over if(!G.maps.main.ref.xmas_tree) return; // If this happens, the event is over
if(character.s.xmas2) return; // If you already have the buff, no need to get re-buffed if(character.s.xmas2) return; // If you already have the buff, no need to get re-buffed
G.maps.main.xmas_tree.return=true; G.maps.main.ref.xmas_tree.return=true;
// If first argument of "smart_move" includes "return" // If first argument of "smart_move" includes "return"
// You are placed back to your original point // You are placed back to your original point
smart_move(G.maps.main.xmas_tree,function(){ smart_move(G.maps.main.ref.xmas_tree,function(){
// This executes when we reach our destination // This executes when we reach our destination
parent.socket.emit("interaction",{type:"xmas_tree"}); parent.socket.emit("interaction",{type:"xmas_tree"});
say("Happy Holidays!"); say("Happy Holidays!");
@@ -50,7 +50,3 @@ setInterval(function(){
} }
},1000/4); // Loops every 1/4 seconds. },1000/4); // Loops every 1/4 seconds.
// NOTE: If the tab isn't focused, browsers slow down the game
// Learn Javascript: https://www.codecademy.com/learn/learn-javascript
// Write your own CODE: https://github.com/kaansoral/adventureland