public static Int32 AniCtrl_InitAnimations(String message) { Process Process = Process.ThisProcess(); try { int address = Convert.ToInt32(message); oCAniCtrl_Human aniCtrl = new oCAniCtrl_Human(Process, Process.ReadInt(address)); int npcAddress = aniCtrl.NPC.Address; Vob vob = null; sWorld.SpawnedVobDict.TryGetValue(npcAddress, out vob); if (vob == null) { return(0); } aniCtrl.WMode = ((NPCProto)vob).WeaponMode; } catch (Exception ex) { zERROR.GetZErr(Process.ThisProcess()).Report(2, 'G', "Exception: " + ex.Message + " " + ex.StackTrace + " " + ex.Source, 0, "Program.cs", 0); } return(0); }
public void KeyPressed(int key) { try { if (key != (int)VirtualKeys.LeftButton) { return; } oCNpc player = oCNpc.Player(process); if (player.Address == 0) { return; } oCAniCtrl_Human aniCtrl = player.AniCtrl; if (aniCtrl.Address == 0) { return; } String str = aniCtrl.GetWalkModeString(); if (str == null) { return; } if (str.Trim().ToLower() != "SNEAK".ToLower() || player.GetTalentSkill(6) == 0 || player.Enemy.Address == 0 || player.Enemy.CanSee(new zCVob(process, player.Address), 0) == 1 || process.ReadInt(0x00AB27D0) == 2) { return; } player.OpenSteal(); } catch (Exception ex) { //System.Windows.Forms.MessageBox.Show(ex.Message+" StealContainer failure"); } }