Npchandler should have all info you need, aggressive, look for existing range npc id in there and you see how to add it on your Armandyl.
No spoonfeed.
|
Okay, i have 2 basic delta questions o.O
1. How can i get these nubs to follow me after i stop attacking and run away.
2. How can i make them have an attacking range? At the moment they need to be next to you to attack, i want it to be like a range attack.. cause.. well its Armadyl. lol
All help is appreciated!
I will rep++ For any attempts to help
Npchandler should have all info you need, aggressive, look for existing range npc id in there and you see how to add it on your Armandyl.
No spoonfeed.
NPCHandler, there may be a code block in which you add aggressive npc's, I don't remember now cause I have never used delta. if you got other aggressive npcs take down their number, go in npc handler and look where they are located.
Well idk... all npc's in delta stops after a while.....Delta combat sucks.
Just use the goodDistance method. Just apply it for NPCs instead of players.
check if you have these three codes in your npchandler.java
Code:public void annoyNpcs(int npcId) { for(Player p : server.playerHandler.players) { if(p != null) { client player = (client)p; if (player.distanceToPoint(npcs[npcId].absX, npcs[npcId].absY) <= getDistanceForNpc(npcId) && p.heightLevel == npcs[npcId].heightLevel) { if(npcGetsAnnoyed(npcId) && (npcs[npcId] != null) && (npcs[npcId].StartKilling == 0)) { npcs[npcId].StartKilling = player.playerId; npcs[npcId].IsUnderAttack = true; npcs[npcId].RandomWalk = false; AttackPlayer(player.playerId); } } } } }Code:public int getDistanceForNpc(int Npc) { switch(npcs[Npc].npcType) { case 50: case 1115: case 1155: case 1160: case 2627: case 2630: case 2631: case 2738: case 2741: case 2743: case 2745: case 1472: return 100; case 2746: return 150; case 3200: case 63: case 1459: case 111: case 125: case 59: case 91: case 912: case 913: case 914: case 78: case 941: case 82: case 83: case 1153: case 1154: case 2263: case 2264: case 2265: return 10; default: return 10; } }Code:public boolean npcGetsAnnoyed(int Npc) { switch(npcs[Npc].npcType) { case 50: case 3200: case 1115: case 1459: case 1155: case 1160: case 2627: case 2630: case 2631: case 2738: case 2741: case 2743: case 2745: case 2746: case 1472: case 63: case 111: case 125: case 59: case 91: case 912: case 913: case 914: case 78: case 941: case 82: case 83: case 1153: case 1154: case 2263: case 2264: case 2265: return true; default: return false; } }
oh sorry nvm lol ignore that xD here try adding this into npchandler.java
Code:if ((GoodDistance(npcs[NPCID].absX, npcs[NPCID].absY, EnemyX, EnemyY, 30) == false) && server.npcHandler.npcs[NPCID].npcType != 2627 && server.npcHandler.npcs[NPCID].npcType != 2630 && server.npcHandler.npcs[NPCID].npcType != 2631 && server.npcHandler.npcs[NPCID].npcType != 2741 && server.npcHandler.npcs[NPCID].npcType != 2743 && server.npcHandler.npcs[NPCID].npcType != 2745 && server.npcHandler.npcs[NPCID].npcType != 2746 && server.npcHandler.npcs[NPCID].npcType != 2738 || player == null || player.deathStage > 0) { npcs[NPCID].RandomWalk = true; ResetAttackPlayer(NPCID); return false; } if ((GoodDistance(npcs[NPCID].absX, npcs[NPCID].absY, EnemyX, EnemyY, 30) == true) && server.npcHandler.npcs[NPCID].npcType != 2627 && server.npcHandler.npcs[NPCID].npcType != 2630 && server.npcHandler.npcs[NPCID].npcType != 2631 && server.npcHandler.npcs[NPCID].npcType != 2741 && server.npcHandler.npcs[NPCID].npcType != 2743 && server.npcHandler.npcs[NPCID].npcType != 2745 && server.npcHandler.npcs[NPCID].npcType != 2746 && server.npcHandler.npcs[NPCID].npcType != 2738 && player != null && player.deathStage == 0 || (server.npcHandler.npcs[NPCID].npcType == 2627 || server.npcHandler.npcs[NPCID].npcType == 2630 || server.npcHandler.npcs[NPCID].npcType == 2631 || server.npcHandler.npcs[NPCID].npcType == 2741 || server.npcHandler.npcs[NPCID].npcType == 2743 || server.npcHandler.npcs[NPCID].npcType == 2745 || server.npcHandler.npcs[NPCID].npcType == 2746 || server.npcHandler.npcs[NPCID].npcType == 2738)) { FollowPlayerCB(NPCID, Player); } if ((GoodDistance(npcs[NPCID].absX, npcs[NPCID].absY, EnemyX, EnemyY, 30) == false) && server.npcHandler.npcs[NPCID].npcType != 2627 && server.npcHandler.npcs[NPCID].npcType != 2630 && server.npcHandler.npcs[NPCID].npcType != 2631 && server.npcHandler.npcs[NPCID].npcType != 2741 && server.npcHandler.npcs[NPCID].npcType != 2743 && server.npcHandler.npcs[NPCID].npcType != 2745 && server.npcHandler.npcs[NPCID].npcType != 2746 && server.npcHandler.npcs[NPCID].npcType != 2738) { ResetAttackPlayer(NPCID); return false; }
Well, i have the good distance thing, but its not that. Its just that when they are under attack they NEVER move out of the spot they are in, thats why u can range them from far away.
I remember doing a tutorial so npc's can't leave the boundaries set for them in autospawn.cfg. I am 80% sure thats the problem, cause no npc's move now.. lol.
But then again, i made them able to move throughout that whole area.. idk.. But does any one know how i can reverse the boundary thing?
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |