Thread: Changing XP rates the higher lvl you get

Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1 Changing XP rates the higher lvl you get 
    Registered Member
    Join Date
    Oct 2014
    Posts
    83
    Thanks given
    0
    Thanks received
    4
    Rep Power
    11
    As it says in the title, I've been trying to find out how to change the xp rates when i get 80 dung for example but i have no idea how to do it, does any know how to?
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Jan 2014
    Posts
    1,652
    Thanks given
    428
    Thanks received
    501
    Rep Power
    221
    Skills.java, addxp method.
    Dung skillid is 24.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2015
    Posts
    195
    Thanks given
    137
    Thanks received
    28
    Rep Power
    27
    If it's only for dung I'd do it directly from your dung script, make some formula to calculate XP which is affected by level. If you do it from skills.java and modify the addXp() method it will change it for every skill unless you make a check on case it's XP for dung but in that case you'll get a pretty messy addXp method so just do as I first said
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Oct 2014
    Posts
    83
    Thanks given
    0
    Thanks received
    4
    Rep Power
    11
    I forgot to mention, i got a custom dung skill, where you kill 1 npc and you get points and xp at the same time, ill add a picture.

    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jan 2015
    Posts
    17
    Thanks given
    11
    Thanks received
    3
    Rep Power
    13
    Post the snippet where your XP is added in your custom minigame.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Oct 2014
    Posts
    83
    Thanks given
    0
    Thanks received
    4
    Rep Power
    11
    Code:
    public void handlePointsNPCs() {
            Player killer = getMostDamageReceivedSourcePlayer();
            switch (id) {
            case 10537:
            	killer.getSkills().addXp(24, 160);
            	killer.setDungPoints(killer.getDungPoints() + 200000); //amount of points given
            	 killer.getPackets().sendGameMessage("<col=434343>You killed an Forgotten Warrior and received 200k (test) Dungeoneering Points!");
                break;
            case 10603:
            	killer.getSkills().addXp(24, 160);
            	killer.setDungPoints(killer.getDungPoints() + 750); //amount of points given
            	 killer.getPackets().sendGameMessage("<col=434343>You killed an Forgotten Mager and received 750 Dungeoneering Points!");
                break;
            case 10363:
            	killer.getSkills().addXp(24, 160);
            	killer.setDungPoints(killer.getDungPoints() + 750); //amount of points given
            	 killer.getPackets().sendGameMessage("<col=434343>You killed an Forgotten Ranger and received 750 Dungeoneering Points!");
                break;
            	
    }
    }
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,409
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    nvm.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jan 2015
    Posts
    195
    Thanks given
    137
    Thanks received
    28
    Rep Power
    27
    Quote Originally Posted by pontus33455 View Post
    Code:
    public void handlePointsNPCs() {
            Player killer = getMostDamageReceivedSourcePlayer();
            switch (id) {
            case 10537:
            	killer.getSkills().addXp(24, 160);
            	killer.setDungPoints(killer.getDungPoints() + 200000); //amount of points given
            	 killer.getPackets().sendGameMessage("<col=434343>You killed an Forgotten Warrior and received 200k (test) Dungeoneering Points!");
                break;
            case 10603:
            	killer.getSkills().addXp(24, 160);
            	killer.setDungPoints(killer.getDungPoints() + 750); //amount of points given
            	 killer.getPackets().sendGameMessage("<col=434343>You killed an Forgotten Mager and received 750 Dungeoneering Points!");
                break;
            case 10363:
            	killer.getSkills().addXp(24, 160);
            	killer.setDungPoints(killer.getDungPoints() + 750); //amount of points given
            	 killer.getPackets().sendGameMessage("<col=434343>You killed an Forgotten Ranger and received 750 Dungeoneering Points!");
                break;
            	
    }
    }
    As I just said.. Right before the killer.getSkills().addXp(24, x)
    Define a variable called xp and make it equal to some formula that you like and change the addXp(24, 160) for addXp(24, xp)

    Ex

    Code:
    case 10537:
                    Private int xp = (killer.getSkills().getLevelByXp(24) * 160)
            	killer.getSkills().addXp(24, xp);
    I'm in my phone so I don't remember if it's getLevelByXp, just put the method that returns the players dung lvl. Just adjust the formula to whatever you want, the 160 would be the base XP which depends on the NPC killed
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Oct 2014
    Posts
    83
    Thanks given
    0
    Thanks received
    4
    Rep Power
    11
    Quote Originally Posted by pvm chapi View Post
    As I just said.. Right before the killer.getSkills().addXp(24, x)
    Define a variable called xp and make it equal to some formula that you like and change the addXp(24, 160) for addXp(24, xp)

    Ex

    Code:
    case 10537:
                    Private int xp = (killer.getSkills().getLevelByXp(24) * 160)
            	killer.getSkills().addXp(24, xp);
    I'm in my phone so I don't remember if it's getLevelByXp, just put the method that returns the players dung lvl. Just adjust the formula to whatever you want, the 160 would be the base XP which depends on the NPC killed
    Ill play around with it and see how i do, will come back if i dont get it:/ I'm also fairly new to coding, got my partner to help me but he is not online for some days:/
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Jan 2015
    Posts
    195
    Thanks given
    137
    Thanks received
    28
    Rep Power
    27
    Quote Originally Posted by pontus33455 View Post
    Ill play around with it and see how i do, will come back if i dont get it:/ I'm also fairly new to coding, got my partner to help me but he is not online for some days:/
    Well, you're welcome
    Reply With Quote  
     

Page 1 of 3 123 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. Rate the Sig Above You
    By DrDiablo in forum Forum Games
    Replies: 2667
    Last Post: 06-18-2017, 09:46 PM
  2. How to change XP rate from NPC's
    By princes arta in forum Tutorials
    Replies: 4
    Last Post: 12-18-2007, 08:56 AM
  3. Rate The Singature Above you (first one yet)
    By Dark-Sworm in forum General
    Replies: 2
    Last Post: 12-13-2007, 01:26 AM
  4. Changing XP rate for monster hits.
    By Tiger in forum Tutorials
    Replies: 17
    Last Post: 11-20-2007, 03:25 PM
  5. Rate the Avatar Above You
    By Jukk in forum General
    Replies: 93
    Last Post: 08-11-2007, 08: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
  •