Created
December 16, 2015 17:39
-
-
Save lordgmage/bc14a53181edac3976b9 to your computer and use it in GitHub Desktop.
for william
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by .ignore support plugin (hsz.mobi) | |
### JetBrains template | |
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio | |
*.iml | |
## Directory-based project format: | |
.idea/ | |
# if you remove the above rule, at least ignore the following: | |
# User-specific stuff: | |
# .idea/workspace.xml | |
# .idea/tasks.xml | |
# .idea/dictionaries | |
# Sensitive or high-churn files: | |
# .idea/dataSources.ids | |
# .idea/dataSources.xml | |
# .idea/sqlDataSources.xml | |
# .idea/dynamic.xml | |
# .idea/uiDesigner.xml | |
# Gradle: | |
# .idea/gradle.xml | |
# .idea/libraries | |
# Mongo Explorer plugin: | |
# .idea/mongoSettings.xml | |
## File-based project format: | |
*.ipr | |
*.iws | |
## Plugin-specific files: | |
# IntelliJ | |
/out/ | |
# mpeltonen/sbt-idea plugin | |
.idea_modules/ | |
# JIRA plugin | |
atlassian-ide-plugin.xml | |
# Crashlytics plugin (for Android Studio and IntelliJ) | |
com_crashlytics_export_strings.xml | |
crashlytics.properties | |
crashlytics-build.properties | |
### Java template | |
*.class | |
# Mobile Tools for Java (J2ME) | |
.mtj.tmp/ | |
# Package Files # | |
*.jar | |
*.war | |
*.ear | |
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | |
hs_err_pid* | |
### Eclipse template | |
*.pydevproject | |
.metadata | |
.gradle | |
bin/ | |
tmp/ | |
*.tmp | |
*.bak | |
*.swp | |
*~.nib | |
local.properties | |
.settings/ | |
.loadpath | |
# Eclipse Core | |
.project | |
# External tool builders | |
.externalToolBuilders/ | |
# Locally stored "Eclipse launch configurations" | |
*.launch | |
# CDT-specific | |
.cproject | |
# JDT-specific (Eclipse Java Development Tools) | |
.classpath | |
# Java annotation processor (APT) | |
.factorypath | |
# PDT-specific | |
.buildpath | |
# sbteclipse plugin | |
.target | |
# TeXlipse plugin | |
.texlipse | |
### NetBeans template | |
nbproject/private/ | |
build/ | |
nbbuild/ | |
dist/ | |
nbdist/ | |
nbactions.xml | |
nb-configuration.xml | |
.nb-gradle/ | |
### Maven template | |
target/ | |
pom.xml.tag | |
pom.xml.releaseBackup | |
pom.xml.versionsBackup | |
pom.xml.next | |
release.properties | |
dependency-reduced-pom.xml | |
buildNumber.properties | |
.mvn/timing.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before_script: | |
- mvn clean | |
production: | |
script: | |
- mvn -U package -Dsettings.security=/home/ci/settings.xml | |
- java -cp /home/ci/allatori/allatori.jar com.allatori.Obfuscate ./target/classes/config.xml | |
type: deploy | |
only: | |
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> | |
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false"> | |
<output url="file://$MODULE_DIR$/target/classes" /> | |
<output-test url="file://$MODULE_DIR$/target/test-classes" /> | |
<content url="file://$MODULE_DIR$"> | |
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | |
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> | |
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> | |
<excludeFolder url="file://$MODULE_DIR$/target" /> | |
</content> | |
<orderEntry type="inheritedJdk" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
<orderEntry type="library" name="Maven: org.parabot:client:2.4.1" level="project" /> | |
<orderEntry type="library" name="Maven: org.parabot:317-api-minified:1.13" level="project" /> | |
</component> | |
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.parabot.lord.LordMine</groupId> | |
<artifactId>LordMine</artifactId> | |
<version>1.0</version> | |
<properties> | |
<jdk.version>1.7</jdk.version> | |
</properties> | |
<repositories> | |
<repository> | |
<id>git-parabot</id> | |
<name>Parabot's Git based repo</name> | |
<url>https://github.com/parabot/Maven-Repository/raw/master/</url> | |
</repository> | |
</repositories> | |
<dependencies> | |
<dependency> | |
<groupId>org.parabot</groupId> | |
<artifactId>client</artifactId> | |
<version>2.4.1</version> | |
</dependency> | |
<dependency> | |
<groupId>org.parabot</groupId> | |
<artifactId>317-api-minified</artifactId> | |
<version>1.13</version> | |
</dependency> | |
</dependencies> | |
<build> | |
<finalName>1000090</finalName> | |
<resources> | |
<resource> | |
<directory>src/main/resources</directory> | |
<filtering>true</filtering> | |
<includes> | |
<include>config.xml</include> | |
</includes> | |
</resource> | |
<resource> | |
<directory>src/main/resources</directory> | |
<filtering>false</filtering> | |
<excludes> | |
<exclude>config.xml</exclude> | |
</excludes> | |
</resource> | |
</resources> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>2.3.2</version> | |
<configuration> | |
<source>1.7</source> | |
<target>1.7</target> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<configuration> | |
<excludes> | |
<exclude>src/main/resources/config.xml</exclude> | |
</excludes> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.parabot.lord.LordMine.data; | |
public class Constants { | |
public static final int IRON[] = {2093,2092} ; | |
public static final int COAL[] = {2097,2096} ; | |
public static final int ADDY[] = {2105} ; | |
public static final int MITH[] = {2102,2103} ; | |
public static final int GOLD[] = {2098,2099} ; | |
public static final int TIN[] = {2094,2095} ; | |
public static final int[] GEM_IDS = {1630, 1624, 1628, 1624, 1622, 1620, 1618, 1632, 1626}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.parabot.lord.LordMine.data; | |
import org.rev317.min.api.events.listeners.MessageListener; | |
import org.rev317.min.api.methods.Skill; | |
public class Variables { | |
public static int[] ore; | |
public static int realleavel; | |
public static boolean bank; | |
public static boolean gemdrop; | |
private static String currentStatus; | |
public static int[] getOre() { | |
return ore; | |
} | |
public static boolean getBank() { | |
return bank; | |
} | |
public static boolean getGemdrop(){ | |
return gemdrop; | |
} | |
public static String getCurrentStatus() { | |
return currentStatus; | |
} | |
public static void setBanking(boolean bank) { | |
Variables.bank = bank; | |
} | |
public static void setGemdrop(boolean gemdrop){ Variables.gemdrop = gemdrop; | |
} | |
public static void setCurrentStatus(String currentStatus) { | |
Variables.currentStatus = currentStatus; | |
} | |
public static int getLevel() { | |
return realleavel; | |
} | |
public static void setRealleavel() { | |
return Variables.realleavel = Skill.MINING.getRealLevel(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.parabot.lord.LordMine.main; | |
import org.parabot.environment.api.interfaces.Paintable; | |
import org.parabot.environment.api.utils.Timer; | |
import org.parabot.environment.scripts.Category; | |
import org.parabot.environment.scripts.Script; | |
import org.parabot.environment.scripts.ScriptManifest; | |
import org.parabot.environment.scripts.framework.Strategy; | |
import org.parabot.lord.LordMine.data.Variables; | |
import org.parabot.lord.LordMine.strategies.Banking; | |
import org.parabot.lord.LordMine.strategies.Dropping; | |
import org.parabot.lord.LordMine.strategies.GenDrop; | |
import org.parabot.lord.LordMine.strategies.Mining; | |
import org.rev317.min.api.methods.Skill; | |
import javax.imageio.ImageIO; | |
import java.awt.*; | |
import java.io.IOException; | |
import java.net.URL; | |
import java.text.DecimalFormat; | |
import java.util.ArrayList; | |
@ScriptManifest(author = "Lord", | |
category = Category.MINING, | |
description = "Mines in skill section, Banks or drops", | |
name = "Lord Mine", | |
servers = { "PKHonor" }, | |
version = 1.1) | |
public class Core extends Script implements Paintable{ | |
private final ArrayList<Strategy> strategies = new ArrayList<Strategy>(); | |
DecimalFormat formatter = new DecimalFormat("#,###,###,###,###"); | |
private final Color color1 = new Color(255, 255, 255); | |
private final Font font1 = new Font("Beirut", 0, 10); | |
private final Image img1 = getImage("http://i.imgur.com/c6elIcK.png"); | |
private Timer scriptTimer; | |
@Override | |
public boolean onExecute() { | |
UI GUI = new UI(); | |
GUI.setVisible(true); | |
while (GUI.isVisible()) { | |
sleep(20); | |
} | |
scriptTimer = new Timer(); | |
strategies.add(new GenDrop()); | |
strategies.add(new Mining()); | |
strategies.add(new Banking()); | |
strategies.add(new Dropping()); | |
provide(strategies); | |
return true; | |
} | |
@Override | |
public void onFinish() { | |
super.onFinish(); | |
} | |
//START: Code generated using Enfilade's Easel | |
private Image getImage(String url) { | |
try { | |
return ImageIO.read(new URL(url)); | |
} catch(IOException e) { | |
return null; | |
} | |
} | |
@Override | |
public void paint(Graphics g1) { | |
Graphics2D g = (Graphics2D)g1; | |
g.drawImage(img1, 1, 295, null); | |
g.setFont(font1); | |
g.setColor(color1); | |
g.drawString(scriptTimer.toString(), 195, 388); | |
g.drawString("To Be Fixed", 209, 407); | |
g.drawString(Variables.getCurrentStatus(), 333, 386); | |
g.drawString(" " + Skill.MINING.getLevel(), 386, 407); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.parabot.lord.LordMine.main; | |
import org.parabot.lord.LordMine.data.Constants; | |
import org.parabot.lord.LordMine.data.Variables; | |
import java.awt.EventQueue; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.border.EmptyBorder; | |
import javax.swing.JLabel; | |
import java.awt.Font; | |
import javax.swing.SwingConstants; | |
import javax.swing.JComboBox; | |
import javax.swing.DefaultComboBoxModel; | |
import javax.swing.JButton; | |
import javax.swing.JCheckBox; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
public class UI extends JFrame { | |
private JPanel contentPane; | |
/** | |
* Launch the application. | |
*/ | |
public static void main(String[] args) { | |
EventQueue.invokeLater(new Runnable() { | |
public void run() { | |
try { | |
UI frame = new UI(); | |
frame.setVisible(true); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
} | |
}); | |
} | |
/** | |
* Create the frame. | |
*/ | |
public UI() { | |
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
setBounds(100, 100, 245, 370); | |
contentPane = new JPanel(); | |
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); | |
setContentPane(contentPane); | |
contentPane.setLayout(null); | |
JLabel lblLordPlanking = new JLabel("Lord Mine"); | |
lblLordPlanking.setHorizontalAlignment(SwingConstants.CENTER); | |
lblLordPlanking.setFont(new Font("Arial Black", Font.BOLD, 20)); | |
lblLordPlanking.setBounds(0, 0, 229, 93); | |
contentPane.add(lblLordPlanking); | |
final JComboBox LogSelect = new JComboBox(); | |
LogSelect.setModel(new DefaultComboBoxModel(new String[] {"Iron", "Coal", "Addy;", "Mithril", "Gold", "Tin"})); | |
LogSelect.setBounds(58, 132, 114, 20); | |
contentPane.add(LogSelect); | |
final JCheckBox HumanDelay = new JCheckBox("Banking"); | |
HumanDelay.setBounds(58, 196, 114, 23); | |
contentPane.add(HumanDelay); | |
final JCheckBox chckbxGemDrop = new JCheckBox("Gem Drop"); | |
chckbxGemDrop.setBounds(58, 222, 97, 23); | |
contentPane.add(chckbxGemDrop); | |
final JButton Start = new JButton("Start"); | |
Start.addActionListener(new ActionListener() { | |
@Override | |
public void actionPerformed(ActionEvent e) { | |
String selection = (String) LogSelect.getModel().getSelectedItem(); | |
switch (selection) { | |
case "Iron": | |
Variables.ore = Constants.IRON; | |
break; | |
case "Coal": | |
Variables.ore = Constants.COAL; | |
break; | |
case "Addy": | |
Variables.ore = Constants.ADDY; | |
break; | |
case "Mithril": | |
Variables.ore = Constants.MITH; | |
break; | |
case "Gold": | |
Variables.ore = Constants.GOLD; | |
break; | |
case "Tin": | |
Variables.ore = Constants.TIN; | |
break; | |
default: | |
System.out.println("Something wrong as happened please contact the script writers."); | |
break; | |
} | |
if (HumanDelay.isSelected()){ | |
Variables.setBanking(true); | |
} | |
if (chckbxGemDrop.isSelected()){ | |
Variables.setGemdrop(true); | |
} | |
setVisible(false); | |
} | |
}); | |
Start.setBounds(10, 308, 209, 23); | |
contentPane.add(Start); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.parabot.lord.LordMine.strategies; | |
import org.parabot.environment.api.utils.Time; | |
import org.parabot.environment.scripts.framework.SleepCondition; | |
import org.parabot.environment.scripts.framework.Strategy; | |
import org.parabot.lord.LordMine.data.Variables; | |
import org.rev317.min.api.methods.*; | |
public class Banking implements Strategy{ | |
@Override | |
public boolean activate() { | |
return Variables.bank = true && Inventory.isFull(); | |
} | |
@Override | |
public void execute() { | |
Variables.setCurrentStatus("Banking"); | |
Menu.clickButton(1195); | |
Time.sleep(600); | |
Time.sleep(new SleepCondition() { | |
@Override | |
public boolean isValid() { | |
return Players.getMyPlayer().getAnimation() == -1; | |
} | |
},4000); | |
Time.sleep(2000); | |
Bank.open(); | |
Time.sleep(new SleepCondition() { | |
@Override | |
public boolean isValid() { | |
return Bank.isOpen(); | |
} | |
},5000); | |
Menu.sendAction(646,126,142,23412); | |
Time.sleep(new SleepCondition() { | |
@Override | |
public boolean isValid() { | |
return Inventory.isEmpty(); | |
} | |
},2500); | |
Menu.clickButton(200); | |
Time.sleep(new SleepCondition() { | |
@Override | |
public boolean isValid() { | |
return Game.getOpenInterfaceId() == -1; | |
} | |
},3000); | |
Menu.clickButton(1170); | |
Time.sleep(new SleepCondition() { | |
@Override | |
public boolean isValid() { | |
return Game.getOpenBackDialogId() == 2492; | |
} | |
},3000); | |
Menu.clickButton(2496); | |
Time.sleep(600); | |
Time.sleep(new SleepCondition() { | |
@Override | |
public boolean isValid() { | |
return Players.getMyPlayer().getAnimation() == -1; | |
} | |
},6000); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.parabot.lord.LordMine.strategies; | |
import org.parabot.environment.api.utils.Time; | |
import org.parabot.environment.input.Keyboard; | |
import org.parabot.environment.scripts.framework.SleepCondition; | |
import org.parabot.environment.scripts.framework.Strategy; | |
import org.parabot.lord.LordMine.data.Variables; | |
import org.rev317.min.api.methods.Inventory; | |
public class Dropping implements Strategy{ | |
@Override | |
public boolean activate() { | |
return Variables.bank = false && Inventory.isFull(); | |
} | |
@Override | |
public void execute() { | |
Variables.setCurrentStatus("Dropping Ore"); | |
Keyboard.getInstance().sendKeys("::empty"); | |
Time.sleep(new SleepCondition() { | |
@Override | |
public boolean isValid() { | |
return Inventory.isEmpty(); | |
} | |
},3000); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.parabot.lord.LordMine.strategies; | |
import org.parabot.environment.api.utils.Time; | |
import org.parabot.environment.scripts.framework.Strategy; | |
import org.parabot.lord.LordMine.data.Constants; | |
import org.parabot.lord.LordMine.data.Variables; | |
import org.rev317.min.api.methods.Inventory; | |
import org.rev317.min.api.wrappers.Item; | |
public class GenDrop implements Strategy{ | |
@Override | |
public boolean activate() { | |
return Variables.gemdrop = true && Inventory.contains(Constants.GEM_IDS); | |
} | |
@Override | |
public void execute() { | |
Variables.setCurrentStatus("Dropping Gems"); | |
for (Item i : Inventory.getItems(Constants.GEM_IDS)) { | |
if (i != null) { | |
i.drop(); | |
} | |
Time.sleep(600); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.parabot.lord.LordMine.strategies; | |
import org.parabot.environment.api.utils.Time; | |
import org.parabot.environment.scripts.framework.SleepCondition; | |
import org.parabot.environment.scripts.framework.Strategy; | |
import org.parabot.lord.LordMine.data.Variables; | |
import org.rev317.min.api.methods.Inventory; | |
import org.rev317.min.api.methods.Players; | |
import org.rev317.min.api.methods.SceneObjects; | |
import org.rev317.min.api.wrappers.SceneObject; | |
public class Mining implements Strategy{ | |
private SceneObject[] ORE; | |
@Override | |
public boolean activate() { | |
ORE = SceneObjects.getNearest(Variables.ore); | |
return ORE != null && ORE.length > 0 && !Inventory.isFull() && Players.getMyPlayer().getAnimation() == -1; | |
} | |
public void execute() { | |
Variables.setCurrentStatus("Mining Ores"); | |
if (ORE[0].distanceTo() < 30) { | |
ORE[0].interact(SceneObjects.Option.MINE); | |
Time.sleep(1500); | |
Time.sleep(new SleepCondition() { | |
@Override | |
public boolean isValid() { | |
return Players.getMyPlayer().getAnimation() == -1; | |
} | |
}, 4000); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<config> | |
<jars basedir="${project.basedir}/target/"> | |
<jar in="${project.build.finalName}.jar" out="/home/ci/jars/${project.build.finalName}.jar"/> | |
</jars> | |
<classpath basedir="/home/ci/allatori/libs"> | |
<jar name="./*.jar"/> | |
</classpath> | |
<!-- String encryption --> | |
<property name="string-encryption" value="enable"/> | |
<property name="string-encryption-type" value="fast"/> | |
<property name="string-encryption-version" value="v4"/> | |
<!-- Control flow obfuscation --> | |
<property name="control-flow-obfuscation" value="enable"/> | |
<property name="extensive-flow-obfuscation" value="normal"/> | |
<!-- Renaming --> | |
<property name="default-package" value=""/> | |
<property name="force-default-package" value="disable"/> | |
<property name="classes-naming" value="unique"/> | |
<property name="methods-naming" value="iii"/> | |
<property name="fields-naming" value="iii"/> | |
<property name="local-variables-naming" value="abc"/> | |
<!-- Other --> | |
<property name="line-numbers" value="keep"/> | |
<property name="generics" value="keep"/> | |
<property name="member-reorder" value="enable"/> | |
<property name="finalize" value="disable"/> | |
<property name="synthetize-methods" value="private"/> | |
<property name="synthetize-fields" value="private"/> | |
<property name="remove-toString" value="disable"/> | |
</config> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment