Thread: Custom Login Screen - mr giggles

Results 1 to 4 of 4
  1. #1 Custom Login Screen - mr giggles 
    Registered Member
    iHybrid's Avatar
    Join Date
    Sep 2010
    Posts
    2,095
    Thanks given
    636
    Thanks received
    352
    Rep Power
    81
    Could anyone help me out with this? I think it has something to do with Step 8 but I'm stuck

    Doing this tutorial: http://www.rune-server.org/runescape...in-screen.html

    Client class: [Java] // Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov. // Jad home page - Pastebin.com

    Spoiler for Errors:




    Frostborn posted a fix but I couldn't figure out all of the anti-leech, just parts of it.
    Spoiler for Supposedly a fix:


    Quote Originally Posted by Frostborn View Post
    Here is my working version if you need any help adding let me know.




    Here is the fixes for the people that want.

    Create a class in your client files called Userloader.java

    Code:
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.PrintStream;
    import sign.signlink;
    
    public class UserLoader extends client
    {
      public static String usernameh = "";
      public static String password = "";
    
      public static boolean charFileFound = false;
    
      public static void saveuser()
      {
        BufferedWriter localBufferedWriter = null;
        try {
          localBufferedWriter = new BufferedWriter(new FileWriter(signlink.findcachedir()+ "login.ini"));
          localBufferedWriter.write("username = ", 0, 11);
          localBufferedWriter.write(myUsername, 0, myUsername.length());
          localBufferedWriter.newLine();
          localBufferedWriter.write("password = ", 0, 11);
          localBufferedWriter.write(myPassword, 0, myPassword.length());
          localBufferedWriter.newLine();
          localBufferedWriter.close();
        }
        catch (IOException localIOException)
        {
        }
      }
    
      public static void loaduser()
      {
        long l = System.currentTimeMillis();
        String str1 = "";
        String str2 = "";
        String str3 = "";
        String[] arrayOfString = new String[3];
        int i = 0;
        int j = 1;
        BufferedReader localBufferedReader = null;
        try
        {
          localBufferedReader = new BufferedReader(new FileReader(signlink.findcachedir()+ "login.ini"));
          charFileFound = true;
        }
        catch (FileNotFoundException localFileNotFoundException) {
        }
        if (!charFileFound) {
          System.out.println("File could not be found.");
          saveuser();
          return;
        }
    
        while ((i == 0) && (str1 != null)) {
          str1 = str1.trim();
          int k = str1.indexOf("=");
          if (k > -1) {
            str2 = str1.substring(0, k);
            str2 = str2.trim();
            str3 = str1.substring(k + 1);
            str3 = str3.trim();
            arrayOfString = str3.split("\t");
            switch (j)
            {
            case 1:
              if (str2.equals("username"))
              {
                usernameh = str3;
              }
    
              if (str2.equals("password"))
              {
                password = str3;
              }
            }
    
          }
    
          try
          {
            str1 = localBufferedReader.readLine();
          } catch (IOException localIOException2) {
            i = 1;
          }
        }
        try
        {
          localBufferedReader.close();
        } catch (IOException localIOException1) {
          System.out.println("");
        }
      }
    
      public static void finalload()
      {
        myUsername = usernameh;
        myPassword = password;
      }
    }
    Change

    Code:
    protected static String myUsername;
    public int facebook = 0;
    	public int twitter = 0;
    	public int youtube = 0;
    	protected static String myPassword;
    both to static in client.java

    Add the following to client.java

    Code:
    public Sprite CheckBox, CheckBoxHover, LoginButton, LoginButtonHover;
    	public static int loginHovered, CheckHovered;
    World login screen method client.java

    Code:
    private void worldLoginScreen() {
    			resetImageProducers();
    			worldScreenArea.drawGraphics(350, super.graphics, 0);
    			worldScreenArea.initDrawingArea();
    			Sprite facebook1 = new Sprite("Login/f1");
    			Sprite twitter1 = new Sprite("Login/t1");
    			Sprite youtube1 = new Sprite("Login/y1");
    
    				if(super.mouseX >= 1 && super.mouseX <= 36 && super.mouseY >= 465 && super.mouseY <= 500) {
    						twitter = 1;
    				} else if(super.mouseX >= 37 && super.mouseX <= 72 && super.mouseY >= 465 && super.mouseY <= 500) {
    						twitter = 2;
    				} else if(super.mouseX >= 73 && super.mouseX <= 107 && super.mouseY >= 465 && super.mouseY <= 500) {
    						twitter = 3;
    					} else {
    						twitter  = 0;
    				}
    				if(super.clickMode3 == 1 && super.saveClickX >= 1 && super.saveClickX <= 36 && super.saveClickY >= 465 && super.saveClickY <= 500) {
    						launchURL("http://www.facebook.com/pages/Proximity/178938142164540");
    				}
    				if(super.clickMode3 == 1 && super.saveClickX >= 37 && super.saveClickX <= 72 && super.saveClickY >= 465 && super.saveClickY <= 500) {
    						launchURL("https://twitter.com/#!/ProximityPKZ");
    				}
    				if(super.clickMode3 == 1 && super.saveClickX >= 73 && super.saveClickX <= 107 && super.saveClickY >= 465 && super.saveClickY <= 500) {
    						launchURL("http://www.youtube.com/playlist?p=PL510011160728E2B1");
    				}
    				if(draw) {
    					youtube1.drawAdvancedSprite(72, 114);
    					facebook1.drawAdvancedSprite(4, 114);
    					twitter1.drawAdvancedSprite(37, 114);
    					draw = false;
    				}
    				if(twitter  == 0) {
    					Sprite cheapfix = new Sprite("Login/cheap");
    					cheapfix.drawAdvancedSprite(3, 5);
    				}
    				if(twitter == 2) {
    					Sprite cheapfix = new Sprite("Login/cheap");
    					cheapfix.drawAdvancedSprite(3, 5);
    					Sprite twitter2 = new Sprite("Login/t2");
    					twitter2.drawAdvancedSprite(7, 10);
    				}
    				if(twitter == 1) {
    					Sprite cheapfix = new Sprite("Login/cheap");
    					cheapfix.drawAdvancedSprite(3, 5);
    					Sprite facebook2 = new Sprite("Login/f2");
    					facebook2.drawAdvancedSprite(7, 10);
    				}
    				if(twitter == 3) {
    									Sprite cheapfix = new Sprite("Login/cheap");
    					cheapfix.drawAdvancedSprite(3, 5);
    					Sprite youtube2 = new Sprite("Login/y2");
    					youtube2.drawAdvancedSprite(7, 10);
    				}
    	}
    Create the method

    Code:
    public void drawAdvancedSprite(int i, int j) {
          int k = 256;
          i += anInt1442;
          j += anInt1443;
          int i1 = i + j * DrawingArea.width;
          int j1 = 0;
          int k1 = myHeight;
          int l1 = myWidth;
          int i2 = DrawingArea.width - l1;
          int j2 = 0;
          if (j < DrawingArea.topY) {
             int k2 = DrawingArea.topY - j;
             k1 -= k2;
             j = DrawingArea.topY;
             j1 += k2 * l1;
             i1 += k2 * DrawingArea.width;
          }
          if (j + k1 > DrawingArea.bottomY)
             k1 -= (j + k1) - DrawingArea.bottomY;
          if (i < DrawingArea.topX) {
             int l2 = DrawingArea.topX - i;
             l1 -= l2;
             i = DrawingArea.topX;
             j1 += l2;
             i1 += l2;
             j2 += l2;
             i2 += l2;
          }
          if (i + l1 > DrawingArea.bottomX) {
             int i3 = (i + l1) - DrawingArea.bottomX;
             l1 -= i3;
             j2 += i3;
             i2 += i3;
          }
          if (!(l1 <= 0 || k1 <= 0)) {
             drawAlphaSprite(j1, l1, DrawingArea.pixels, myPixels, j2, k1, i2, k, i1);
          }
       }
    Code:
     private void drawAlphaSprite(int i, int j, int ai[], int ai1[], int l, int i1, int j1, int k1, int l1) {
          int k;// was parameter
          int j2;
          for (int k2 = -i1; k2 < 0; k2++) {
             for (int l2 = -j; l2 < 0; l2++) {
                k1 = ((myPixels[i] >> 24) & 255);
                j2 = 256 - k1;
                k = ai1[i++];
                if (k != 0) {
                   int i3 = ai[l1];
                   ai[l1++] = ((k & 0xff00ff) * k1 + (i3 & 0xff00ff) * j2 & 0xff00ff00) + ((k & 0xff00) * k1 + (i3 & 0xff00) * j2 & 0xff0000) >> 8;
                } else {
                   l1++;
                }
             }
             
             l1 += j1;
             i += l;
          }
       }
    in sprite.java
    Reply With Quote  
     

  2. #2  
    Registered Member
    iHybrid's Avatar
    Join Date
    Sep 2010
    Posts
    2,095
    Thanks given
    636
    Thanks received
    352
    Rep Power
    81
    Ok, I'm trying to add Frostborne's fix, I got a little further than I did before.

    Client Class: [Java] // Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov. // Jad home page - Pastebin.com

    Sprite Class: [Java] // Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov. // Jad home page - Pastebin.com

    Paints not working, can't post error yet.
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    May 2012
    Age
    31
    Posts
    119
    Thanks given
    8
    Thanks received
    17
    Rep Power
    0
    Pm me your teamviewer info ill fix.
    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    Registered Member
    iHybrid's Avatar
    Join Date
    Sep 2010
    Posts
    2,095
    Thanks given
    636
    Thanks received
    352
    Rep Power
    81
    Quote Originally Posted by Frostborn View Post
    Pm me your teamviewer info ill fix.
    PM'd

    Thanks so much

    Edit:
    Frostborn fixed it, repped ;D.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Custom Login screen
    By mr giggles in forum Tutorials
    Replies: 182
    Last Post: 09-13-2016, 03:13 AM
  2. Custom Animated Login Screen
    By xxx9234 in forum Selling
    Replies: 11
    Last Post: 07-16-2012, 12:29 PM
  3. Login Screen [Login box position]
    By pro banana in forum Help
    Replies: 6
    Last Post: 09-05-2011, 01:42 PM
  4. New custom login screen.
    By Mr. Gangster in forum RS2 Client
    Replies: 1
    Last Post: 12-11-2009, 04:59 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •