public void describeAvatarToAI(Avatar avatar) { // string verb; // if (avatar.SittingOn == 0) // verb = "standing"; // else // verb = "sitting"; SimObject A = GetSimObject(avatar); //WriteLine(avatar.Name + " is " + verb + " in " + avatar.CurrentSim.Name + "."); //WriteLine(avatar.Name + " is " + Vector3.Distance(GetSimPosition(), avatar.Position).ToString() + " distant."); client.SendPersonalEvent(SimEventType.MOVEMENT, "on-avatar-dist", A, A.Distance(TheSimAvatar)); SendNewRegionEvent(SimEventType.MOVEMENT, "on-avatar-pos", A, A.GlobalPosition); SendNewRegionEvent(SimEventType.EFFECT, "on-avatar-description", avatar, avatar.GroupName); // botenqueueLispTask("(on-avatar-posture (@\"" + avatar.Name + "\") (@\"" + verb + "\") )"); /* * if (avatar.ProfileProperties.BornOn != null) * WriteLine("Born on: " + avatar.ProfileProperties.BornOn); * if (avatar.ProfileProperties.AboutText != null) * WriteLine("About their second life: " + avatar.ProfileProperties.AboutText); * if (avatar.ProfileProperties.FirstLifeText != null) * WriteLine("About their first life: " + avatar.ProfileProperties.FirstLifeText); * if (avatar.ProfileInterests.LanguagesText != null) * WriteLine("Languages spoken: " + avatar.ProfileInterests.LanguagesText); * if (avatar.ProfileInterests.SkillsText != null) * WriteLine("Skills: " + avatar.ProfileInterests.SkillsText); * if (avatar.ProfileInterests.WantToText != null) * WriteLine("Wants to: " + avatar.ProfileInterests.WantToText); */ }
public bool UseEventSource(Object so) { if (so is SimObject) { SimObject A = (SimObject)so; if (!A.IsRegionAttached) { return(false); } if (A == m_TheSimAvatar) { return(false); } if (A.ID == client.MasterKey) { return(true); } if (A.IsRegionAttached && A.GetName().Contains("ael")) { return(true); } if (A.Distance(TheSimAvatar) > MaintainEffectsDistance) { return(false); } } //return true; return(MaintainEffects); }
//this routine should return -1 if xy and 0 if x==y. // for our sample we'll just use string comparison public int Compare(object x, object y) { SimObject item1 = ((SimObjectListViewItem)x).TheSimObject; SimObject item2 = ((SimObjectListViewItem)y).TheSimObject; if (Origin == null || !Origin.IsRegionAttached) { return(item1.ToString().CompareTo(item2.ToString())); } // SimAvatarImpl av = (SimAvatarImpl)Origin; double distance1 = item1.Distance(Origin); double distance2 = item2.Distance(Origin); if (distance1 == distance2) { return(item1.ToString().CompareTo(item2.ToString())); } return(distance1.CompareTo(distance2)); }