Thread: Walking on command?

Results 1 to 4 of 4
  1. #1 Walking on command? 
    Registered Member Earthling1's Avatar
    Join Date
    Mar 2007
    Age
    26
    Posts
    38
    Thanks given
    0
    Thanks received
    3
    Rep Power
    11
    I've tried searching for this problem several times... Google, other Rsps communities, rune-server search feature <.< Not a single answer.

    I don't know how much information I can give you.

    Just name the information which I need to give you, and I'll provide it <.<

    I'm not asking for you to do it for me O_o. I'm just asking for a bit of help.

    I've been trying to make it so that if a player clicks on a ladder, they have to be in a certain spot... If they're not then to make them walk to that spot.

    This is my attempt so far.

    Code: [Select]
    } else if (objectID == 11740) {
    if (isNextTo(2954, 3388) == true) {
    setAnimation(828);
    heightLevel = 1;
    break;
    } else {
    walkTo(2954, 3388);
    setAnimation(828);
    heightLevel = 1;
    break;
    }

    Error given:
    Logs me out and then teleports me straight up without moving me.

    After looking around at several forums, I've discovered that the walkTo method is used for NPCs.

    If I have to code it myself, that's fine as well. I just need to know where to start.

    Source Used: DeltaClean
    Reply With Quote  
     

  2. #2  
    Registered Member Earthling1's Avatar
    Join Date
    Mar 2007
    Age
    26
    Posts
    38
    Thanks given
    0
    Thanks received
    3
    Rep Power
    11
    /bump.

    Still looking for help with this ^.^
    Reply With Quote  
     

  3. #3  
    Registered Member Mayday Parade's Avatar
    Join Date
    Apr 2009
    Age
    23
    Posts
    495
    Thanks given
    20
    Thanks received
    17
    Rep Power
    8
    Code:
    } else if (objectID == 11740) {
    if(absX == 2954 && absY == 3388){
    setAnimation(828);
    heightLevel = 1;
    break;
    } else {
    walkTo(2954, 3388);
    setAnimation(828);
    heightLevel = 1;
    break;
    }
    Try that. If that doesn't work, you're gonna have to mess with the walkTo code, because i think all that does is walk your player that many spaces (I.E. walkTo(1, 1); = Walk the character 1 space up on X and one space up on Y)

    Spoiler for LoL:
    Quote Originally Posted by Imbued View Post
    Quote Originally Posted by pasta186 View Post
    That tutorial doesnt walk.
    That's because it got no legs..
    Best report I've sent? "Mass spam? Also in wrong sexual"
    LOL
    Reply With Quote  
     

  4. #4  
    Registered Member Earthling1's Avatar
    Join Date
    Mar 2007
    Age
    26
    Posts
    38
    Thanks given
    0
    Thanks received
    3
    Rep Power
    11
    I already have the isNextTo boolean coded, so there's no need to change it.

    Code:
    //Determines whether the player is close to an object
    	public boolean isNextTo(int objectX, int objectY) {
    		if (((absX == objectX)) && ((absY == objectY))) {
    			return true;
    		} else {
    			return false;
    		}
    	}
    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

Similar Threads

  1. Replies: 50
    Last Post: 04-17-2014, 02:19 PM
  2. Replies: 9
    Last Post: 07-31-2010, 12:42 AM
  3. new type of pure command or master command
    By brodyjenkins in forum Configuration
    Replies: 18
    Last Post: 05-16-2010, 07:59 AM
  4. Replies: 4
    Last Post: 02-13-2009, 12:32 AM
  5. Custom Command Voids(Command Hndler)
    By AlexMason in forum Tutorials
    Replies: 7
    Last Post: 03-22-2008, 12:41 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •