- Thread Author
- #1
Alright so, I'm trying to use an earth rune on the fire altar in order to make lava runes. I've tried a few different methods and i cant seem to get the bot to even select the Earth rune. Yet alone use it on the altar.
I'm extremely new to Java, so any help would be greatly appreciated. I'm sure i'm not doing everything the cleanest way possible, at this point i'm just trying to limp through it then work out the kinks later.
I'm extremely new to Java, so any help would be greatly appreciated. I'm sure i'm not doing everything the cleanest way possible, at this point i'm just trying to limp through it then work out the kinks later.
Code:
package com.rootbots.runecrafting.LavaRunes.leafs;
import com.runemate.game.api.hybrid.Environment;
import com.runemate.game.api.hybrid.entities.GameObject;
import com.runemate.game.api.hybrid.local.hud.interfaces.Inventory;
import com.runemate.game.api.hybrid.local.hud.interfaces.SpriteItem;
import com.runemate.game.api.hybrid.location.Coordinate;
import com.runemate.game.api.hybrid.region.GameObjects;
import com.runemate.game.api.osrs.local.hud.interfaces.Magic;
import com.runemate.game.api.script.framework.tree.LeafTask;
/**
* NOTES:
* if we arent at castle wars, and we have 26 essence, we are and the altar is visible
Use Magic Imbue and use Earth Rune on Altar
*/
public class CraftRune extends LeafTask {
Coordinate altarRegion = new Coordinate(2583, 4840, 0);
@Override
public void execute() {
Environment.getBot().getLogger().info("Starting craftRune.java");
GameObject altar = GameObjects.getLoaded("Altar").nearest();
if (altar.isVisible()) {
Magic.Lunar.MAGIC_IMBUE.activate();
}
SpriteItem items = Inventory.getItems("Earth rune").first();
if (items != null && altar != null) {
Environment.getBot().getLogger().info("Found earth RUNE and ALTAR!!!!!!");
items.interact("Use", Inventory.getSelectedItem() + "->" + altar);
}
}
}