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).

1  
!752
2  
3  
static int delay = 3000;
4  
static S jackID = "#1003169";
5  
static S im = "I'm Jack's Identity Manager";
6  
7  
static O jack;
8  
9  
p {
10  
  makeBot("Jack Runner");
11  
  
12  
  thread "Jack Runner" {
13  
    while (licensed()) {
14  
      pcall { yo(); }
15  
      sleep(delay);
16  
    }
17  
  }
18  
}
19  
20  
svoid yo() {
21  
  S a = sendToRemoteBot(im, "Should machine * run Jack?", computerID());
22  
  
23  
  if (isYes(a)) {
24  
    if (jack == null) {
25  
      print("Jacking.");
26  
      jack = run(jackID);
27  
    }
28  
  } else if (jack != null) {
29  
    print("Unjacking!");
30  
    cleanUp(jack);
31  
    jack = null;
32  
  }
33  
}
34  
35  
synchronized answer {
36  
  if (match("copy to machine *", s) || match("delete from machine *", s))
37  
    ret sendToRemoteBot(im, s);
38  
  if "delete"
39  
    ret sendToRemoteBot(im, "delete from machine *", computerID());
40  
  if "come"
41  
    ret sendToRemoteBot(im, "copy to machine *", computerID());
42  
}

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: 578 / 648
Referenced in: [show references]