mirror of
https://github.com/2006Scape-Scripts/ParaScript.git
synced 2026-12-06 03:07:23 +00:00
Initial Maven
This commit is contained in:
1 parent
15eb36b99a
commit
c1c0ee9e59
44 files changed
+403
-83
No files matched your search
@@ -1,47 +0,0 @@
|
||||
package ParaScript;
|
||||
|
||||
import ParaScript.data.Variables;
|
||||
import ParaScript.strategies.*;
|
||||
import ParaScript.ui.UI;
|
||||
import org.parabot.environment.api.utils.Time;
|
||||
import org.parabot.environment.scripts.Script;
|
||||
import org.parabot.environment.scripts.framework.Strategy;
|
||||
import org.parabot.environment.scripts.Category;
|
||||
import org.parabot.environment.scripts.ScriptManifest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ScriptManifest(author = "RedSparr0w", category = Category.OTHER, description = "ParaScript", name = "Script", servers = { "2006rebotted" }, version = 1)
|
||||
public class Main extends Script{
|
||||
|
||||
private final ArrayList<Strategy> strategies = new ArrayList<Strategy>();
|
||||
|
||||
@Override
|
||||
public boolean onExecute() {
|
||||
|
||||
UI ui = new UI();
|
||||
ui.setVisible(true);
|
||||
while (!Variables.running) {
|
||||
Time.sleep(300);
|
||||
}
|
||||
|
||||
strategies.add(new ScriptState());
|
||||
if(Variables.skill_to_train.equalsIgnoreCase("Woodcutting")) {
|
||||
strategies.add(new MakeArrowShafts());
|
||||
strategies.add(new WoodcutTree());
|
||||
}
|
||||
if(Variables.skill_to_train.equalsIgnoreCase("Mining")) {
|
||||
strategies.add(new Mine());
|
||||
strategies.add(new Bank());
|
||||
strategies.add(new Walk());
|
||||
}
|
||||
strategies.add(new HandleLogin());
|
||||
provide(strategies);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package ParaScript;
|
||||
|
||||
import ParaScript.data.Variables;
|
||||
import ParaScript.strategies.*;
|
||||
import ParaScript.ui.UI;
|
||||
import org.parabot.environment.api.utils.Time;
|
||||
import org.parabot.environment.scripts.Script;
|
||||
import org.parabot.environment.scripts.framework.Strategy;
|
||||
import org.parabot.environment.scripts.Category;
|
||||
import org.parabot.environment.scripts.ScriptManifest;
|
||||
import org.rev317.min.api.events.MessageEvent;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ScriptManifest(author = "RedSparr0w", category = Category.OTHER, description = "src/ParaScript", name = "Script", servers = { "2006rebotted" }, version = 1)
|
||||
public class Main extends Script{
|
||||
|
||||
private final ArrayList<Strategy> strategies = new ArrayList<Strategy>();
|
||||
|
||||
@Override
|
||||
public boolean onExecute() {
|
||||
|
||||
UI ui = new UI();
|
||||
ui.setVisible(true);
|
||||
while (!Variables.running) {
|
||||
Time.sleep(300);
|
||||
}
|
||||
|
||||
strategies.add(new ScriptState());
|
||||
if(Variables.skill_to_train.equalsIgnoreCase("Woodcutting")) {
|
||||
strategies.add(new MakeArrowShafts());
|
||||
strategies.add(new WoodcutTree());
|
||||
}
|
||||
if(Variables.skill_to_train.equalsIgnoreCase("Mining")) {
|
||||
strategies.add(new Mine());
|
||||
strategies.add(new Bank());
|
||||
strategies.add(new Walk());
|
||||
}
|
||||
if(Variables.skill_to_train.equalsIgnoreCase("Bank Runner")) {
|
||||
strategies.add(new Bank());
|
||||
strategies.add(new Walk());
|
||||
}
|
||||
strategies.add(new HandleLogin());
|
||||
provide(strategies);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
System.out.println("Script Stopped");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paint(Graphics graphics) {
|
||||
Graphics2D g = (Graphics2D) graphics;
|
||||
|
||||
Color c2=new Color(0f,.749f,1.0f,.3f );
|
||||
g.setColor(c2);
|
||||
g.setBackground(c2);
|
||||
g.fillRect(355, 232, 160, 20);
|
||||
|
||||
Color c=new Color(.686f,.933f,.933f,.3f );
|
||||
g.setColor(c);
|
||||
g.setBackground(c);
|
||||
g.fillRect(355, 252, 160, 85);
|
||||
|
||||
g.setColor(Color.WHITE);
|
||||
g.setFont(new Font("Arial", 1, 14));
|
||||
g.drawString("AIOWoodcutter", 360, 247);
|
||||
g.setFont(new Font("Arial", 1, 11));
|
||||
g.drawString("Status: " + Variables.getStatus(), 360, 270);
|
||||
g.drawString("Logs(P/H): " + 10 + "(" + 120 + ")", 360, 290);
|
||||
g.drawString("EXP(P/H): " + 1000 + "(" + 12685 + ")", 360, 310);
|
||||
g.drawString("Runtime: " + "02:22:20", 360, 330);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void messageReceived(MessageEvent message) {
|
||||
switch (message.getType()) {
|
||||
case 0:
|
||||
if (message.getMessage().contains("Congratulations, you advanced a woodcutting level.")) {
|
||||
// add in level up to paint
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if(Variables.skill_to_train.equalsIgnoreCase("Bank Runner")) {
|
||||
if (message.getMessage().startsWith(Variables.slaveMaster.toLowerCase() + " wishes to trade with you")) {
|
||||
// add in level up to paint
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,8 @@ public class Variables {
|
||||
private static String password = "";
|
||||
// Settings Panel
|
||||
public static String skill_to_train = "Woodcutting";
|
||||
// Used for slave accounts
|
||||
public static String slaveMaster = "";
|
||||
|
||||
// Used to walk places
|
||||
public static TilePath pathToWalk;
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -35,7 +35,7 @@ public class UI extends JFrame {
|
||||
private Color Color_Alizarin = new Color(231, 76, 60);
|
||||
|
||||
public UI() {
|
||||
setTitle("ParaScript");
|
||||
setTitle("src/ParaScript");
|
||||
setResizable(false);
|
||||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
setBounds(100, 100, 400, 300);
|
||||
@@ -51,7 +51,7 @@ public class UI extends JFrame {
|
||||
contentPane.add(tabbedPane);
|
||||
|
||||
/*
|
||||
* Login Stuff
|
||||
* Login Panel
|
||||
*/
|
||||
JPanel loginPanel = new JPanel();
|
||||
loginPanel.setForeground(Color_WhiteSmoke);
|
||||
@@ -88,7 +88,7 @@ public class UI extends JFrame {
|
||||
loginPanel.add(autoLogin);
|
||||
|
||||
/*
|
||||
* Settings
|
||||
* Settings Panel
|
||||
*/
|
||||
JPanel settingsPanel = new JPanel();
|
||||
settingsPanel.setForeground(Color_WhiteSmoke);
|
||||
@@ -104,6 +104,7 @@ public class UI extends JFrame {
|
||||
skillSelect.setModel(new DefaultComboBoxModel(new String[]{
|
||||
"Woodcutting",
|
||||
"Mining",
|
||||
"Bank Runner",
|
||||
}));
|
||||
skillSelect.setBounds(20, 40, 150, 20);
|
||||
settingsPanel.add(skillSelect);
|
||||
@@ -112,8 +113,9 @@ public class UI extends JFrame {
|
||||
Variables.skill_to_train = skillSelect.getSelectedItem().toString();
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* Woodcutting Stuff
|
||||
* Woodcutting Panel
|
||||
*/
|
||||
|
||||
JPanel woodcuttingPanel = new JPanel();
|
||||
@@ -178,6 +180,29 @@ public class UI extends JFrame {
|
||||
});
|
||||
*/
|
||||
|
||||
/*
|
||||
* Slave Panel
|
||||
*/
|
||||
JPanel slavePanel = new JPanel();
|
||||
slavePanel.setForeground(Color_WhiteSmoke);
|
||||
slavePanel.setBackground(Color_WetAsphalt);
|
||||
tabbedPane.addTab("Settings", null, slavePanel, null);
|
||||
slavePanel.setLayout(null);
|
||||
|
||||
// Which skill are we training
|
||||
JLabel lblSlaveMaster = new JLabel("Slave Master");
|
||||
lblSlaveMaster.setForeground(Color_WhiteSmoke);
|
||||
lblSlaveMaster.setBounds(20, 20, 73, 20);
|
||||
slavePanel.add(lblSlaveMaster);
|
||||
JTextField slaveMaster = new JTextField();
|
||||
slaveMaster.setBounds(20, 40, 150, 20);
|
||||
slavePanel.add(slaveMaster);
|
||||
slaveMaster.addActionListener (new ActionListener () {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Variables.slaveMaster = slaveMaster.getText();
|
||||
}
|
||||
});
|
||||
|
||||
JButton start = new JButton("START");
|
||||
start.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent arg0) {
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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>
|
||||
Reference in new issue
Block a user