Skip to content

Instantly share code, notes, and snippets.

import org.powerbot.game.api.methods.Widgets;
import org.powerbot.game.api.wrappers.widget.WidgetChild;
public class Equipment {
/**
* @author _phl0w
* @since 12-6-2012
*/
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
/**
* @param item
* @return The integer of the widget equipment slot if found, otherwise -1.
*/
public static int isWearing(int item) {
for (int slot : WIDGET_EQUIPMENT_ALL) {
if (Widgets.get(WIDGET, WIDGET_EQUIPMENT_ALL[slot]).getChildId() == item) {
return WIDGET_EQUIPMENT_ALL[slot];
}
}
/**
* @author Cakemix
* @author Coma
* @param id
* the item id
* @return the price
* @throws IOException
*/
private int getPrice(int id) throws IOException {
URL url = new URL("http://open.tip.it/json/ge_single_item?item=" + id);
private class Banking extends Strategy implements Task {
@Override
public boolean validate() {
return (Inventory.getCount(primary) == 0 || Inventory
.getCount(secondary) == 0)
&& guiInitialized
&& !Bank.isOpen();
}
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout;
private final Pattern UPDATER_VERSION_PATTERN = Pattern
.compile("version\\s*=\\s*([0-9.]+)");
doUpdates("http://phl0w.site88.net/scripts/barb.php");
public double getVersion() {
return iTBarbFisher.class.getAnnotation(Manifest.class).version();
}
<?php
include("../includes/functions.php");
$ver = getVersion("iTBarbFisher");
echo "version = ".$ver;
?>
function getVersion($script) {
$sql = mysql_query("SELECT * FROM `scripts` WHERE script = '".$script."'");
$rows = mysql_num_rows($sql);
while ($row = mysql_fetch_array($sql)) {
import org.powerbot.game.api.methods.Settings;
import org.powerbot.game.api.methods.Widgets;
import org.powerbot.game.api.util.Random;
import org.powerbot.game.api.util.Time;
public class Summoning {
public static boolean isFamiliarSummoned() {
return Settings.get(448) != -1;
}
import org.powerbot.game.api.methods.Settings;
import org.powerbot.game.api.methods.Widgets;
public class Prayer {
public static int getPrayerPoints() {
return Integer.parseInt(Widgets.get(749, 6).getText());
}
public static boolean isQuickPrayersOn() {