import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.powerbot.core.script.job.Task;
import org.powerbot.core.script.job.state.Node;
import org.powerbot.core.script.job.state.Tree;
import org.powerbot.game.api.util.Timer;
public abstract class ScriptWrapper extends org.powerbot.core.script.ActiveScript {
public final Timer runTime;
private Tree jobContainer = null;
private List<Node> jobs;
public ScriptWrapper() {
runTime = new Timer(0);
jobs = Collections.synchronizedList(new ArrayList<Node>());
}
public final void provide(final Node job) {
if(!jobs.contains(job)) {
jobs.add(job);
jobContainer = new Tree(jobs.toArray(new Node[jobs.size()]));
}
}
public final void revoke(final Node job) {
if(jobs.contains(job)) {
jobs.remove(job);
jobContainer = new Tree(jobs.toArray(new Node[jobs.size()]));
}
}
public final void submit(final Task task) {
getContainer().submit(task);
}
public final ScriptWrapper getScriptWrapper() {
return this;
}
public abstract void onStart();
@Override
public int loop(); {
if (jobContainer != null) {
final Node job = jobContainer.state();
if (job != null) {
jobContainer.set(job);
getContainer().submit(job);
job.join();
}
}
return 0;
}
}
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.regex.Pattern;
import org.powerbot.core.event.listeners.PaintListener;
import org.powerbot.core.script.job.state.Node;
import org.powerbot.game.api.Manifest;
import org.powerbot.game.api.methods.Widgets;
import org.powerbot.game.api.methods.input.Mouse;
import org.powerbot.game.api.methods.interactive.Players;
import org.powerbot.game.api.methods.node.GroundItems;
import org.powerbot.game.api.methods.node.Menu;
import org.powerbot.game.api.util.Filter;
import org.powerbot.game.api.util.Random;
import org.powerbot.game.api.util.Timer;
import org.powerbot.game.api.util.node.Deque;
import org.powerbot.game.api.util.node.Queue;
import org.powerbot.game.api.wrappers.Tile;
import org.powerbot.game.api.wrappers.interactive.Player;
import org.powerbot.game.api.wrappers.node.GroundItem;
import org.powerbot.game.bot.Context;
import org.powerbot.game.client.Client;
import org.powerbot.game.client.MenuGroupNode;
import org.powerbot.game.client.MenuItemNode;
import org.powerbot.game.client.NodeDeque;
import org.powerbot.game.client.NodeSubQueue;
@Manifest(authors = { "Cup" }, name = "c[DropParty]")
public class DropParty extends ScriptWrapper implements PaintListener {
private ArrayList<Tile> locations = new ArrayList<Tile>();
private ArrayList<Long> times = new ArrayList<Long>();
private Timer timer = new Timer(0);
private Player player;
@Override
public void onStart() {
provide(new VexillumCloser());
provide(new StatueCloser());
provide(new Walk());
provide(new Pickup());
provide(new Tracking());
}
private class VexillumCloser extends Node {
@Override
public boolean activate() {
return Widgets.get(1107, 156).validate();
}
@Override
public void execute() {
Mouse.hop((int) Widgets.get(1107, 156).getBoundingRectangle().getCenterX(), (int) Widgets.get(1107, 156).getBoundingRectangle().getCenterY());
Mouse.click(true);
}
}
private class StatueCloser extends Node {
@Override
public boolean activate() {
return Widgets.get(21, 42).validate();
}
@Override
public void execute() {
Mouse.hop((int) Widgets.get(21, 42).getBoundingRectangle().getCenterX(), (int) Widgets.get(21, 42).getBoundingRectangle().getCenterY());
Mouse.click(true);
}
}
private class Walk extends Node {
@Override
public boolean activate() {
return Menu.isOpen() && Menu.contains("Walk");
}
@Override
public void execute() {
if (Menu.isOpen()) {
select(Menu.contains("Take") ? "Take" : "Walk");
}
}
}
エラーは 63 行目から始まります: } import java.awt.Color;
友人から送られてきたこのコードを修正しようとしていますが、このエラーを修正できません。これはおそらく私が初心者であるため、助けていただきありがとうございます。