Thread: [718] Help with Prestige??? Please!

Results 1 to 6 of 6
  1. #1 [718] Help with Prestige??? Please! 
    Registered Member
    Join Date
    Jul 2013
    Posts
    97
    Thanks given
    2
    Thanks received
    0
    Rep Power
    22
    EDIT:
    Hello! I have got it up and working for all players, the only thing is they have to wear a item to do it?
    I see this is in player.java, I'm just not sure how to fix it.


    __________________________________________________ _________________________

    Cannot fix prestige system!
    Here is a video showing my detail too its fullest, It'd be a challenge to explain in words.


    As you can see, I cannot prestige... I hit the button but nothing happens? Any idea?

    I'm following this snippet.
    http://www.rune-server.org/runescape...ge-system.html

    Here is my PrestigeOne.java
    Code:
    package com.rs.game.player.dialogues;
    
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.game.Animation;
    import com.rs.game.ForceTalk;
    import com.rs.game.Graphics;
    import com.rs.game.WorldTile;
    import com.rs.game.npc.NPC;
    import com.rs.game.player.content.Magic;
    import com.rs.utils.ShopsHandler;
    
    public class PrestigeOne extends Dialogue {
    
            private int npcId = 8118;
    
            @Override
            public void start() {
                    sendEntityDialogue(SEND_2_TEXT_CHAT,
                                    new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
                                                    "Hello "+player.getDisplayName()+" Would you like to learn about the Prestige system?"}, IS_NPC, npcId, 9827);
            }
            
            @Override
            public void run(int interfaceId, int componentId) {
                    if (stage == -1) {
                            sendOptionsDialogue("Would you like to Prestige?", "Yes", "No.", "I'd like to check my Prestige tokens please.", "I would like to recieve my prestige title please.", "I would like to access the prestige shop please.");
                            stage = 1;
                    } else if (stage == 1) {
                            if (componentId == OPTION_1) {
                            	if(player.getEquipment().wearingArmour()) {
                        			player.getDialogueManager().startDialogue("SimpleNPCMessage", 8118, "You're not able to prestige with armor on. Take it off and then speak to me again.");
                        			return;
                        		}
                            	sendNPCDialogue(npcId, 9827, "The prestige system allows you to reset ALL of you're skills, you will be rewarded with one prestige token for every time you prestige, you will need every 99 in order to prestige, For every prestige you will gain one new user title. ");
                                    stage = 2;
                                    }
                            else if (componentId == OPTION_2) {
                                    end();
                                    }
                            else if (componentId == OPTION_3) {
                            	player.getPackets().sendGameMessage("I Currently have: "+player.prestigeTokens+" prestige tokens.");
                            	player.setNextForceTalk(new ForceTalk("I Currently have: "+player.prestigeTokens+" prestige tokens."));
                                end();
                                }
                            else if (componentId == OPTION_4) {
                				if (player.prestigeTokens == 1) {
                					player.getAppearence().setTitle(676);
                				} else if (player.prestigeTokens == 2) {
                					player.getAppearence().setTitle(6575);
                				} else if (player.prestigeTokens == 3) {
                					player.getAppearence().setTitle(1657);
                				} else if (player.prestigeTokens == 4) {
                					player.getAppearence().setTitle(345);
                				} else if (player.prestigeTokens == 5) {
                					player.getAppearence().setTitle(999);
                				} else {
                					player.getPackets().sendGameMessage("You need to have prestiged to use this command.");
                				}
                                end();
                                }
                            else if (componentId == OPTION_5) {
                            	player.prestigeShops();
                                end();
                                }
                    } else if (stage == 2) {
                    	sendPlayerDialogue(9827, "Wow sounds amazing!");
                    	stage = 3;
                    } else if (stage == 3) {
                    	sendNPCDialogue(npcId, 9827, "That's because it is! When you prestige for the first time ALL of your stats will be reset, but once you gain all your 99 stats back it will only reset your combat stats, such as strength and mage, it will not reset your skills.");
                    	stage = 4;
                    } else if (stage == 4) { 
            			sendOptionsDialogue("Would you like to prestige?", "Yes!", "Of course!");
                    	stage = 5;
                    } else if (stage == 5) { 
            			if (componentId == OPTION_1)
            				player.prestige();
            			if(!player.isPrestige1()) {
            				player.setNextForceTalk(new ForceTalk("I must get all 99's in order to prestige!"));
            			}
            			else if (player.isPrestige1()) {
            				if (player.prestigeTokens == 0) {
            				player.setCompletedPrestigeOne();
            				}
            				else if (player.prestigeTokens == 5) {
            					player.nothing();
            				} else {
            					player.setCompletedPrestige2();
            				}
            			}
            			else if (componentId == OPTION_2) {
                        	end();
                        }
                    end();
                    }
                }
    
    
            @Override
            public void finish() {
    
            }
    }
    and here is my player.java, atleast a section where its relevent.


    Code:
    	}
    		public void resetPlayer() {
    		for (int skill = 0; skill < 25; skill++)
    		getSkills().setXp(skill, 1);
    		//getSkills().set(skill, 1);
    		getSkills().init();
    	}
    	
    	public void resetPlayer2() {
    		for (int skill = 0; skill < 25; skill++)
    		//getSkills().setXp(skill, 1);
    		getSkills().set(skill, 1);
    		getSkills().setXp(3, 1154);
    		getSkills().set(3, 10);
    		getSkills().init();
    	}
    		public void resetPlayer3() {
    		for (int skill = 0; skill < 25; skill++)
    		//getSkills().setXp(skill, 1);
    		getSkills().set(skill, 1);
    		getSkills().setXp(3, 1154);
    		getSkills().set(3, 10);
    		getSkills().init();
    	}
    	
    	public boolean Prestige1;
    	
    	public int prestigeTokens = 0; //prestige points.
    	
    	public boolean isPrestige1() {
    		return Prestige1;
    	}
    
    	public void setPrestige1() {
    		if(!Prestige1) {
    			Prestige1 = true;
    		}
    	}
    	
    	public void setCompletedPrestigeOne() {
    		if(getEquipment().wearingArmour()) {
    			getPackets().sendGameMessage("<col=ff0000>You must remove your amour before you can prestige.");
    		if (prestigeTokens == 0) {
    		prestigeTokens++;
    		resetPlayer();
    		resetPlayer2();
    		resetPlayer3();
    		resetHerbXp();
    		Prestige1 = false;
    	    setNextAnimation(new Animation(1914));
    		setNextGraphics(new Graphics(1762));
    		getPackets().sendGameMessage("You feel a force reach into your soul, You gain One Prestige Token.");
    		World.sendWorldMessage("<img=7><col=ff0000>News: "+getDisplayName()+" has just prestiged! he has now prestiged "+prestigeTokens+" times.", false);
    		if (prestigeTokens == 5) {
    			getPackets().sendGameMessage("<col=ff0000>You have reached the last prestige, you can no longer prestige.");
    		}
    		}
    	}
    	}
    	
    	public void prestigeShops() {
    		if (prestigeTokens == 0) {
    			getPackets().sendGameMessage("You need to have prestiged to gain access to this shop.");
    		} else if (prestigeTokens == 1) {
    			ShopsHandler.openShop(this, 35);
    		} else if (prestigeTokens == 2) {
    			ShopsHandler.openShop(this, 36);
    		} else if (prestigeTokens == 3) {
    			ShopsHandler.openShop(this, 37);
    		} else if (prestigeTokens == 4) {
    			ShopsHandler.openShop(this, 38);
    		} else if (prestigeTokens == 5) {
    			ShopsHandler.openShop(this, 39);
    		}
    	}
    	
    	public void nothing() {
    		getPackets().sendGameMessage("You have completed all the prestiges.");
    	}
    	
    	
    	public void setCompletedPrestige2() {
    		if (prestigeTokens >= 1) {
    			resetCbXp();
    			resetCbSkills();
    			resetSummon();
    			resetSummonXp();
    			prestigeTokens++;
    			Prestige1 = false;
    		    setNextAnimation(new Animation(1914));
    			setNextGraphics(new Graphics(1762));
    			getPackets().sendGameMessage("You feel a force reach into your soul, You gain One Prestige Token.");
    			World.sendWorldMessage("<img=7><col=ff0000>News: "+getDisplayName()+" has just prestiged! he has now prestiged "+prestigeTokens+" times.", false);
    		}
    	}
    	
    	public void resetCbXp() {
    		for (int skill = 0; skill < 7; skill++)
    		getSkills().setXp(skill, 1);
    		//getSkills().set(skill, 1);
    		getSkills().init();
    	}
    	
    	public void resetHerbXp() {
    		getSkills().set(15, 3);
    		getSkills().setXp(15, 174);
    	}
    	
    	public void resetSummon() {
    		getSkills().set(23, 1);
    		getSkills().init();
    	}
    	public void resetSummonXp() {
    		getSkills().setXp(23, 1);
    		getSkills().init();
    	}
    	
    	public void resetCbSkills() {
    		for (int skill = 0; skill < 7; skill++)
    		getSkills().set(skill, 1);
    		getSkills().setXp(3, 1154);
    		getSkills().set(3, 10);
    		getSkills().init();
    	}
    	
    	public void prestige() {
    		if (getSkills().getLevel(Skills.ATTACK) >= 99 
    				&& getSkills().getLevel(Skills.STRENGTH) >= 99 
    				&& getSkills().getLevel(Skills.DEFENCE) >= 99 
    				&& getSkills().getLevel(Skills.RANGE) >= 99 
    				&& getSkills().getLevel(Skills.MAGIC) >= 99 
    				&& getSkills().getLevel(Skills.PRAYER) >= 99
    				&& getSkills().getLevel(Skills.HITPOINTS) >= 99
    				&& getSkills().getLevel(Skills.COOKING) >= 99 
    				&& getSkills().getLevel(Skills.WOODCUTTING) >= 99 
    				&& getSkills().getLevel(Skills.FLETCHING) >= 99 
    				&& getSkills().getLevel(Skills.FISHING) >= 99 
    				&& getSkills().getLevel(Skills.FIREMAKING) >= 99 
    				&& getSkills().getLevel(Skills.CRAFTING) >= 99 
    				&& getSkills().getLevel(Skills.SMITHING) >= 99 
    				&& getSkills().getLevel(Skills.MINING) >= 99
    				&& getSkills().getLevel(Skills.HERBLORE) >= 99 
    				&& getSkills().getLevel(Skills.AGILITY) >= 99 
    				&& getSkills().getLevel(Skills.THIEVING) >= 99 
    				&& getSkills().getLevel(Skills.SLAYER) >= 99
    				&& getSkills().getLevel(Skills.FARMING) >= 99 
    				&& getSkills().getLevel(Skills.HUNTER) >= 99 
    				&& getSkills().getLevel(Skills.RUNECRAFTING) >= 99
    				&& getSkills().getLevel(Skills.CONSTRUCTION) >= 99 
    				&& getSkills().getLevel(Skills.SUMMONING) >= 99 
    				&& getSkills().getLevel(Skills.DUNGEONEERING) >= 120) {
    			setPrestige1();
    		}
    	}
    Reply With Quote  
     

  2. #2  
    Member [718] Help with Prestige??? Please! Market Banned

    xasterisk's Avatar
    Join Date
    Dec 2006
    Posts
    2,473
    Thanks given
    2,572
    Thanks received
    3,036
    Rep Power
    5000
    Delete the following:

    Code:
    @Override
            public void run(int interfaceId, int componentId) {
                    if (stage == -1) {
                            sendOptionsDialogue("Would you like to Prestige?", "Yes", "No.", "I'd like to check my Prestige tokens please.", "I would like to recieve my prestige title please.", "I would like to access the prestige shop please.");
                            stage = 1;
                    } else if (stage == 1) {
    and it should work fine
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jul 2013
    Posts
    97
    Thanks given
    2
    Thanks received
    0
    Rep Power
    22
    Quote Originally Posted by trixstar View Post
    Delete the following:

    Code:
    @Override
            public void run(int interfaceId, int componentId) {
                    if (stage == -1) {
                            sendOptionsDialogue("Would you like to Prestige?", "Yes", "No.", "I'd like to check my Prestige tokens please.", "I would like to recieve my prestige title please.", "I would like to access the prestige shop please.");
                            stage = 1;
                    } else if (stage == 1) {
    and it should work fine
    Are you 100% on that?
    Reply With Quote  
     

  4. #4  
    Member [718] Help with Prestige??? Please! Market Banned

    xasterisk's Avatar
    Join Date
    Dec 2006
    Posts
    2,473
    Thanks given
    2,572
    Thanks received
    3,036
    Rep Power
    5000
    Quote Originally Posted by alext1223 View Post
    Are you 100% on that?
    I don't unless im 110%
    Reply With Quote  
     

  5. #5  
    Success is the worst teacher

    Santa Hat's Avatar
    Join Date
    Oct 2012
    Age
    27
    Posts
    3,334
    Thanks given
    807
    Thanks received
    1,185
    Rep Power
    190
    Please Don't use this lol, its terribly coded, I wrote it literally when I started.

    Use this instead

    Dialogue:

    Code:
    package com.lostRealm.game.player.dialogues;
    
    import com.lostRealm.cache.loaders.NPCDefinitions;
    import com.lostRealm.game.ForceTalk;
    
    public class Prestige extends Dialogue {
    
            private int npcId = 2253;
    
            @Override
            public void start() {
                    sendEntityDialogue(SEND_2_TEXT_CHAT,
                                    new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
                                                    "Hello "+player.getDisplayName()+" Would you like to learn about the Prestige system?"}, IS_NPC, npcId, 9827);
            }
            
            @Override
            public void run(int interfaceId, int componentId) {
                    if (stage == -1) {
                            sendOptionsDialogue("Would you like to prestige?", "Yes", "No.", "I'd like to check my Prestige tokens please.", "I would like to recieve my prestige title please.", "I would like to access the prestige shop please.");
                            stage = 1;
                    } else if (stage == 1) {
                            if (componentId == OPTION_1) {
                        		if (player.getEquipment().wearingArmour()) {
                    				player.getPackets().sendGameMessage("<col=ff0000>You must remove your armour before you can prestige.");
                    				end();
                    		} else {
                            	sendNPCDialogue(npcId, 9827, "The Prestige System allows you to prestige through the 25 prestiges, each prestige will reset your combat skills only, so do not worry about loosing your skill levels. Each Prestige will reward you with a new Prestige title and Prestige tokens.");
                                    stage = 2;
                    			}
                            } else if (componentId == OPTION_2) {
                                    end();
                           } else if (componentId == OPTION_3) {
                            	player.getPackets().sendGameMessage("I Currently have: "+player.prestigePoints+" prestige tokens.");
                            	player.setNextForceTalk(new ForceTalk("I Currently have: "+player.prestigePoints+" prestige tokens."));
                                end();
                           } else if (componentId == OPTION_4) {
                				if (player.prestigeLevel == 1) {
                					player.getAppearence().setTitle(1024);
                				} else if (player.prestigeLevel == 2) {
                					player.getAppearence().setTitle(1214);
                				} else if (player.prestigeLevel == 3) {
                					player.getAppearence().setTitle(1594);
                				} else if (player.prestigeLevel == 4) {
                					player.getAppearence().setTitle(1432);
                				} else if (player.prestigeLevel == 5) {
                					player.getAppearence().setTitle(1342);
                				} else {
                					player.getPackets().sendGameMessage("You need to have prestiged in order to gain a prestige title.");
                				}
                                end();
                           } else if (componentId == OPTION_5) {
                            	player.prestigeShops();
                                end();
                           }
                    } else if (stage == 2) {
                    	sendPlayerDialogue(9827, "Wow sounds amazing!");
                    	stage = 3;
                    } else if (stage == 3) {
                    	sendNPCDialogue(npcId, 9827, "That's because it is! When you have prestiged you will be rewarded with Prestige Points which can be spent in the Prestige Shop.");
                    	stage = 4;
                    } else if (stage == 4) { 
            			sendOptionsDialogue("Would you like to prestige?", "Yes Please!", "No thank you.");
                    	stage = 5;
                    } else if (stage == 5) { 
            			if (componentId == OPTION_1) {
            				player.canPrestige();
            			} else if (componentId == OPTION_2) {
                        	end();
                        }
                    end();
                    }
                }
    
    
            @Override
            public void finish() {
    
            }
    }
    Player.java

    Code:
    	/**
    	 * Prestige System
    	 */
    	/* The Players Prestige Level */
    	public int prestigeLevel, prestigePoints;
    	
    	/** Checks if the Player can Prestige **/
    	public void canPrestige() {
    		for (int i = 0; i < 7; i++) {
    			if (getSkills().getLevel(i) >= 99) {
    				setPrestige();
    				return;
    			} else {
    				out("You must have 99 in Attack, Strength, Defence, Hitpoints, Range, Mage and Prayer in order to prestige.");
    				return;
    			}
    		}
    	}
    	
    	/** Increases the Players Prestige Level **/
    	private void setPrestige() {
    		if (prestigeLevel == 25) {
    			out("We are sorry but you may only prestige 25 times.");
    			return;
    		}
    		prestigeLevel++;
    		prestigePoints += 30;
    		resetSkills();
    	   	setNextAnimation(new Animation(1914));
    		setNextGraphics(new Graphics(92));
    		setNextForceTalk(new ForceTalk("Arguuhhhhhh"));
    		getPackets().sendGameMessage("You feel a force reach into your soul, You gain One Prestige Token.");
    		World.sendWorldMessage("<img=7><col=ff0000>News: "+getDisplayName()+" has just prestiged! they have now prestiged "+prestigeLevel+" times.", false);
    	}
    	
    	/** Resets the Skills that are required to prestige. **/
    	private void resetSkills() {
    		for (int i = 0; i < 7; i++) {
    			getSkills().set(i, 1);
    			getSkills().setXp(i, 1);
    			getSkills().init();
    		}
    		getSkills().set(3, 10);
    		getSkills().setXp(3, 1154);
    	}
    	
    	/** Opens prestige shop. **/
    	public void prestigeShops() {
    		if (prestigeLevel == 0) {
    			getPackets().sendGameMessage("You need to have prestiged to gain access to this shop.");
    		} else if (prestigeLevel == 1) {
    			ShopsHandler.openShop(this, 35);
    		} else if (prestigeLevel == 2) {
    			ShopsHandler.openShop(this, 36);
    		} else if (prestigeLevel == 3) {
    			ShopsHandler.openShop(this, 37);
    		} else if (prestigeLevel == 4) {
    			ShopsHandler.openShop(this, 38);
    		} else if (prestigeLevel == 5) {
    			ShopsHandler.openShop(this, 39);
    		}
    	}


    Reply With Quote  
     

  6. Thankful user:


  7. #6  
    Registered Member
    Join Date
    Jul 2013
    Posts
    97
    Thanks given
    2
    Thanks received
    0
    Rep Power
    22
    Quote Originally Posted by Santa Hat View Post
    Please Don't use this lol, its terribly coded, I wrote it literally when I started.

    Use this instead
    I really never thought I could bother you to help me, but you did. Thank you so much
    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: 10
    Last Post: 10-21-2014, 08:12 AM
  2. 718 matrix need help with shops please
    By codyorr4 in forum Help
    Replies: 4
    Last Post: 06-23-2013, 03:41 AM
  3. Help with this please.
    By wreckless in forum Help
    Replies: 3
    Last Post: 03-10-2009, 09:41 PM
  4. Help with silabs Please
    By fyreplayer in forum RS2 Client
    Replies: 1
    Last Post: 11-14-2007, 04:12 AM
  5. Help With compiler!!!! please!!!!
    By romanthomas in forum Tutorials
    Replies: 4
    Last Post: 11-12-2007, 05: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
  •