Thread: Change rank on click [Pi]

Results 1 to 2 of 2
  1. #1 Change rank on click [Pi] 
    Registered Member
    Join Date
    Nov 2015
    Posts
    22
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Okay so my problem is as the title sounds, I am making a rsps in which you choose to follow guthix or saradomin and you choose to follow them by clicking on their statue and you get their cape ect,ect. Anyway I made this:

    This is in my playersave.java

    Code:
    					} else if (token.equals("character-follows")) {
    						p.follows =  Integer.parseInt(token2);
    Code:
    		      characterfile.write("character-follows = ", 0, 20);
    		         characterfile.write(Integer.toString(p.follows), 0, Integer.toString(p.follows).length());
    		         characterfile.newLine();

    This is in my player.java

    Code:
    	public int follows;

    Anyway, on the statue I want them to change the character-follows=0 to like character-follows=1 when they click on the guthix statue and character-follows=2 when they click on the saradomin statue.

    Thanks, tell me if you need more info this is my first time posting

    Edit: Hey guys I thought this info would help


    This is what the statue looks like in my ActionHandler.java

    Saradomin:

    Code:
    		case 2873:
    			if (!c.getItems().ownsCape()) {
    				c.startAnimation(645);
    				c.sendMessage("You choose to follow saradomin.");
    				c.getItems().addItem(2412, 1);
    			} else {
    				c.sendMessage("You already chose a god to follow!");
    			}	
    		break;
    Guthix:

    Code:
    		case 2875:
    			if (!c.getItems().ownsCape()) {
    				c.startAnimation(645);
    				c.sendMessage("You choose to follow guthix.");
    				c.getItems().addItem(2413, 1);
    			} else {
    				c.sendMessage("You already chose a god to follow!");
    			}
    		break;
    I did it myself, if anyone else is trying to do this I added this to the statues
    Code:
    									Client p = (Client) Server.playerHandler.players[1];
    									p.follows = 1;
    CLOSE TOPIC PLEASE
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Nov 2015
    Posts
    409
    Thanks given
    122
    Thanks received
    41
    Rep Power
    17
    Quote Originally Posted by Xven View Post
    Okay so my problem is as the title sounds, I am making a rsps in which you choose to follow guthix or saradomin and you choose to follow them by clicking on their statue and you get their cape ect,ect. Anyway I made this:

    This is in my playersave.java

    Code:
    					} else if (token.equals("character-follows")) {
    						p.follows =  Integer.parseInt(token2);
    Code:
    		      characterfile.write("character-follows = ", 0, 20);
    		         characterfile.write(Integer.toString(p.follows), 0, Integer.toString(p.follows).length());
    		         characterfile.newLine();

    This is in my player.java

    Code:
    	public int follows;

    Anyway, on the statue I want them to change the character-follows=0 to like character-follows=1 when they click on the guthix statue and character-follows=2 when they click on the saradomin statue.

    Thanks, tell me if you need more info this is my first time posting

    Edit: Hey guys I thought this info would help


    This is what the statue looks like in my ActionHandler.java

    Saradomin:

    Code:
    		case 2873:
    			if (!c.getItems().ownsCape()) {
    				c.startAnimation(645);
    				c.sendMessage("You choose to follow saradomin.");
    				c.getItems().addItem(2412, 1);
    			} else {
    				c.sendMessage("You already chose a god to follow!");
    			}	
    		break;
    Guthix:

    Code:
    		case 2875:
    			if (!c.getItems().ownsCape()) {
    				c.startAnimation(645);
    				c.sendMessage("You choose to follow guthix.");
    				c.getItems().addItem(2413, 1);
    			} else {
    				c.sendMessage("You already chose a god to follow!");
    			}
    		break;
    I did it myself, if anyone else is trying to do this I added this to the statues
    Code:
    									Client p = (Client) Server.playerHandler.players[1];
    									p.follows = 1;
    CLOSE TOPIC PLEASE
    try ripping it from luzoxpk? they have that built in as well.
    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. Changing Background on Ruse PI 474 Client?
    By XxlJesselxX in forum Help
    Replies: 9
    Last Post: 12-13-2015, 08:28 AM
  2. [PI]Item Value On Click[/PI]
    By Jilic-Matt in forum Help
    Replies: 1
    Last Post: 08-15-2011, 04:08 PM
  3. [PI] Changing message on login?[PI]
    By BradHowes in forum Help
    Replies: 3
    Last Post: 03-01-2011, 06:12 AM
  4. Changing background on PI
    By charrisa in forum Help
    Replies: 2
    Last Post: 07-27-2010, 05:35 AM
  5. Replies: 13
    Last Post: 02-14-2010, 12:34 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
  •