ScriptzMoDz

Tic Tac Toe Class [MW3]

Aug 25th, 2014
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 44.82 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading;
  5. using System.Text;
  6.  
  7. public static class TTT
  8. {
  9.     #region Values
  10.     private static string Player1, Player2, Turn, Option;
  11.     private static bool[] PLAYER1 = new bool[10], PLAYER2 = new bool[10], STATE = new bool[10];
  12.     private static bool TTTStatus, GameEnd = false;
  13.     private static Thread TTTThread;
  14.     private static uint
  15.        CreditsIndex = 500,
  16.        MoveIndex = 501,
  17.        SelectIndex = 502,
  18.        Player2Index = 503,
  19.        Player1Index = 504,
  20.        TITELIndex = 505,
  21.        AIndex = 506,
  22.        BIndex = 507,
  23.        CIndex = 508,
  24.        DIndex = 509,
  25.        EIndex = 510,
  26.        FIndex = 511,
  27.        GIndex = 512,
  28.        HIndex = 513,
  29.        IIndex = 514,
  30.        SCROLLERIndex = 515,
  31.       TypewriterIndex = 516;
  32.     #endregion
  33.  
  34.     #region Read + Write
  35.  
  36.     private static string ReadString(uint Offset)
  37.     {
  38.         uint num = 0;
  39.         List<byte> List = new List<byte>();
  40.         while (true)
  41.         {
  42.             byte[] buffer = new byte[1];
  43.             PS3.GetMemory(Offset + num, buffer);
  44.             if (buffer[0] == 0)
  45.             {
  46.                 return Encoding.UTF8.GetString(List.ToArray());
  47.             }
  48.             List.Add(buffer[0]);
  49.             num++;
  50.         }
  51.     }
  52.  
  53.     private static float ReadFloat(uint Offset)
  54.     {
  55.         byte[] buffer = new byte[4];
  56.         PS3.GetMemory(Offset, buffer);
  57.         Array.Reverse(buffer, 0, 4);
  58.         return BitConverter.ToSingle(buffer, 0);
  59.     }
  60.  
  61.     private static int ReadInt(uint Offset)
  62.     {
  63.         byte[] buffer = new byte[4];
  64.         PS3.GetMemory(Offset, buffer);
  65.         Array.Reverse(buffer);
  66.         int Value = BitConverter.ToInt32(buffer, 0);
  67.         return Value;
  68.     }
  69.  
  70.     private static float[] ReadFloatLength(uint Offset, int Length)
  71.     {
  72.         byte[] buffer = new byte[Length * 4];
  73.         PS3.GetMemory(Offset, buffer);
  74.         ReverseBytes(buffer);
  75.         float[] Array = new float[Length];
  76.         for (int i = 0; i < Length; i++)
  77.         {
  78.             Array[i] = BitConverter.ToSingle(buffer, (Length - 1 - i) * 4);
  79.         }
  80.         return Array;
  81.     }
  82.  
  83.     private static void WriteString(uint Offset, string Text)
  84.     {
  85.         byte[] buffer = Encoding.UTF8.GetBytes(Text);
  86.         Array.Resize(ref buffer, buffer.Length + 1);
  87.         PS3.SetMemory(Offset, buffer);
  88.     }
  89.  
  90.     private static void WriteByte(uint Offset, byte Byte)
  91.     {
  92.         byte[] buffer = new byte[1];
  93.         buffer[0] = Byte;
  94.         PS3.SetMemory(Offset, buffer);
  95.     }
  96.  
  97.     private static void WriteFloat(uint Offset, float Float)
  98.     {
  99.         byte[] buffer = new byte[4];
  100.         BitConverter.GetBytes(Float).CopyTo(buffer, 0);
  101.         Array.Reverse(buffer, 0, 4);
  102.         PS3.SetMemory(Offset, buffer);
  103.     }
  104.  
  105.     private static void WriteFloatArray(uint Offset, float[] Array)
  106.     {
  107.         byte[] buffer = new byte[Array.Length * 4];
  108.         for (int Lenght = 0; Lenght < Array.Length; Lenght++)
  109.         {
  110.             ReverseBytes(BitConverter.GetBytes(Array[Lenght])).CopyTo(buffer, Lenght * 4);
  111.         }
  112.         PS3.SetMemory(Offset, buffer);
  113.     }
  114.  
  115.     private static void WriteUInt(uint Offset, int Value)
  116.     {
  117.         PS3.SetMemory(Offset, ReverseBytes(BitConverter.GetBytes(Value)));
  118.     }
  119.  
  120.     #endregion
  121.  
  122.     #region RPC
  123.     private static uint func_address = 0x0277208;
  124.  
  125.     private static void Enable()
  126.     {
  127.         byte[] Check = new byte[1];
  128.         PS3.GetMemory(func_address + 4, Check);
  129.         if (Check[0] == 0x3F)
  130.         {
  131.  
  132.         }
  133.         else
  134.         {
  135.             byte[] PPC = new byte[]
  136.         {0x3F,0x80,0x10,0x05,0x81,0x9C,0,0x48,0x2C,0x0C,0,0,0x41,0x82,0,0x78,
  137.          0x80,0x7C,0,0,0x80,0x9C,0,0x04,0x80,0xBC,0,0x08,0x80,0xDC,0,0x0C,0x80,
  138.          0xFC,0,0x10,0x81,0x1C,0,0x14,0x81,0x3C,0,0x18,0x81,0x5C,0,0x1C,0x81,
  139.          0x7C,0,0x20,0xC0,0x3C,0,0x24,0xC0,0x5C,0,0x28,0xC0,0x7C,0,0x2C,0xC0,
  140.          0x9C,0,0x30,0xC0,0xBC,0,0x34,0xC0,0xDC,0,0x38,0xC0,0xFC,0,0x3C,0xC1,
  141.          0x1C,0,0x40,0xC1,0x3C,0,0x44,0x7D,0x89,0x03,0xA6,0x4E,0x80,0x04,0x21,
  142.          0x38,0x80,0,0,0x90,0x9C,0,0x48,0x90,0x7C,0,0x4C,0xD0,0x3C,0,0x50,0x48,0,0,0x14};
  143.             PS3.SetMemory(func_address, new byte[] { 0x41 });
  144.             PS3.SetMemory(func_address + 4, PPC);
  145.             PS3.SetMemory(func_address, new byte[] { 0x40 });
  146.         }
  147.     }
  148.  
  149.     private static int Call(uint address, params object[] parameters)
  150.     {
  151.         int length = parameters.Length;
  152.         int index = 0;
  153.         uint count = 0;
  154.         uint Strings = 0;
  155.         uint Single = 0;
  156.         uint Array = 0;
  157.         while (index < length)
  158.         {
  159.             if (parameters[index] is int)
  160.             {
  161.                 WriteUInt(0x10050000 + (count * 4), (int)parameters[index]);
  162.                 count++;
  163.             }
  164.             else if (parameters[index] is uint)
  165.             {
  166.                 WriteUInt(0x10050000 + (count * 4), (int)parameters[index]);
  167.                 count++;
  168.             }
  169.             else if (parameters[index] is byte)
  170.             {
  171.                 WriteByte(0x10050000 + (count * 4), (byte)parameters[index]);
  172.                 count++;
  173.             }
  174.             else
  175.             {
  176.                 uint pointer;
  177.                 if (parameters[index] is string)
  178.                 {
  179.                     pointer = 0x10052000 + (Strings * 0x400);
  180.                     WriteString(pointer, Convert.ToString(parameters[index]));
  181.                     WriteUInt(0x10050000 + (count * 4), (int)pointer);
  182.                     count++;
  183.                     Strings++;
  184.                 }
  185.                 else if (parameters[index] is float)
  186.                 {
  187.                     WriteFloat(0x10050024 + (Single * 4), (float)parameters[index]);
  188.                     Single++;
  189.                 }
  190.                 else if (parameters[index] is float[])
  191.                 {
  192.                     float[] Args = (float[])parameters[index];
  193.                     pointer = 0x10051000 + Array * 4;
  194.                     WriteFloatArray(pointer, Args);
  195.                     WriteUInt(0x10050000 + count * 4, (int)pointer);
  196.                     count++;
  197.                     Array += (uint)Args.Length;
  198.                 }
  199.             }
  200.             index++;
  201.         }
  202.         WriteUInt(0x10050048, (int)address);
  203.         Thread.Sleep(20);
  204.         return ReadInt(0x1005004c);
  205.     }
  206.     #endregion
  207.  
  208.     #region Functions
  209.  
  210.     private static uint DPADOFFSET;
  211.     private static bool DPADState = false;
  212.     private static string DPAD_IsDown(uint Client)
  213.     {
  214.         if (DPADState == false)
  215.         {
  216.             DPADOFFSET = ((uint)ReadInt(0x17BB210)) + 0x21022;
  217.             DPADState = true;
  218.         }
  219.         string KeyPressed;
  220.         string Key = ReadString(DPADOFFSET + (Client * 0x68B80));
  221.         if (Key == "16")
  222.         {
  223.             KeyPressed = null;
  224.         }
  225.         else if (Key == "15")
  226.         {
  227.             KeyPressed = "Up";
  228.         }
  229.         else if (Key == "17")
  230.         {
  231.             KeyPressed = "Down";
  232.         }
  233.         else if (Key == "19")
  234.         {
  235.             KeyPressed = "Left";
  236.         }
  237.         else if (Key == "21")
  238.         {
  239.             KeyPressed = "Right";
  240.         }
  241.         else if (Key == "25")
  242.         {
  243.             KeyPressed = "X";
  244.         }
  245.         else
  246.         {
  247.             KeyPressed = Key;
  248.         }
  249.         return KeyPressed;
  250.     }
  251.  
  252.     private static string GetNames(uint Client)
  253.     {
  254.         return ReadString(0x0110d60c + (Client * 0x3980));
  255.     }
  256.  
  257.     private static string DeleteLetter(string Text, int Length)
  258.     {
  259.         char[] Letters = Text.ToCharArray();
  260.         char[] OutPut = new char[Letters.Length - Length];
  261.         for (int i = 0; i < Letters.Length - Length; i++)
  262.         {
  263.             OutPut[i] = Letters[i];
  264.         }
  265.         return new string(OutPut);
  266.     }
  267.  
  268.     private static string NameOnly11Letters(string Name)
  269.     {
  270.         if (Name.Length < 11)
  271.         {
  272.             return Name;
  273.         }
  274.         else
  275.         {
  276.             int Length = Name.Length - 11;
  277.             return DeleteLetter(Name, Length);
  278.         }
  279.     }
  280.  
  281.     private static byte[] ReverseBytes(byte[] inArray)
  282.     {
  283.         Array.Reverse(inArray);
  284.         return inArray;
  285.     }
  286.  
  287.     private static void iPrintlnBold(int Client, string Text)
  288.     {
  289.         Call(0x228FA8, Client, 0, "c \"" + Text + "\"");
  290.     }
  291.  
  292.     private static void DestroyElem(uint Index)
  293.     {
  294.         PS3.SetMemory(0xF0E10C + (Index * 0xB4), new byte[0xB4]);
  295.     }
  296.  
  297.     private static decimal GetGameMode()
  298.     {
  299.         decimal Shader = 0;
  300.         string GM = null;
  301.         byte[] buffer = new byte[0x100];
  302.         if (buffer[10] == 0)
  303.             PS3.GetMemory(0x8360D5, buffer);
  304.         System.Text.ASCIIEncoding Encoding = new System.Text.ASCIIEncoding();
  305.         if (buffer[0] == 0)
  306.         {
  307.  
  308.         }
  309.         else
  310.         {
  311.             GM = Encoding.GetString(buffer).Split(new char[] { Convert.ToChar(0x5C) })[2];
  312.         }
  313.         if (GM == "dm")
  314.             Shader = 51;
  315.         else if (GM == "war")
  316.             Shader = 52;
  317.         else if (GM == "sd")
  318.             Shader = 64;
  319.         else if (GM == "sab")
  320.             Shader = 60;
  321.         else if (GM == "dom")
  322.             Shader = 64;
  323.         else if (GM == "koth")
  324.             Shader = 56;
  325.         else if (GM == "ctf")
  326.             Shader = 52;
  327.         else if (GM == "dd")
  328.             Shader = 63;
  329.         else if (GM == "conf")
  330.             Shader = 53;
  331.         else if (GM == "tdef")
  332.             Shader = 53;
  333.         else if (GM == "grnd")
  334.             Shader = 55;
  335.         else if (GM == "tjugg")
  336.             Shader = 52;
  337.         else if (GM == "jugg")
  338.             Shader = 53;
  339.         else if (GM == "gun")
  340.             Shader = 51;
  341.         else if (GM == "infect")
  342.             Shader = 52;
  343.         else if (GM == "oic")
  344.             Shader = 51;
  345.         return Shader;
  346.     }
  347.  
  348.     private static void StoreHUD(bool State, uint P1 = 0, uint P2 = 0)
  349.     {
  350.         if (State == true)
  351.         {
  352.             Player1 = GetNames(P1);
  353.             Player2 = GetNames(P2);
  354.             StoreText(CreditsIndex, HElems.AllClient, "^:by GMT xCSBKx", 3, 1.3f, 601, 226);//Credits
  355.             StoreText(MoveIndex, HElems.AllClient, "^:Move:[{+actionslot 1}] [{+actionslot 2}] [{+actionslot 3}] [{+actionslot 4}]", 3, 1.3f, 601, 207);//Move
  356.             StoreText(SelectIndex, HElems.AllClient, "^:Select:", 3, 1.3f, 601, 188);//Select
  357.             StoreText(Player2Index, HElems.AllClient, "^1^77   demo_stop" + "^:" + NameOnly11Letters(Player2), 3, 1.3f, 597, 169);//Player2
  358.             StoreText(Player1Index, HElems.AllClient, "^2^77   demo_stop" + "^:" + NameOnly11Letters(Player1), 3, 1.3f, 597, 150);//Player1
  359.             StoreText(TITELIndex, HElems.AllClient, "^:Tic Tac Toe:", 3, 1.3f, 601, 131);//TITEL
  360.             StoreIcon(AIndex, HElems.AllClient, 1, 30, 30, 597, 26, 190, 190, 190, 255);//A
  361.             StoreIcon(BIndex, HElems.AllClient, 1, 30, 30, 632, 26, 190, 190, 190, 255);//B
  362.             StoreIcon(CIndex, HElems.AllClient, 1, 30, 30, 667, 26, 190, 190, 190, 255);//C
  363.             StoreIcon(DIndex, HElems.AllClient, 1, 30, 30, 597, 61, 190, 190, 190, 255);//D
  364.             StoreIcon(EIndex, HElems.AllClient, 1, 30, 30, 632, 61, 190, 190, 190, 255);//E
  365.             StoreIcon(FIndex, HElems.AllClient, 1, 30, 30, 667, 61, 190, 190, 190, 255);//F
  366.             StoreIcon(GIndex, HElems.AllClient, 1, 30, 30, 597, 95, 190, 190, 190, 255);//G
  367.             StoreIcon(HIndex, HElems.AllClient, 1, 30, 30, 632, 95, 190, 190, 190, 255);//H
  368.             StoreIcon(IIndex, HElems.AllClient, 1, 30, 30, 667, 95, 190, 190, 190, 255);//I
  369.             StoreIcon(SCROLLERIndex, HElems.AllClient, GetGameMode(), 45, 45, 590, 18);//SCROLLER    
  370.         }
  371.         else
  372.         {
  373.             Player1 = "";
  374.             Player2 = "";
  375.             for (uint i = 500; i < 516; i++)
  376.                 DestroyElem(i);
  377.             for (int i = 1; i < 10; i++)
  378.                 STATE[i] = false;
  379.             for (int i = 1; i < 10; i++)
  380.             {
  381.                 PLAYER1[i] = false;
  382.                 PLAYER2[i] = false;
  383.             }
  384.             Option = "A";
  385.             GameEnd = false;
  386.             DPADState = false;
  387.         }
  388.     }
  389.  
  390.     private static void ChangeField(uint State, uint Index)
  391.     {
  392.         if (STATE[State] == false)
  393.         {
  394.             if (Turn == Player1)
  395.             {
  396.                 STATE[State] = true;
  397.                 PLAYER1[State] = true;
  398.                 ChangeRGBA(Index, 0, 255, 0, 255);
  399.                 Turn = Player2;
  400.                 Typewriter(TypewriterIndex, (decimal)GetIndexfromName(Turn), "^:It's your turn!", 230);
  401.             }
  402.             else if (Turn == Player2)
  403.             {
  404.                 STATE[State] = true;
  405.                 PLAYER2[State] = true;
  406.                 ChangeRGBA(Index, 255, 0, 0, 255);
  407.                 Turn = Player1;
  408.                 Typewriter(TypewriterIndex, (decimal)GetIndexfromName(Turn), "^:It's your turn!", 230);
  409.             }
  410.         }
  411.     }
  412.  
  413.     private static void CheckWin(uint Field1, uint Field2, uint Field3)
  414.     {
  415.         if (PLAYER1[Field1] == true && PLAYER1[Field2] == true && PLAYER1[Field3] == true)
  416.         {
  417.             Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  418.             GameEnd = true;
  419.             StoreHUD(false);
  420.             TTTStatus = false;
  421.             TTTThread.Abort();
  422.         }
  423.         else if (PLAYER2[Field1] == true && PLAYER2[Field2] == true && PLAYER2[Field3] == true)
  424.         {
  425.             Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  426.             GameEnd = true;
  427.             StoreHUD(false);
  428.             TTTStatus = false;
  429.             TTTThread.Abort();
  430.         }
  431.     }
  432.  
  433.     private static uint GetIndexfromName(string Name)
  434.     {
  435.         for (uint i = 0; i < 18; i++)
  436.         {
  437.             if (GetNames((uint)i) == Name)
  438.             {
  439.                 return (uint)i;
  440.             }
  441.         }
  442.         return 18;
  443.     }
  444.  
  445.     private static void StartTTT(uint P1, uint P2)
  446.     {
  447.         StoreHUD(false);
  448.         StoreHUD(true, P1, P2);
  449.         iPrintlnBold(-1, "^: TicTacToe Match : " + Player1 + " vs " + Player2);
  450.  
  451.         Random Random = new Random();
  452.         switch (Random.Next(1, 3))
  453.         {
  454.             case 1:
  455.                 Turn = Player1;
  456.                 break;
  457.             case 2:
  458.                 Turn = Player2;
  459.                 break;
  460.         }
  461.         Typewriter(TypewriterIndex, (decimal)GetIndexfromName(Turn), "^:It's your turn!", 230);
  462.     }
  463.  
  464.     private static void TTTFunction()
  465.     {
  466.         PS3.Connect();
  467.         while (TTTThread.IsAlive)
  468.         {
  469.             switch (Option)
  470.             {
  471.                 #region A
  472.                 case "A":
  473.                     switch (DPAD_IsDown(GetIndexfromName(Turn)))
  474.                     {
  475.                         case "Right":
  476.                             Scroller(2);
  477.                             Option = "B";
  478.                             break;
  479.  
  480.                         case "Down":
  481.                             Scroller(4);
  482.                             Option = "D";
  483.                             break;
  484.  
  485.                         case "X":
  486.                             ChangeField(1, AIndex);
  487.                             break;
  488.                     }
  489.                     break;
  490.                 #endregion
  491.                 #region B
  492.                 case "B":
  493.                     switch (DPAD_IsDown(GetIndexfromName(Turn)))
  494.                     {
  495.                         case "Left":
  496.                             Scroller(1);
  497.                             Option = "A";
  498.                             break;
  499.  
  500.                         case "Right":
  501.                             Scroller(3);
  502.                             Option = "C";
  503.                             break;
  504.  
  505.                         case "Down":
  506.                             Scroller(5);
  507.                             Option = "E";
  508.                             break;
  509.  
  510.                         case "X":
  511.                             ChangeField(2, BIndex);
  512.                             break;
  513.                     }
  514.                     break;
  515.                 #endregion
  516.                 #region C
  517.                 case "C":
  518.                     switch (DPAD_IsDown(GetIndexfromName(Turn)))
  519.                     {
  520.                         case "Left":
  521.                             Scroller(2);
  522.                             Option = "B";
  523.                             break;
  524.  
  525.                         case "Down":
  526.                             Scroller(6);
  527.                             Option = "F";
  528.                             break;
  529.  
  530.                         case "X":
  531.                             ChangeField(3, CIndex);
  532.                             break;
  533.                     }
  534.                     break;
  535.                 #endregion
  536.                 #region D
  537.                 case "D":
  538.                     switch (DPAD_IsDown(GetIndexfromName(Turn)))
  539.                     {
  540.                         case "Up":
  541.                             Scroller(1);
  542.                             Option = "A";
  543.                             break;
  544.  
  545.                         case "Right":
  546.                             Scroller(5);
  547.                             Option = "E";
  548.                             break;
  549.  
  550.                         case "Down":
  551.                             Scroller(7);
  552.                             Option = "G";
  553.                             break;
  554.  
  555.                         case "X":
  556.                             ChangeField(4, DIndex);
  557.                             break;
  558.                     }
  559.                     break;
  560.                 #endregion
  561.                 #region E
  562.                 case "E":
  563.                     switch (DPAD_IsDown(GetIndexfromName(Turn)))
  564.                     {
  565.                         case "Up":
  566.                             Scroller(2);
  567.                             Option = "B";
  568.                             break;
  569.  
  570.                         case "Left":
  571.                             Scroller(4);
  572.                             Option = "D";
  573.                             break;
  574.  
  575.                         case "Right":
  576.                             Scroller(6);
  577.                             Option = "F";
  578.                             break;
  579.  
  580.                         case "Down":
  581.                             Scroller(8);
  582.                             Option = "H";
  583.                             break;
  584.  
  585.                         case "X":
  586.                             ChangeField(5, EIndex);
  587.                             break;
  588.                     }
  589.                     break;
  590.                 #endregion
  591.                 #region F
  592.                 case "F":
  593.                     switch (DPAD_IsDown(GetIndexfromName(Turn)))
  594.                     {
  595.                         case "Up":
  596.                             Scroller(3);
  597.                             Option = "C";
  598.                             break;
  599.  
  600.                         case "Left":
  601.                             Scroller(5);
  602.                             Option = "E";
  603.                             break;
  604.  
  605.                         case "Down":
  606.                             Scroller(9);
  607.                             Option = "I";
  608.                             break;
  609.  
  610.                         case "X":
  611.                             ChangeField(6, FIndex);
  612.                             break;
  613.                     }
  614.                     break;
  615.                 #endregion
  616.                 #region G
  617.                 case "G":
  618.                     switch (DPAD_IsDown(GetIndexfromName(Turn)))
  619.                     {
  620.                         case "Up":
  621.                             Scroller(4);
  622.                             Option = "D";
  623.                             break;
  624.  
  625.                         case "Right":
  626.                             Scroller(8);
  627.                             Option = "H";
  628.                             break;
  629.  
  630.                         case "X":
  631.                             ChangeField(7, GIndex);
  632.                             break;
  633.                     }
  634.                     break;
  635.                 #endregion
  636.                 #region H
  637.                 case "H":
  638.                     switch (DPAD_IsDown(GetIndexfromName(Turn)))
  639.                     {
  640.                         case "Up":
  641.                             Scroller(5);
  642.                             Option = "E";
  643.                             break;
  644.  
  645.                         case "Left":
  646.                             Scroller(7);
  647.                             Option = "G";
  648.                             break;
  649.  
  650.                         case "Right":
  651.                             Scroller(9);
  652.                             Option = "I";
  653.                             break;
  654.  
  655.                         case "X":
  656.                             ChangeField(8, HIndex);
  657.                             break;
  658.                     }
  659.                     break;
  660.                 #endregion
  661.                 #region I
  662.                 case "I":
  663.                     switch (DPAD_IsDown(GetIndexfromName(Turn)))
  664.                     {
  665.                         case "Up":
  666.                             Scroller(6);
  667.                             Option = "F";
  668.                             break;
  669.  
  670.                         case "Left":
  671.                             Scroller(8);
  672.                             Option = "H";
  673.                             break;
  674.  
  675.                         case "X":
  676.                             ChangeField(9, IIndex);
  677.                             break;
  678.                     }
  679.                     break;
  680.                 #endregion
  681.             }
  682.             #region CheckGame
  683.             if (GameEnd == false)
  684.             {
  685.                 #region ABC
  686.                 if (PLAYER1[1] == true && PLAYER1[2] == true && PLAYER1[3] == true)
  687.                 {
  688.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  689.                     GameEnd = true;
  690.                     StoreHUD(false);
  691.                     TTTStatus = false;
  692.                     TTTThread.Abort();
  693.                 }
  694.                 else if (PLAYER2[1] == true && PLAYER2[2] == true && PLAYER2[3] == true)
  695.                 {
  696.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  697.                     GameEnd = true;
  698.                     StoreHUD(false);
  699.                     TTTStatus = false;
  700.                     TTTThread.Abort();
  701.                 }
  702.                 #endregion
  703.                 #region DEF
  704.                 else if (PLAYER1[4] == true && PLAYER1[5] == true && PLAYER1[6] == true)
  705.                 {
  706.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  707.                     GameEnd = true;
  708.                     StoreHUD(false);
  709.                     TTTStatus = false;
  710.                     TTTThread.Abort();
  711.                 }
  712.                 else if (PLAYER2[4] == true && PLAYER2[5] == true && PLAYER2[6] == true)
  713.                 {
  714.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  715.                     GameEnd = true;
  716.                     StoreHUD(false);
  717.                     TTTStatus = false;
  718.                     TTTThread.Abort();
  719.                 }
  720.                 #endregion
  721.                 #region GHI
  722.                 else if (PLAYER1[7] == true && PLAYER1[8] == true && PLAYER1[9] == true)
  723.                 {
  724.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  725.                     GameEnd = true;
  726.                     StoreHUD(false);
  727.                     TTTStatus = false;
  728.                     TTTThread.Abort();
  729.                 }
  730.                 else if (PLAYER2[7] == true && PLAYER2[8] == true && PLAYER2[9] == true)
  731.                 {
  732.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  733.                     GameEnd = true;
  734.                     StoreHUD(false);
  735.                     TTTStatus = false;
  736.                     TTTThread.Abort();
  737.                 }
  738.                 #endregion
  739.                 #region ADG
  740.                 else if (PLAYER1[1] == true && PLAYER1[4] == true && PLAYER1[7] == true)
  741.                 {
  742.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  743.                     GameEnd = true;
  744.                     StoreHUD(false);
  745.                     TTTStatus = false;
  746.                     TTTThread.Abort();
  747.                 }
  748.                 else if (PLAYER2[1] == true && PLAYER2[4] == true && PLAYER2[7] == true)
  749.                 {
  750.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  751.                     GameEnd = true;
  752.                     StoreHUD(false);
  753.                     TTTStatus = false;
  754.                     TTTThread.Abort();
  755.                 }
  756.                 #endregion
  757.                 #region BEH
  758.                 else if (PLAYER1[2] == true && PLAYER1[5] == true && PLAYER1[8] == true)
  759.                 {
  760.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  761.                     GameEnd = true;
  762.                     StoreHUD(false);
  763.                     TTTStatus = false;
  764.                     TTTThread.Abort();
  765.                 }
  766.                 else if (PLAYER2[2] == true && PLAYER2[5] == true && PLAYER2[8] == true)
  767.                 {
  768.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  769.                     GameEnd = true;
  770.                     StoreHUD(false);
  771.                     TTTStatus = false;
  772.                     TTTThread.Abort();
  773.                 }
  774.                 #endregion
  775.                 #region CFI
  776.                 else if (PLAYER1[3] == true && PLAYER1[6] == true && PLAYER1[9] == true)
  777.                 {
  778.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  779.                     GameEnd = true;
  780.                     StoreHUD(false);
  781.                     TTTStatus = false;
  782.                     TTTThread.Abort();
  783.                 }
  784.                 else if (PLAYER2[3] == true && PLAYER2[6] == true && PLAYER2[9] == true)
  785.                 {
  786.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  787.                     GameEnd = true;
  788.                     StoreHUD(false);
  789.                     TTTStatus = false;
  790.                     TTTThread.Abort();
  791.                 }
  792.                 #endregion
  793.                 #region AEI
  794.                 else if (PLAYER1[1] == true && PLAYER1[5] == true && PLAYER1[9] == true)
  795.                 {
  796.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  797.                     GameEnd = true;
  798.                     StoreHUD(false);
  799.                     TTTStatus = false;
  800.                     TTTThread.Abort();
  801.                 }
  802.                 else if (PLAYER2[1] == true && PLAYER2[5] == true && PLAYER2[9] == true)
  803.                 {
  804.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  805.                     GameEnd = true;
  806.                     StoreHUD(false);
  807.                     TTTStatus = false;
  808.                     TTTThread.Abort();
  809.                 }
  810.                 #endregion
  811.                 #region CEG
  812.                 else if (PLAYER1[3] == true && PLAYER1[5] == true && PLAYER1[7] == true)
  813.                 {
  814.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  815.                     GameEnd = true;
  816.                     StoreHUD(false);
  817.                     TTTStatus = false;
  818.                     TTTThread.Abort();
  819.                 }
  820.                 else if (PLAYER2[3] == true && PLAYER2[5] == true && PLAYER2[7] == true)
  821.                 {
  822.                     Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  823.                     GameEnd = true;
  824.                     StoreHUD(false);
  825.                     TTTStatus = false;
  826.                     TTTThread.Abort();
  827.                 }
  828.                 #endregion
  829.                 #region IFALLCHECKED
  830.                 else if (STATE[1] == true && STATE[2] == true && STATE[3] == true && STATE[4] == true && STATE[5] == true && STATE[6] == true && STATE[7] == true && STATE[8] == true && STATE[9] == true)
  831.                 {
  832.                     #region ABC
  833.                     if (PLAYER1[1] == true && PLAYER1[2] == true && PLAYER1[3] == true)
  834.                     {
  835.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  836.                         GameEnd = true;
  837.                         StoreHUD(false);
  838.                         TTTStatus = false;
  839.                         TTTThread.Abort();
  840.                     }
  841.                     else if (PLAYER2[1] == true && PLAYER2[2] == true && PLAYER2[3] == true)
  842.                     {
  843.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  844.                         GameEnd = true;
  845.                         StoreHUD(false);
  846.                         TTTStatus = false;
  847.                         TTTThread.Abort();
  848.                     }
  849.                     #endregion
  850.                     #region DEF
  851.                     else if (PLAYER1[4] == true && PLAYER1[5] == true && PLAYER1[6] == true)
  852.                     {
  853.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  854.                         GameEnd = true;
  855.                         StoreHUD(false);
  856.                         TTTStatus = false;
  857.                         TTTThread.Abort();
  858.                     }
  859.                     else if (PLAYER2[4] == true && PLAYER2[5] == true && PLAYER2[6] == true)
  860.                     {
  861.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  862.                         GameEnd = true;
  863.                         StoreHUD(false);
  864.                         TTTStatus = false;
  865.                         TTTThread.Abort();
  866.                     }
  867.                     #endregion
  868.                     #region GHI
  869.                     else if (PLAYER1[7] == true && PLAYER1[8] == true && PLAYER1[9] == true)
  870.                     {
  871.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  872.                         GameEnd = true;
  873.                         StoreHUD(false);
  874.                         TTTStatus = false;
  875.                         TTTThread.Abort();
  876.                     }
  877.                     else if (PLAYER2[7] == true && PLAYER2[8] == true && PLAYER2[9] == true)
  878.                     {
  879.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  880.                         GameEnd = true;
  881.                         StoreHUD(false);
  882.                         TTTStatus = false;
  883.                         TTTThread.Abort();
  884.                     }
  885.                     #endregion
  886.                     #region ADG
  887.                     else if (PLAYER1[1] == true && PLAYER1[4] == true && PLAYER1[7] == true)
  888.                     {
  889.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  890.                         GameEnd = true;
  891.                         StoreHUD(false);
  892.                         TTTStatus = false;
  893.                         TTTThread.Abort();
  894.                     }
  895.                     else if (PLAYER2[1] == true && PLAYER2[4] == true && PLAYER2[7] == true)
  896.                     {
  897.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  898.                         GameEnd = true;
  899.                         StoreHUD(false);
  900.                         TTTStatus = false;
  901.                         TTTThread.Abort();
  902.                     }
  903.                     #endregion
  904.                     #region BEH
  905.                     else if (PLAYER1[2] == true && PLAYER1[5] == true && PLAYER1[8] == true)
  906.                     {
  907.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  908.                         GameEnd = true;
  909.                         StoreHUD(false);
  910.                         TTTStatus = false;
  911.                         TTTThread.Abort();
  912.                     }
  913.                     else if (PLAYER2[2] == true && PLAYER2[5] == true && PLAYER2[8] == true)
  914.                     {
  915.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  916.                         GameEnd = true;
  917.                         StoreHUD(false);
  918.                         TTTStatus = false;
  919.                         TTTThread.Abort();
  920.                     }
  921.                     #endregion
  922.                     #region CFI
  923.                     else if (PLAYER1[3] == true && PLAYER1[6] == true && PLAYER1[9] == true)
  924.                     {
  925.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  926.                         GameEnd = true;
  927.                         StoreHUD(false);
  928.                         TTTStatus = false;
  929.                         TTTThread.Abort();
  930.                     }
  931.                     else if (PLAYER2[3] == true && PLAYER2[6] == true && PLAYER2[9] == true)
  932.                     {
  933.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  934.                         GameEnd = true;
  935.                         StoreHUD(false);
  936.                         TTTStatus = false;
  937.                         TTTThread.Abort();
  938.                     }
  939.                     #endregion
  940.                     #region AEI
  941.                     else if (PLAYER1[1] == true && PLAYER1[5] == true && PLAYER1[9] == true)
  942.                     {
  943.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  944.                         GameEnd = true;
  945.                         StoreHUD(false);
  946.                         TTTStatus = false;
  947.                         TTTThread.Abort();
  948.                     }
  949.                     else if (PLAYER2[1] == true && PLAYER2[5] == true && PLAYER2[9] == true)
  950.                     {
  951.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  952.                         GameEnd = true;
  953.                         StoreHUD(false);
  954.                         TTTStatus = false;
  955.                         TTTThread.Abort();
  956.                     }
  957.                     #endregion
  958.                     #region CEG
  959.                     else if (PLAYER1[3] == true && PLAYER1[5] == true && PLAYER1[7] == true)
  960.                     {
  961.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player1) + " Wins!", 215);
  962.                         GameEnd = true;
  963.                         StoreHUD(false);
  964.                         TTTStatus = false;
  965.                         TTTThread.Abort();
  966.                     }
  967.                     else if (PLAYER2[3] == true && PLAYER2[5] == true && PLAYER2[7] == true)
  968.                     {
  969.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:" + NameOnly11Letters(Player2) + " Wins!", 215);
  970.                         GameEnd = true;
  971.                         StoreHUD(false);
  972.                         TTTStatus = false;
  973.                         TTTThread.Abort();
  974.                     }
  975.                     #endregion
  976.                     #region NoOne
  977.                     else
  978.                     {
  979.                         Typewriter(TypewriterIndex, HElems.AllClient, "^:The Game is a Draw!", 195);
  980.                         GameEnd = true;
  981.                         StoreHUD(false);
  982.                         TTTStatus = false;
  983.                         TTTThread.Abort();
  984.                     }
  985.                     #endregion
  986.                 }
  987.                 #endregion
  988.             }
  989.             #endregion
  990.         }
  991.     }
  992.     #endregion
  993.  
  994.     #region HUDS
  995.     private static class HElems
  996.     {
  997.         public static uint
  998.             xOffset = 0x04,
  999.             yOffset = 0x08,
  1000.                     fontScale = 0x14,
  1001.                     fontOffset = 0x24,
  1002.                     alignOrg = 0x28,
  1003.                     alignOffset = 0x2C,
  1004.                     colorOffset = 0x30,
  1005.                     widthOffset = 0x44,
  1006.             heightOffset = 0x48,
  1007.                     shaderOffset = 0x4C,
  1008.                     fromX = 0x60,
  1009.             fromY = 0x64,
  1010.                      fromAlignOrg = 0x68,
  1011.             fromAlignScreen = 0x6C,
  1012.             moveStartTime = 0x70,
  1013.              moveTime = 0x74,
  1014.             time = 0x78,
  1015.                     textOffset = 0x84,
  1016.                     glowColor = 0x8C,
  1017.                     fxBirthTime = 0x90,
  1018.             fxLetterTime = 0x94,
  1019.             fxDecayStartTime = 0x98,
  1020.             fxDecayDuration = 0x9C,
  1021.                     clientOffset = 0xa8,
  1022.                     AllClient = 0x7FF;
  1023.     }
  1024.  
  1025.     private static uint Element(uint Index)
  1026.     {
  1027.         return 0xF0E10C + ((Index) * 0xB4);
  1028.     }
  1029.  
  1030.     private static uint StoreText(uint Index, decimal Client, string Text, int Font, float FontScale, int X, int Y, decimal R = 255, decimal G = 255, decimal B = 255, decimal A = 255, decimal R1 = 0, decimal G1 = 0, decimal B1 = 0, decimal A1 = 0)
  1031.     {
  1032.         uint elem = Element(Index);
  1033.         PS3.SetMemory(elem + HElems.textOffset, CacheString(Text));
  1034.         PS3.SetMemory(elem + HElems.fontOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(Font))));
  1035.         WriteFloat(elem + HElems.fontScale, FontScale);
  1036.         WriteFloat(elem + HElems.xOffset, X);
  1037.         WriteFloat(elem + HElems.yOffset, Y);
  1038.         PS3.SetMemory(elem + 0xa7, new byte[] { 7 });
  1039.         PS3.SetMemory(elem + HElems.colorOffset, new byte[] { (byte)R, (byte)G, (byte)B, (byte)A });
  1040.         PS3.SetMemory(elem + HElems.glowColor, new byte[] { (byte)R1, (byte)G1, (byte)B1, (byte)A1 });
  1041.         PS3.SetMemory(elem + HElems.clientOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(Client))));
  1042.         System.Threading.Thread.Sleep(20);
  1043.         byte[] Type_ = BitConverter.GetBytes(1);
  1044.         Array.Reverse(Type_);
  1045.         PS3.SetMemory(elem, Type_);
  1046.         return elem;
  1047.     }
  1048.  
  1049.     private static uint StoreIcon(uint Index, decimal Client, decimal Shader, int Width, int Height, int X, int Y, decimal R = 255, decimal G = 255, decimal B = 255, decimal A = 255)
  1050.     {
  1051.         uint elem = Element(Index);
  1052.         PS3.SetMemory(elem + HElems.shaderOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(Shader))));
  1053.         PS3.SetMemory(elem + HElems.heightOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(Height))));
  1054.         PS3.SetMemory(elem + HElems.widthOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(Width))));
  1055.         WriteFloat(elem + HElems.xOffset, X);
  1056.         WriteFloat(elem + HElems.yOffset, Y);
  1057.         PS3.SetMemory(elem + 0xa7, new byte[] { 5 });
  1058.         PS3.SetMemory(elem + HElems.colorOffset, new byte[] { (byte)R, (byte)G, (byte)B, (byte)A });
  1059.         PS3.SetMemory(elem + HElems.clientOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(Client))));
  1060.         System.Threading.Thread.Sleep(20);
  1061.         byte[] Type_ = BitConverter.GetBytes(4);
  1062.         Array.Reverse(Type_);
  1063.         PS3.SetMemory(elem, Type_);
  1064.         return elem;
  1065.     }
  1066.  
  1067.     private static void Typewriter(uint Index, decimal Client, string Text, int X = 180, bool UnderHUD = false, decimal R = 255, decimal G = 255, decimal B = 255, decimal A = 255, decimal R1 = 0, decimal G1 = 0, decimal B1 = 0, decimal A1 = 0)
  1068.     {
  1069.         uint elem = Element(Index);
  1070.         PS3.SetMemory(elem + HElems.textOffset, CacheString(Text));
  1071.         PS3.SetMemory(elem + HElems.fontOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(3))));
  1072.         WriteFloat(elem + HElems.fontScale, 2);
  1073.         WriteFloat(elem + HElems.xOffset, X);
  1074.         WriteFloat(elem + HElems.yOffset, 300);
  1075.         PS3.SetMemory(elem + 0xa7, new byte[] { 7 });
  1076.         PS3.SetMemory(elem + HElems.colorOffset, new byte[] { (byte)R, (byte)G, (byte)B, (byte)A });
  1077.         PS3.SetMemory(elem + HElems.glowColor, new byte[] { (byte)R1, (byte)G1, (byte)B1, (byte)A1 });
  1078.         PS3.SetMemory(elem + HElems.clientOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(Client))));
  1079.         PS3.SetMemory(elem + HElems.fxBirthTime, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(GetLevelTime()))));
  1080.         PS3.SetMemory(elem + HElems.fxLetterTime, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(100))));
  1081.         PS3.SetMemory(elem + HElems.fxDecayStartTime, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(5000))));
  1082.         PS3.SetMemory(elem + HElems.fxDecayDuration, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(1000))));
  1083.         System.Threading.Thread.Sleep(20);
  1084.         byte[] Type_ = BitConverter.GetBytes(1);
  1085.         Array.Reverse(Type_);
  1086.         PS3.SetMemory(elem, Type_);
  1087.     }
  1088.  
  1089.     private static uint CreateText(string Text)
  1090.     {
  1091.         return (uint)Call(0x1BE6CC, Text);
  1092.     }
  1093.  
  1094.     private static uint GetLevelTime()
  1095.     {
  1096.         return (uint)ReadInt(0xFC3DB0);
  1097.     }
  1098.  
  1099.     private static byte[] uintBytes(uint Input)
  1100.     {
  1101.         byte[] Data = BitConverter.GetBytes(Input);
  1102.         Array.Reverse(Data);
  1103.         return Data;
  1104.     }
  1105.  
  1106.     private static byte[] CacheString(string Text)
  1107.     {
  1108.         byte[] Index = uintBytes(CreateText(Text + "\0"));
  1109.         return Index;
  1110.     }
  1111.  
  1112.     private static void ChangeRGBA(uint Index, decimal R = 255, decimal G = 255, decimal B = 255, decimal A = 255)
  1113.     {
  1114.         uint elem = Element(Index);
  1115.         PS3.SetMemory(elem + HElems.colorOffset, new byte[] { (byte)R, (byte)G, (byte)B, (byte)A });
  1116.     }
  1117.  
  1118.     private static void MoveOverTime(uint Index, short Time, int X, int Y)
  1119.     {
  1120.         uint elem = 0xF0E10C + (Index * 0xB4);
  1121.         WriteFloatArray(elem + HElems.fromAlignOrg, ReadFloatLength(elem + HElems.alignOrg, 4));
  1122.         WriteFloatArray(elem + HElems.fromAlignScreen, ReadFloatLength(elem + HElems.alignOffset, 4));
  1123.         WriteFloatArray(elem + HElems.fromY, ReadFloatLength(elem + HElems.yOffset, 4));
  1124.         WriteFloatArray(elem + HElems.fromX, ReadFloatLength(elem + HElems.xOffset, 4));
  1125.         WriteUInt(elem + HElems.moveStartTime, (Int32)GetLevelTime());
  1126.         WriteUInt(elem + HElems.moveTime, Time);
  1127.         WriteFloat(elem + HElems.xOffset, X);
  1128.         WriteFloat(elem + HElems.yOffset, Y);
  1129.     }
  1130.  
  1131.     private static void Scroller(int Option)
  1132.     {
  1133.         if (Option == 1)
  1134.         {
  1135.             MoveOverTime(SCROLLERIndex, 100, 590, 18);
  1136.         }
  1137.         else if (Option == 2)
  1138.         {
  1139.             MoveOverTime(SCROLLERIndex, 100, 625, 18);
  1140.         }
  1141.         else if (Option == 3)
  1142.         {
  1143.             MoveOverTime(SCROLLERIndex, 100, 660, 18);
  1144.         }
  1145.         else if (Option == 4)
  1146.         {
  1147.             MoveOverTime(SCROLLERIndex, 100, 590, 53);
  1148.         }
  1149.         else if (Option == 5)
  1150.         {
  1151.             MoveOverTime(SCROLLERIndex, 100, 625, 53);
  1152.         }
  1153.         else if (Option == 6)
  1154.         {
  1155.             MoveOverTime(SCROLLERIndex, 100, 660, 53);
  1156.         }
  1157.         else if (Option == 7)
  1158.         {
  1159.             MoveOverTime(SCROLLERIndex, 100, 590, 88);
  1160.         }
  1161.         else if (Option == 8)
  1162.         {
  1163.             MoveOverTime(SCROLLERIndex, 100, 625, 88);
  1164.         }
  1165.         else if (Option == 9)
  1166.         {
  1167.             MoveOverTime(SCROLLERIndex, 100, 660, 88);
  1168.         }
  1169.     }
  1170.     #endregion
  1171.  
  1172.     public static void Start(uint P1 = 0, uint P2 = 0)
  1173.     {
  1174.         Enable();
  1175.         StartTTT(P1, P2);
  1176.         ThreadStart Start = null;
  1177.         if (!TTTStatus)
  1178.         {
  1179.             Thread.Sleep(100);
  1180.             TTTStatus = true;
  1181.             if (Start == null)
  1182.             {
  1183.                 Start = () => TTTFunction();
  1184.             }
  1185.             TTTThread = new Thread(Start);
  1186.             TTTThread.IsBackground = true;
  1187.             TTTThread.Start();
  1188.         }
  1189.         else
  1190.         {
  1191.             TTTStatus = false;
  1192.             TTTThread.Abort();
  1193.         }
  1194.     }
  1195.  
  1196.     public static void Stop(string Message = "^:The game was stopped!")
  1197.     {
  1198.         if (Message != null)
  1199.             Typewriter(TypewriterIndex, HElems.AllClient, Message, 195);
  1200.         GameEnd = true;
  1201.         StoreHUD(false);
  1202.         TTTStatus = false;
  1203.         if (TTTThread != null)
  1204.             TTTThread.Abort();
  1205.     }
  1206. }
Add Comment
Please, Sign In to add comment