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
var hashCode = function(str) { | |
var hash = 0; | |
var i = 0; | |
var chr = 0; | |
var len = 0; | |
if (str.length === 0) { | |
return hash; | |
} | |
for (i = 0, len = str.length; i < len; i++) { | |
chr = str.charCodeAt(i); |
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
function receiveMessage(from, message, type) { | |
var session = axolotl.getSession(from); | |
// session could be in some sort of uninitalised state here - yuck! | |
if (type === "PreKeyWhisperMessage") { | |
return session.decryptPreKeyMessage(message); | |
} else if (type === "WhisperMessage") { | |
return session.decryptMessage(message); | |
} | |
} |
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
# Turn grass off | |
setTerrainGrid 50; | |
# Disable fatigue | |
player enableFatigue false; |