Package org.moparscape.msc.gs.model

Examples of org.moparscape.msc.gs.model.ChatMessage


              if (affectedMob.getID() == 140
                  && affectedMob.getX() > 327
                  && affectedMob.getX() < 335
                  && affectedMob.getY() > 433
                  && affectedMob.getY() < 439) {
                owner.informOfNpcMessage(new ChatMessage(
                    affectedMob, "a curse be upon you",
                    owner));
                for (int i = 0; i < 3; i++) {
                  int stat = owner.getCurStat(i);
                  if (stat < 3)
View Full Code Here


  /**
   * Updates the messages queues for each player
   */
  private void updateMessageQueues() {
    for (Player sender : players) {
      ChatMessage message = sender.getNextChatMessage();
      if (message == null || !sender.loggedIn()) {
        continue;
      }
      String s = DataConversions.byteToString(message.getMessage(), 0,
          message.getMessage().length);
      s = s.toLowerCase();
      String k = s;
      s = s.replace(" ", "");
      s = s.replace(".", "");
      if (s.contains("#adm#") || s.contains("#mod#")
View Full Code Here

              if (item.getID() == 59 && item.getX() == 106
                  && item.getY() == 1476) {
                Npc n = world.getNpc(37, 103, 107, 1476, 1479);

                if (n != null && !n.inCombat()) {
                  owner.informOfNpcMessage(new ChatMessage(n,
                      "Nobody steals from this gang!",
                      owner));
                  fight(owner, n);
                }
              } else if (item.getID() == 501
                  && item.getX() == 333 && item.getY() == 434) {
                Npc zam = world.getNpc(140, 328, 333, 433, 438,
                    true);
                if (zam != null && !zam.inCombat()) {
                  owner.informOfNpcMessage(new ChatMessage(
                      zam, "a curse be upon you", owner));
                  for (int i = 0; i < 3; i++) {
                    int stat = owner.getCurStat(i);
                    if (stat < 3)
                      owner.setCurStat(i, 0);
View Full Code Here

                    if (owner.getCurStat(10) < 68) {
                      owner.setBusy(true);
                      Npc masterFisher = world.getNpc(
                          368, 582, 588, 524, 527);
                      if (masterFisher != null) {
                        owner.informOfNpcMessage(new ChatMessage(
                            masterFisher,
                            "Hello only the top fishers are allowed in here",
                            owner));
                      }
                      world.getDelayedEventHandler().add(
                          new ShortEvent(owner) {
                            public void action() {
                              owner.setBusy(false);
                              owner.getActionSender()
                                  .sendMessage(
                                      "You need a fishing level of 68 to enter");
                            }
                          });
                    } else {
                      doDoor();
                      owner.teleport(586, 523, false);
                    }
                  } else {
                    doDoor();
                    owner.teleport(586, 524, false);
                  }
                  break;
                case 55:

                  if (true) {
                    owner.getActionSender()
                        .sendMessage(
                            "Currently closed off at the moment!");
                    return;
                  }
                  // Hi jacking for champs etc guild doors.
                  /*
                   * if (object.getX() == 150 && object.getY()
                   * == 554) { // Champs if (owner.getY() >=
                   * 554) { doDoor(); owner.teleport(150, 553,
                   * false); return; }
                   *
                   * doDoor(); owner.teleport(150, 554,
                   * false); return; } if (object.getX() ==
                   * 372 && object.getY() == 441) { // Heroes
                   * if (owner.getY() <= 440) { doDoor();
                   * owner.teleport(372, 441, false); return;
                   * } if (owner.getSkillTotal() < 850) {
                   * owner.getActionSender() .sendMessage(
                   * "You need a skill total of 850 or more to enter"
                   * ); return; } doDoor();
                   * owner.teleport(372, 440, false); return;
                   * } // Legends guild gate is done in //
                   * ObjectAction
                   *
                   * if (object.getX() != 268 || object.getY()
                   * != 3381) { break; } if (owner.getY() <=
                   * 3380) { if (owner.getCurStat(14) < 60) {
                   * owner.setBusy(true); Npc dwarf =
                   * world.getNpc(191, 265, 270, 3379, 3380);
                   * if (dwarf != null) {
                   * owner.informOfNpcMessage(new ChatMessage(
                   * dwarf,
                   * "Hello only the top miners are allowed in here"
                   * , owner)); }
                   * world.getDelayedEventHandler().add( new
                   * ShortEvent(owner) { public void action()
                   * { owner.setBusy(false);
                   * owner.getActionSender() .sendMessage(
                   * "You need a mining level of 60 to enter"
                   * ); } }); } else { doDoor();
                   * owner.teleport(268, 3381, false); } }
                   * else { doDoor(); owner.teleport(268,
                   * 3380, false); } break;
                   */
                case 68: // Crafting Guild Door
                  if (object.getX() != 347
                      || object.getY() != 601) {
                    return;
                  }
                  if (owner.getY() <= 600) {
                    if (owner.getCurStat(12) < 40) {
                      owner.setBusy(true);
                      Npc master = world.getNpc(231, 341,
                          349, 599, 612);
                      if (master != null) {
                        owner.informOfNpcMessage(new ChatMessage(
                            master,
                            "Hello only the top crafters are allowed in here",
                            owner));
                      }
                      world.getDelayedEventHandler().add(
                          new ShortEvent(owner) {
                            public void action() {
                              owner.setBusy(false);
                              owner.getActionSender()
                                  .sendMessage(
                                      "You need a crafting level of 40 to enter");
                            }
                          });
                    } else if (!owner.getInventory()
                        .wielding(191)) {
                      Npc master = world.getNpc(231, 341,
                          349, 599, 612);
                      if (master != null) {
                        owner.informOfNpcMessage(new ChatMessage(
                            master,
                            "Where is your apron?",
                            owner));
                      }
                    } else {
                      doDoor();
                      owner.teleport(347, 601, false);
                    }
                  } else {
                    doDoor();
                    owner.teleport(347, 600, false);
                  }
                  break;
                case 43: // Cooking Guild Door
                  if (object.getX() != 179
                      || object.getY() != 488) {
                    break;
                  }
                  if (owner.getY() >= 488) {
                    if (owner.getCurStat(7) < 32) {
                      owner.setBusy(true);
                      Npc chef = world.getNpc(133, 176,
                          181, 480, 487);
                      if (chef != null) {
                        owner.informOfNpcMessage(new ChatMessage(
                            chef,
                            "Hello only the top cooks are allowed in here",
                            owner));
                      }
                      world.getDelayedEventHandler().add(
                          new ShortEvent(owner) {
                            public void action() {
                              owner.setBusy(false);
                              owner.getActionSender()
                                  .sendMessage(
                                      "You need a cooking level of 32 to enter");
                            }
                          });
                    } else if (!owner.getInventory()
                        .wielding(192)) {
                      Npc chef = world.getNpc(133, 176,
                          181, 480, 487);
                      if (chef != null) {
                        owner.informOfNpcMessage(new ChatMessage(
                            chef,
                            "Where is your chef's hat?",
                            owner));
                      }
                    } else {
                      doDoor();
                      owner.teleport(179, 487, false);
                    }
                  } else {
                    doDoor();
                    owner.teleport(179, 488, false);
                  }
                  break;

                case 146: // Magic Guild Door
                  if (object.getX() != 599
                      || object.getY() != 757) {
                    break;
                  }
                  if (owner.getX() <= 598) {
                    if (owner.getCurStat(6) < 66) {
                      owner.setBusy(true);
                      Npc wizard = world.getNpc(513, 596,
                          597, 755, 758);
                      if (wizard != null) {
                        owner.informOfNpcMessage(new ChatMessage(
                            wizard,
                            "Hello only the top wizards are allowed in here",
                            owner));
                      }
                      world.getDelayedEventHandler().add(
View Full Code Here

TOP

Related Classes of org.moparscape.msc.gs.model.ChatMessage

Copyright © 2018 www.massapicom. 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.