Thread: Taverly obstacle pipe

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Taverly obstacle pipe 
    Registered Member InK Scape's Avatar
    Join Date
    Oct 2012
    Posts
    173
    Thanks given
    18
    Thanks received
    10
    Rep Power
    13
    Hey, so I was looking around my combat areas and I saw that I dont need no requirements for my taverly obstacle pipe. so I have tryed messing around with the codes.

    I want this : c.playerLevel[16] >= 70)) And I have no problem putting it where i want but since theres already an } else when I try to make another one to exemple sendMessage You need a agility level of 70. it gets error in my compiler. I have not tryed to fix them, just thought i couldnt put twice "else" in a code.

    Code:
    		case 9294:
    			if (c.absX < c.objectX) {
    				c.getPA().movePlayer(c.objectX + 1, c.absY, 0);
    			} else if (c.absX > c.objectX) {
    				c.getPA().movePlayer(c.objectX - 1, c.absY, 0);
    			}
    		break;
    How can I make it so whatever side im on I need a agility requirements of 70 and have a sendMessage if i dont have 70 agility?
    Reply With Quote  
     

  2. #2  
    Owner of DemonTec.net

    Join Date
    Feb 2012
    Posts
    149
    Thanks given
    9
    Thanks received
    10
    Rep Power
    11
    Code:
    case 9294:
    if (c.playerLevel[16] < 70) {
    c.sendMessage("your not a high enough agility level to enter this pipe");
    }
    else if (c.playerLevel[16] >= 70) {
        if (c.absX < c.objectX) {
            c.getPA().movePlayer(c.objectX + 1, c.absY, 0);
        } else if (c.absX > c.objectX) {
            c.getPA().movePlayer(c.objectX - 1, c.absY, 0);
        }
    }
    break;
    might have few noob errors but you get the idea
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member InK Scape's Avatar
    Join Date
    Oct 2012
    Posts
    173
    Thanks given
    18
    Thanks received
    10
    Rep Power
    13
    Quote Originally Posted by Rs Bots Pro View Post
    Code:
    case 9294:
    if (c.playerLevel[16] < 70) {
    c.sendMessage("your not a high enough agility level to enter this pipe");
    }
    else if (c.playerLevel[16] >= 70) {
        if (c.absX < c.objectX) {
            c.getPA().movePlayer(c.objectX + 1, c.absY, 0);
        } else if (c.absX > c.objectX) {
            c.getPA().movePlayer(c.objectX - 1, c.absY, 0);
        }
    }
    break;
    might have few noob errors but you get the idea

    No errors...

    And works many thanks
    Reply With Quote  
     

  5. #4  
    Owner of DemonTec.net

    Join Date
    Feb 2012
    Posts
    149
    Thanks given
    9
    Thanks received
    10
    Rep Power
    11
    no worries as long as you understand how it works and didn't just mindlessly copy and paste. not hating if you did. It will just save you alot of time in the long run if you know how to do something rather than asking the same question in a different context
    Reply With Quote  
     

  6. Thankful user:


  7. #5  
    Registered Member InK Scape's Avatar
    Join Date
    Oct 2012
    Posts
    173
    Thanks given
    18
    Thanks received
    10
    Rep Power
    13
    Quote Originally Posted by Rs Bots Pro View Post
    no worries as long as you understand how it works and didn't just mindlessly copy and paste. not hating if you did. It will just save you alot of time in the long run if you know how to do something rather than asking the same question in a different context
    Dont worry i gave you the wrong file and had to change how you did it and well thanks Sorry cant repp yet :/
    Reply With Quote  
     

  8. #6  
    need java lessons
    Eclipse's Avatar
    Join Date
    Aug 2012
    Posts
    4,436
    Thanks given
    686
    Thanks received
    898
    Rep Power
    490
    I didn't see that you understood the code and I felt obligated to explain. (No idea why )


    case 9294:
    if (c.playerLevel[16] < 70) {
    c.sendMessage("your not a high enough agility level to enter this pipe");
    }

    else if (c.playerLevel[16] >= 70) {
    if (c.absX < c.objectX) {
    c.getPA().movePlayer(c.objectX + 1, c.absY, 0);
    }
    else if (c.absX > c.objectX) {
    c.getPA().movePlayer(c.objectX - 1, c.absY, 0);
    }

    }
    break;

    Red - if 70 is greater than your 16th level (agility) then:
    c.sendMessage("your not a high enough agility level to enter this pipe");


    Magenta - if your 16th level is greater than or equal to 70 than it follows until the other bracket.

    Blue -
    "if (c.absX < c.objectX) {" if you c.absX(X coordinate of your position) is less than c.objectX (Object's X coordinate) than do as follows:
    "c.getPA().movePlayer(c.objectX + 1, c.absY, 0);" moves the player to c.objectX + 1(objects X coord + 1) and c.absY (player Y coordinate), and 0 is the height.

    "else if (c.absX > c.objectX) {" if you c.absX(X coordinate of your position) is greater than c.objectX (Object's X coordinate) than do as follows:
    "c.getPA().movePlayer(c.objectX - 1, c.absY, 0);" moves the player to c.objectX - 1(objects X coord + 1) and c.absY (player Y coordinate), and 0 is the height.



    I really hope that someone who didn't understand the code read this because i'm only doing this so you can get a grater understanding.

    Quote Originally Posted by jerryrocks317 View Post
    i am 14 and have my own laptop im on almost 24/7 currently creating rsps lol so please get off my thread lol
    Reply With Quote  
     

  9. Thankful user:


  10. #7  
    Banned

    Join Date
    Jun 2012
    Posts
    652
    Thanks given
    233
    Thanks received
    128
    Rep Power
    0
    Code:
    	
    case 9294:
    		if (c.playerLevel[16] <= 69) {
    			c.sendMessage("You do not have the agility level required to pass this obstacle.");
    			return;
    		}
    		if (c.absX < c.objectX) {
    			c.getPA().movePlayer(c.objectX + 1, c.absY, 0);
    		} else if (c.absX > c.objectX) {
    			c.getPA().movePlayer(c.objectX - 1, c.absY, 0);
    		}
    		break;
    Reply With Quote  
     

  11. #8  
    Registered Member InK Scape's Avatar
    Join Date
    Oct 2012
    Posts
    173
    Thanks given
    18
    Thanks received
    10
    Rep Power
    13
    Yea man, its all good, i just never had the experience of putting a skill requirements to an object with a two way. thanks too everyone
    Reply With Quote  
     

  12. #9  
    Banned

    Join Date
    Apr 2012
    Posts
    3,225
    Thanks given
    2,554
    Thanks received
    832
    Rep Power
    0
    I recommend you to fix the grammar on your message, if you're going to use the code that was posted.
    I recommend you to put a detailed check for the player coordinates aswell.
    Reply With Quote  
     

  13. #10  
    Registered Member InK Scape's Avatar
    Join Date
    Oct 2012
    Posts
    173
    Thanks given
    18
    Thanks received
    10
    Rep Power
    13
    Quote Originally Posted by Demonhorn View Post
    I recommend you to fix the grammar on your message, if you're going to use the code that was posted.
    I recommend you to put a detailed check for the player coordinates aswell.
    I dont mind grammar at the moment, I make big amount of mistake myself and being mostly french does not help :/ and As I said I gave him the wrong code, I replaced with this:
    Code:
    			case 9293:
    if (c.playerLevel[16] < 70) {
    c.sendMessage("You need a agility level of 99 to enter this obstacle.");
    }
    else if (c.playerLevel[16] >= 70) {
    			if (c.absX < c.objectX) {
    				c.getPA().movePlayer(2892, 9799, 0);
    			} else {
    				c.getPA().movePlayer(2886, 9799, 0);
    			}
    }
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. Wilderness Agility Obstacle Problem
    By Armist in forum Help
    Replies: 15
    Last Post: 09-10-2012, 07:59 AM
  2. Wilderness Lava Rock Obstacle
    By Armist in forum Help
    Replies: 0
    Last Post: 06-12-2012, 04:52 AM
  3. Pipe Taverly dungeon
    By xnosafepkx in forum Help
    Replies: 0
    Last Post: 09-03-2011, 07:47 PM
  4. Broken Pipe Exception
    By Arcobaleno in forum Help
    Replies: 2
    Last Post: 11-09-2010, 10:10 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
  •