Thread: npc walk back

Results 1 to 4 of 4
  1. #1 npc walk back 
    Registered Member
    Join Date
    Sep 2009
    Posts
    527
    Thanks given
    22
    Thanks received
    10
    Rep Power
    30
    Hey i need it so that if u walk a certain amount of squares away from a npc it returns to its origional spawn id.


    if possible id like it so i can use different amounts of squars using this:
    Code:
    	public static int ToFar(int type) {
    		switch (type) {
    
    		case 1: 
    		case 9:
    			return 3;
    
    		case 1265:
    		case 1267:
    			return 6;
    		case 100:
    			return 3;

    dont tell me 2 rip from devo... i tried so much
    :trollface:
    Working on a Project with Shoopdawhoop =)
    Spoiler for lol:
    [img]http://2.bp.blogspot.com/_eQXh9P3bqks/S-ewcqWSXyI/AAAAAAAABUI/6i3xd_77cVk/s1600/****-bear-cake.jpg[/img]
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Mar 2009
    Posts
    1,123
    Thanks given
    36
    Thanks received
    217
    Rep Power
    183
    if(!p.withinDistance(blah)) {
    npc.walkTo(spawnPointX, spawnPointY);
    }
    I'm not the devil, but I'm sure as **** not a saint.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Sep 2009
    Posts
    527
    Thanks given
    22
    Thanks received
    10
    Rep Power
    30
    ^

    Code:
    COMPILING...
    NPCHandler.java:624: cannot find symbol
    symbol  : variable p
    location: class NPCHandler
    if(!p.withinDistance(8)) {
        ^
    NPCHandler.java:625: cannot find symbol
    symbol  : variable spawnPointX
    location: class NPCHandler
    walkTo(spawnPointX, spawnPointY);
           ^
    NPCHandler.java:625: cannot find symbol
    symbol  : variable spawnPointY
    location: class NPCHandler
    walkTo(spawnPointX, spawnPointY);
                        ^
    3 errors
    DivinePk - chris
    Press any key to continue . . .
    :trollface:
    Working on a Project with Shoopdawhoop =)
    Spoiler for lol:
    [img]http://2.bp.blogspot.com/_eQXh9P3bqks/S-ewcqWSXyI/AAAAAAAABUI/6i3xd_77cVk/s1600/****-bear-cake.jpg[/img]
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Sep 2009
    Posts
    527
    Thanks given
    22
    Thanks received
    10
    Rep Power
    30
    cmon guys help please
    :trollface:
    Working on a Project with Shoopdawhoop =)
    Spoiler for lol:
    [img]http://2.bp.blogspot.com/_eQXh9P3bqks/S-ewcqWSXyI/AAAAAAAABUI/6i3xd_77cVk/s1600/****-bear-cake.jpg[/img]
    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
  •