Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * @filename ZomScript.js
- * @author Zombie
- * @desc Ladder Reset Script
- */
- var
- leader = false,
- leadZom = "",
- boer = false,
- boZom = "",
- moocher = false,
- moochZoms = [],
- zombies = Config.ZomScript.Profiles,
- horde = Config.ZomScript.Profiles.length,
- myJob = "",
- scratchNuts = true,
- cWh = "ÿc0", // White
- cGr = "ÿc2", // Green
- cGo = "ÿc4", // Gold
- ZomBrain = {
- command: function (zombie, action) {
- ZomComm.toAll(zombie + " " + action);
- }
- },
- ZomComm = {
- toAll: function (msg) {
- Messaging.sendToList(Config.ZomScript.Profiles, msg);
- },
- read: function () {
- addEventListener("copydata", (id, data) => {
- let { msg, nick } = JSON.parse(data);
- print(cGr + "From " + cGo + nick + cWh + ": " + msg);
- if (id == 55) { // Message Start
- if (msg.match("job ")) {
- var zombie = msg.split(" ")[1];
- var title = msg.split(" ")[2];
- switch (title) {
- case "leader":
- leadZom = zombie;
- break;
- case "boer":
- boZom = zombie;
- break;
- case "moocher":
- moochZoms += zombie;
- break;
- default:
- ZomComm.toAll("These are not the droids you're looking for.");
- break;
- }
- }
- switch (msg) {
- case "Jobs":
- leadZom = nick;
- if (me.name == Config.ZomScript.TeleZom) {
- myJob = "leader";
- leadZom = me.name;
- } else if (me.name == Config.ZomScript.BoZom) {
- myJob = "boer";
- boZom = me.name;
- } else {
- myJob = "moocher";
- moochZoms += me.name;
- }
- ZomComm.toAll("job "+me.name+" "+ myJob);
- break;
- case "Continue":
- scratchNuts = false;
- break;
- default:
- break;
- }
- } // Message End
- });
- }
- };
- function ZomScript() {
- delay(3000);
- ZomComm.read();
- if (me.profile == Config.ZomScript.TeleZom) {
- leader = true;
- leadZom = me.name;
- myJob = "leader";
- ZomComm.toAll("Jobs");
- ZomComm.toAll("job " + me.name + " " + myJob);
- }
- if (leadZom != "" && boZom != "") {
- partyReady = true;
- ZomComm.toAll("Continue");
- }
- while (scratchNuts) {
- delay(500);
- }
- print(cGr + "Leader" + cWh + ": " + cGo + leadZom);
- print(cGr + "Boer" + cWh + ": " + cGo + boZom);
- print(cGr + "Moochers" + cWh + ": " + cGo + moochZoms);
- delay(1000 * 60 * 60);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement