Jump to content
Existing user? Sign In

Sign In



Sign Up

Vencillio Crafting Bug Fix


Sanity

Recommended Posts

Hello Lads, 
I ran into an issue with the Vencillio base where gem's and some other items could be cut or crafted without the necessary tool, today I have a small snippet of code which could be considered kinda "hacky" but takes care of this issue.

First Open your Crafting.java
rs2.content.skill.craftingnew.Crafting.java

search for

public boolean itemOnItem(Player player, Item use, Item with) {

next search for this

	final Craftable craftable = getCraftable(use.getId(), with.getId());

		if (craftable == null) {
			return false;
		}

and underneath that we can add this snippet of code I have written.

if(craftable.getUse().getId() != use.getId() && craftable.getUse().getId() != with.getId()) {
			player.send(new SendMessage("You need a " + craftable.getUse().getDefinition().getName() + " to craft this"));
			return false;
}

Let's explain a bit what this code does so you guys can understand how we are solving this issue

craftable.getUse.getId()

returns the ID of the required Chisel(or required tool)
we are comparing this against both of our used items to make sure a chisel is in fact being used.

If the correct tool is not being used we are using

craftable.getUse().getDefinition.getName()

 

to return the name of the proper tool to the user.


Hopefully this helped someone out.

Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Contact

[email protected]

astra.security

What is a RSPS?

A RSPS, also known as RuneScape private server, is an online game based on RuneScape, and controlled by independent individuals.

Popular RSPS Servers

Runewild Ikov RedemptionRSPS

Disclaimer

Runesuite is not affiliated with runescape, jagex in any way & exists solely for educational purposes.

×
×
  • Create New...