Created
April 30, 2013 14:23
-
-
Save rileydutton/5489065 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on("change:token", function(obj, prev) { | |
if(obj.get("left") === prev["left"] && obj.get("top") === prev["top"]) return; | |
var dragon = findObjs({"name": "Dragon"})[0]; | |
if(dragon.get("layer") == "objects") return; //already triggered | |
if(objInPath(obj, getObj("path", "-It0Qq-YsN3s_oa_a_Zi"))) { | |
//You woke the dragon! | |
dragon.set({ | |
layer: "objects" | |
}); | |
sendChat("", "/desc You here a rumbling from above..."); | |
sendChat("Dragon", "Who dares enter my lair?"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment