//--------------------------------------------------------------------------------------------- // Color: 0x0B77 Graphic: 0x0F09 public static void TimerElapsed(object sender, System.Timers.ElapsedEventArgs e) { counter += 50; if (lastLocation != null && Invis.GetRelativeVectorLength(World.Player.X, World.Player.Y, lastLocation.X, lastLocation.Y) > 4) { World.Player.PrintMessage("[Detect.. Hide!]", Game.Val_GreenBlue); Stop(); Game.Wait(75); Hiding.CraftBandana(); return; } if (counter % 1000 == 0) { Game.PrintMessage(String.Format("Bandana ETA: {0:N1}", ((time - counter) / 1000.0m)), Game.Val_LightPurple); } if (counter >= time) { Stop(); return; } lastLocation = new LastLocation(World.Player.X, World.Player.Y); }
public async Task TeleportAsync(Position pos) { var last = LastLocation.ToChunkCoord(); var toChunk = pos.ToChunkCoord(); await this.client.Server.World.ResendBaseChunksAsync(this.client.ClientSettings?.ViewDistance ?? 4, last.x, last.z, toChunk.x, toChunk.z, this.client); var tid = Globals.Random.Next(0, 999); await client.Server.Events.InvokePlayerTeleportedAsync( new PlayerTeleportEventArgs ( this, this.Location, pos )); await this.client.QueuePacketAsync(new ClientPlayerPositionLook { Position = pos, Flags = PositionFlags.NONE, TeleportId = tid }); this.TeleportId = tid; }
//--------------------------------------------------------------------------------------------- private static void Stop() { t.Stop(); lastLocation = null; counter = 0; UO.Print(0x0032, "Invis - konec"); }
public static void RunBandana() { t.Stop(); lastLocation = null; UOItem bandana = World.Player.FindType(CraftBandana); if (bandana.Exist)//UO.Backpack.AllItems.FindType(0x0F09, 0x0B77).Exist) { if (bandana.Layer == Layer.Hat) { if (bandana.Move(1, World.Player.Backpack)) { Game.Wait(); } else { Game.PrintMessage("Nepodarilo se sundat bandanu", MessageType.Error); return; } } Game.PrintMessage("Bandana - Start"); t.Start(); } else { Game.PrintMessage("Nemas bandanu", MessageType.Error); } }
public void Deserealize(SerializationInfo info, StreamingContext context) { BeginPoint = (Point)info.GetValue("BeginPoint", BeginPoint.GetType()); LastLocation = (Point)info.GetValue("LastLocation", LastLocation.GetType()); EndPoint = (Point)info.GetValue("EndPoint", EndPoint.GetType()); // calculate = (ICalculate)info.GetValue("calculate", calculate.GetType()); // variable = (IVariable)info.GetValue("variable", variable.GetType()); }
//--------------------------------------------------------------------------------------------- private static void Stop() { t.Stop(); lastLocation = null; counter = 0; Game.PrintMessage("Bandana - Konec"); }
public static LastLocation1 ConvertToDto(LastLocation l) { return(new LastLocation1() { Id = l.Id, UserId = l.UserId, LastLocation = l.LastLocation1, Date = l.Date }); }
public Agent UpdateLocation([NotNull] Location newLocation) { LastUpdate = DateTime.Now; if (LastLocation is null) { LastLocation = newLocation; } else { LastLocation.UpdateFrom(newLocation); } return(this); }
public static void RunInvis(int eat) { eatFish = eat; t.Stop(); lastLocation = null; //counter = 0; if (UO.Backpack.AllItems.FindType(0x0F09, 0x0B77).Exist) { UO.Print(0x0032, "Invis - Start"); t.Start(); } else { UO.Print(0x0032, "Invis - Nemas invisku!!"); } }
//--------------------------------------------------------------------------------------------- // Color: 0x0B77 Graphic: 0x0F09 public static void TimerElapsed(object sender, System.Timers.ElapsedEventArgs e) { counter += 50; if (lastLocation != null && GetRelativeVectorLength(World.Player.X, World.Player.Y, lastLocation.X, lastLocation.Y) > 4) { UO.Print(0x0032, "Kop detect! Hide"); Stop(); UO.Wait(Core.CurrentLatency + 75); UO.UseType(0x0F09, 0x0B77); for (int i = 0; i < eatFish; i++) { if (World.Player.Backpack.AllItems.FindType(0x09CD, 0x084C).Exist) { UO.Wait(400); UO.UseType(0x09CD, 0x084C); } else { break; } } eatFish = 0; return; } if (counter % 1000 == 0) { UO.Print(0x0032, String.Format("Invis ETA: {0:N1}", ((time - counter) / 1000.0m))); } if (counter >= time) { Stop(); eatFish = 0; return; } lastLocation = new LastLocation(World.Player.X, World.Player.Y); }
public Edge(SerializationInfo info, StreamingContext context) { FlagVisible = 0; region = new Region(); ForInvalidate = new GraphicsPath(); variable = null; calculate = null; pen = new Pen(Color.Black, 7); PathLine = new GraphicsPath(); BeginEllips = new GraphicsPath(); EndEllips = new GraphicsPath(); BeginPoint = (Point)info.GetValue("BeginPoint", BeginPoint.GetType()); EndPoint = (Point)info.GetValue("EndPoint", EndPoint.GetType()); LastLocation = (Point)info.GetValue("LastLocation", LastLocation.GetType()); try { calculate = (ICalculate)info.GetValue("calculate", ((BaseControl)calculate).GetType()); } catch { calculate = null; } try { variable = (IVariable)info.GetValue("variable", variable.GetType()); } catch { variable = null; } BeginEllips.AddEllipse(BeginPoint.X - 10, BeginPoint.Y - 10, 20, 20); PathLine.AddLine(BeginPoint, EndPoint); EndEllips.AddEllipse(EndPoint.X - 10, EndPoint.Y - 10, 20, 20); if (Move != null) { Move(this, BeginPoint, EndPoint); } }
public Task <Android.Locations.Location> GetLastLocationAsync() { return(LastLocation.AsAsync <Android.Locations.Location>()); }
//Delete האם יש למחוק קודם מהטבלאות שהוא נמצא בהן בקשרי גומלין public static void DeleteLastLocation(LastLocation1 lastLocation) { LastLocation newlastLocation = LastLocationConvertor.ConvertToDL(lastLocation); LastLocationDL.DeleteLastLocation(newlastLocation); }