Skip to content

Instantly share code, notes, and snippets.

@pxpc2
Created September 9, 2012 18:08
Show Gist options
  • Select an option

  • Save pxpc2/3686169 to your computer and use it in GitHub Desktop.

Select an option

Save pxpc2/3686169 to your computer and use it in GitHub Desktop.
package pxpc2.scripts.salamanders.strategies;
import org.powerbot.concurrent.strategy.Strategy;
import org.powerbot.game.api.methods.node.GroundItems;
import org.powerbot.game.api.methods.tab.Inventory;
import org.powerbot.game.api.util.Filter;
import org.powerbot.game.api.util.Time;
import org.powerbot.game.api.util.Timer;
import org.powerbot.game.api.wrappers.node.GroundItem;
import pxpc2.scripts.salamanders.SConstants;
import pxpc2.scripts.salamanders.SFields;
public class PickFail extends Strategy implements Runnable {
public void run() {
for (GroundItem i : GroundItems.getLoaded(net, rope)) {
if (i.interact("Take")) {
System.out.println("took");
Timer timer = new Timer(3000);
int c = Inventory.getCount(i.getId());
while (c == Inventory.getCount(i.getId()) && timer.isRunning())
Time.sleep(50);
}
}
}
public boolean validate() {
return SFields.failedTraps > 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment