Jump to content

Need help with casting a spell


dalukas

Recommended Posts

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 by dalukas
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...