Esempio n. 1
0
        public static String doCensor(String s)
        {
            long l = NetDrawingTools.CurrentTimeMillis();

            char[] ac = s.ToCharArray();
            method495(ac);
            String s1 = (new String(ac)).Trim();

            ac = s1.ToLower().ToCharArray();
            String s2 = s1.ToLower();

            method505(ac);
            method500(ac);
            method501(ac);
            method514(ac);
            for (int j = 0; j < exceptions.Length; j++)
            {
                for (int k = -1; (k = s2.IndexOf(exceptions[j], k + 1)) != -1;)
                {
                    char[] ac1 = exceptions[j].ToCharArray();
                    Array.Copy(ac1, 0, ac, k, ac1.Length);
                }
            }
            method498(s1.ToCharArray(), ac);
            method499(ac);
            long l1 = NetDrawingTools.CurrentTimeMillis();

            return((new String(ac)).Trim()); //xxx chat filter, return s to avoid
        }
Esempio n. 2
0
        public void mousePressed(int mouseX, int mouseY, bool left)
        {
            int i = mouseX;
            int j = mouseY;

            if (gameFrame != null)
            {
                i -= 4;
                j -= 22;
            }
            idleTime  = 0;
            clickX    = i;
            clickY    = j;
            clickTime = NetDrawingTools.CurrentTimeMillis();
            if (!left)
            {
                clickMode1 = 2;
                clickMode2 = 2;
            }
            else
            {
                clickMode1 = 1;
                clickMode2 = 1;
            }
            clickMode3 = clickMode1;
        }
Esempio n. 3
0
 public void createClientFrame(int i, int j)
 {
     myWidth        = Screen.width;
     myHeight       = Screen.height;
     fullGameScreen = new RSImageProducer(myWidth, myHeight);
     helvetica      = new UnityEngine.Font("Helvetica");
     drawLoadingText(0, "Loading...");
     signlink.run();
     Loom.StartSingleThread(() => { startUp(); }, System.Threading.ThreadPriority.Normal, true);
     for (int k1 = 0; k1 < 10; k1++)
     {
         aLongArray7[k1] = NetDrawingTools.CurrentTimeMillis();
     }
 }
Esempio n. 4
0
        public void ClientUpdateLoop()
        {
            //startUp();
            int i  = 0;
            int j  = 256;
            int k  = 1;
            int l  = 0;
            int i1 = 0;

            for (int j1 = 0; j1 < 10; j1++)
            {
                aLongArray7[j1] = NetDrawingTools.CurrentTimeMillis();
            }
            while (true)
            {
//              if((NetDrawingTools.CurrentTimeMillis() - lastGameFrame) >= 20)
//              {
//                  clientUpdate();
//                  lastGameFrame = NetDrawingTools.CurrentTimeMillis();
//              }

                if (anInt4 < 0)
                {
                    break;
                }
                if (anInt4 > 0)
                {
                    anInt4--;
                    if (anInt4 == 0)
                    {
                        exit();
                        return;
                    }
                }
                int k1 = j;
                int i2 = k;
                j = 300;
                k = 1;
                long l2 = NetDrawingTools.CurrentTimeMillis();
                if (aLongArray7[i] == 0L)
                {
                    j = k1;
                    k = i2;
                }
                else
                if (l2 > aLongArray7[i])
                {
                    j = (int)((long)(2560 * delayTime) / (l2 - aLongArray7[i]));
                }
                if (j < 25)
                {
                    j = 25;
                }
                if (j > 256)
                {
                    j = 256;
                    k = (int)((long)delayTime - (l2 - aLongArray7[i]) / 10L);
                }
                if (k > delayTime)
                {
                    k = delayTime;
                }
                aLongArray7[i] = l2;
                i = (i + 1) % 10;
                if (k > 1)
                {
                    for (int j2 = 0; j2 < 10; j2++)
                    {
                        if (aLongArray7[j2] != 0L)
                        {
                            aLongArray7[j2] += k;
                        }
                    }
                }
                if (k < minDelay)
                {
                    k = minDelay;
                }
                try
                {
                    Thread.Sleep(k);
                }
                catch (Exception interruptedexception)
                {
                    i1++;
                }
                for (; l < 256; l += j)
                {
                    clickMode3 = clickMode1;
                    saveClickX = clickX;
                    saveClickY = clickY;
                    aLong29    = clickTime;
                    clickMode1 = 0;
                    processGameLoop();
                    readIndex = writeIndex;
                }

                l &= 0xff;
                if (delayTime > 0)
                {
                    fps = (1000 * j) / (delayTime * 256);
                }
                shouldDraw = true;
            }
        }