dalukas Posted March 9, 2015 Posted March 9, 2015 I'm trying to make an easy Wine grabber but I can't get the telekinetic grab or whatever spell to work.Help would be greatly appreciated.
Precise Posted March 9, 2015 Posted March 9, 2015 I'm trying to make an easy Wine grabber but I can't get the telekinetic grab or whatever spell to work. Help would be greatly appreciated. please post your current code which isn't working and then we can fix this issue Precise
dalukas Posted March 9, 2015 Author Posted March 9, 2015 (edited) Th is is my current code: package wineripper; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.api.Inventory; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.ui.Spells; import java.awt.*; @ScriptManifest(name = "Winegrabber", author = "Dalukas", version = 1.0, info = "", logo = "") public class Wineripper extends Script { public static final Spells.NormalSpells TELEKINETIC_GRAB = null; public String WINE_NAME = "Wine of zamorak"; @Override public void onStart() { // Code here will execute before the loop is started } @Override public void onExit() { // Code here will execute after the script ends } @Override public int onLoop() throws InterruptedException { Inventory inven = getInventory(); if (!inven.isFull()) { Entity wine = getObjects().closestThatContains(WINE_NAME); magic.castSpellOnEntity(TELEKINETIC_GRAB, wine); } return 100; } @Override public void onPaint(Graphics2D g) { // Paint } } Edited March 9, 2015 by dalukas
VladBots Posted March 9, 2015 Posted March 9, 2015 Th is is my current code: public static final Spells.NormalSpells TELEKINETIC_GRAB = null;
Khaleesi Posted March 9, 2015 Posted March 9, 2015 Th is is my current code: public static final Spells.NormalSpells TELEKINETIC_GRAB = null; why is that there? You are basicly using a spell which is NULL in the interact method. Just use the MagicSpell in the method instead 1
Apaec Posted March 9, 2015 Posted March 9, 2015 Also, i'm pretty sure the wine is a ground item! GroundItem wine = groundItems.closest(WINE_NAME); 1
dalukas Posted March 9, 2015 Author Posted March 9, 2015 Problems solved Thanks for all the help! (: 1