Jump to content
View in the app

A better way to browse. Learn more.

RuneSuite RSPS Development

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted
comment_13268

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.

  • 2 years later...

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.