Hellooo... Here is a lil modification you can add to any npc, especially for shopkeepers!
Icons to show what sort of thing that NPC relates to. This nothing to big so don't be a smart ass and comment unuseful things lol.
First Download these sprites and place them in your Sprites Folder: SpritesIcon.zip - Mediafire
Ok first of all you can add more of these icons when ever and am sure this will an simple tutorial so you wont have trouble adding more later on.
Client Sided
Step 1: Open Client.java
Add this:
Code:
static Sprite bankerIcon;
static Sprite retailIcon;
static Sprite meleshopIcon;
Step 2:
Find:
Code:
private void updateEntities() {
try {
int anInt974 = 0;
for (int j = -1; j < playerCount + npcCount; j++) {
Object obj;
if (j == -1)
obj = myPlayer;
else if (j < playerCount)
obj = playerArray[playerIndices[j]];
else
obj = npcArray[npcIndices[j - playerCount]];
if (obj == null || !((Entity) (obj)).isVisible())
continue;
if (obj instanceof NPC) {
Bellow that
Add:
Code:
EntityDef entityDef = ((NPC) obj).desc;
npcScreenPos(((Entity) (obj)), ((Entity) (obj)).height+15);
bankerIcon = new Sprite(signlink.findcachedir()
+ "Sprites/bankerIcon.PNG",
1);
retailIcon = new Sprite(signlink.findcachedir()
+ "Sprites/retailIcon.PNG",
1);
meleshopIcon = new Sprite(signlink.findcachedir()
+ "Sprites/meleshopIcon.PNG",
1);
EntityDef entityDef_1 = ((NPC) obj).desc;
if (entityDef_1.type == 953) {
bankerIcon.drawAdvancedSprite(spriteDrawX - 12, spriteDrawY - 20);
} else if (entityDef_1.type == 9159) {
retailIcon.drawAdvancedSprite(spriteDrawX - 12, spriteDrawY - 20);
} else if (entityDef_1.type == 883) {
meleshopIcon.drawAdvancedSprite(spriteDrawX - 12, spriteDrawY - 20);
}
That is it, your done.
Good luck on adding more icons and and let us what else you have added!