void vp_OnChatMessage(Instance sender, ChatMessageEventArgsT <Avatar <Vector3>, ChatMessage, Vector3, Color> args) { if (args.ChatMessage.Message == "!teleport") { args.Avatar.Position = new Vector3(100, 0, 100); args.Avatar.Rotation = new Vector3(90, 0, 0); sender.TeleportAvatar(args.Avatar); } }
/// <summary> /// Called when a chat message arrives. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The args.</param> void vp_OnChatMessage(Instance sender, ChatMessageEventArgsT <Avatar, ChatMessage> args) { // Write a serialized version showing all the data of the chat message event using VpNet.Extension methods. Console.WriteLine("Chat message received.\r\n{0}", args.Serialize()); if (args.ChatMessage.Message.ToLower().StartsWith("!consoletest")) { // test a console message in pretty pink :) sender.ConsoleMessage("Hello", "World", new Color(255, 64, 128)); } }
void OnChatMessage(Instance sender, ChatMessageEventArgsT <Avatar <Vector3>, ChatMessage, Vector3, Color> args) { if (args.ChatMessage.Message.ToLower().StartsWith("//sendurl")) { var items = args.ChatMessage.Message.Split(' '); if (items.Length < 2 || items.Length > 2) { sender.ConsoleMessage(args.Avatar, "sendurl", "Please use in the form of: //sendurl <yoururl>", new Color(255, 0, 0), TextEffectTypes.Bold); } else { sender.UrlSendOverlay(args.Avatar, items[1]); } } }
void vp_OnChatMessage(Instance sender, ChatMessageEventArgsT <Avatar, ChatMessage> args) { if ((args.ChatMessage.Type == ChatMessageTypes.Console && args.Avatar.Name == "interchat")) { return; } foreach (var vp in _instances) { if (vp.Configuration.World.Name != sender.Configuration.World.Name) { vp.ConsoleMessage(args.ChatMessage.Name, string.Format("[{0}] {1}", sender.Configuration.World.Name, args.ChatMessage.Message), new Color(64, 64, 64)); vp.Wait(); } } }
void OnChatMessage(Instance sender, ChatMessageEventArgsT <Avatar, ChatMessage> args) { args.Serialize().AppendTextFile(LogName(args.GetType())); }
void OnChatMessage(Instance sender, ChatMessageEventArgsT <Avatar, ChatMessage> args) { Console.WriteLine(ConsoleMessageType.Information, string.Format(">{0}{1}", args.ChatMessage.Name.PadRight(17), args.ChatMessage.Message)); }
static void vp_OnChatMessage(Instance sender, ChatMessageEventArgsT<Avatar<Vector3>, ChatMessage, Vector3, Color> args) { Console.WriteLine("{0} : {1}", args.ChatMessage.Name, args.ChatMessage.Message); //displays chat on console window }
public void OnChatMessage(VpNet.Instance sender, ChatMessageEventArgsT <Avatar <VpNet.Vector3>, ChatMessage, VpNet.Vector3, VpNet.Color> args) { _caller.onChatMessage(args); }