Jump to content

Bubletan

Member
  • Content count

    12
  • Joined

  • Last visited

  1. Fixed one bug, change getotherxp() with [CODE] public void getotherxp() { c.thirdXp = c.playerXP[20] + c.playerXP[21] + c.playerXP[22]; int otherXp = c.firstXpWithoutBills + c.secondXpWithoutBills + c.thirdXp; int firstAndSecond = c.firstXpWithoutBills + c.secondXpWithoutBills; int firstAndSecondWithoutBills = 0; if (firstAndSecond >= 1547483647) { firstAndSecondWithoutBills = firstAndSecond - 1000000000; if (firstAndSecondWithoutBills + c.thirdXp >= 1000000000) { c.otherXpBills = 2; c.totalXp = firstAndSecondWithoutBills + c.thirdXp - 1000000000; } else { c.otherXpBills = 1; c.totalXp = firstAndSecondWithoutBills + c.thirdXp; } } else { if (otherXp >= 1000000000) { c.otherXpBills = 1; c.totalXp = otherXp - 1000000000; } else if (otherXp >= 2000000000) { c.otherXpBills = 2; c.totalXp = otherXp - 2000000000; } else { c.otherXpBills = 0; c.totalXp = otherXp; } } } [/CODE]
  2. I have made this wierd way after many things.. There can still be hidden bugs I haven't found, but already fixed most of em. Made shitty way, but it works :) So, its xp calcutator which can be used even if the total xp would be more than 2147m First in [B]Player.java[/B] find the list wheres different character file things etc.. And add anywhere on list: [CODE] billsXp, totalXp, firstXpWithoutBills, firstXpBills, secondXpWithoutBills, secondXpBills, thirdXp, otherXpBills,[/CODE] Then [B]PlayerSave.java[/B] and find "rights" and above it or anywhere in list add: [CODE] } else if (token.equals("Bills-XP")) { p.billsXp = Integer.parseInt(token2); } else if (token.equals("Total-XP")) { p.totalXp = Integer.parseInt(token2); } else if (token.equals("firstXpWithoutBills")) { p.firstXpWithoutBills = Integer.parseInt(token2); } else if (token.equals("firstXpBills")) { p.firstXpBills = Integer.parseInt(token2); } else if (token.equals("secondXpWithoutBills")) { p.secondXpWithoutBills = Integer.parseInt(token2); } else if (token.equals("secondXpBills")) { p.secondXpBills = Integer.parseInt(token2); } else if (token.equals("thirdXp")) { p.thirdXp = Integer.parseInt(token2); } else if (token.equals("otherXpBills")) { p.otherXpBills = Integer.parseInt(token2);[/CODE] Then, stay in PlayerSave.java and search for "characterfile.write(Integer.toString(" and find good place and add: [CODE] characterfile.write("Bills-XP = ", 0, 11); characterfile.write(Integer.toString(p.billsXp), 0, Integer.toString(p.billsXp).length()); characterfile.newLine(); characterfile.write("Total-XP = ", 0, 11); characterfile.write(Integer.toString(p.totalXp), 0, Integer.toString(p.totalXp).length()); characterfile.newLine(); characterfile.write("firstXpWithoutBills = ", 0, 22); characterfile.write(Integer.toString(p.firstXpWithoutBills), 0, Integer.toString(p.firstXpWithoutBills).length()); characterfile.newLine(); characterfile.write("firstXpBills = ", 0, 15); characterfile.write(Integer.toString(p.firstXpBills), 0, Integer.toString(p.firstXpBills).length()); characterfile.newLine(); characterfile.write("secondXpWithoutBills = ", 0, 23); characterfile.write(Integer.toString(p.secondXpWithoutBills), 0, Integer.toString(p.secondXpWithoutBills).length()); characterfile.newLine(); characterfile.write("secondXpBills = ", 0, 16); characterfile.write(Integer.toString(p.secondXpBills), 0, Integer.toString(p.secondXpBills).length()); characterfile.newLine(); characterfile.write("thirdXp = ", 0, 10); characterfile.write(Integer.toString(p.thirdXp), 0, Integer.toString(p.thirdXp).length()); characterfile.newLine(); characterfile.write("otherXpBills = ", 0, 15); characterfile.write(Integer.toString(p.otherXpBills), 0, Integer.toString(p.otherXpBills).length()); characterfile.newLine();[/CODE] Then open [B]PlayerAssistant.java[/B] and search for "public void totallevelsupdate()" and [B]above[/B] it add: [CODE]public void getfirstxp() { int firstXp = c.playerXP[0] + c.playerXP[1] + c.playerXP[2] + c.playerXP[3] + c.playerXP[4] + c.playerXP[5] + c.playerXP[6] + c.playerXP[7] + c.playerXP[8] + c.playerXP[9]; if (firstXp >= 1000000000 && firstXp != 2000000000) { c.firstXpWithoutBills = -1000000000 + c.playerXP[0] + c.playerXP[1] + c.playerXP[2] + c.playerXP[3] + c.playerXP[4] + c.playerXP[5] + c.playerXP[6] + c.playerXP[7] + c.playerXP[8] + c.playerXP[9]; c.firstXpBills = 1; } else if (firstXp == 2000000000) { c.firstXpWithoutBills = 0; c.firstXpBills = 2; } else { c.firstXpWithoutBills = c.playerXP[0] + c.playerXP[1] + c.playerXP[2] + c.playerXP[3] + c.playerXP[4] + c.playerXP[5] + c.playerXP[6] + c.playerXP[7] + c.playerXP[8] + c.playerXP[9]; c.firstXpBills = 0; } } public void getsecondxp() { int secondXp = c.playerXP[10] + c.playerXP[11] + c.playerXP[12] + c.playerXP[13] + c.playerXP[14] + c.playerXP[15] + c.playerXP[16] + c.playerXP[17] + c.playerXP[18] + c.playerXP[19]; if (secondXp >= 1000000000 && secondXp != 2000000000) { c.secondXpWithoutBills = -1000000000 + c.playerXP[10] + c.playerXP[11] + c.playerXP[12] + c.playerXP[13] + c.playerXP[14] + c.playerXP[15] + c.playerXP[16] + c.playerXP[17] + c.playerXP[18] + c.playerXP[19]; c.secondXpBills = 1; } else if (secondXp == 2000000000) { c.secondXpWithoutBills = 0; c.secondXpBills = 2; } else { c.secondXpWithoutBills = c.playerXP[10] + c.playerXP[11] + c.playerXP[12] + c.playerXP[13] + c.playerXP[14] + c.playerXP[15] + c.playerXP[16] + c.playerXP[17] + c.playerXP[18] + c.playerXP[19]; c.secondXpBills = 0; } } public void getotherxp() { c.thirdXp = c.playerXP[20] + c.playerXP[21] + c.playerXP[22]; int otherXp = c.firstXpWithoutBills + c.secondXpWithoutBills + c.thirdXp; int firstAndSecond = c.firstXpWithoutBills + c.secondXpWithoutBills; int firstAndSecondWithoutBills = 0; if (firstAndSecond >= 1547483647) { firstAndSecondWithoutBills = firstAndSecond - 1000000000; if (firstAndSecondWithoutBills + c.thirdXp >= 1000000000) { c.otherXpBills = 2; c.totalXp = firstAndSecondWithoutBills + c.thirdXp - 1000000000; } else { c.otherXpBills = 1; c.totalXp = firstAndSecondWithoutBills + c.thirdXp; } } else { if (otherXp >= 1000000000) { c.otherXpBills = 1; c.totalXp = otherXp - 1000000000; } else if (otherXp >= 2000000000) { c.otherXpBills = 2; c.totalXp = otherXp - 2000000000; } else { c.otherXpBills = 0; c.totalXp = otherXp; } } } public void updatetotalxp() { getfirstxp(); getsecondxp(); getotherxp(); c.billsXp = c.firstXpBills + c.secondXpBills + c.otherXpBills; }[/CODE] And under the same "public void totallevelsupdate()" add: [CODE]updatetotalxp();[/CODE] And then search "public void refreshSkill" and in every case add the same: [CODE]updatetotalxp();[/CODE] And for extra, command you can use to see your total xp ([B]Commands.java[/B]): [CODE]if (playerCommand.equals("totalxp")) { DecimalFormatSymbols seperate = new DecimalFormatSymbols(); seperate.setGroupingSeparator(','); DecimalFormat formatter = new DecimalFormat("#,###,###,###", seperate); if (c.billsXp != 0) { c.sendMessage("You have total of "+c.billsXp+","+formatter.format(c.totalXp)+" xp."); } else { c.sendMessage("You have total of "+formatter.format(c.totalXp)+" xp."); } }[/CODE] And be sure you have these imports in Commands.java [CODE]import java.text.DecimalFormat; import java.text.DecimalFormatSymbols;[/CODE] Have fun with editing it better lol Credits: 100% for me for my shitty counter
  3. Can anyone give me the code to make? So, when you click like attack in skilltab it opens inputdialogue "enter amount", then you type 1-99 (exept 10-99 on hp if possible), and then it sets the number as level :)
  4. Figured number one out myself. Anyone got answer for other one?
  5. ClanChatHandler.java or ClanChat.java... or something else?
  6. I've been trying to fix these, but I got 2 problems left.. So, problems are... 1. When you are in cc admins have owner crown and owners have admin crown 2. When you talk with owner, other players see the right crown, but owner sees own crown as admin crown I would like to fix especially the number one ;)
  7. Bubletan

    How to fix this?

    So... Im not really good on client things, but I downloaded somewhere these models for 120 capes. I tested with adding one of them first, but when I logged in, the cape didn't look right. I searched for guides, but didnt find help to this small problem. Idk is it even on int or the model :D [img]http://i.imgur.com/VDXL5.png[/img] And int (I think problem is on this cause I just edited donor cape int...) [code]case 4315: itemDef.itemActions = new String[5]; itemDef.itemActions[1] = "Wear"; itemDef.editedModelColor = new int[4]; itemDef.newModelColor = new int[4]; itemDef.editedModelColor[0] = 57280; itemDef.editedModelColor[1] = 54503; itemDef.editedModelColor[2] = 54183; itemDef.editedModelColor[3] = 11200; itemDef.newModelColor[0] = 9152; itemDef.newModelColor[1] = 7104; itemDef.newModelColor[2] = 7104; itemDef.newModelColor[3] = 796; itemDef.modelid = 65274; itemDef.modelZoom = 2700; itemDef.modelRotationY = 500; itemDef.modelRotationX = 0; itemDef.anInt204 = 14; itemDef.modelOffset1 = -6; itemDef.modelOffset2 = 1; itemDef.anInt165 = 65273; itemDef.anInt200 = 65273; itemDef.name = "Agility master cape"; itemDef.description = "It's a Agility master cape."; break;[/code]
  8. Ok, i was restatting agile :D I test copying it from the blank source Wont work :/ I test to do the same for 3 other items (only renamed them) Now it works! I moved my full item.cfg file to new folder and replaced it with the one from the source i started with... Ill try to make them again :D But - Thanks :)
  9. Ok, I was just changing stats on pair items, and then I compiled and typed ::restart ingame... And then I got this error [img]http://i.imgur.com/uxiGY.png[/img] I say if I find the answer myself... But I'm not good coder, so anyone got solution?
  10. I got 1 error... [IMG]http://i.imgur.com/koMzF.png[/IMG] [CODE]private void buildAtPlayerMenu(int i, int j, Player player, int k) { if(player == myPlayer) return; if(menuActionRow >= 400) return; String s; if(player.skill == 0) s = player.name + combatDiffColor(myPlayer.combatLevel, player.combatLevel) else s = "@[email protected]" + loyaltyRank(player.skill) + "@[email protected] " + player.name + combatDiffColor(myPlayer.combatLevel, player.combatLevel) + " (level-" + player.combatLevel + ")";[/CODE]
×