Thread: 2 Questions in 1! help! (Will repz)

Results 1 to 9 of 9
  1. #1 2 Questions in 1! help! (Will repz) 
    Registered Member
    discipl3's Avatar
    Join Date
    Sep 2008
    Posts
    324
    Thanks given
    1
    Thanks received
    5
    Rep Power
    95
    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
    All models i post are made by me. Yay.
    Quote Originally Posted by Koâk View Post
    I WILL RAPE++
    Reply With Quote  
     

  2. #2  
    Registered Member
    Apower's Avatar
    Join Date
    Sep 2008
    Age
    30
    Posts
    824
    Thanks given
    7
    Thanks received
    15
    Rep Power
    94
    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.
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Jul 2008
    Posts
    1,043
    Thanks given
    209
    Thanks received
    46
    Rep Power
    0
    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.
    Reply With Quote  
     

  4. #4  
    Registered Member
    discipl3's Avatar
    Join Date
    Sep 2008
    Posts
    324
    Thanks given
    1
    Thanks received
    5
    Rep Power
    95
    Well, they are agressive, except if i run away then run back they will stop attacking me.. And then i can range them from afar without them attacking back.
    All models i post are made by me. Yay.
    Quote Originally Posted by Koâk View Post
    I WILL RAPE++
    Reply With Quote  
     

  5. #5  
    Registered Member
    Apower's Avatar
    Join Date
    Sep 2008
    Age
    30
    Posts
    824
    Thanks given
    7
    Thanks received
    15
    Rep Power
    94
    Well idk... all npc's in delta stops after a while.....Delta combat sucks.
    Reply With Quote  
     

  6. #6  
    Banned

    Join Date
    May 2009
    Posts
    1,387
    Thanks given
    21
    Thanks received
    14
    Rep Power
    0
    Just use the goodDistance method. Just apply it for NPCs instead of players.
    Reply With Quote  
     

  7. #7  
    !\_\So you thinK/_/!
    Guest
    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;
    			}
    	}
    Reply With Quote  
     

  8. #8  
    !\_\So you thinK/_/!
    Guest
    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;
    		}
    Reply With Quote  
     

  9. #9  
    Registered Member
    discipl3's Avatar
    Join Date
    Sep 2008
    Posts
    324
    Thanks given
    1
    Thanks received
    5
    Rep Power
    95
    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?
    All models i post are made by me. Yay.
    Quote Originally Posted by Koâk View Post
    I WILL RAPE++
    Reply With Quote  
     


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
  •