Examples of Sign


Examples of games.stendhal.server.entity.mapstuff.sign.Sign

    exit.setPosition(17, 20);
    exit.setIdentifier(Integer.valueOf(0));
    exit.setDestination(entranceZoneName, Integer.valueOf(0));
    zone.add(exit);

    final Sign sign = new Sign();
    sign.setPosition(96, 102);
    sign.setText("If the door is closed, you will have to wait a short time until the last player finishes his task.");
    entranceZone.add(sign);
  }
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.sign.Sign

  /**
   * creates the hall of fame sign
   */
  private void createHallOfFameSign() {
    sign = new Sign();
    sign.setPosition(94, 110);
    StendhalRPZone zone = SingletonRepository.getRPWorld().getZone("0_semos_mountain_n2");
    zone.add(sign);
    updateQuest();
  }
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.sign.Sign

    } catch (final NumberFormatException e) {
      sandbox.privateText(player, "Please specify a number");
      return;
    }

    final Sign sign = storage.get(Integer.valueOf(i));
    if (sign != null) {
      storage.remove(Integer.valueOf(i));
      sandbox.remove(sign);
      final StringBuilder sb = new StringBuilder();
      sb.append("Removed sign ");
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.sign.Sign

    final StringBuilder sb = new StringBuilder();
    sb.append("Listing signs:");

    int i = 1;
    while (i <= signcounter) {
      final Sign sign = storage.get(Integer.valueOf(i));
      if (sign != null) {
        sb.append("\r\n");
        sb.append(i);
        sb.append(". ");
        signToString(sb, sign);
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.sign.Sign

    npc.setPosition(10, 4);
    npc.initHP(100);
    zone.add(npc);

    // Add a book with the shop offers
    final Sign book = new Sign();
    book.setPosition(12, 3);
    book.setText(" -- Buying -- \n steel boots\t 1000\n golden boots\t 1500\n shadow boots\t 2000\n stone boots\t 2500\n chaos boots\t 4000\n green thing boots\t 6000\n xeno boots\t 8000");
    book.setEntityClass("book_blue");
    book.setResistance(10);
    zone.add(book);

    final Sign book2 = new Sign();
    book2.setPosition(13, 4);
    book2.setText(" -- Buying -- \n golden helmet\t 3000\n shadow helmet\t 4000\n horned golden helmet 5000\n chaos helmet\t 6000\n magic chain helmet\t 8000\n black helmet\t 10000");
    book2.setEntityClass("book_red");
    book2.setResistance(10);
    zone.add(book2);
  }
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.sign.Sign

    walkblocker.setPosition(2, 5);
    walkblocker
        .setDescription("You see a wastebin, handily placed for items you wish to dispose of.");
    add(walkblocker);
    // Add a sign explaining about equipped items
    final Sign book = new Sign();
    book.setPosition(2, 2);
    book
        .setText("Items left on the ground will be returned to you when you leave the vault, as it is assumed they were equipped by mistake. There is a wastebin provided below for anything you want to throw away. It will be emptied automatically when you leave the vault.");
    book.setEntityClass("book_blue");
    book.setResistance(0);
    add(book);
    disallowIn();
    this.addMovementListener(new VaultMovementListener());
  }
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.sign.Sign

    ricardo.setPrizes(prizes);

    final StendhalRPZone zone = ricardo.getZone();

    Sign blackboard = new Sign();
    blackboard.setPosition(25, 0);
    blackboard.setEntityClass("blackboard");
    StringBuilder prizelistBuffer = new StringBuilder("PRIZES:\n");
    for (int i = 18; i >= 13; i--) {
      prizelistBuffer.append("\n" + i + ": " + prizes.get(i).first());
    }
    blackboard.setText(prizelistBuffer.toString());
    zone.add(blackboard);

    blackboard = new Sign();
    blackboard.setPosition(26, 0);
    blackboard.setEntityClass("blackboard");
    prizelistBuffer = new StringBuilder("PRIZES:\n");
    for (int i = 12; i >= 7; i--) {
      prizelistBuffer.append("\n" + i + ": " + prizes.get(i).first());
    }
    blackboard.setText(prizelistBuffer.toString());
    zone.add(blackboard);

    ricardo.add(ConversationStates.ATTENDING, "play", null,
        ConversationStates.QUESTION_1,
        "In order to play, you have to stake " + STAKE
View Full Code Here

Examples of opennlp.ccg.synsem.Sign

            // parse it
            System.out.println(line);
      parser.parse(line);
      int numParses = Math.min(nbestListSize, parser.getResult().size());
      for (int i=0; i < numParses; i++) {
          Sign thisParse = parser.getResult().get(i);
          // convert lf
          Category cat = thisParse.getCategory();
          LF convertedLF = null;
          String predInfo = null;
          if (cat.getLF() != null) {
        // convert LF
        LF flatLF = cat.getLF();
        cat = cat.copy();
        Nominal index = cat.getIndexNominal();
        convertedLF = HyloHelper.compactAndConvertNominals(flatLF, index, thisParse);
        // get pred info
        predInfoMap.clear();
        Testbed.extractPredInfo(flatLF, predInfoMap);
        predInfo = Testbed.getPredInfo(predInfoMap);
          }
          // add test item, sign
          Element item = RegressionInfo.makeTestItem(grammar, line, 1, convertedLF);
          String actualID = (nbestListSize == 1) ? id : id + "-" + (i+1);
          item.setAttribute("info", actualID);
          outRoot.addContent(item);
          signMap.put(actualID, thisParse);
          // Add parsed words as a separate LF element
          Element fullWordsElt = new Element("full-words");
          fullWordsElt.addContent(tokenizer.format(thisParse.getWords()));
          item.addContent(fullWordsElt);
          if (predInfo != null) {
        Element predInfoElt = new Element("pred-info");
        predInfoElt.setAttribute("data", predInfo);
        item.addContent(predInfoElt);
View Full Code Here

Examples of org.boris.expr.function.excel.SIGN

        assertEquals(eval(r, -3.14159, 1), -3.2);
        assertEquals(eval(r, 31415.92654, -2), 31500.);
    }

    public void testSIGN() throws Exception {
        SIGN s = new SIGN();
        assertEquals(eval(s, 10), 1.);
        assertEquals(eval(s, 4 - 4), 0.);
        assertEquals(eval(s, -0.00001), -1.);
    }
View Full Code Here

Examples of org.bukkit.block.Sign

    @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
    public void onSignChange(SignChangeEvent e){
        Player player = e.getPlayer();

        Sign sign = (Sign) e.getBlock().getState();
        String[] lines = e.getLines();
        String function = lines[0].toLowerCase();

        if (function.equals("[balance]")){
            if (Permissions.checkPerms(player, "cex.sign.create.balance")){
                if (!lines[1].equals("") || !lines[2].equals("") || !lines[3].equals("")){
                    LogHelper.showWarning("commandSignInvalid", player);
                    sign.getBlock().breakNaturally();
                } else {
                    LogHelper.showInfo("commandSignBalance", player, ChatColor.GREEN);
                }
            } else {
                sign.getBlock().breakNaturally();
            }
        } else if (function.equals("[pay]")){
            if (Permissions.checkPerms(player, "cex.sign.create.pay")){
                if (lines[1].equals("")){
                    LogHelper.showWarning("commandSignInvalid", player);
                    sign.getBlock().breakNaturally();
                } else {
                    if (lines[2].equals("")){
                        e.setLine(2, player.getName());
                    }

                    try {
                        double amount = Double.parseDouble(lines[1]);
                        e.setLine(1, Economy.fixDecimals(amount));
                        LogHelper.showInfo("commandSignPay", player, ChatColor.GREEN);
                    } catch (NumberFormatException ex){
                        LogHelper.showWarning("commandSignInvalid", player);
                        sign.getBlock().breakNaturally();
                    }
                }
            }
        } else if (function.equals("[item]")){
            if (Permissions.checkPerms(player, "cex.sign.create.item")){
                if (lines[1].equals("")){
                    LogHelper.showWarning("commandSignInvalid", player);
                    sign.getBlock().breakNaturally();
                } else {
                    String[] data = lines[1].split(":");
                    List<Material> matches = ClosestMatches.material(data[0]);
                    Material material = (matches.size() > 0 ? matches.get(0) : null);
                    if (material == null){
                        LogHelper.showWarning("itemNotFound", player);
                        sign.getBlock().breakNaturally();
                    } else {
                        if (data.length > 0){
                            if (data.length != 2){
                                LogHelper.showWarning("commandSignInvalid", player);
                                sign.getBlock().breakNaturally();
                            } else {
                                if (material == Material.WOOL || material == Material.INK_SACK){
                                    List<DyeColor> dyeMatches = ClosestMatches.dyeColor(data[1]);
                                    DyeColor dye = (dyeMatches.size() > 0 ? dyeMatches.get(0) : null);
                                    if (dye == null){
                                        LogHelper.showWarning("commandSignInvalid", player);
                                        sign.getBlock().breakNaturally();
                                        return;
                                    } else {
                                        e.setLine(1, WordUtils.capitalize(material.name().toLowerCase().replaceAll("_", ""))  + ":" + WordUtils.capitalize(dye.toString().toLowerCase().replaceAll("_", "")));
                                    }
                                } else {
                                    if (!data[1].matches(CommandsEX.intRegex)){
                                        LogHelper.showWarning("commandSignInvalid", player);
                                        sign.getBlock().breakNaturally();
                                        return;
                                    } else {
                                        e.setLine(1, WordUtils.capitalize(material.name().toLowerCase().replaceAll("_", "")));
                                    }
                                }
                            }
                        }
                       
                        if (lines[2].equals("")){
                            e.setLine(2, String.valueOf(1));
                        } else {
                            try {
                                Integer.parseInt(lines[2]);

                                if (!lines[3].equals("")){
                                    try {
                                        double amount = Double.parseDouble(lines[3]);

                                        e.setLine(3, Economy.fixDecimals(amount));
                                    } catch (NumberFormatException ex1){
                                        LogHelper.showWarning("commandSignInvalid", player);
                                        sign.getBlock().breakNaturally();
                                        return;
                                    }
                                }
                            } catch (NumberFormatException ex){
                                LogHelper.showWarning("commandSignInvalid", player);
                                sign.getBlock().breakNaturally();
                                return;
                            }
                        }

                        LogHelper.showInfo("commandSignItem", player, ChatColor.GREEN);
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.