Jump to content

neeko6464

Member
  • Content count

    30
  • Joined

  • Last visited

  1. I'm using this code for fishing but I am getting 100 errors for a missing { or whatever. I have no clue where it is or what I need to do about it. Help is greatly appreciated, thanks... [CODE]package server.model.players.skills; import server.util.Misc; import server.model.players.Client; import server.event.*; import server.*; /** * Class Fishing * Handles: Fishing * @author: PapaDoc * START: 22:07 23/12/2010 * FINISH: 22:28 23/12/2010 */ public class Fishing extends SkillHandler { private static int[][] data = { {1, 1, 303, -1, 317, 10, 621, 321, 15, 30}, //SHRIMP + ANCHOVIES {2, 5, 309, 313, 327, 20, 622, 345, 10, 30}, //SARDINE + HERRING {3, 16, 305, -1, 353, 20, 620, -1, -1, -1}, //MACKEREL ***, 20, 309, -1, 335, 50, 622, 331, 30, 70}, //TROUT {5, 23, 305, -1, 341, 45, 619, 363, 46, 100}, //BASS + COD {6, 25, 309, 313, 349, 60, 622, -1, -1, -1}, //PIKE {7, 35, 311, -1, 359, 80, 618, 371, 50, 100}, //TUNA + SWORDIE {8, 40, 301, -1, 377, 90, 619, -1, -1, -1}, //LOBSTER {9, 62, 305, -1, 7944, 120, 620, -1, -1, -1}, //MONKFISH {10, 76, 311, -1, 383, 110, 618, -1, -1, -1}, //SHARK {11, 79, 305, -1, 395, 38, 619, -1, -1, -1}, //SEA TURTLE {12, 81, 305, -1, 389, 46, 621, -1, -1, -1}, //MANTA RAY }; private static void attemptdata(final Client c, int npcId) { if(c.playerSkillProp[10][4] > 0) { c.playerSkilling[10] = false; return; } if (!noInventorySpace(c, "fishing")) { return; } resetFishing(c); for(int i = 0; i < data.length; i++) { if(npcId == data[i][0]) { if (c.playerLevel[c.playerFishing] < data[i][1]) { c.sendMessage("You haven't got high enough fishing level to fish here!"); c.sendMessage("You at list need the fishing level of "+ data[i][1] +"."); c.getPA().sendStatement("You need the fishing level of "+ data[i][1] +" to fish here."); return; } if(data[i][3] > 0) { if (!c.getItems().playerHasItem(data[i][3])) { c.sendMessage("You haven't got any "+ c.getItems().getItemName(data[i][3]) +"!"); c.sendMessage("You need "+ c.getItems().getItemName(data[i][3]) +" to fish here."); return; } } c.playerSkillProp[10][0] = data[i][6]; // ANIM c.playerSkillProp[10][1] = data[i][4]; // FISH c.playerSkillProp[10][2] = data[i][5]; // XP c.playerSkillProp[10][3] = data[i][3]; // BAIT c.playerSkillProp[10][4] = data[i][2]; // EQUIP c.playerSkillProp[10][5] = data[i][7]; // sFish c.playerSkillProp[10][6] = data[i][8]; // sLvl c.playerSkillProp[10][7] = data[i][4]; // FISH c.playerSkillProp[10][8] = data[i][9]; // sXP c.playerSkillProp[10][9] = Misc.random(1) == 0 ? 7 : 5; c.playerSkillProp[10][10] = data[i][0]; // INDEX if (!hasFishingEquipment(c, c.playerSkillProp[10][4])) { return; } c.sendMessage("You start fishing."); c.startAnimation(c.playerSkillProp[10][0]); c.stopPlayerSkill = true; if(c.playerSkilling[10]) { return; } c.playerSkilling[10] = true; CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() { @Override public void execute(CycleEventContainer container) { if(c.playerSkillProp[10][5] > 0) { if(c.playerLevel[c.playerFishing] >= c.playerSkillProp[10][6]) { c.playerSkillProp[10][1] = c.playerSkillProp[10][Misc.random(1) == 0 ? 7 : 5]; } } if(c.playerSkillProp[10][1] > 0) { c.sendMessage("You catch a "+ c.getItems().getItemName(c.playerSkillProp[10][1]) +"."); } if(c.playerSkillProp[10][1] > 0) { c.getItems().addItem(c.playerSkillProp[10][1], 1); c.startAnimation(c.playerSkillProp[10][0]); } if(c.playerSkillProp[10][2] > 0) { c.getPA().addSkillXP(c.playerSkillProp[10][2] * FISHING_XP, c.playerFishing); } if(c.playerSkillProp[10][3] > 0) { c.getItems().deleteItem(c.playerSkillProp[10][3], c.getItems().getItemSlot(c.playerSkillProp[10][3]), 1); if (!c.getItems().playerHasItem(c.playerSkillProp[10][3])) { c.sendMessage("You haven't got any "+ c.getItems().getItemName(c.playerSkillProp[10][3]) +" left!"); c.sendMessage("You need "+ c.getItems().getItemName(c.playerSkillProp[10][3]) +" to fish here."); container.stop(); } } if (!hasFishingEquipment(c, c.playerSkillProp[10][4])) { container.stop(); } if (!noInventorySpace(c, "fishing")) { container.stop(); } if (Misc.random(15) == 0) { container.stop(); } if(!c.stopPlayerSkill) { container.stop(); } if(!c.playerSkilling[10]) { container.stop(); } } @Override public void stop() { resetFishing(c); } }, getTimer(c, npcId) + 5 + playerFishingLevel(c)); } } } private static boolean hasFishingEquipment(Client c, int equipment) { if (!c.getItems().playerHasItem(equipment)) { if(equipment == 311) { if(!c.getItems().playerHasItem(311) && !c.getItems().playerHasItem(10129) && c.playerEquipment[3] != 10129) { c.sendMessage("You need a "+ c.getItems().getItemName(equipment) +" to fish here."); return false; } } else { c.sendMessage("You need a "+ c.getItems().getItemName(equipment) +" to fish here."); return false; } } return true; } private static void resetFishing(Client c) { c.startAnimation(65535); c.getPA().removeAllWindows(); c.playerSkilling[10] = false; for(int i = 0; i < 11; i++) { c.playerSkillProp[10][i] = -1; } } private static int playerFishingLevel(Client c) { return (10 - (int)Math.floor(c.playerLevel[c.playerFishing] / 10)); } private final static int getTimer(Client c, int npcId) { switch (npcId) { case 1: return 2; case 2: return 3; case 3: return 4; case 4: return 4; case 5: return 4; case 6: return 5; case 7: return 5; case 8: return 5; case 9: return 5; case 10: return 5; case 11: return 9; case 12: return 9; default: return -1; } } public static void fishingNPC(Client c, int i, int l) { switch (i) { case 1: switch (l) { case 319: case 329: case 323: case 325: case 326: case 327: case 330: case 332: case 316: //NET + BAIT Fishing.attemptdata(c, 1); break; case 334: case 313: //NET + HARPOON Fishing.attemptdata(c, 3); break; case 322: //NET + HARPOON Fishing.attemptdata(c, 5); break; case 309: //LURE case 310: case 311: case 314: case 315: case 317: case 318: case 328: case 331: Fishing.attemptdata(c, 4); break; case 312: case 321: case 324: //CAGE + HARPOON Fishing.attemptdata(c, 8); break; } break; case 2: switch (l) { case 326: case 327: case 330: case 332: case 316: //BAIT + NET Fishing.attemptdata(c, 2); break; case 319: case 323: case 325: //BAIT + NET Fishing.attemptdata(c, 9); break; case 310: case 311: case 314: case 315: case 317: case 318: case 328: case 329: case 331: case 309: //BAIT + LURE Fishing.attemptdata(c, 6); break; case 312: case 321: case 324://SWORDIES+TUNA-CAGE+HARPOON Fishing.attemptdata(c, 7); break; case 313: case 322: case 334: //NET+HARPOON Fishing.attemptdata(c, 10); break; } break; } } public static boolean fishingNPC(Client c, int npc) { for(int i = 308; i < 335; i++) { if(npc == i) { return true; } } return false; } }[/CODE]
  2. I have been currently using my 'Skilling Teleport' to teleport you to a skilling area. I just changed it back to the different options for individual skills. When I click to go to one of them nothing happens but the actionID pops up in the server. When I got to my Source the action ID's are all there that say to teleport the player to the given area. They don't appear to be commented out or anything... What do I do ??? Thanks, Nick
  3. I currently have my Skill Teleport where you click it and it teleports you to a skilling island. I am trying to change it to where it brings up the list. I went into clickingbuttons.java and saw this [CODE] case 51013: case 6004: case 117162: c.getPA().startTeleport(2852, 3432, 0, "modern"); //c.getDH().sendOption5("Mining", "Smithing", "Fishing/Cooking", "Woodcutting", "Farming"); //c.teleAction = 5; break; [/CODE] I deleted the case 6004: because that was the actionID that would pop up when I clicked the skilling island teleport but that didn't work. I want it to come up with the different options, how do I do this? thanks, nick
  4. I am willing to pay someone about $10 to add a completely new Smithing, Firemaking, and Thieving system to my 317 PI server. It would be best over Teamviewer but other ways are okay too. Thieving - I want it to be where you get a different item per stall and then I can change prices by myself later (just the default; chocolate cake, silver dust, onyx or whatever) Smithing - Currently my smelting is really messy and doesn't really work. No matter what you click it only makes 1 bar. I just need a cleaner version that works well. Firemaking - Mainly I just need it to be clipped, any other positive modifications are good too though. Add me on Skype, my name is neeko6464 and we can talk.
  5. I am willing to pay someone to add Clipped Firemaking to my server and fix my smelting. add me on skype and we can talk. neeko6464
  6. Thanks for you help but I have no idea how to do that.
  7. It compiled but now I can't smith anything no matter what, I used to be able to smith 1 with every option but now 0 with every option...
  8. src\server\model\players\skills\Smithing.java:77: error: cannot find symbol this.stop(); ^ symbol: method stop() Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error Press any key to continue . . .
  9. I am trying to fix my smithing on my server with another persons... this is the code that I'm getting errors from... [CODE] public void startSmelting(int barType) { if (canSmelt(barType)) { if (hasOres(barType)) { this.exp = getExp(barType); this.oreId = getOre(barType); this.oreId2 = getOre2(barType); this.barId = barType; smelt(barType); } else { c.sendMessage("You do not have the required ores to smelt this."); c.getPA().removeAllWindows(); } } else { c.sendMessage("You must have a higher smithing level to smith this."); c.getPA().removeAllWindows(); } } public void smelt(final int barType) { c.getPA().closeAllWindows(); World.getWorld().submit(new Event(1500) { public void execute() { if (c.smeltAmount > 0) { if (hasOres(barType)) { c.startAnimation(899); c.getItems().deleteItem(oreId, c.getItems().getItemSlot(oreId), 1); if (oreId2 > 0) c.getItems().deleteItem(oreId2, c.getItems().getItemSlot(oreId2), 1); c.getItems().addItem(barId,1); c.getPA().addSkillXP(exp * Config.SMITHING_EXPERIENCE, c.playerSmithing); c.getPA().refreshSkill(c.playerSmithing); c.smeltAmount--; } else { c.sendMessage("You do not have the required ores to smelt this."); c.getPA().removeAllWindows(); c.smeltAmount = 0; this.stop(); } } else { c.getPA().removeAllWindows(); this.stop(); } } }); }[/CODE] I know that I have to import a class or something to fix it but idk how to do that. Could anyone leave me 1 detailed comment on how to do it?
  10. I got it but what do I change the "frame ID" to?
  11. [url]http://www.moparscape.org/smf/index.php?topic=513130.0[/url]
  12. I recently followed a tutorial to make summoning give you combat levels up to 138. It works for the player but if you right click someone that is past 126 it will just show 126... :/ Any help is greatly appreciated :) -Nick
  13. Alright so I was just editing my drops and compiled and didn't work for the NPC that I was working on (trying to get him to drop 50 noted dragon bones) in npcdrops.tsm. So I removed it and logged back in. Now no NPC's drop bones at all :\ I looked in NPCHandler and it says that those NPC's still drop bones but they don't? any help is appreciated :) thanks, Nick
  14. I have tried every single tutorial on Google to fix this but to no prevail. I get an error that I am incapable of fixing every single time. My problem is, when you try to smelt some ore, no matter what you click it only makes one. But if you click "make x" it dc's you. Is there any actually way to fix this without getting errors? thanks, Nick
×