ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Fuentes para bots


Enviado por   •  3 de Noviembre de 2014  •  Informes  •  254 Palabras (2 Páginas)  •  308 Visitas

Página 1 de 2

Fuentes para bots

Bot Mascota

Este bot te sigue a todo lugar con unas instrucciones determinadas

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using OpenMetaverse;

namespace Bot3

{

class Program

{

public static GridClient Client =new GridClient();

private static string first_name = "javf1";

private static string last_name ="javf2";

private static string password ="javf";

private static float followDistance = 5;

public static bool followon = false;

public static string followName ="george andrew";

static void Main(string[] args)

{

Client.Network.OnConnected +=new NetworkManager.ConnectedCallback(Network_OnConnected);

Client.Settings.LOGIN_SERVER = "http://192.168.162.1:9000";

if (Client.Network.Login(first_name, last_name, password,"Program","javf"))

{

Client.Appearance.SetPreviousAppearance(true);

Client.Self.OnChat += new AgentManager.ChatCallback(Self_OnChat);

Client.Objects.OnObjectUpdated +=new ObjectManager.ObjectUpdatedCallback(Objects_OnObjectUpdated);

}

else

{

Console.WriteLine("Yo no puedo conectarme aqui, es porque: "+Client.Network.LoginMessage);

Console.WriteLine("Presione cualqueir tecla para cerrar...");

Console.ReadLine();

}

}

static void Network_OnConnected(object sender)

{

Console.WriteLine("Yo estoy conectado al simulador, Yo voy a saludar a todo elmundo alrededor mio");

Client.Self.Chat("Hola a todo el mundo!", 0,ChatType.Normal);

Console.ReadLine();

Console.WriteLine("Ahora yo voy a desconectarme de SL.. Adios!");

Client.Network.Logout();

Console.WriteLine("Yo estoy desconectado, por favor presione enter para cerrar...");

Console.ReadLine();

}

static void Objects_OnObjectUpdated(Simulator simulator,ObjectUpdate update, ulongregionHandle,ushort timeDilation)

{

if (followon ==true)

{

if

...

Descargar como (para miembros actualizados)  txt (3.3 Kb)  
Leer 1 página más »
Disponible sólo en Clubensayos.com