Skip to content

Instantly share code, notes, and snippets.

@phl0w
Created June 19, 2012 13:47
Show Gist options
  • Select an option

  • Save phl0w/2954314 to your computer and use it in GitHub Desktop.

Select an option

Save phl0w/2954314 to your computer and use it in GitHub Desktop.
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;
}
public static int getSummoningPoints() {
return Integer.parseInt(Widgets.get(747, 7).getText());
}
public static void dismissFamiliar() {
try {
Widgets.get(747, 3).interact("Dismiss");
Time.sleep(Random.nextInt(1250, 1500));
Widgets.get(1188, 3).interact("Continue");
} catch (NullPointerException e) {
}
}
public static void attack() {
Widgets.get(747, 3).interact("Attack");
}
public static void takeBob() {
Widgets.get(747, 3).interact("Take BoB");
}
public static void cast() {
Widgets.get(747, 3).interact("Cast");
}
public static void renewFamiliar() {
Widgets.get(747, 3).interact("Renew Familiar");
}
public static void callFamiliar() {
Widgets.get(747, 3).interact("Call Follower");
}
public static int getSpecialLeft() {
return Settings.get(1177);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment