Skills.java, addxp method.
Dung skillid is 24.
|
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?
Skills.java, addxp method.
Dung skillid is 24.
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
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.
Post the snippet where your XP is added in your custom minigame.
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; } }
nvm.
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
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 killedCode:case 10537: Private int xp = (killer.getSkills().getLevelByXp(24) * 160) killer.getSkills().addXp(24, xp);
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |