public bool AnimationPlayReverseTick() { if (TimerTools.TimerPassed(frameTimer)) { frameTimer = TimerTools.TimerSet(frameTimeMs); DecrementFrame(); } return(FirstFrame); }
//Animation reverses play direction once reaching and end in a loop. public bool AnimationPlayPingPongTick() { if (TimerTools.TimerPassed(frameTimer)) { frameTimer = TimerTools.TimerSet(frameTimeMs); PingPong(); } return(AtAnEnd); }
//Animation methods return true when on the start/end of the animation. public bool AnimationPlayTick() { if (TimerTools.TimerPassed(frameTimer)) { frameTimer = TimerTools.TimerSet(frameTimeMs); IncrementFrame(); } return(LastFrame); }
public EliteMMOWrapper(int pid) { EliteAPI = new EliteAPI(pid); Navigator = new NavigationTools(EliteAPI); NPC = new NPCTools(EliteAPI); PartyMember = new Dictionary<byte, IPartyMemberTools>(); Player = new PlayerTools(EliteAPI); Target = new TargetTools(EliteAPI); Timer = new TimerTools(EliteAPI); Windower = new WindowerTools(EliteAPI); for (byte i = 0; i < 16; i++) { PartyMember.Add(i, new PartyMemberTools(EliteAPI, i)); } }
public FFACEWrapper(int pid) { FFACE = new FFACE(pid); Navigator = new NavigationTools(FFACE); NPC = new NPCTools(FFACE); PartyMember = new Dictionary<byte, IPartyMemberTools>(); Player = new PlayerTools(FFACE); Target = new TargetTools(FFACE); Timer = new TimerTools(FFACE); Windower = new WindowerTools(FFACE); for (byte i = 0; i < 16; i++) { PartyMember.Add(i, new PartyMemberTools(FFACE, i)); } }
public FFACEWrapper(int pid) { FFACE = new FFACE(pid); Navigator = new NavigationTools(FFACE); NPC = new NPCTools(FFACE); PartyMember = new Dictionary <byte, IPartyMemberTools>(); Player = new PlayerTools(FFACE); Target = new TargetTools(FFACE); Timer = new TimerTools(FFACE); Windower = new WindowerTools(FFACE); for (byte i = 0; i < 16; i++) { PartyMember.Add(i, new PartyMemberTools(FFACE, i)); } }
public EliteMMOWrapper(int pid) { EliteAPI = new EliteAPI(pid); Navigator = new NavigationTools(EliteAPI); NPC = new NPCTools(EliteAPI); PartyMember = new Dictionary <byte, IPartyMemberTools>(); Player = new PlayerTools(EliteAPI); Target = new TargetTools(EliteAPI); Timer = new TimerTools(EliteAPI); Windower = new WindowerTools(EliteAPI); for (byte i = 0; i < 16; i++) { PartyMember.Add(i, new PartyMemberTools(EliteAPI, i)); } }
//test draw function void FormMain_KeyPress(object sender, KeyPressEventArgs e) { //camera settings terrain cameraTest.CameraPosition.X = -(512 * xys) + 5000; cameraTest.CameraPosition.Z = -(512 * xys); cameraTest.CameraPosition.Y = 0; cameraTest.CameraPosition.Angle3 = 270; cameraTest.CameraPosition.Angle1 = -15; //model starting position mopos.X = -(512 * xys) + 4400; mopos.Z = -(512 * xys) + 200; mopos.Y = 100; //fps counter Int64 fpsUpdate = TimerTools.TimerSet(TimerTools.oneSecondMS); //testing while (true) { cameraTest.Clear(); //terrain test testT.Render(cameraTest); cameraTest.CameraPosition.Y = testT.GetHeight(cameraTest.CameraPosition.X, cameraTest.CameraPosition.Z) + 400; //set camera on top of terrain //cameraTest.CameraPosition.Angle3 -= 0.20f; //spin camera //model test mopos.Y = testT.GetHeight(mopos.X, mopos.Z) - 50; //set model on top of terrain mo.Position.Angle3 += 0.2f; //spin model mo.PlayPingPong(); mo.Render(cameraTest); //drawing KeyIO.DrawToScreen(cameraTest.ScreenDepthTexture, this); //performance measuring if (TimerTools.TimerPassed(fpsUpdate)) { fpsUpdate = TimerTools.TimerSet(TimerTools.oneSecondMS); this.Text = TimerTools.FPS.ToString() + " " + TimerTools.FrameDeltaTime.ToString();//cameraTest.CameraPosition.Angle3.ToString(); } TimerTools.FrameTickAll(); } }
public EliteMmoWrapper(int pid) { var eliteApi = new EliteAPI(pid); Navigator = new NavigationTools(eliteApi); NPC = new NpcTools(eliteApi); PartyMember = new Dictionary <byte, IPartyMemberTools>(); Player = new PlayerTools(eliteApi); Target = new TargetTools(eliteApi); Timer = new TimerTools(eliteApi); Windower = new WindowerTools(eliteApi); Chat = new ChatTools(eliteApi); for (byte i = 0; i < 16; i++) { PartyMember.Add(i, new PartyMemberTools(eliteApi, i)); } }
public void Timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { return; TimerTools Timer = new TimerTools(); // 得到 hour minute second 如果等于某个值就开始执行某个程序。 int intHour = e.SignalTime.Hour; int intMinute = e.SignalTime.Minute; int intSecond = e.SignalTime.Second; //定制时间; 比如 在10:30 :00 的时候执行某个函数 //int iHour = 10; //int iMinute = 30; //int iSecond = 00; //设置 每秒钟的开始执行一次 //if (intSecond == iSecond) //{ //} //设置 每个小时的偶数分钟开始执行 if (intMinute % 2 == 0) { Timer.TimerRequest(); string WeekDay = DateTime.Now.DayOfWeek.ToString(); //每周一调用一次 if (WeekDay == "Monday" && intHour == 1 && intMinute == 0) { Timer.TimerSupplyCapacitySend(); Timer.TimerDemandForecastRequest();//获取需求预测 } } //设置 每天的2点发送部件详细数据 if ((intHour == 2 && intMinute == 00)) { Timer.TimerPartDatailsSend(); } if ((intHour == 3 && intMinute == 00)) { Timer.TimerTotalInventorySend(); } }
public EliteMMOWrapper(int pid) { EliteAPI = new EliteAPI(pid); Navigator = new NavigationTools(EliteAPI); NPC = new NPCTools(EliteAPI); PartyMember = new Dictionary <byte, IPartyMemberTools>(); Player = new PlayerTools(EliteAPI); Target = new TargetTools(EliteAPI); Timer = new TimerTools(EliteAPI); Windower = new WindowerTools(EliteAPI); Chat = new ChatTools(EliteAPI); //EliteAPI.Player.GetPlayerInfo().StatsModifiers. for (byte i = 0; i < 16; i++) { PartyMember.Add(i, new PartyMemberTools(EliteAPI, i)); } }
public void AnimationSetToEnd() { frameTimer = TimerTools.TimerSet(frameTimeMs); currentFrame = AnimationLength - 1; }
public void AnimationSetToStart() { frameTimer = TimerTools.TimerSet(frameTimeMs); currentFrame = 0; }
/// <summary> /// Constructor that instantiates FFACE /// </summary> /// <param name="processID">The Process ID of the POL Process you want to interface with.</param> public FFACE(int processID) { // create our FFACE instance _InstanceID = CreateInstance((UInt32)processID); #region Find Windower Plugin Path System.Diagnostics.Process[] Processes = System.Diagnostics.Process.GetProcessesByName("pol"); if (Processes.Length > 0) { foreach (System.Diagnostics.ProcessModule mod in Processes[0].Modules) { if (mod.ModuleName.ToLower() == "hook.dll") { WindowerPath = mod.FileName.Substring(0, mod.FileName.Length - 8) + @"\plugins\"; ParseResources.UseFFXIDatFiles = false; break; } } } // Fix for non-windower users if (String.IsNullOrEmpty(WindowerPath)) { string ExePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location); // If we have a resources folder, use the resource parser otherwise let it default to using .dat reader if (System.IO.Directory.Exists(ExePath + @"\resources\")) { WindowerPath = ExePath; ParseResources.UseFFXIDatFiles = false; } } #endregion // Find out if we should be using structs or not System.Diagnostics.FileVersionInfo fileInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(FFACE_LIBRARY); // Need 4, 1, 0, 14 or later. Adjust these settings as needed. UInt64 version = ((UInt64)fileInfo.FileMajorPart << 48) + ((UInt64)fileInfo.FileMinorPart << 32) + ((UInt64)fileInfo.FileBuildPart << 16) + (UInt64)fileInfo.FilePrivatePart; if (fileInfo.FileMajorPart != 4) { throw new Exception(NEED_v410_24_OR_HIGHER); } else if (version < 0x0004000100000018UL) // 0004 0001 0000 000E (4, 1, 0, 14) // // 0004 0001 0000 0018 (4, 1, 0, 24) { throw new Exception(NEED_v410_24_OR_HIGHER); } /*if (fileInfo.FileMajorPart != 4) * throw new Exception(NEED_v410_24_OR_HIGHER); * else if (fileInfo.FileMinorPart < 1) * throw new Exception(NEED_v410_24_OR_HIGHER); * else if (fileInfo.FileBuildPart < 0) * throw new Exception(NEED_v410_24_OR_HIGHER); * else if (fileInfo.FilePrivatePart < 14) * throw new Exception(NEED_v410_24_OR_HIGHER);*/ // instantiate our classes Player = new PlayerTools(_InstanceID); Target = new TargetTools(_InstanceID); Party = new PartyTools(_InstanceID); Fish = new FishTools(_InstanceID); Windower = new WindowerTools(_InstanceID); Timer = new TimerTools(_InstanceID); Chat = new ChatTools(_InstanceID); Item = new ItemTools(this); NPC = new NPCTools(_InstanceID); Menu = new MenuTools(this); Search = new SearchTools(_InstanceID); Navigator = new NavigatorTools(this); Resources = ParseResources.Instance; #region Party Members // instantiate our party members PartyMember = new System.Collections.Generic.Dictionary <byte, PartyMemberTools>(); PartyMember.Add(0, new PartyMemberTools(_InstanceID, 0)); PartyMember.Add(1, new PartyMemberTools(_InstanceID, 1)); PartyMember.Add(2, new PartyMemberTools(_InstanceID, 2)); PartyMember.Add(3, new PartyMemberTools(_InstanceID, 3)); PartyMember.Add(4, new PartyMemberTools(_InstanceID, 4)); PartyMember.Add(5, new PartyMemberTools(_InstanceID, 5)); PartyMember.Add(6, new PartyMemberTools(_InstanceID, 6)); PartyMember.Add(7, new PartyMemberTools(_InstanceID, 7)); PartyMember.Add(8, new PartyMemberTools(_InstanceID, 8)); PartyMember.Add(9, new PartyMemberTools(_InstanceID, 9)); PartyMember.Add(10, new PartyMemberTools(_InstanceID, 10)); PartyMember.Add(11, new PartyMemberTools(_InstanceID, 11)); PartyMember.Add(12, new PartyMemberTools(_InstanceID, 12)); PartyMember.Add(13, new PartyMemberTools(_InstanceID, 13)); PartyMember.Add(14, new PartyMemberTools(_InstanceID, 14)); PartyMember.Add(15, new PartyMemberTools(_InstanceID, 15)); PartyMember.Add(16, new PartyMemberTools(_InstanceID, 16)); PartyMember.Add(17, new PartyMemberTools(_InstanceID, 17)); #endregion } // @ public FFACEWrapper(uint processID)
/// <summary> /// Constructor that instantiates FFACE /// </summary> /// <param name="processID">The Process ID of the POL Process you want to interface with.</param> public FFACE(int processID) { // create our FFACE instance _InstanceID = CreateInstance((UInt32)processID); if (!System.IO.Directory.Exists(WindowerPath) && !ParseResources.UseFFXIDatFiles) ParseResources.UseFFXIDatFiles = true; //#region Find Windower Plugin Path //System.Diagnostics.Process[] Processes = System.Diagnostics.Process.GetProcessesByName("pol"); //if (Processes.Length > 0) // foreach (System.Diagnostics.ProcessModule mod in Processes[0].Modules) // { // if (mod.ModuleName.ToLower() == "hook.dll") // { // WindowerPath = mod.FileName.Substring(0, mod.FileName.Length - 8) + @"\plugins\"; // break; // } // } //if (String.IsNullOrEmpty(WindowerPath)) // WindowerPath = "Windower path could not be found"; //#endregion // Find out if we should be using structs or not System.Diagnostics.FileVersionInfo fileInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(FFACE_LIBRARY); // Need 4, 1, 0, 14 or later. Adjust these settings as needed. UInt64 version = ((UInt64)fileInfo.FileMajorPart << 48) + ((UInt64)fileInfo.FileMinorPart << 32) + ((UInt64)fileInfo.FileBuildPart << 16) + (UInt64)fileInfo.FilePrivatePart; if (fileInfo.FileMajorPart != 4) throw new Exception(NEED_v410_14_OR_HIGHER); else if (version < 0x000400010000000EUL) // 0004 0001 0000 000E (4, 1, 0, 14) throw new Exception(NEED_v410_14_OR_HIGHER); /*if (fileInfo.FileMajorPart != 4) throw new Exception(NEED_v410_14_OR_HIGHER); else if (fileInfo.FileMinorPart < 1) throw new Exception(NEED_v410_14_OR_HIGHER); else if (fileInfo.FileBuildPart < 0) throw new Exception(NEED_v410_14_OR_HIGHER); else if (fileInfo.FilePrivatePart < 14) throw new Exception(NEED_v410_14_OR_HIGHER);*/ // instantiate our classes Player = new PlayerTools(_InstanceID); Target = new TargetTools(_InstanceID); Party = new PartyTools(_InstanceID); Fish = new FishTools(_InstanceID); Windower = new WindowerTools(_InstanceID); Timer = new TimerTools(_InstanceID); Chat = new ChatTools(_InstanceID); Item = new ItemTools(this); NPC = new NPCTools(_InstanceID); Menu = new MenuTools(this); Search = new SearchTools(_InstanceID); Navigator = new NavigatorTools(this); //Resources = ParseResources.Instance; #region Party Members // instantiate our party members PartyMember = new System.Collections.Generic.Dictionary<byte, PartyMemberTools>(); PartyMember.Add(0, new PartyMemberTools(_InstanceID, 0)); PartyMember.Add(1, new PartyMemberTools(_InstanceID, 1)); PartyMember.Add(2, new PartyMemberTools(_InstanceID, 2)); PartyMember.Add(3, new PartyMemberTools(_InstanceID, 3)); PartyMember.Add(4, new PartyMemberTools(_InstanceID, 4)); PartyMember.Add(5, new PartyMemberTools(_InstanceID, 5)); PartyMember.Add(6, new PartyMemberTools(_InstanceID, 6)); PartyMember.Add(7, new PartyMemberTools(_InstanceID, 7)); PartyMember.Add(8, new PartyMemberTools(_InstanceID, 8)); PartyMember.Add(9, new PartyMemberTools(_InstanceID, 9)); PartyMember.Add(10, new PartyMemberTools(_InstanceID, 10)); PartyMember.Add(11, new PartyMemberTools(_InstanceID, 11)); PartyMember.Add(12, new PartyMemberTools(_InstanceID, 12)); PartyMember.Add(13, new PartyMemberTools(_InstanceID, 13)); PartyMember.Add(14, new PartyMemberTools(_InstanceID, 14)); PartyMember.Add(15, new PartyMemberTools(_InstanceID, 15)); PartyMember.Add(16, new PartyMemberTools(_InstanceID, 16)); PartyMember.Add(17, new PartyMemberTools(_InstanceID, 17)); #endregion }
/// <summary> /// Constructor that instantiates FFACE /// </summary> /// <param name="processID">The Process ID of the POL Process you want to interface with.</param> public FFACE (int processID) { // create our FFACE instance _InstanceID = CreateInstance((UInt32)processID); #region Find Windower Plugin Path System.Diagnostics.Process[] Processes = System.Diagnostics.Process.GetProcessesByName("pol"); if (Processes.Length > 0) foreach (System.Diagnostics.ProcessModule mod in Processes[0].Modules) { if (mod.ModuleName.ToLower() == "hook.dll") { WindowerPath = mod.FileName.Substring(0, mod.FileName.Length - 8) + @"\plugins\"; ParseResources.UseFFXIDatFiles = false; break; } } // Fix for non-windower users if (String.IsNullOrEmpty(WindowerPath)) { string ExePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location); // If we have a resources folder, use the resource parser otherwise let it default to using .dat reader if (System.IO.Directory.Exists(ExePath + @"\resources\")) { WindowerPath = ExePath; ParseResources.UseFFXIDatFiles = false; } } #endregion // Find out if we should be using structs or not System.Diagnostics.FileVersionInfo fileInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(FFACE_LIBRARY); // Need 4, 1, 0, 14 or later. Adjust these settings as needed. UInt64 version = ( (UInt64)fileInfo.FileMajorPart << 48 ) + ( (UInt64)fileInfo.FileMinorPart << 32 ) + ( (UInt64)fileInfo.FileBuildPart << 16 ) + (UInt64)fileInfo.FilePrivatePart; if (fileInfo.FileMajorPart != 4) throw new Exception(NEED_v410_24_OR_HIGHER); else if (version < 0x0004000100000018UL) // 0004 0001 0000 000E (4, 1, 0, 14) // // 0004 0001 0000 0018 (4, 1, 0, 24) throw new Exception(NEED_v410_24_OR_HIGHER); /*if (fileInfo.FileMajorPart != 4) throw new Exception(NEED_v410_24_OR_HIGHER); else if (fileInfo.FileMinorPart < 1) throw new Exception(NEED_v410_24_OR_HIGHER); else if (fileInfo.FileBuildPart < 0) throw new Exception(NEED_v410_24_OR_HIGHER); else if (fileInfo.FilePrivatePart < 14) throw new Exception(NEED_v410_24_OR_HIGHER);*/ // instantiate our classes Player = new PlayerTools(_InstanceID); Target = new TargetTools(_InstanceID); Party = new PartyTools(_InstanceID); Fish = new FishTools(_InstanceID); Windower = new WindowerTools(_InstanceID); Timer = new TimerTools(_InstanceID); Chat = new ChatTools(_InstanceID); Item = new ItemTools(this); NPC = new NPCTools(_InstanceID); Menu = new MenuTools(this); Search = new SearchTools(_InstanceID); Navigator = new NavigatorTools(this); Resources = ParseResources.Instance; #region Party Members // instantiate our party members PartyMember = new System.Collections.Generic.Dictionary<byte, PartyMemberTools>(); PartyMember.Add(0, new PartyMemberTools(_InstanceID, 0)); PartyMember.Add(1, new PartyMemberTools(_InstanceID, 1)); PartyMember.Add(2, new PartyMemberTools(_InstanceID, 2)); PartyMember.Add(3, new PartyMemberTools(_InstanceID, 3)); PartyMember.Add(4, new PartyMemberTools(_InstanceID, 4)); PartyMember.Add(5, new PartyMemberTools(_InstanceID, 5)); PartyMember.Add(6, new PartyMemberTools(_InstanceID, 6)); PartyMember.Add(7, new PartyMemberTools(_InstanceID, 7)); PartyMember.Add(8, new PartyMemberTools(_InstanceID, 8)); PartyMember.Add(9, new PartyMemberTools(_InstanceID, 9)); PartyMember.Add(10, new PartyMemberTools(_InstanceID, 10)); PartyMember.Add(11, new PartyMemberTools(_InstanceID, 11)); PartyMember.Add(12, new PartyMemberTools(_InstanceID, 12)); PartyMember.Add(13, new PartyMemberTools(_InstanceID, 13)); PartyMember.Add(14, new PartyMemberTools(_InstanceID, 14)); PartyMember.Add(15, new PartyMemberTools(_InstanceID, 15)); PartyMember.Add(16, new PartyMemberTools(_InstanceID, 16)); PartyMember.Add(17, new PartyMemberTools(_InstanceID, 17)); #endregion } // @ public FFACEWrapper(uint processID)
/// <summary> /// Constructor that instantiates FFACE /// </summary> /// <param name="processID">The Process ID of the POL Process you want to interface with.</param> public FFACE(int processID) { // create our FFACE instance _InstanceID = CreateInstance((UInt32)processID); if (!System.IO.Directory.Exists(WindowerPath) && !ParseResources.UseFFXIDatFiles) { ParseResources.UseFFXIDatFiles = true; } //#region Find Windower Plugin Path //System.Diagnostics.Process[] Processes = System.Diagnostics.Process.GetProcessesByName("pol"); //if (Processes.Length > 0) // foreach (System.Diagnostics.ProcessModule mod in Processes[0].Modules) // { // if (mod.ModuleName.ToLower() == "hook.dll") // { // WindowerPath = mod.FileName.Substring(0, mod.FileName.Length - 8) + @"\plugins\"; // break; // } // } //if (String.IsNullOrEmpty(WindowerPath)) // WindowerPath = "Windower path could not be found"; //#endregion // Find out if we should be using structs or not System.Diagnostics.FileVersionInfo fileInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(FFACE_LIBRARY); // Need 4, 1, 0, 14 or later. Adjust these settings as needed. UInt64 version = ((UInt64)fileInfo.FileMajorPart << 48) + ((UInt64)fileInfo.FileMinorPart << 32) + ((UInt64)fileInfo.FileBuildPart << 16) + (UInt64)fileInfo.FilePrivatePart; if (fileInfo.FileMajorPart != 4) { throw new Exception(NEED_v410_14_OR_HIGHER); } else if (version < 0x000400010000000EUL) // 0004 0001 0000 000E (4, 1, 0, 14) { throw new Exception(NEED_v410_14_OR_HIGHER); } /*if (fileInfo.FileMajorPart != 4) * throw new Exception(NEED_v410_14_OR_HIGHER); * else if (fileInfo.FileMinorPart < 1) * throw new Exception(NEED_v410_14_OR_HIGHER); * else if (fileInfo.FileBuildPart < 0) * throw new Exception(NEED_v410_14_OR_HIGHER); * else if (fileInfo.FilePrivatePart < 14) * throw new Exception(NEED_v410_14_OR_HIGHER);*/ // instantiate our classes Player = new PlayerTools(_InstanceID); Target = new TargetTools(_InstanceID); Party = new PartyTools(_InstanceID); Fish = new FishTools(_InstanceID); Windower = new WindowerTools(_InstanceID); Timer = new TimerTools(_InstanceID); Chat = new ChatTools(_InstanceID); Item = new ItemTools(this); NPC = new NPCTools(_InstanceID); Menu = new MenuTools(this); Search = new SearchTools(_InstanceID); Navigator = new NavigatorTools(this); //Resources = ParseResources.Instance; #region Party Members // instantiate our party members PartyMember = new System.Collections.Generic.Dictionary <byte, PartyMemberTools>(); PartyMember.Add(0, new PartyMemberTools(_InstanceID, 0)); PartyMember.Add(1, new PartyMemberTools(_InstanceID, 1)); PartyMember.Add(2, new PartyMemberTools(_InstanceID, 2)); PartyMember.Add(3, new PartyMemberTools(_InstanceID, 3)); PartyMember.Add(4, new PartyMemberTools(_InstanceID, 4)); PartyMember.Add(5, new PartyMemberTools(_InstanceID, 5)); PartyMember.Add(6, new PartyMemberTools(_InstanceID, 6)); PartyMember.Add(7, new PartyMemberTools(_InstanceID, 7)); PartyMember.Add(8, new PartyMemberTools(_InstanceID, 8)); PartyMember.Add(9, new PartyMemberTools(_InstanceID, 9)); PartyMember.Add(10, new PartyMemberTools(_InstanceID, 10)); PartyMember.Add(11, new PartyMemberTools(_InstanceID, 11)); PartyMember.Add(12, new PartyMemberTools(_InstanceID, 12)); PartyMember.Add(13, new PartyMemberTools(_InstanceID, 13)); PartyMember.Add(14, new PartyMemberTools(_InstanceID, 14)); PartyMember.Add(15, new PartyMemberTools(_InstanceID, 15)); PartyMember.Add(16, new PartyMemberTools(_InstanceID, 16)); PartyMember.Add(17, new PartyMemberTools(_InstanceID, 17)); #endregion } // @ public FFACEWrapper(uint processID)