Package net.sf.l2j.gameserver.model.actor.instance

Examples of net.sf.l2j.gameserver.model.actor.instance.L2BoatInstance


    {
      if(!activeChar.isInBoat())
      {
        activeChar.setInBoat(true);
      }
      L2BoatInstance boat = BoatManager.getInstance().GetBoat(_boatId);
      activeChar.setBoat(boat);
      activeChar.setInBoatPosition(_pos);
      activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO_IN_A_BOAT, new L2CharPosition(_pos.getX(),_pos.getY(), _pos.getZ(), 0), new L2CharPosition(_origin_pos.getX(),_origin_pos.getY(),_origin_pos.getZ(), 0));
    }
  }
View Full Code Here


  protected void runImpl()
  {
    L2PcInstance activeChar = getClient().getActiveChar();
    if(activeChar == null)
      return;
        L2BoatInstance boat = BoatManager.getInstance().GetBoat(_id);
        GetOffVehicle Gon = new GetOffVehicle(activeChar,boat,_x,_y,_z);
        activeChar.broadcastPacket(Gon);
  }
View Full Code Here

      String line = null;
      while ((line = lnr.readLine()) != null)
      {
        if (line.trim().length() == 0 || line.startsWith("#"))
          continue;
        L2BoatInstance boat = parseLine(line);
        boat.spawn();
        _staticItems.put(boat.getObjectId(), boat);
        if(Config.DEBUG)
        {
        System.out.println("Boat ID : " + boat.getObjectId());
        }
      }
    }
    catch (FileNotFoundException e)
    {
View Full Code Here

   * @param line
   * @return
   */
  private L2BoatInstance parseLine(String line)
  {
    L2BoatInstance boat;
    StringTokenizer st = new StringTokenizer(line, ";");

    String name = st.nextToken();
    int id = Integer.parseInt(st.nextToken());
    int xspawn = Integer.parseInt(st.nextToken());
    int yspawn = Integer.parseInt(st.nextToken());
    int zspawn = Integer.parseInt(st.nextToken());
    int heading = Integer.parseInt(st.nextToken());

    StatsSet npcDat = new StatsSet();
    npcDat.set("npcId", id);
    npcDat.set("level", 0);
    npcDat.set("jClass", "boat");

    npcDat.set("baseSTR", 0);
    npcDat.set("baseCON", 0);
    npcDat.set("baseDEX", 0);
    npcDat.set("baseINT", 0);
    npcDat.set("baseWIT", 0);
    npcDat.set("baseMEN", 0);

    npcDat.set("baseShldDef", 0);
    npcDat.set("baseShldRate", 0);
    npcDat.set("baseAccCombat", 38);
    npcDat.set("baseEvasRate"38);
    npcDat.set("baseCritRate"38);

    //npcDat.set("name", "");
    npcDat.set("collision_radius", 0);
    npcDat.set("collision_height", 0);
    npcDat.set("sex", "male");
    npcDat.set("type", "");
    npcDat.set("baseAtkRange", 0);
        npcDat.set("baseMpMax", 0);
        npcDat.set("baseCpMax", 0);
    npcDat.set("rewardExp", 0);
    npcDat.set("rewardSp", 0);
    npcDat.set("basePAtk", 0);
    npcDat.set("baseMAtk", 0);
    npcDat.set("basePAtkSpd", 0);
    npcDat.set("aggroRange", 0);
    npcDat.set("baseMAtkSpd", 0);
    npcDat.set("rhand", 0);
    npcDat.set("lhand", 0);
    npcDat.set("armor", 0);
    npcDat.set("baseWalkSpd", 0);
    npcDat.set("baseRunSpd", 0);
    npcDat.set("name", name);
    npcDat.set("baseHpMax", 50000);
    npcDat.set("baseHpReg", 3.e-3f);
    npcDat.set("baseMpReg", 3.e-3f);
    npcDat.set("basePDef", 100);
    npcDat.set("baseMDef", 100);
    L2CharTemplate template = new L2CharTemplate(npcDat);
    boat = new L2BoatInstance(IdFactory.getInstance().getNextId(),template,name);
    boat.getPosition().setHeading(heading);
    boat.setXYZ(xspawn,yspawn,zspawn);
    //boat.spawnMe();

    int IdWaypoint1 = Integer.parseInt(st.nextToken());
    int IdWTicket1 = Integer.parseInt(st.nextToken());
    int ntx1 = Integer.parseInt(st.nextToken());
    int nty1 = Integer.parseInt(st.nextToken());
    int ntz1 = Integer.parseInt(st.nextToken());
    String npc1 = st.nextToken();
    String mess10_1 = st.nextToken();
    String mess5_1 = st.nextToken();
    String mess1_1 = st.nextToken();
    String mess0_1 = st.nextToken();
    String messb_1 = st.nextToken();
    boat.setTrajet1(IdWaypoint1,IdWTicket1,ntx1,nty1,ntz1,npc1,mess10_1,mess5_1,mess1_1,mess0_1,messb_1);
    IdWaypoint1 = Integer.parseInt(st.nextToken());
    IdWTicket1 = Integer.parseInt(st.nextToken());
    ntx1 = Integer.parseInt(st.nextToken());
    nty1 = Integer.parseInt(st.nextToken());
    ntz1 = Integer.parseInt(st.nextToken());
    npc1 = st.nextToken();
    mess10_1 = st.nextToken();
    mess5_1 = st.nextToken();
    mess1_1 = st.nextToken();
    mess0_1 = st.nextToken();
    messb_1 = st.nextToken();
    boat.setTrajet2(IdWaypoint1,IdWTicket1,ntx1,nty1,ntz1,npc1,mess10_1,mess5_1,mess1_1,mess0_1,messb_1);
    return boat;
  }
View Full Code Here

  protected void runImpl()
    {
        L2PcInstance activeChar = getClient().getActiveChar();
        if (activeChar == null) return;

        L2BoatInstance boat = BoatManager.getInstance().GetBoat(_id);
        if (boat == null) return;

        GetOnVehicle Gon = new GetOnVehicle(activeChar,boat,_x,_y,_z);
        activeChar.setInBoatPosition(new Point3D(_x,_y,_z));
        activeChar.getPosition().setXYZ(boat.getPosition().getX(),boat.getPosition().getY(),boat.getPosition().getZ());
        activeChar.broadcastPacket(Gon);
        activeChar.revalidateZone(true);


    }
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.model.actor.instance.L2BoatInstance

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.