we can now make animations to npcs i mean head thanks for you P
|
Make sure you have him in your autospawn
Add this in NPC.java:
Add this void in your NPCHandler.java:Code:protected int playerId;
Add this under the process:Code:public void staticGraphic(int gfx, int x, int y, int i) { int Player = npcs[i].playerId; client p = (client) server.playerHandler.players[Player]; p.stillgfx(gfx, y, x); }
Then add this under your welcome message:Code:if (npcs[i].npcType == 639) { if (misc.random(100) == 20) { staticGraphic(574, npcs[i].absX, npcs[i].absY, i); } }
- Mr. BrightsideCode:for(int i = 0; i < server.npcHandler.maxNPCs; i++) { if (server.npcHandler.npcs[i] != null) { server.npcHandler.npcs[i].playerId = playerId; } }
You can use this for other npc gfx also
we can now make animations to npcs i mean head thanks for you P
Nice, it works, but if i host my server with this code like 5 minutes, it crashes and then no1 cant connect to it... Try to fix that, then it's perfect, or if your server wont crash, there's something wrong with my server.
lol santa idiot under process it will blink like every second.
Nice man
I got someting wrong Where do I need to add
? In client.java? or Please help, thanks.Code:for(int i = 0; i < server.npcHandler.maxNPCs; i++) { if (server.npcHandler.npcs[i] != null) { server.npcHandler.npcs[i].playerId = playerId; }
Uhm, sweet Added this to my new project. Thanks.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |