Examples of Bot


Examples of com.uwyn.drone.core.Bot

 
  public void processElement()
  {
    Collection  bots = BotsRunner.getRepInstance().getBots();
    Iterator  bots_it = bots.iterator();
    Bot      bot = null;
    while (bots_it.hasNext())
    {
      bot = (Bot)bots_it.next();
     
      mTemplate.setValue("bot", encodeHtml(bot.getName()));
      mTemplate.appendBlock("options", "option");
    }

    print(mTemplate);
  }
View Full Code Here

Examples of com.uwyn.drone.core.Bot

      generateForm(mTemplate, submission);
      processElement();
      return;
    }
   
    Bot      bot = BotFactory.get(submission.getBot());
    Privmsg    msg = new Privmsg(submission.getTarget(), submission.getMessage());
   
    try
    {
      bot.send(msg);
    }
    catch (CoreException e)
    {
      throw new EngineException(e);
    }
View Full Code Here

Examples of com.uwyn.drone.core.Bot

        Collection         bots = BotsRunner.getRepInstance().getBots();
        Iterator         iter = bots.iterator();

        while (iter.hasNext())
        {
          Bot bot = (Bot)iter.next();

          Iterator channels_it = bot.getJoinedChannels().iterator();
          while (channels_it.hasNext())
          {
            Channel     channel = ((Channel)channels_it.next());
            StringBuffer   key = new StringBuffer();
            key
              .append(Config.getRepInstance().getString("LUCENE_DIR"))
              .append(File.separator)
              .append(bot.getName())
              .append("-")
              .append(bot.getServer().getServerName())
              .append("-")
              .append(channel.getName().substring(1));
           
            if (submission.getChannel() == null ||
              submission.getChannel().equals(""))
View Full Code Here

Examples of com.uwyn.drone.core.Bot

 
        List channels = new ArrayList();
 
        while (iter.hasNext())
        {
          Bot bot = (Bot)iter.next();
 
          Iterator channelsIter = bot.getJoinedChannels().iterator();
          while (channelsIter.hasNext())
          {
            String name = bot.getName() + " - " + ((Channel)channelsIter.next()).getName();
            channels.add(name);
          }
        }
       
        new SortListComparables().sort(channels);
View Full Code Here

Examples of de.christopherstock.shooter.game.objects.Bot

            {
                case EUnitOfficeEmployee:
                {
                    switch ( LibMath.getRandom( 0, 3 ) )
                    {
                        default: return new Botnew BotPattern( BotPatternBase.EOfficeEmployee1,   iKind   ),  Bot.BotType.ETypeFriend, iAnchor,  null, BotJob.EStandStill,           null,     iFacingAngle, iActions, BotHealth.ECivilian, iID, BotHanded.ERightHanded          );
                    }
                    //break;
                }

                case EUnitSecurity:
                {
                    switch ( LibMath.getRandom( 0, 1 ) )
                    {
                        case 0: return new Botnew BotPattern( BotPatternBase.ESecurityLight,     iKind   ),  Bot.BotType.ETypeEnemy, iAnchor,  null, BotJob.EAttackPlayerFire,           new Artefact[] { new Artefact( ArtefactType.ESpaz12 ) }, iFacingAngle, iActions, BotHealth.ESecurity, iID, BotHanded.ERightHanded      );
                        case 1: return new Botnew BotPattern( BotPatternBase.ESecurityHeavy,     iKind   ),  Bot.BotType.ETypeEnemy, iAnchor,  null, BotJob.EAttackPlayerFire,           new Artefact[] { new Artefact( ArtefactType.ESpaz12 ) }, iFacingAngle, iActions, BotHealth.ESecurity, iID, BotHanded.ERightHanded     );
                    }
                    break;
                }

                case EUnitPilot:
                {
                    switch ( LibMath.getRandom( 0, 1 ) )
                    {
                        case 0: return new Botnew BotPattern( BotPatternBase.EPilot1,            iKind   ),  Bot.BotType.ETypeFriend, iAnchor,  new Point2D.Float[] { new Point2D.Float( 7.0f, 4.0f ), new Point2D.Float( 7.0f, 10.0f ), }, BotJob.EWalkWaypoints,     new Artefact[] { new Artefact( ArtefactType.ESpaz12 ) }, iFacingAngle, iActions, BotHealth.ECivilian, iID, BotHanded.ERightHanded    );
                        case 1: return new Botnew BotPattern( BotPatternBase.EPilot1,            iKind   ),  Bot.BotType.ETypeFriend, iAnchor,  new Point2D.Float[] { new Point2D.Float( 7.0f, 4.0f ), new Point2D.Float( 7.0f, 10.0f ), }, BotJob.EWalkWaypoints,     new Artefact[] { new Artefact( ArtefactType.ESpaz12 ) }, iFacingAngle, iActions, BotHealth.ECivilian, iID, BotHanded.ERightHanded    );
                    }
                    break;
                }

                case EUnitSpecialForces:
                {
                    switch ( LibMath.getRandom( 0, 1 ) )
                    {
                        case 0: return new Botnew BotPattern( BotPatternBase.ESpecialForces,     iKind   ),  Bot.BotType.ETypeFriend, iAnchor,  null, BotJob.EWatchPlayer,     new Artefact[] { new Artefact( ArtefactType.ESpaz12 ) }, iFacingAngle, iActions, BotHealth.EPrivateSoldier, iID, BotHanded.ERightHanded );
                        case 1: return new Botnew BotPattern( BotPatternBase.ESpecialForces,     iKind   ),  Bot.BotType.ETypeFriend, iAnchor,  null, BotJob.EWatchPlayer,     new Artefact[] { new Artefact( ArtefactType.ESpaz12 ) }, iFacingAngle, iActions, BotHealth.EPrivateSoldier, iID, BotHanded.ERightHanded );
                    }
                    break;
                }
            }
View Full Code Here

Examples of hudson.plugins.im.bot.Bot

      // get rid of old messages:
      while (groupChat.pollMessage() != null) {
      }

      this.bots.add(new Bot(new JabberMultiUserChat(groupChat, this, !chat.isNotificationOnly()),
          this.groupChatNick, this.desc.getHost(),
          this.botCommandPrefix, this.authentication));

      groupChatCache.put(chat.getName(), new WeakReference<MultiUserChat>(groupChat));
    }
View Full Code Here

Examples of hudson.plugins.im.bot.Bot

        return c;
      }
    }
   
    final Chat chat = ChatManager.getInstanceFor(this.connection).createChat(chatPartner, null);
    Bot bot = new Bot(new JabberChat(chat, this), this.groupChatNick,
          this.desc.getHost(), this.botCommandPrefix, this.authentication);
    this.bots.add(bot);
   
    if (msg != null) {
      // replay original message:
      bot.onMessage(new JabberMessage(msg, isAuthorized(msg.getFrom())));
    }
    chatCache.put(chatPartner, new WeakReference<Chat>(chat));
    return chat;
  }
View Full Code Here

Examples of org.rsbot.bot.Bot

  }

  private void checkData() {
    if (uidData != null) {
      if (client == null) {
        final Bot b = Application.getBot(this);
        if (b == null) {
          return;
        }
        client = b.getClient();
      }
      final String accountName = client != null ? client.getCurrentUsername() : "";

      if (!uidData.getLastUsed().equals(accountName) && data != null) {
        uidData.setUID(uidData.getLastUsed(), data);
View Full Code Here

Examples of org.rsbot.bot.Bot

            option, JOptionPane.QUESTION_MESSAGE, null, null, pretext);
        if (!(key == null || key.trim().isEmpty())) {
          ScriptDownloader.save(key);
        }
      } else if (option.equals(Messages.RUNSCRIPT)) {
        final Bot current = getCurrentBot();
        if (current != null) {
          showScriptSelector(current);
        }
      } else if (option.equals(Messages.STOPSCRIPT)) {
        final Bot current = getCurrentBot();
        if (current != null) {
          showStopScript(current);
        }
      } else if (option.equals(Messages.PAUSESCRIPT)) {
        final Bot current = getCurrentBot();
        if (current != null) {
          pauseScript(current);
        }
      } else if (option.equals(Messages.SAVESCREENSHOT)) {
        final Bot current = getCurrentBot();
        if (current != null && current.getMethodContext() != null) {
          ScreenshotUtil.saveScreenshot(current, current.getMethodContext().game.isLoggedIn());
        }
      } else if (option.equals(Messages.HIDE)) {
        setTray();
      } else if (option.equals(Messages.EXIT)) {
        cleanExit();
      }
    } else if (menu.equals(Messages.EDIT)) {
      if (option.equals(Messages.ACCOUNTS)) {
        AccountManager.getInstance().showGUI();
      } else {
        final Bot current = getCurrentBot();
        if (current != null) {
          if (option.equals(Messages.FORCEINPUT)) {
            current.overrideInput = ((JCheckBoxMenuItem) evt.getSource()).isSelected();
            updateScriptControls();
          } else if (option.equals(Messages.LESSCPU)) {
            current.disableRendering = ((JCheckBoxMenuItem) evt.getSource()).isSelected();
          } else if (option.equals(Messages.DISABLECANVAS)) {
            current.disableGraphics = ((JCheckBoxMenuItem) evt.getSource()).isSelected();
          } else if (option.equals(Messages.EXTDVIEWS)) {
            menuBar.setExtendedView(((JCheckBoxMenuItem) evt.getSource()).isSelected());
          } else if (option.equals(Messages.DISABLEANTIRANDOMS)) {
            current.disableRandoms = ((JCheckBoxMenuItem) evt.getSource()).isSelected();
          } else if (option.equals(Messages.DISABLEAUTOLOGIN)) {
            current.disableAutoLogin = ((JCheckBoxMenuItem) evt.getSource()).isSelected();
          } else if (option.equals(Messages.DISABLETHEME)) {
            Preferences.getInstance().theme = !((JCheckBoxMenuItem) evt.getSource()).isSelected();
            log.info("Themes will be " + (Preferences.getInstance().theme ? "enabled" : "disabled") + " next time you run the application");
          } else if (option.equals(Messages.DISABLEADS)) {
            Preferences.getInstance().hideAds = ((JCheckBoxMenuItem) evt.getSource()).isSelected();
          }
        }
      }
    } else if (menu.equals(Messages.VIEW)) {
      final Bot current = getCurrentBot();
      final boolean selected = ((JCheckBoxMenuItem) evt.getSource()).isSelected();
      if (option.equals(Messages.HIDETOOLBAR)) {
        toggleViewState(toolBar, selected);
      } else if (option.equals(Messages.HIDELOGPANE)) {
        toggleViewState(textScroll, selected);
      } else if (current != null) {
        if (option.equals(Messages.ALLDEBUGGING)) {
          for (final String key : BotMenuBar.DEBUG_MAP.keySet()) {
            final Class<?> el = BotMenuBar.DEBUG_MAP.get(key);
            if (menuBar.getCheckBox(key).isVisible()) {
              final boolean wasSelected = menuBar.getCheckBox(key).isSelected();
              menuBar.getCheckBox(key).setSelected(selected);
              if (selected) {
                if (!wasSelected) {
                  current.addListener(el);
                }
              } else {
                if (wasSelected) {
                  current.removeListener(el);
                }
              }
            }
          }
        } else {
          final Class<?> el = BotMenuBar.DEBUG_MAP.get(option);
          menuBar.getCheckBox(option).setSelected(selected);
          if (selected) {
            current.addListener(el);
          } else {
            menuBar.getCheckBox(Messages.ALLDEBUGGING).setSelected(false);
            current.removeListener(el);
          }
        }
      }
    } else if (menu.equals(Messages.TOOLS)) {
      if (option.equals(Messages.LICENSES)) {
        log.warning("License manager coming soon");
      }
    } else if (menu.equals(Messages.HELP)) {
      if (option.equals(Messages.SITE)) {
        openURL(Configuration.Paths.URLs.SITE);
      } else if (option.equals(Messages.PROJECT)) {
        openURL(Configuration.Paths.URLs.PROJECT);
      } else if (option.equals(Messages.LICENSE)) {
        openURL(Configuration.Paths.URLs.LICENSE);
      } else if (option.equals(Messages.ABOUT)) {
        JOptionPane.showMessageDialog(this, new String[]{
            "An open source bot developed by the community.",
            "",
            "RuneScape® is a trademark of Jagex © 1999 - 2011 Jagex, Ltd.",
            "RuneScape content and materials are trademarks and copyrights of Jagex or its licensees.",
            "This program is issued with no warranty and is not affiliated with Jagex Ltd., nor do they endorse usage of our software.",
            "",
            "Visit " + Configuration.Paths.URLs.SITE + "/ for more information."},
            option,
            JOptionPane.INFORMATION_MESSAGE);
      }
    } else if (menu.equals("Tab")) {
      final Bot curr = getCurrentBot();
      menuBar.setBot(curr);
      panel.setBot(curr);
      panel.repaint();
      toolBar.setHome(curr == null);
      setTitle(curr == null ? null : curr.getAccountName());
      updateScriptControls();
    }
  }
View Full Code Here

Examples of org.rsbot.bot.Bot

    }
  }

  public void updateScriptControls() {
    boolean idle = true, paused = false;
    final Bot bot = getCurrentBot();

    if (bot != null) {
      final Map<Integer, LoopTask> scriptMap = bot.getScriptHandler().getRunningScripts();
      if (scriptMap.size() > 0) {
        idle = false;
        paused = scriptMap.values().iterator().next().isPaused();
      } else {
        idle = true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.