Examples of WalkerRoutePoint


Examples of lineage2.gameserver.templates.npc.WalkerRoutePoint

            Location loc = Location.parse(nextElement);
            NpcString phrase = nextElement.attributeValue("phrase_id") == null ? null : NpcString.valueOf(Integer.parseInt(nextElement.attributeValue("phrase_id").toUpperCase()));
            int socialActionId = nextElement.attributeValue("social_action_id") == null ? -1 : Integer.parseInt(nextElement.attributeValue("social_action_id"));
            int delay = nextElement.attributeValue("delay") == null ? 0 : Integer.parseInt(nextElement.attributeValue("delay"));
            boolean running = nextElement.attributeValue("running") == null ? false : Boolean.parseBoolean(nextElement.attributeValue("running"));
            walkerRoute.addPoint(new WalkerRoutePoint(loc, phrase, socialActionId, delay, running));
          }
          template.addWalkerRoute(walkerRoute);
        }
        else if (nodeName.equalsIgnoreCase("random_actions"))
        {
View Full Code Here

Examples of lineage2.gameserver.templates.npc.WalkerRoutePoint

  private void continueWalkerRoute()
  {
    if (_haveWalkerRoute)
    {
         WalkerRoutePoint route = _walkerRoute.getPoint(_currentWalkerPoint);
         if (route == null)
         {
           return;
         }
         NpcInstance actor = getActor();
         int socialActionId = route.getSocialActionId();
         if (socialActionId >= 0)
         {
           actor.broadcastPacket(new L2GameServerPacket[] { new SocialAction(actor.getObjectId(), socialActionId) });
         }
         NpcString phrase = route.getPhrase();
         if (phrase != null)
         {
           Functions.npcSay(actor, phrase, new String[0]);
         }
         moveToNextPoint(route.getDelay());
    }
  }
View Full Code Here

Examples of lineage2.gameserver.templates.npc.WalkerRoutePoint

          actor.stopMove();
        }
        break;
    }
    WalkerRoutePoint route = _walkerRoute.getPoint(_currentWalkerPoint);
    if (route == null)
    {
      return;
    }
    if (route.isRunning())
    {
      actor.setRunning();
    }
    else
    {
      actor.setWalking();
    }
    if (delay > 0)
    {
      addTimer(-1000, route.getLocation(), delay * 1000L);
    }
    else
    {
      moveToLocation(route.getLocation());
    }
  }
 
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.