Thread: Loading Custom Sprites :)

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Loading Custom Sprites :) 
    Registered Member
    Alex's Avatar
    Join Date
    Apr 2007
    Posts
    1,658
    Thanks given
    0
    Thanks received
    0
    Rep Power
    284
    YA YA,
    I don't think this has been posted before.
    So I'm gonna teach you how to load custom Sprites

    .tep 1:.
    First find the name of the sprite you want. I will use STATICONS 0.

    .tep 2:.
    Open up: Class30_Sub2_Sub1_Sub1

    .tep 3:.
    Next press Ctrl+F and search for layout.

    .tep 4:.
    Now underneath the last } of that we need to tell the client to load the sprites.
    So use this as an example for STATICONS 0:
    else if (s.equalsIgnoreCase("STATICONS") && i == 0)
    {
    try
    {
    Image image = Toolkit.getDefaultToolkit().getImage("./sprites/"+s+" "+i+".png"); //System.getProperty("user.dir") + "\\"+i+".png");
    anIntArray1439 = new int[anInt1440 * anInt1441];
    PixelGrabber pixelgrabber = new PixelGrabber(image, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
    pixelgrabber.grabPixels();
    //System.out.println(s+" "+i+".png"+ " hopefully loaded");
    }
    catch (Exception exception)
    {
    System.out.println(((Object) (exception)));
    }
    }
    Notice the STATICONS and the 0 are in different places, watch for that!

    .tep 5:.
    Replace the above with the name of your sprites,
    and you done! You can now load custom sprites

    I don't know if you can do this another way, but this is how I just found out today
    Your password is 354 days old, and has therefore expired.


    Fail
     

  2. #2  
    ~Legend Rene
    Guest
    Nice , but that other way that is posted is better , as some sprites require a different way to be loaded , such as client , class44 and class30 subs.
     

  3. #3  
    Registered Member
    Alex's Avatar
    Join Date
    Apr 2007
    Posts
    1,658
    Thanks given
    0
    Thanks received
    0
    Rep Power
    284
    by this I mean normal sprites like stat icons etc
    Your password is 354 days old, and has therefore expired.


    Fail
     

  4. #4  
    0x2B | ~0x2B


    Impulser's Avatar
    Join Date
    Jul 2006
    Posts
    1,305
    Thanks given
    389
    Thanks received
    335
    Rep Power
    2751
    If You think that this has been posted alredy, your wrong, people have the wrong idea about "Sprites", Sprites are the little icons E.G, Buttons, Icons, Tabs Etc.

    Images are things like the Gameframe...
     

  5. #5  
    Super Donator


    Join Date
    Jun 2007
    Age
    28
    Posts
    2,158
    Thanks given
    316
    Thanks received
    282
    Discord
    View profile
    Rep Power
    779
    Quote Originally Posted by ~Legend Rene View Post
    Nice , but that other way that is posted is better , as some sprites require a different way to be loaded , such as client , class44 and class30 subs.
    I couldn't find any sprites that load outta class44...well what I need doesn't anyways
     

  6. #6  
    Community Veteran

    Jake_'s Avatar
    Join Date
    Apr 2007
    Age
    28
    Posts
    2,048
    Thanks given
    18
    Thanks received
    80
    Discord
    View profile
    Rep Power
    253
    Wow didnt realise it was that easy, thanks so much, rep 4 u!
     

  7. #7  
    ~Legend Rene
    Guest
    Quote Originally Posted by mage_owner View Post
    I couldn't find any sprites that load outta class44...well what I need doesn't anyways
    Class44 extends methods in class30's subs , tx used it to load his mapback.
     

  8. #8  
    Zondix
    Guest
    hey its about time u do something xD uv been gone for so long anyhoo nice tut i knew how to do some of it but this summed it up thanks
     

  9. #9  
    Super Donator


    Join Date
    Jun 2007
    Age
    28
    Posts
    2,158
    Thanks given
    316
    Thanks received
    282
    Discord
    View profile
    Rep Power
    779
    Quote Originally Posted by ~Legend Rene View Post
    Class44 extends methods in class30's subs , tx used it to load his mapback.
    ahhh...couldn't you just modify where the client loads the sprite? and make it load from the same place as everywhere else?
     

  10. #10  
    Registered Member
    Alex's Avatar
    Join Date
    Apr 2007
    Posts
    1,658
    Thanks given
    0
    Thanks received
    0
    Rep Power
    284
    Quote Originally Posted by mage_owner View Post
    ahhh...couldn't you just modify where the client loads the sprite? and make it load from the same place as everywhere else?

    you could,
    But one error would lead to another....
    But some sprites are loaded from sub2 instead of sub1,
    so you have to find a way to "combine the together"
    Your password is 354 days old, and has therefore expired.


    Fail
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •