Jump to content

Search the Community

Showing results for tags 'firemaking'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 14 results

  1. Hello I've looked all over for a firemaking coding but they don't really work. My problem is: my character will do the lighting animation but he will just keep bending and acting as if he is lighting. NO FIRE will come out! or log starting to get fire.... please take a look at mine and tell me what is missing and what I've done wrong. Thank you! [CODE]package server.model.players.skills; import server.Config; import server.model.players.Client; import server.model.objects.Objects; import server.Server; /** * Firemaking.java * * @author Sanity * **/ public class Firemaking { private Client c; private int[] logs = {1511,1521,1519,1517,1515,1513}; private int[] exp = {1,3,4,5,7,8}; private int[] level = {1,15,30,45,60,75}; public long lastLight; private int DELAY = 1250; public boolean resetAnim = true; public Firemaking(Client c) { this.c = c; } public void checkLogType(int logType, int otherItem) { for (int j = 0; j < logs.length;j++) { if (logs[j] == logType || logs[j] == otherItem) { lightFire(j); return; } } } public void lightFire(int slot) { if (c.duelStatus >= 5) { c.sendMessage("Why am I trying to light a fire in the duel arena?"); return; } if (c.playerLevel[c.playerFiremaking] >= level[slot]) { if (c.getItems().playerHasItem(590) && c.getItems().playerHasItem(logs[slot])) { if (System.currentTimeMillis() - lastLight > DELAY) { c.startAnimation(733,0); c.getItems().deleteItem(logs[slot], c.getItems().getItemSlot(logs[slot]), 1); c.getPA().addSkillXP(logs[slot] * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); Objects fire = new Objects(2732,c.getX(),c.getY(), 0, -1, 10, 3); Objects fire2 = new Objects(-1,c.getX(),c.getY(), 0, -1, 10, 60); c.sendMessage("You light the fire."); this.lastLight = System.currentTimeMillis(); //c.getPA().frame1(); resetAnim = true; } } } } }[/CODE]
  2. I'm redoing the firemaking skill and I have it all working but adding the part where the player moves after the fire is lit is a little bit confusing. I'm inexperienced so I guess and experienced person would know where this goes but the person that posted the tutorial didn't specify a file to add it to. Here is what the tutorial said: To Do #1: Adding clipped movement. Two ways this can be Done, One. [CODE]if (Region.getClipping(c.getX() - 1, c.getY(), c.heightLevel, -1, 0)) { c.getPA().walkTo(-1, 0); } else if (Region.getClipping(c.getX() + 1, c.getY(), c.heightLevel, 1, 0)) { c.getPA().walkTo(1, 0); } else if (Region.getClipping(c.getX(), c.getY() - 1, c.heightLevel, 0, -1)) { c.getPA().walkTo(0, -1); } else if (Region.getClipping(c.getX(), c.getY() + 1, c.heightLevel, 0, 1)) { c.getPA().walkTo(0, 1); }[/CODE] Make sure you import the Region.class Alternatively, you can Use the world map. Here is the code. [CODE]if(VirtualWorld.I(c.heightLevel, c.absX, c.absY, c.absX-1, c.absY, 0)) { c.getPA().walkTo(-1, 0); } else { c.getPA().walkTo(1, 0); }[/CODE] [CODE]import server.world.map.VirtualWorld;[/CODE]
  3. Hello there, I have a bug in my server that I can light a fire on top of another one, How I can fix that? my firemaking.java [CODE]package server.model.players.skills; import server.Server; import server.clip.region.Region; import server.event.CycleEvent; import server.event.CycleEventContainer; import server.event.CycleEventHandler; import server.model.objects.Objects; import server.model.players.Client; import server.world.Tiles; import server.world.WalkingCheck; public class Firemaking extends SkillHandler { private static Tiles currentTile; private static int[][] data = { { 1511, 1, 280, 2732 }, // LOG { 7406, 1, 220, 11406 }, // RED LOG { 7405, 1, 220, 11405 }, // BLUE LOG { 7404, 1, 220, 11404 }, // RED LOG { 2862, 1, 230, 2732 }, // ACHEY { 1521, 15, 420, 2732 }, // OAK { 1519, 30, 630, 2732 }, // WILLOW { 6333, 35, 640, 2732 }, // TEAK { 1517, 45, 945, 2732 }, // MAPLE { 10810, 45, 950, 2732 }, // ARTIC PINE { 6332, 50, 970, 2732 }, // MAHOGANY { 1515, 60, 1421, 2732 }, // YEW { 1513, 75, 2128, 2732 }, // MAGIC }; public static boolean playerLogs(Client c, int i, int l) { boolean flag = false; for (int kl = 0; kl < data.length; kl++) { if ((i == data[kl][0] && requiredItem(c, l)) || (requiredItem(c, i) && l == data[kl][0])) { flag = true; } } return flag; } private static int getAnimation(Client c, int item, int item1) { int[][] data = { { 841, 6714 }, { 843, 6715 }, { 849, 6716 }, { 853, 6717 }, { 857, 6718 }, { 861, 6719 }, }; for (int i = 0; i < data.length; i++) { if (item == data[i][0] || item1 == data[i][0]) { return data[i][1]; } } return 733; } private static boolean requiredItem(Client c, int i) { int[] data = { 841, 843, 849, 853, 857, 861, 590 }; for (int l = 0; l < data.length; l++) { if (i == data[l]) { return true; } } return false; } @SuppressWarnings("unused") public static void grabData(final Client c, final int useWith, final int withUse) { final int[] coords = new int[2]; coords[0] = c.absX; coords[1] = c.absY; if (c.playerIsWoodcutting) { Woodcutting.resetWoodcutting(c); } if (c.absX == Objects.getObjectX() && c.absY == Objects.getObjectY() && Objects.getObjectId() > 0) { return; } if (c.absX == Objects.getObjectX() && c.absY == Objects.getObjectY()) { return; } for (Objects o : Server.objectHandler.globalObjects) { if (Objects.getObjectX() == c.getX() && Objects.getObjectY() == c.getY() && Objects.objectId != -1) { return; } } for (int i = 0; i < data.length; i++) { if ((requiredItem(c, useWith) && withUse == data[i][0] || useWith == data[i][0] && requiredItem(c, withUse))) { if (c.playerLevel[11] < data[i][1]) { c.sendMessage("You don't have the correct Firemaking level to light this log!"); c.sendMessage("You need the Firemaking level of at least " + data[i][1] + "."); return; } if (System.currentTimeMillis() - c.lastFire > 1200) { if (c.playerIsFiremaking) { return; } if (c.absX == Objects.getObjectX() && c.absY == Objects.getObjectY() && Objects.getObjectId() > 0) { return; } if (c.absX == Objects.getObjectX() && c.absY == Objects.getObjectY()) { return; } for (Objects o : Server.objectHandler.globalObjects) { if (Objects.getObjectX() == c.getX() && Objects.getObjectY() == c.getY() && Objects.objectId != -1) { return; } } final int[] time = new int[3]; final int log = data[i][0]; final int fire = data[i][3]; if (System.currentTimeMillis() - c.lastFire > 3000) { c.startAnimation(getAnimation(c, useWith, withUse)); time[0] = 4; time[1] = 3; } else { time[0] = 1; time[1] = 2; } c.playerIsFiremaking = true; Server.itemHandler.createGroundItem(c, log, coords[0], coords[1], c.getHeight(), 1, c.getId()); CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() { @Override public void execute( CycleEventContainer container) { Server.itemHandler.removeGroundItem(c, log, coords[0], coords[1], false); Server.objectHandler.createAnObject(c, fire, coords[0], coords[1]); c.playerIsFiremaking = false; container.stop(); } @Override public void stop() { } }, time[0]); currentTile = new Tiles(c.absX - 1, c.absY, c.heightLevel); if (!WalkingCheck.tiles .containsKey(currentTile.getH() << 28 | currentTile.getX() << 14 | currentTile.getY())) { c.getPA().walkTo(-1, 0); } else { c.getPA().walkTo(1, 0); } c.sendMessage("You succesfully light the logs."); CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() { @Override public void execute( CycleEventContainer container) { c.startAnimation(65535); container.stop(); } @Override public void stop() { } }, time[1]); CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() { @Override public void execute( CycleEventContainer container) { Server.objectHandler.createAnObject(c, -1, coords[0], coords[1]); Server.itemHandler.createGroundItem(c, 592, coords[0], coords[1], c.getHeight(), 1, c.getId()); container.stop(); } @Override public void stop() { } }, 200); c.getPA().addSkillXP(data[i][2] * FIREMAKING_XP, 11); c.turnPlayerTo(c.absX + 1, c.absY); if (c.absX == Objects.getObjectX() && c.absY == Objects.getObjectY() && Objects.getObjectId() > 0) { return; } if (c.absX == Objects.getObjectX() && c.absY == Objects.getObjectY()) { return; } for (Objects o : Server.objectHandler.globalObjects) { if (Objects.getObjectX() == c.getX() && Objects.getObjectY() == c.getY() && Objects.objectId != -1) { return; } } if (Region.getClipping(c.getX() - 1, c.getY(), c.heightLevel, -1, 0)) { c.getPA().walkTo(-1, 0); } else if (Region.getClipping(c.getX() + 1, c.getY(), c.heightLevel, 1, 0)) { c.getPA().walkTo(1, 0); } else if (Region.getClipping(c.getX(), c.getY() - 1, c.heightLevel, 0, -1)) { c.getPA().walkTo(0, -1); } else if (Region.getClipping(c.getX(), c.getY() + 1, c.heightLevel, 0, 1)) { c.getPA().walkTo(0, 1); } if (c.absX == Objects.getObjectX() && c.absY == Objects.getObjectY() && Objects.getObjectId() > 0) { return; } if (c.absX == Objects.getObjectX() && c.absY == Objects.getObjectY()) { return; } for (Objects o : Server.objectHandler.globalObjects) { if (Objects.getObjectX() == c.getX() && Objects.getObjectY() == c.getY() && Objects.objectId != -1) { return; } } c.getItems().deleteItem(data[i][0], c.getItems().getItemSlot(data[i][0]), 1); c.lastFire = System.currentTimeMillis(); } } } } } [/CODE] and about the experience, In Project organic its complicated so I decided to post here... There are no "skill experience multiplier = ##" I am just confused what to edit so I can choose how many exp per skill... I've dealed with firemaking but other skills are really complicated althought I searched in their classes but I couldn't find something about changing xp... Can you help me? if you want me to post more classes, I am ready.
  4. I know this may have been done already but when i looked for it i couldn't find it. What this does is when you light a fire instead of moving one spot to the left to right, you just stay in 1 spot. This may not be what you're looking for but its a quick fix Search for firemaking.java Find : c.getPA().walkTo(-1, 0); } else { c.getPA().walkTo(1, 0); Replace it with : c.getPA().walkTo(0, 0); } else { c.getPA().walkTo(0, 0);
  5. Hey guys, I'm adding Region Clipping to my firemaking but it's not working. Everything else with my Firemaking is near perfect but all I need is this, here's my Firemaking.java. [code]package server.model.players.skills; import server.Config; import server.world.ItemHandler; import server.model.players.Client; import server.model.objects.Objects; import server.Server; import server.world.map.VirtualWorld; import server.world.ObjectHandler; import server.event.CycleEvent; import server.model.players.Region; import server.event.CycleEventContainer; import server.world.map.VirtualWorld; import server.event.CycleEventHandler; import server.util.Misc; /** * Firemaking.java * * @author Faris * **/ public class Firemaking { private Client c; private int[] logs = {1511,1521,1519,1517,1515,1513}; private int[] exp = {1,3,4,5,7,8}; private int[] level = {1,15,30,45,60,75}; public long lastLight; private int DELAY = 1250; private int fireId = 2732; public int timer; public int walkTo; public int timer2; public int multiplyFailChance; public int chanceToLight; public int chancetoFail; public boolean resetAnim = true; public Firemaking(Client c) { this.c = c; } public void checkLogType(int logType, int otherItem) { for (int j = 0; j < logs.length;j++) { if (logs[j] == logType || logs[j] == otherItem) { attemptLighting(); return; } } } public void lightFire(int slot) { final int x = c.getX(); final int y = c.getY(); if (c.playerLevel[c.playerFiremaking] >= level[slot]) { if (c.getItems().playerHasItem(590) && c.getItems().playerHasItem(logs[slot])) { if (System.currentTimeMillis() - lastLight > DELAY) { c.getItems().deleteItem(logs[slot], c.getItems().getItemSlot(logs[slot]), 1); c.getPA().addSkillXP(logs[slot] * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.getPA().checkObjectSpawn(fireId, x, y, 1, 10); if (Region.getClipping(c.getX() - 1, c.getY(), c.heightLevel, -1, 0)) { c.getPA().walkTo(-1, 0); } else if (Region.getClipping(c.getX() + 1, c.getY(), c.heightLevel, 1, 0)) { c.getPA().walkTo(1, 0); } else if (Region.getClipping(c.getX(), c.getY() - 1, c.heightLevel, 0, -1)) { c.getPA().walkTo(0, -1); } else if (Region.getClipping(c.getX(), c.getY() + 1, c.heightLevel, 0, 1)) { c.getPA().walkTo(0, 1); } CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() { int timer = 1; @Override public void execute(CycleEventContainer container) { if (timer == 0) { container.stop(); } timer--; } @Override public void stop() { c.getPA().checkObjectSpawn(-1, x, y, 1, 10); //c.sendMessage("Your fire has been extinguished."); Server.itemHandler.createGroundItem(c, 592, x, y, 1, c.playerId); } }, 45); c.sendMessage("You light the fire."); final int walk = Misc.random(3); this.lastLight = System.currentTimeMillis(); resetAnim = true; } } } } public void attemptLighting() { if (c.duelStatus >= 5) { c.sendMessage("I can't do that here."); return; } final int x = c.getX(); final int y = c.getY(); final int levelChance = c.playerLevel[11]; c.sendMessage("You attempt to light a fire..."); c.inTrade = true; Server.itemHandler.createGroundItem(c, 1511, x, y, 1, c.playerId); c.startAnimation(733,0); CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() { int timer2 = 10; @Override public void execute(CycleEventContainer container) { double multiplyFailChance = Misc.random(levelChance)/10; int chanceToLight = Misc.random(levelChance)+1; double chanceToFail = Misc.random(9)+(multiplyFailChance); if (chanceToLight >= chanceToFail && timer2 != 0) { for (int j = 0; j < logs.length;j++) { lightFire(j); } container.stop(); } if (timer2 == 0) { //c.sendMessage("You have failed to start a fire"); container.stop(); } timer2--; } @Override public void stop() { c.startAnimation(65535); Server.itemHandler.removeGroundItem(c, 1511, x, y, false); c.inTrade = false; } }, 3); } }[/code] I tried to make it work by adding, [code] if (Region.getClipping(c.getX() - 1, c.getY(), c.heightLevel, -1, 0)) { c.getPA().walkTo(-1, 0); } else if (Region.getClipping(c.getX() + 1, c.getY(), c.heightLevel, 1, 0)) { c.getPA().walkTo(1, 0); } else if (Region.getClipping(c.getX(), c.getY() - 1, c.heightLevel, 0, -1)) { c.getPA().walkTo(0, -1); } else if (Region.getClipping(c.getX(), c.getY() + 1, c.heightLevel, 0, 1)) { c.getPA().walkTo(0, 1); }[/code] But all the player does is stand over the fire, any ideas?
  6. [CENTER][B][U]Difficulty[/U][/B]: 0.5 [B][U]Required Knowledge:[/U][/B] Copy/paste + Ability to read file paths [B][U]Time to complete:[/U][/B] With copy/paste under one minute[/CENTER] [B][U]Description: [/U][/B] This Firemaking base uses absolutely no animations or sounds. It really is for noobies to get a "start" on Firemaking (Like me ;)) But anyhow... I was fooling around with Firemaking.. looking up tutorials and such and everyone has "90-95% completed Firemaking!" guides. Problem is they can't get the user to walk backwards and stop at objects not meant to be walked through :P SOOOO I came up with this very... [b]VERY[/b] simple Firemaking base that is nearly like Fletching, or crafting. This is my first tutorial and I don't mind feedback, just don't be a d**k head please as I'm only a beginner at Java. [B][U]Step 1:[/U][/B] Goto "server\src\server\model\items\UseItem.java" [COLOR="#DAA520"]then right click[/COLOR] UseItem.java [COLOR="#DAA520"]and click "edit"[/COLOR]. [B][U]Step 2:[/U][/B] Press the keys "CTRL" (Control key) and "F" key simultaneously to bring up the search mini-window. [B][U]Step 3:[/U][/B] Search for: [code]590[/code] [B][U]Step 4:[/U][/B] You should see something like: [code]case 590:[/code] [COLOR="#DAA520"]If you do not see case 590:[/COLOR] in your search, it's okay, [COLOR="#DAA520"]continue on to step 5.[/COLOR] [B][U]Step 5:[/U][/B] Now,[COLOR="#DAA520"] copy/paste this code[/COLOR] below the case 590: For those who found "case 590:" [spoiler][code] if (itemUsed == 590 && useWith == 1511 || itemUsed == 1511 && useWith == 590) {//regular logs if (c.playerLevel[c.playerFiremaking] >= 1) { c.getItems().deleteItem(1511, c.getItems().getItemSlot(1511), 1); c.getItems().addItem(592, 1); c.getPA().addSkillXP(40 * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.sendMessage("The logs burn to ashes."); } else { c.sendMessage("You need a firemaking level of 1 to burn this log."); } } if (itemUsed == 590 && useWith == 1521 || itemUsed == 1521 && useWith == 590) {//oak logs if (c.playerLevel[c.playerFiremaking] >= 15) { c.getItems().deleteItem(1521, c.getItems().getItemSlot(1521), 1); c.getItems().addItem(592, 1); c.getPA().addSkillXP(60 * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.sendMessage("The logs burn to ashes."); } else { c.sendMessage("You need a firemaking level of 15 to burn this log."); } } if (itemUsed == 590 && useWith == 1519 || itemUsed == 1519 && useWith == 590) {//willow logs if (c.playerLevel[c.playerFiremaking] >= 30) { c.getItems().deleteItem(1519, c.getItems().getItemSlot(1519), 1); c.getItems().addItem(592, 1); c.getPA().addSkillXP(105 * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.sendMessage("The logs burn to ashes."); } else { c.sendMessage("You need a firemaking level of 30 to burn this log."); } } if (itemUsed == 590 && useWith == 1517 || itemUsed == 1517 && useWith == 590) {//maple logs if (c.playerLevel[c.playerFiremaking] >= 45) { c.getItems().deleteItem(1517, c.getItems().getItemSlot(1517), 1); c.getItems().addItem(592, 1); c.getPA().addSkillXP(135 * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.sendMessage("The logs burn to ashes."); } else { c.sendMessage("You need a firemaking level of 45 to burn this log."); } } if (itemUsed == 590 && useWith == 1515 || itemUsed == 1515 && useWith == 590) {//yew logs if (c.playerLevel[c.playerFiremaking] >= 60) { c.getItems().deleteItem(1515, c.getItems().getItemSlot(1515), 1); c.getItems().addItem(592, 1); c.getPA().addSkillXP(202 * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.sendMessage("The logs burn to ashes."); } else { c.sendMessage("You need a firemaking level of 60 to burn this log."); } } if (itemUsed == 590 && useWith == 1513 || itemUsed == 1513 && useWith == 590) {//magic logs if (c.playerLevel[c.playerFiremaking] >= 75) { c.getItems().deleteItem(1513, c.getItems().getItemSlot(1513), 1); c.getItems().addItem(592, 1); c.getPA().addSkillXP(308 * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.sendMessage("The logs burn to ashes."); } else { c.sendMessage("You need a firemaking level of 75 to burn this log."); } } break;[/code][/spoiler] For those who didn't find "case 590:" [spoiler][code] case 590: if (itemUsed == 590 && useWith == 1511 || itemUsed == 1511 && useWith == 590) {//regular logs if (c.playerLevel[c.playerFiremaking] >= 1) { c.getItems().deleteItem(1511, c.getItems().getItemSlot(1511), 1); c.getItems().addItem(592, 1); c.getPA().addSkillXP(40 * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.sendMessage("The logs burn to ashes."); } else { c.sendMessage("You need a firemaking level of 1 to burn this log."); } } if (itemUsed == 590 && useWith == 1521 || itemUsed == 1521 && useWith == 590) {//oak logs if (c.playerLevel[c.playerFiremaking] >= 15) { c.getItems().deleteItem(1521, c.getItems().getItemSlot(1521), 1); c.getItems().addItem(592, 1); c.getPA().addSkillXP(60 * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.sendMessage("The logs burn to ashes."); } else { c.sendMessage("You need a firemaking level of 15 to burn this log."); } } if (itemUsed == 590 && useWith == 1519 || itemUsed == 1519 && useWith == 590) {//willow logs if (c.playerLevel[c.playerFiremaking] >= 30) { c.getItems().deleteItem(1519, c.getItems().getItemSlot(1519), 1); c.getItems().addItem(592, 1); c.getPA().addSkillXP(105 * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.sendMessage("The logs burn to ashes."); } else { c.sendMessage("You need a firemaking level of 30 to burn this log."); } } if (itemUsed == 590 && useWith == 1517 || itemUsed == 1517 && useWith == 590) {//maple logs if (c.playerLevel[c.playerFiremaking] >= 45) { c.getItems().deleteItem(1517, c.getItems().getItemSlot(1517), 1); c.getItems().addItem(592, 1); c.getPA().addSkillXP(135 * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.sendMessage("The logs burn to ashes."); } else { c.sendMessage("You need a firemaking level of 45 to burn this log."); } } if (itemUsed == 590 && useWith == 1515 || itemUsed == 1515 && useWith == 590) {//yew logs if (c.playerLevel[c.playerFiremaking] >= 60) { c.getItems().deleteItem(1515, c.getItems().getItemSlot(1515), 1); c.getItems().addItem(592, 1); c.getPA().addSkillXP(202 * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.sendMessage("The logs burn to ashes."); } else { c.sendMessage("You need a firemaking level of 60 to burn this log."); } } if (itemUsed == 590 && useWith == 1513 || itemUsed == 1513 && useWith == 590) {//magic logs if (c.playerLevel[c.playerFiremaking] >= 75) { c.getItems().deleteItem(1513, c.getItems().getItemSlot(1513), 1); c.getItems().addItem(592, 1); c.getPA().addSkillXP(308 * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.sendMessage("The logs burn to ashes."); } else { c.sendMessage("You need a firemaking level of 75 to burn this log."); } } break; [/code][/spoiler] [B][U]Step 6: [/U][/B] [COLOR="#DAA520"]Save[/COLOR] the file [COLOR="#DAA520"]and close[/COLOR] out of it. [B][U]Step 7:[/U][/B] [COLOR="#DAA520"]Save/compile your server then run[/COLOR], wala! Your simple Firemaking base is now implemented :) [SIZE=4][B]Credits:[/B][/SIZE] 90% me 10% RL's Starter Pack Developers for having provided the base I've been using for my rsps
  7. Okay, so at first i struggled to get the object to spawn and it turned out i just had to move it 2 lines lower then it was and i got it to delete the fire but now you can't walk in the spot so as an example you can trap people in lummy bank... The red boxes are where i lit a fire. [ATTACH=CONFIG]6503[/ATTACH]
  8. okay so the source i have Has firemaking but it isn't great... AKA doesn't put the fire under the player, i am trying to make it do that, probably the worst way possible but yeah when i put [CODE]player.getActionSender().sendCreateGlobalObject(2732, player.getLocation().getZ(), player.getLocation().getX(), player.getLocation().getY(), -1, 10);[/CODE] it gives me an if without else or something error [CODE] if (itemUsed == 590 && (usedWith == 1511 || usedWith == 1521 || usedWith == 1519 || usedWith == 1517 || usedWith == 1515 || usedWith == 1513)) player.getActionSender().sendCreateGlobalObject(2732, player.getLocation().getZ(), player.getLocation().getX(), player.getLocation().getY(), -1, 10); Firemaking.fire(player, 1, usedWith, 100); else if (usedWith == 590 && (itemUsed == 1511 || itemUsed == 1521 || itemUsed == 1519 || itemUsed == 1517 || itemUsed == 1515 || itemUsed == 1513)) Firemaking.fire(player, 1, itemUsed, 0); }[/CODE]
  9. 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.
  10. 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
  11. joeri

    [PI] firemaking help

    hey guy's i got a small problem. i made my firemaking appearing and disappearing but the problems is that people cant see my fire when i made it :s can any one help me?
  12. What do i need to fix in my firemaking.java to make it stop trying to light log on log? InsidiaX firemaking method: [code]package server.model.players.skills; import server.Config; import server.world.ItemHandler; import server.model.players.Client; import server.model.objects.Objects; import server.Server; import server.world.ObjectHandler; import server.event.CycleEvent; import server.event.CycleEventContainer; import server.event.CycleEventHandler; import server.util.Misc; /** * Firemaking.java * * @author Faris * **/ public class Firemaking { private Client c; private int[] logs = {1511,1521,1519,1517,1515,1513}; private int[] exp = {1,3,4,5,7,8}; private int[] level = {1,15,30,45,60,75}; public long lastLight; private int DELAY = 1250; private int fireId = 2732; public int timer; public int timer2; public int multiplyFailChance; public int chanceToLight; public int chancetoFail; public boolean resetAnim = true; public Firemaking(Client c) { this.c = c; } public void checkLogType(int logType, int otherItem) { for (int j = 0; j < logs.length;j++) { if (logs[j] == logType || logs[j] == otherItem) { attemptLighting(); return; } } } public void lightFire(int slot) { final int x = c.getX(); final int y = c.getY(); if (c.playerLevel[c.playerFiremaking] >= level[slot]) { if (c.getItems().playerHasItem(590) && c.getItems().playerHasItem(logs[slot])) { if (System.currentTimeMillis() - lastLight > DELAY) { c.getItems().deleteItem(logs[slot], c.getItems().getItemSlot(logs[slot]), 1); c.getPA().addSkillXP(logs[slot] * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking); c.getPA().checkObjectSpawn(fireId, x, y, 1, 10); CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() { int timer = 1; @Override public void execute(CycleEventContainer container) { if (timer == 0) { container.stop(); } timer--; } @Override public void stop() { c.getPA().checkObjectSpawn(-1, x, y, 1, 10); //c.sendMessage("Your fire has been extinguished."); Server.itemHandler.createGroundItem(c, 592, x, y, 1, c.playerId); } }, 45); c.sendMessage("You light the fire."); final int walk = Misc.random(3); if (walk == 0) c.getPA().walkTo(-1, 0); if (walk == 1) c.getPA().walkTo(1, 0); if (walk == 2) c.getPA().walkTo(0, 1); if (walk == 3) c.getPA().walkTo(0, -1); this.lastLight = System.currentTimeMillis(); resetAnim = true; } } } } public void attemptLighting() { if (c.duelStatus >= 5) { c.sendMessage("I can't do that here."); return; } final int x = c.getX(); final int y = c.getY(); final int levelChance = c.playerLevel[11]; c.sendMessage("You attempt to light a fire..."); c.inTrade = true; Server.itemHandler.createGroundItem(c, 1511, x, y, 1, c.playerId); c.startAnimation(733,0); CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() { int timer2 = 10; @Override public void execute(CycleEventContainer container) { double multiplyFailChance = Misc.random(levelChance)/10; int chanceToLight = Misc.random(levelChance)+1; double chanceToFail = Misc.random(9)+(multiplyFailChance); if (chanceToLight >= chanceToFail && timer2 != 0) { for (int j = 0; j < logs.length;j++) { lightFire(j); } container.stop(); } if (timer2 == 0) { //c.sendMessage("You have failed to start a fire"); container.stop(); } timer2--; } @Override public void stop() { c.startAnimation(65535); Server.itemHandler.removeGroundItem(c, 1511, x, y, false); c.inTrade = false; } }, 3); } }[/code] Should be an error right here somewhere: [code] final int levelChance = c.playerLevel[11]; double multiplyFailChance = Misc.random(levelChance)/10; int chanceToLight = Misc.random(levelChance)+1; double chanceToFail = Misc.random(9)+(multiplyFailChance); if (chanceToLight >= chanceToFail && timer2 != 0) { for (int j = 0; j < logs.length;j++) { lightFire(j); } container.stop(); }[/code] Just cant figure it out :s someone please help!
  13. [CENTER]So im editing my Firemaking skill and the exp rates really really High "128K per Log" to Be Exact. Here's the code For [B][COLOR="#FF0000"]Firemaking.java[/COLOR][/B][/CENTER] [CODE]package server.model.players.skills; import server.Config; import server.model.players.Client; import server.model.objects.Objects; import server.Server; /** * Firemaking.java * **/ public class Firemaking { private Client c; private int[] logs = {[COLOR="#FF0000"]1511,1521,1519,1517,1515,1513[/COLOR]}; //[B] It Thinks this is the exp[/B] private int[] exp = {40,60,90,135,203,304}; //[B]How would i make it so this is the exp * the multiplier[/B] private int[] level = {1,15,30,45,60,75}; public long lastLight; private int DELAY = 1250; public boolean resetAnim = false; public Firemaking(Client c) { this.c = c; } public void checkLogType(int logType, int otherItem) { for (int j = 0; j < logs.length;j++) { if (logs[j] == logType || logs[j] == otherItem) { lightFire(j); return; } } } public void lightFire(int slot) { if (c.duelStatus >= 5) { c.sendMessage("Why am I trying to light a fire in the duel arena?"); return; } if (c.playerLevel[c.playerFiremaking] >= level[slot]) { if (c.getItems().playerHasItem(590) && c.getItems().playerHasItem(logs[slot])) { if (System.currentTimeMillis() - lastLight > DELAY) { c.startAnimation(733,0); c.getItems().deleteItem(logs[slot], c.getItems().getItemSlot(logs[slot]), 1); [B]c.getPA().addSkillXP([COLOR="#FF0000"]logs[slot][/COLOR] * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking);[/B] c.getPA().checkObjectSpawn(2732, c.getX(), c.getY(), 1, 10); c.getPA().checkObjectSpawn(2732, c.getX(), c.getY(), 1, 10); c.sendMessage("You light the fire."); this.lastLight = System.currentTimeMillis(); //c.getPA().frame1(); resetAnim = true; } } } } }[/CODE] [CENTER] Heres the Multiplier [SIZE=1](your proally thinking why don't i just edit the Multiplier but im trying to make it so i get custom rates)[/SIZE][/CENTER] [CODE] public static final int FIREMAKING_EXPERIENCE = 80;[/CODE]
  14. [IMG]http://i55.tinypic.com/29xzpld.png[/IMG] At the moment, I am going for 20,000,000 experience in Fishing. Experience in Fishing at the moment: 19,590,125. [COLOR="#00FF00"]70 Herblore[/COLOR] Oh by the way guys, I didn't screen shot any of my other 99s a part from Firemaking. I don't know why.
×