Jump to content

Need help with compiling script.


Dutchsmoker420

Recommended Posts

Hi all, 

I've tried to use the code from the ''jad script'' in this section. 

This is the code:

import org.osbot.rs07.api.model.NPC;

import org.osbot.rs07.api.ui.PrayerButton;

import org.osbot.rs07.script.Script;

import org.osbot.rs07.script.ScriptManifest;


//TzTok-Jad

//MAGE(2656, Prayer.PROTECT_FROM_MAGIC, Color.BLUE),

//MELEE(2655, Prayer.PROTECT_FROM_MELEE, Color.RED),

//RANGE(2652, Prayer.PROTECT_FROM_MISSILES, Color.GREEN);


@ScriptManifest(author = "GuiltyAsCharged", info = "Because reflexes suck hardcore.", name = "Jad Prayer Swaper", version = 1.1, logo = "")


public class main extends Script

{

    @Override

    public void onStart() {

        log("Let's get started!");

    }


    @Override

    public int onLoop() throws InterruptedException 

    {

    	getBot().setHumanInputEnabled(true);

    	NPC jad = npcs.closest("TzTok-Jad");

    	if(jad != null)

    	{ 

    		//begin prayer swapping

    		//get animation

    		if(jad.getAnimation() == 2656)

    		{

    			//swap to mage prayer

    			log("Jad is maging.");

    			prayer.set(PrayerButton.PROTECT_FROM_MAGIC, true);

    		}

    		else if(jad.getAnimation() == 2652)

    		{

    			//swap to range prayer

    			log("Jad is ranging.");

    			prayer.set(PrayerButton.PROTECT_FROM_MISSILES, true);

    		}

    		else if(jad.getAnimation() == 2655)

    		{

    			//swap to melee prayer

    			log("Jad is meeleing.");

    			prayer.set(PrayerButton.PROTECT_FROM_MELEE, true);

    		}

        return random(100, 110);

    	}

    	else

    	{

    		log("waiting for Jad to appear...");

    		return random(100, 110);

    	}

    }


    @Override

    public void onExit() {

        log("Hope you got the cape!");

    }

}

I used this guide: Script Development Setup - Tutorials - OSBot :: 2007 OSRS Botting

Now im getting this error when trying to finish the build:

C:\Users\Youri\IdeaProjects\Script\src\Scriptkid.java:32:6
java: illegal character: '\ufeff'

The app also doesnt seem to put the script into the script direction of OSBOT even when i directed it to it.

Can someone please help me to make this script functional ? 

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...