Thread: [838] [MX3] 100% Smithing & 100% Summoning FIX!

Page 4 of 4 FirstFirst ... 234
Results 31 to 39 of 39
  1. #31  
    Banned

    Join Date
    May 2016
    Age
    55
    Posts
    1,137
    Thanks given
    565
    Thanks received
    600
    Rep Power
    0
    thanks 4 this
    Reply With Quote  
     

  2. #32  
    Registered Member Ledion's Avatar
    Join Date
    Nov 2014
    Posts
    141
    Thanks given
    4
    Thanks received
    8
    Rep Power
    0
    Quote Originally Posted by JTlr Frost View Post
    Summoning
    Smithing
    SmithingD

    Looks awfully alot like mine..



    You do know this is my summoning AND smithing code is exact.
    It even has the debug message SPAWNING FAMILIAR from when i was trying to make them spawn.
    No this cant be yours. As i said, i ripped this from cirvex source and released it so there is no way of copying you.
    Reply With Quote  
     

  3. #33  
    Registered Member Ahri's Avatar
    Join Date
    Dec 2009
    Posts
    76
    Thanks given
    67
    Thanks received
    11
    Rep Power
    2
    Quote Originally Posted by Ledion View Post
    No this cant be yours. As i said, i ripped this from cirvex source and released it so there is no way of copying you.
    He released a matrix 3 server he was working on way before Cirvex did, they probably downloaded it and copied it.

    https://www.rune-server.org/runescap...ivination.html


    Reply With Quote  
     

  4. #34  
    Registered Member Ledion's Avatar
    Join Date
    Nov 2014
    Posts
    141
    Thanks given
    4
    Thanks received
    8
    Rep Power
    0
    Quote Originally Posted by Ahri View Post
    He released a matrix 3 server he was working on way before Cirvex did, they probably downloaded it and copied it.

    https://www.rune-server.org/runescap...ivination.html
    Well in that case maybe it 'could' be yours but anyways i'm just showing what i have found for others.
    Reply With Quote  
     

  5. #35  
    Registered Member
    Join Date
    Oct 2014
    Posts
    76
    Thanks given
    1
    Thanks received
    9
    Rep Power
    11
    Theoretically, people could use this to fix some of the other problems with the other skills, correct? For example on the source I'm using when you use a knife on normal logs and say you happened to have magic logs in your inventory, if you clicked on a magic shortbow it would fletch the regular logs into a magic shortbow and you will keep the original magic logs from before. So with this I should be able to re-write some of the code to rework fletching correct?
    Reply With Quote  
     

  6. #36  
    Registered Member

    Join Date
    Sep 2009
    Posts
    1,919
    Thanks given
    480
    Thanks received
    1,687
    Rep Power
    1262
    I appreciate the contribution but the whole point of MX3 was to make things easier. There are enums in the cache that display EVERYTHING you need to automate skills with little effort. Look at my Fletching2.java class in the action package (Wrote it two years ago so cut me some slack and it's incomplete). It provides a perfect example of how all skills that use the skill dialogue interface should be.

    Code:
    package com.rs.game.player.actions;
    
    import com.rs.Settings;
    import com.rs.cache.loaders.ItemDefinitions;
    import com.rs.game.item.Item;
    import com.rs.game.player.Player;
    import com.rs.game.player.Skills;
    
    public class Fletching2 extends Action {
    
    	private static final int LEVEL_OPCODE = 2645, BASE_OPCODE = 2655,
    			PERMENANT_SECONDARY_OPCODE = 2650, REMOVEABLE_SECONDARY_OPCODE = 2656, EXPERIENCE_OPCODE = 2697,
    			CREATION_COUNT_OPCODE = 2653;
    
    	private static final int[] PRODUCTS = {2861, 52, 53, 54, 60, 64, 68, 72, 806, 839, 841, 877, 879, 882, 2864, 2866, 9174, 9446, 9450, 10158, 16867, 16427, 17742, 25982, 25983, 25984, 25985, 25986, 25987, 25988, 25989, 25990, 17747, 21364, 21582, 24122, 29736, 30574 };
    
    	private final FletchData data;
    	private int product, cycles, incrementPerCycle, level;
    	private double experience;
    
    	public Fletching2(FletchData data, int product, int cycles) {
    		this.data = data;
    		this.product = product;
    		this.cycles = cycles;
    		ItemDefinitions defs = ItemDefinitions.getItemDefinitions(product);
    		this.incrementPerCycle = defs.getCSOpcode(CREATION_COUNT_OPCODE);
    		this.level = defs.getCSOpcode(LEVEL_OPCODE);
    		this.experience = defs.getCSOpcode(EXPERIENCE_OPCODE) / 10.0;
    	}
    
    	public boolean checkAll(Player player) {
    		if (player.getSkills().getLevel(Skills.FLETCHING) < level)
    			return false;
    		else if (!player.getSlayerManager().hasLearnedBroad()) {
    			if (product == 4160 || product == 13280) {
    				player.getPackets().sendGameMessage("You lack the knowledge to create a broad accessory, perhaps a Slayer Master could assist you.");
    				return false;
    			}
    		}
    		return continueNextCycle(player);
    	}
    
    	@Override
    	public boolean start(Player player) {
    		if (!checkAll(player))
    			return false;
    		return true;
    	}
    
    	@Override
    	public boolean process(Player player) {
    		return continueNextCycle(player) && cycles > 0;
    	}
    
    	private boolean continueNextCycle(Player player) {
    		return player.getInventory().containsItemToolBelt(data.getSecondary()) && player.getInventory().containsItem(data.getNode(), 1);
    	}
    
    	@Override
    	public int processWithDelay(Player player) {
    		cycles--;
    		boolean isShaft = product == 52;
    		if (incrementPerCycle > 0) {
    			if (data.canDeleteSecondary()) {
    				int nodeCount = player.getInventory().getAmountOf(data.getNode());
    				int secondaryCount = player.getInventory().getAmountOf(data.getSecondary());
    				if (!isShaft) {
    					if (nodeCount < incrementPerCycle)
    						incrementPerCycle = nodeCount;
    					if (secondaryCount < incrementPerCycle)
    						incrementPerCycle = secondaryCount;
    				}
    			}
    		} else
    			incrementPerCycle = 1;
    		if (data.canDeleteSecondary())
    			player.getInventory().deleteItem(data.getSecondary(), incrementPerCycle);
    		player.getInventory().deleteItem(data.getNode(), isShaft ? 1 : incrementPerCycle);
    		player.getSkills().addXp(Skills.FLETCHING, experience * incrementPerCycle);
    		player.getInventory().addItem(product, incrementPerCycle * (incrementPerCycle != 1 ? Settings.getCraftRate() : incrementPerCycle));
    
    		//You carefully cut the wood into a Shieldbow (u).
    		//You add a string to the bow.
    
    		//TODO animation and message display.
    		return 4;
    	}
    
    	@Override
    	public void stop(Player player) {
    		setActionDelay(player, 3);
    	}
    
    	public static FletchData isFletching(int material) {
    		for (int product : PRODUCTS) {
    			ItemDefinitions defs = ItemDefinitions.getItemDefinitions(product);
    			int secondary = defs.getCSOpcode(PERMENANT_SECONDARY_OPCODE);
    			if (secondary == 0)
    				continue;
    			int nodeId = defs.getCSOpcode(BASE_OPCODE);
    			if (nodeId == material)
    				return new FletchData(product, nodeId, secondary, secondary == 0);
    		}
    		return null;
    	}
    
    	public static FletchData isFletchingCombination(Item node, Item secondary) {
    		for (int product : PRODUCTS) {
    			ItemDefinitions defs = ItemDefinitions.getItemDefinitions(product);
    			int nodeId = defs.getCSOpcode(BASE_OPCODE);
    			int fixedSecondaryId = defs.getCSOpcode(PERMENANT_SECONDARY_OPCODE);
    			int removeableSecondaryId = defs.getCSOpcode(REMOVEABLE_SECONDARY_OPCODE);
    			if (fixedSecondaryId == 0 && removeableSecondaryId == 0)
    				removeableSecondaryId = 314;//Feather isn't in cache idk why
    			if (node.getId() == nodeId && (secondary.getId() == fixedSecondaryId || secondary.getId() == removeableSecondaryId))
    				return new FletchData(product, nodeId, secondary.getId(), fixedSecondaryId == 0);
    			else if ((node.getId() == fixedSecondaryId || node.getId() == removeableSecondaryId) && secondary.getId() == nodeId)
    				return new FletchData(product, secondary.getId(), nodeId, fixedSecondaryId == 0);
    		}
    		return null;
    	}
    
    	public static class FletchData {
    		private int product;
    		private final int node;
    		private final int secondary;
    		private final boolean deleteSecondary;
    
    		public FletchData(int product, int node, int secondary, boolean deleteSecondary) {
    			System.out.println(product);
    			this.product = product;
    			this.node = node;
    			this.secondary = secondary;
    			this.deleteSecondary = deleteSecondary;
    		}
    
    		public int getProduct() {
    			return product;
    		}
    
    		public int getNode() {
    			return node;
    		}
    
    		public int getSecondary() {
    			return secondary;
    		}
    
    		public boolean canDeleteSecondary() {
    			return deleteSecondary;
    		}
    	}
    }
    Feel free to PM me if you really want a more indepth explanation, but we should be utilizing the data RS is handing us.
    Reply With Quote  
     

  7. Thankful users:


  8. #37  
    Registered Member
    Join Date
    Jan 2013
    Posts
    3
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Why do i get these errors when doing all the steps for smithing?
    I find non working smithing actually working better than errors upon errors.
    Description Resource Path Location Type
    The constructor Smithing(Integer, int, boolean) is undefined WorldPacketsDecoder.java /Server/src/com/rs/net/decoders line 1218 Java Problem
    The constructor Smithing(int, int, boolean) is undefined ButtonHandler.java /Server/src/com/rs/net/decoders/handlers line 993 Java Problem
    The constructor Smithing(int, int, boolean) is undefined ButtonHandler.java /Server/src/com/rs/net/decoders/handlers line 1010 Java Problem
    COMPONENTS cannot be resolved or is not a field ButtonHandler.java /Server/src/com/rs/net/decoders/handlers line 985 Java Problem
    COMPONENTS cannot be resolved or is not a field ButtonHandler.java /Server/src/com/rs/net/decoders/handlers line 986 Java Problem
    COMPONENTS cannot be resolved or is not a field ButtonHandler.java /Server/src/com/rs/net/decoders/handlers line 1000 Java Problem
    Reply With Quote  
     

  9. #38  
    Registered Member
    Join Date
    Sep 2017
    Posts
    7
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    I'm an idiot, could you please upload the .java files as you have them?

    Did this all but it's not working, I could login and go to the lobby, but then when I tried to start by clicking the "Play now" button, it freezes and after some seconds it logs me out.
    Reply With Quote  
     

  10. #39  
    Registered Member
    Selseus's Avatar
    Join Date
    Aug 2017
    Posts
    386
    Thanks given
    11
    Thanks received
    73
    Rep Power
    84
    Quote Originally Posted by Chumi View Post
    I'm an idiot, could you please upload the .java files as you have them?

    Did this all but it's not working, I could login and go to the lobby, but then when I tried to start by clicking the "Play now" button, it freezes and after some seconds it logs me out.
    This post is from last year, so I highly doubt OP is still around. I suggest you starting on lower revisions and looking up some tutorials before trying to implement classes that have a LOT data in them, especially if they're replacing ones that came with the package you downloaded.

    Basically, learn from what Cjay (Actually one of the makers of the original Matrix that you're using now) said, or learn to convert this code for your release.

    If you're having trouble copying and pasting this code and that's just your problem, then please don't use this as you'll render more problems than solutions. Try using an IDE like Eclipse if you haven't already and hover your mouse over the error in the code and see if it gives you any "quickfixes" or solutions.
    Reply With Quote  
     

Page 4 of 4 FirstFirst ... 234

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [Delta] 100% Smithing for your server!
    By Da D4v1nci C0de in forum Tutorials
    Replies: 20
    Last Post: 12-29-2011, 03:09 AM
  2. Replies: 7
    Last Post: 10-23-2011, 10:25 AM
  3. Replies: 3
    Last Post: 08-24-2010, 06:45 AM
  4. Replies: 8
    Last Post: 06-15-2010, 06:24 PM
  5. SWAT's 100% GS's: How to Fix this?
    By Division in forum Help
    Replies: 18
    Last Post: 01-08-2010, 07:24 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •