Created
April 15, 2020 13:13
-
-
Save nnnlog/63e4a8491023da391da1e175cf6fa160 to your computer and use it in GitHub Desktop.
ElementZero Custom Scripting API test
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
import * as player from "ez:player"; | |
import * as chat from "ez:chat"; | |
import * as inv from "ez:inventory"; | |
setInterval(() => console.log(Date.now()), 200); | |
let name_to_player_obj = []; | |
player.onPlayerJoined(entry => { | |
console.log(entry); | |
name_to_player_obj[entry.name] = entry; | |
}); | |
chat.onChat(({sender, content}) => { | |
console.log(sender, content); | |
console.log(inv.getOffHandItem(name_to_player_obj[sender])); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment