PDA

View Full Version : Adding a Custom Crown {ALREADY 90% DONE-JUST NEED HELP WITH A CODE}



Shadow Ranqe
June 18th, 2010, 02:03
Okay so I got the idea that I could add my own custom crown. And I thought I could use the donator status theory instead of adding a whole new player right. I coded everything else and I'm stuck on 1 part.

If this is the donator status code:

if(s.startsWith("iconh33"))
{
try
{
anInt1440 = 25;
anInt1441 = 16;
Image image48 = Toolkit.getDefaultToolkit().getImage("./Files/Spirts/dones.png");
anIntArray1439 = new int[anInt1440 * anInt1441];
PixelGrabber pixelgrabber48 = new PixelGrabber(image48, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
pixelgrabber48.grabPixels();
}
catch(Exception exception48)
{
System.out.println(exception48);
}
} else



aClass30_Sub2_Sub1_Sub1Array1099[15] = new Class30_Sub2_Sub1_Sub1("iconh33");

Then what should I change this to?


if(s.startsWith("shadowicon"))
{
try
{
anInt1440 = 25;
anInt1441 = 16;
Image image48 = Toolkit.getDefaultToolkit().getImage("./Files/Spirts/shadowicon.png");
anIntArray1439 = new int[anInt1440 * anInt1441];
PixelGrabber pixelgrabber48 = new PixelGrabber(image48, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
pixelgrabber48.grabPixels();
}
catch(Exception exception48)
{
System.out.println(exception48);
}
} else



aClass30_Sub2_Sub1_Sub1Array1099[16] = new Class30_Sub2_Sub1_Sub1("shadowicon");

Aaron
June 18th, 2010, 02:03
GoodLuck on this, can't wait to see the outcome, Sorry I'm not any good help at coding:(

Sunni
June 18th, 2010, 02:05
Well if you going with the donator base, yes that code would be right.Also is the iconh33 and shadowicon the name of the crown image?

Shadow Ranqe
June 18th, 2010, 02:05
Haha thank you. It came to me during my math final. I got kicked out because I randomly yelled 'Holy shit, why didn't I think of that.." X)

Shadow Ranqe
June 18th, 2010, 02:07
Sorry iconh33 is the donator picture
and shadowicon is the custom icon I have.

But I used the same exact code and used "shadowicon" instead of "iconh33" and I still get the donator sign... think it has something to do with the number 48 =s

Sunni
June 18th, 2010, 02:09
PixelGrabber pixelgrabber48 = new
PixelGrabber(image48, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);

Correct, image48 needs to be changed, but idk what to.

Shadow Ranqe
June 18th, 2010, 02:10
Well the last number I have is 49 but I tried 50 and I got a shitload of errors so idk. =[

Sunni
June 18th, 2010, 02:11
Did you change all the needed to 49?

Shadow Ranqe
June 18th, 2010, 02:23
I changes all the numbers to 50 because I already had a 49. It just keeps showing the donator icon.

if(s.startsWith("shadowicon"))
{
try
{
anInt1440 = 25;
anInt1441 = 16;
Image image50 = Toolkit.getDefaultToolkit().getImage("./Files/Spirts/shadowicon.png");
anIntArray1439 = new int[anInt1440 * anInt1441];
PixelGrabber pixelgrabber50 = new PixelGrabber(image50, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
pixelgrabber50.grabPixels();
}
catch(Exception exception50)
{
System.out.println(exception50);
}

Sunni
June 18th, 2010, 02:33
if(s.startsWith("shadowicon"))
{
try
{
anInt1440 = 25;
anInt1441 = 16;
Image image50 = Toolkit.getDefaultToolkit().getImage("./Files/Spirts/shadowicon.png");
anIntArray1439 = new int[anInt1440 * anInt1441];
PixelGrabber pixelgrabber50 = new PixelGrabber(image50, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
pixelgrabber50.grabPixels();
}
catch(Exception exception50)
{
System.out.println(exception50);
}

It could be the anInt..

Shadow Ranqe
June 18th, 2010, 02:39
I don't think so, most of the other codes for other crowns look just like that, and only the number 48, and 49 change between the two. I think there's another code somewhere that says what number the pixelgrabber would be.

Sunni
June 18th, 2010, 02:41
Post both the 48 and 49 code in code boxes please.

Shadow Ranqe
June 18th, 2010, 02:43
if(s.startsWith("iconh33"))
{
try
{
anInt1440 = 25;
anInt1441 = 16;
Image image48 = Toolkit.getDefaultToolkit().getImage("./Files/Spirts/dones.png");
anIntArray1439 = new int[anInt1440 * anInt1441];
PixelGrabber pixelgrabber48 = new PixelGrabber(image48, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
pixelgrabber48.grabPixels();
}
catch(Exception exception48)
{
System.out.println(exception48);
}
} else



if(s.startsWith("iconh34"))
{
try
{
anInt1440 = 25;
anInt1441 = 16;
Image image49 = Toolkit.getDefaultToolkit().getImage("./Files/Spirts/skull_red.png");
anIntArray1439 = new int[anInt1440 * anInt1441];
PixelGrabber pixelgrabber49 = new PixelGrabber(image49, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
pixelgrabber49.grabPixels();
}
catch(Exception exception49)
{
System.out.println(exception49);
}
}
}

Sunni
June 18th, 2010, 02:47
if(s.startsWith("iconh35"))
{
try
{
anInt1440 = 25;
anInt1441 = 16;
Image image50 = Toolkit.getDefaultToolkit().getImage("./Files/Spirts/shadowicon.png");
anIntArray1439 = new int[anInt1440 * anInt1441];
PixelGrabber pixelgrabber50 = new PixelGrabber(image50, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
pixelgrabber50.grabPixels();
}
catch(Exception exception50)
{
System.out.println(exception50);
}

I see how there all the same except for the command and if those are working maybe it's all in the command.

Shadow Ranqe
June 18th, 2010, 02:55
Still shows the donator crown. I don't think I coded it right in the server somewhere =\
I'll poke around.

Shadow Ranqe
June 18th, 2010, 03:04
Haven't found anything, I'll check more tomorrow...It looks like I've coded it 100% but idk.

X Pwner X
July 6th, 2010, 21:07
is there a tutorial for this? for like changing the mod/admin/donor sign? i dont even have a donor sign i kinda want plz help

mager dd
July 8th, 2010, 10:28
is this in client.java or player.java, or if its something different please tell me what u put this in ?

Pyro Sauce
July 31st, 2010, 02:15
is this in client.java or player.java, or if its something different please tell me what u put this in ?

yea where the hell is this?