Beispiel #1
0
 public static void TargetGameObj(GameObject obj, string lfs)
 {
     // Only can target NPC
     if ((obj.ObjType == DataManager.GameObjectTypes.NPC) &&
         !LuaHelper.TargetUnitByName(obj.Name))
     {
         throw new QuestSkipException("Unable target NPC");
     }
 }
Beispiel #2
0
        public static NPC MoveInteractService(string service, string lfs)
        {
            NpcDest dest = FindNearestService(service);

            if (dest == null)
            {
                throw new ServiceNotFountException(service);
            }

            // Move to NPC
            // If it failed it throw exception. I know :)
            MoveToDest(dest.Waypoint, lfs, "Moving to NPC: '" + dest.Npc.Name + "'");

            // Interact with NPC and select given service
            LuaHelper.TargetUnitByName(dest.Npc.Name);
            InteractNpc(dest.Npc.Name, false, lfs);

            return(dest.Npc);
        }