Skip to content

Instantly share code, notes, and snippets.

View pxpc2's full-sized avatar
💭
CANSADO

pedro daia pxpc2

💭
CANSADO
  • Brasil
  • 08:22 (UTC -03:00)
View GitHub Profile
@pxpc2
pxpc2 / ProfileViews.java
Last active July 1, 2019 02:49
criando um script pra aumentar visualizações de perfil no powerbot
package pedro.url;
import javax.swing.*;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
public class ProfileViews {
Pedro
@pxpc2
pxpc2 / PathSearch.java
Last active July 1, 2019 02:47
Modified A* path finding
package us.brtm.algorithms.pathfinder;
import org.powerbot.game.api.methods.Calculations;
import org.powerbot.game.api.methods.Game;
import org.powerbot.game.api.methods.Walking;
import org.powerbot.game.api.wrappers.Tile;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@pxpc2
pxpc2 / CustomTile.java
Created December 11, 2012 18:49
CustomTile
import org.powerbot.game.api.methods.Game;
import org.powerbot.game.api.methods.Walking;
import org.powerbot.game.api.wrappers.Tile;
import java.util.ArrayList;
import java.util.List;
/**
* @author pxpc2 & _phl0w
*/
for (Tile aTILE_AREA : TILE_AREA) {
if (SceneEntities.getAt(aTILE_AREA) != null && filter.accept(aTILE_AREA)) {
sc.add(SceneEntities.getAt(aTILE_AREA));
}
}
package us.brtm.scripts.algorithms.pathfinder;
import org.powerbot.game.api.methods.Calculations;
import org.powerbot.game.api.wrappers.Tile;
import us.brtm.scripts.algorithms.CustomTile;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
public static Applet createApplet(String host, String s, String className,
Dimension d) throws Exception {
String source = getPageSource(new URL(s), host);
Matcher matcher = SOURCE_PATTERN.matcher(source);
if (matcher.find()) {
String first = matcher.group(1);
String frameSource = getPageSource(new URL(first), host);
matcher = ARCHIVE_PATTERN.matcher(frameSource);
Matcher codeMatcher = CODE_PATTERN.matcher(frameSource);
if (matcher.find() && codeMatcher.find()) {
private void getParams(String url) {
final String[] VALUES = { "document.write", "<param name=\"", "\">'","'", "\\(", "\\)", "\"", " ", ";", "value" };
try {
BufferedReader in = new BufferedReader(new InputStreamReader(new URL(url).openStream()));
String line;
for (String s : parameters.values()) {
System.out.println(s);
}
package us.brtm.client.loader;
import javax.swing.*;
import java.applet.Applet;
import java.applet.AppletContext;
import java.applet.AppletStub;
import java.awt.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
private File createFile(final String fileName, final String directory) {
final StringBuilder builder = new StringBuilder(directory);
final Path path = Paths.get(builder.append(fileName).toString());
if (path == null || path.toFile().length() == 0) {
System.err.println("failed to create file");
return null;
}
System.out.println("file created with success");
return path.toFile();
}