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

27
LINES

< > BotCompany Repo | #1002893 // Spam Bot v2 - says a random line every 10 seconds (dev.)

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

Libraryless. Click here for Pure Java version (1123L/8K/26K).

!752

static S myName = "Spam Bot 2";
static int historySuck = 100;
static int room = 1;

static new TreeSet<S> lines;

p {
  suckWebChat_room = sayInWebChat_room = room;
  
  thread "Spam Bot 2" {
    while (licensed()) {
      pcall {
        for (ChatLine l : suckWebChat(myName, historySuck)) {
          lines.add(l.text);
        }
        sayInWebChat(myName, makeRandomLine());
      }
      sleepSeconds(10);
    }
  }
}

static S makeRandomLine() {
  ret oneOf(asList(lines));
}

Author comment

Began life as a copy of #1002892

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002893
Snippet name: Spam Bot v2 - says a random line every 10 seconds (dev.)
Eternal ID of this version: #1002893/1
Text MD5: a6f5bf9e2d59575c4caf2baa06e48e85
Transpilation MD5: 7f5f687107eb6eb4615c885830f47256
Author: stefan
Category: eleu / nl
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-03-31 20:19:36
Source code size: 514 bytes / 27 lines
Pitched / IR pitched: No / No
Views / Downloads: 1992 / 1855
Referenced in: [show references]