Use the search bar, it's actually quite useful
|
Basically could someone tell me the code for commands.java
::resetdef
::resetatk
::resetall
yes i have allready tried the npc reseter but i had issues with it colliding with the blackjack npcs chat.
Use the search bar, it's actually quite useful
Just whipped it up, probably wont work.Code:if (playerCommand.equalsIgnoreCase("resetdef")) { c.playerLevel[1] = 1; c.playerXP[1] = 0; c.getPA().refreshSkill(1); c.sendMessage("You reset your defence level"); }
Btw thats for def, I'm sure you can work out the others with that.
reggie i edited it.. altough you can add the Equipment thing back.
Anyway.. atk,str,def:
Code:if (playerCommand.equalsIgnoreCase("resetatk")) { for (int j = 0; j < c.playerEquipment.length; j++) { if (c.playerEquipment[j] > 1) { c.sendMessage("Take off your items first!"); return; } } c.playerXP[0]=0; c.playerLevel[0] = 1; c.getPA().refreshSkill(0); } if (playerCommand.equalsIgnoreCase("resetstr")) { for (int j = 0; j < c.playerEquipment.length; j++) { if (c.playerEquipment[j] > 1) { c.sendMessage("Take off your items first!"); return; } } c.playerXP[2]=0; c.playerLevel[2] = 1; c.getPA().refreshSkill(2); } if (playerCommand.equalsIgnoreCase("resetdef")) { for (int j = 0; j < c.playerEquipment.length; j++) { if (c.playerEquipment[j] > 1) { c.sendMessage("Take off your items first!"); return; } } c.playerXP[1]=0; c.playerLevel[1] = 1; c.getPA().refreshSkill(1); }
what about if you wanted to resetall? something like this?
or would i have to repeatCode:if (playerCommand.equalsIgnoreCase("resetall")) { for (int j = 0; j < c.playerEquipment.length; j++) { if (c.playerEquipment[j] > 1) { c.sendMessage("Take off your items first!"); return; } } c.playerXP[1]=0; c.playerLevel[1] = 1; c.getPA().refreshSkill(1,2,3,4,5,6);
c.getPA().refreshSkill(1)
c.getPA().refreshSkill(2)
c.getPA().refreshSkill(3)
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |