Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

42
LINES

< > BotCompany Repo | #1003175 // Jack Runner

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (2102L/14K/47K).

!752

static int delay = 3000;
static S jackID = "#1003169";
static S im = "I'm Jack's Identity Manager";

static O jack;

p {
  makeBot("Jack Runner");
  
  thread "Jack Runner" {
    while (licensed()) {
      pcall { yo(); }
      sleep(delay);
    }
  }
}

svoid yo() {
  S a = sendToRemoteBot(im, "Should machine * run Jack?", computerID());
  
  if (isYes(a)) {
    if (jack == null) {
      print("Jacking.");
      jack = run(jackID);
    }
  } else if (jack != null) {
    print("Unjacking!");
    cleanUp(jack);
    jack = null;
  }
}

synchronized answer {
  if (match("copy to machine *", s) || match("delete from machine *", s))
    ret sendToRemoteBot(im, s);
  if "delete"
    ret sendToRemoteBot(im, "delete from machine *", computerID());
  if "come"
    ret sendToRemoteBot(im, "copy to machine *", computerID());
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, nbgitpuheiab, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

-
Snippet ID: #1003175
Snippet name: Jack Runner
Eternal ID of this version: #1003175/1
Text MD5: 0c5ced9b1eb426c51a59c228d56cf348
Transpilation MD5: dcdb1e393fd2732ab3d2130a43de6e6a
Author: stefan
Category: javax / networking
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-05-21 04:33:58
Source code size: 874 bytes / 42 lines
Pitched / IR pitched: No / No
Views / Downloads: 577 / 647
Referenced in: