private void FashionBotModuleMain_OnSimConnected(object sender, SimConnectedEventArgs e)
 {
     EnumerateClothing();
     if (ClothingFolderFolders.Count>0)
     {
         StartRotatingClothing();
     }
 }
Example #2
0
        /// <summary>
        /// Handler when the bot is connected to the server
        /// </summary>
        /// <param name="sender">Client that was connected</param>
        /// <param name="e">Parameters of the result of the connection</param>
        private void Network_OnConnected(object sender, SimConnectedEventArgs e)
        {
            Console.WriteLine("The bot is connected");
            //Client.CurrentDirectory = Inventory.Store.RootFolder;
            Client.Self.Movement.AlwaysRun = false;
            Client.Network.SimChanged += new EventHandler<SimChangedEventArgs>(Network_SimChanged);
            Client.Network.EventQueueRunning += new EventHandler<EventQueueRunningEventArgs>(Network_EventQueueRunning);
            //LoadOutfit("Clothing/" + FirstName + " " + LastName);
            System.Threading.Thread.Sleep(3000);

            float rad = (float)DegreeToRadian(Angle);

            Console.WriteLine("angulo: " + Angle + " - rad: " + rad);
            Client.Self.Movement.BodyRotation = Quaternion.CreateFromEulers(0, 0, (float)DegreeToRadian(Angle));
            //client.Objects.AvatarUpdate += new EventHandler<AvatarUpdateEventArgs>(Objects_AvatarUpdate);
        }
 ///<summary>Raises the SimConnected Event</summary>
 /// <param name="e">A SimConnectedEventArgs object containing
 /// the data sent from the simulator</param>
 protected virtual void OnSimConnected(SimConnectedEventArgs e)
 {
     EventHandler<SimConnectedEventArgs> handler = m_SimConnected;
     if (handler != null)
         handler(this, e);
 }
Example #4
0
        private void Ensure_Downloaded(object sender, SimConnectedEventArgs e)
        {
            if (!GleanAssetsFromInventory) return;
            if (ensuredDownloadAssetFoldersComplete) return;
            ensuredDownloadAssetFoldersComplete = true;
            Inventory = Manager.Store;
            Inventory.InventoryObjectAdded += Store_OnInventoryObjectAdded;
            Inventory.InventoryObjectUpdated += Store_OnInventoryObjectUpdated;
            Inventory.InventoryObjectRemoved += Store_OnInventoryObjectRemoved;
            Enqueue((DownloadAssetFolders));
            taskQueue.Start();

        }
Example #5
0
 public void Network_SimConnected(object sender, SimConnectedEventArgs args)
 {
     m_log.DebugFormat(
         "[BOT]: Bot {0} connected to region {1} at {2}", Name, args.Simulator.Name, args.Simulator.IPEndPoint);
 }
Example #6
0
File: Bot.cs Project: 4U2NV/opensim
 public void Network_SimConnected(object sender, SimConnectedEventArgs args)
 {
 }
Example #7
0
 public void foo(object sender, SimConnectedEventArgs e)
 {
     BotClient c = Store.Client;
     c.Network.SimConnected -= foo;
     lock (this)
         if (PullServerAsset)
         {
             PullServerAsset = false;
         }
     if (e.Simulator == c.Network.CurrentSim)
     {
         MakeRequest();
     }
 }
Example #8
0
        void Network_SimConnected(object sender, SimConnectedEventArgs e)
        {
            Logger.Log("New sim connection from " + e.Simulator.Name, Helpers.LogLevel.Info);


            if (client.Network.CurrentSim.Handle == e.Simulator.Handle)
            {
                Logger.Log("Current sim connection, we are now in " + e.Simulator.Name, Helpers.LogLevel.Info);

            }
        }
Example #9
0
 void Network_OnSimConnected(object sender, SimConnectedEventArgs e)
 {
     ExpectConnected = true;
     var simulator = e.Simulator;
     if (simulator == Network.CurrentSim)
     {
         if (!Settings.SEND_AGENT_APPEARANCE)
         {
             Appearance.RequestAgentWearables();
         }
         Self.RequestMuteList();
     }
     if (Self.AgentID != UUID.Zero)
     {
         SetSecurityLevel(Self.AgentID, Self.Name, BotPermissions.Owner);
     }
     SendNetworkEvent("On-Simulator-Connected", simulator);
     //            SendNewEvent("on-simulator-connected",simulator);
 }
Example #10
0
 /// <summary>
 /// Handler when the bot is connected to the server
 /// </summary>
 /// <param name="sender">Client that was connected</param>
 /// <param name="e">Parameters of the result of the connection</param>
 private void Network_OnConnected(object sender, SimConnectedEventArgs e)
 {
     Console.WriteLine("The bot is connected");
     Client.Self.Movement.AlwaysRun = false;
     System.Threading.Thread.Sleep(3000);
     //client.Objects.AvatarUpdate += new EventHandler<AvatarUpdateEventArgs>(Objects_AvatarUpdate);
 }
 void Network_SimConnected(object sender, SimConnectedEventArgs e)
 {
     Console.Write("Connected to simulator\n");
 }
Example #12
0
 public virtual void Network_OnSimConnected(object sender, SimConnectedEventArgs e) { OnEvent("On-Sim-Connected", paramNamesOnSimConnected, paramTypesOnSimConnected, e); }
 public override void Network_OnSimConnected(object sender, SimConnectedEventArgs e)
 {
     Simulator simulator = e.Simulator;
     EnsureSimulator(simulator);
 }
 public void Network_OnSimConnectedHook(object sender, SimConnectedEventArgs e)
 {
     Simulator simulator = e.Simulator;
     ///base.Network_OnSimConnected(simulator);
     lock (WorldObjectsMasterLock)
     {
         if (simulator.Handle == 0)
         {
             Debug("Simulator Handle==0 for " + simulator);
             return;
         }
         EnsureSimulator(simulator);
         IsConnected = true;
         if (SimRegion.IsMaster(simulator, client.gridClient))
         {
             Debug("---SIMMASTER---------" + client + " region: " + simulator);
             SetWorldMaster(true);
             SimMaster[simulator.Handle] = this;
             //client.Grid.RequestMapRegion(simulator.Name, GridLayerType.Objects);
             if (simulator.Name.Length > 0)
             {
                 client.Grid.RequestMapRegion(simulator.Name, GridLayerType.Terrain);
             } else 
             {
                 Debug("no sim bname "+simulator);
             }
             client.Estate.RequestInfo();
             //client.Grid.RequestMapRegion(simulator.Name, GridLayerType.LandForSale);
             //client.Grid.RequestMapItems(simulator.Handle,OpenMetaverse.GridItemType.Classified,GridLayerType.Terrain);
             MasteringRegions.Add(simulator.Handle);
             var MaintainSimCollisionsList = WorldPathSystem.MaintainSimCollisionsList;
             if (simulator == client.Network.CurrentSim)
             {
                 lock (MaintainSimCollisionsList)
                 {
                     if (!MaintainSimCollisionsList.Contains(simulator.Handle))
                     {
                         MaintainSimCollisionsList.Add(simulator.Handle);
                     }
                 }
             }
             //RequestGridInfos(simulator.Handle);
         }
         else
         {
             Debug("-----NOT SIMMASTER-------" + client + " region: " + simulator);
             MasteringRegions.Remove(simulator.Handle);
             if (MasteringRegions.Count == 0)
             {
                 SetWorldMaster(false);
                 Debug("------UNREGISTERING------" + client);
             }
         }
     }
     if (simulator == client.Network.CurrentSim)
     {
         StartupPostLoginQueues();
         // new Thread(() => client.Appearance.SetPreviousAppearance(true)).Start();
     }
     //if (simulator == client.Network.CurrentSim) { new Thread(() => { Thread.Sleep(30000); client.Appearance.SetPreviousAppearance(true); }).Start(); }
 }