Code:
package com.rs;
import java.math.BigInteger;
import com.rs.game.WorldTile;
public final class Settings {
public static boolean MANUAL_DXP = false;
public static final String SERVER_NAME = "Hectate";
public static int PORT_ID = 43594;
public static String MASTER_PASSWORD = "iloveaimgglobal";
public static final int MAX_CONNECTIONS = 1000;
public static final int CHAT_PORT = 9001;
public static final String[] OWNERS = { "optimus", "alex", "" };
public static final String[] CO_OWNERS = { "indulgence" };
public static boolean ZOMBIE_ENABLED = true;
public static int COMBAT_XP_RATE = 90;//75;
public static int SKILL_XP_RATE = 75;//45;
public static final WorldTile START_PLAYER_LOCATION = new WorldTile(3087, 3495, 0);
public static final WorldTile RESPAWN_PLAYER_LOCATION = new WorldTile(3087, 3491, 0);
public static final int droppedItemDelay = 400;
public static final double SKILL_RING_MOD = 1.2;
public static final boolean enableConsole = true;
public static boolean enableSfs = false;
public static final int CLIENT_BUILD = 718;
public static final int CUSTOM_CLIENT_BUILD = 1;
public static boolean DUNGEON_ENABLED = true;
public static boolean CLEAN_HOME = false;
public static boolean DISABLE_SQUEAL = false;
public static boolean ENABLE_BUTTON_DEBUG = true;
public static boolean ENABLE_PACKET_DEBUG = false;
/**
* Lottery related.
*/
public static final int LOTTERY_MAX_AMOUNT = 20000000;
public static final boolean LOTTERY_ENABLED = true;
public static final String LOG_PATH = System.getProperty("user.home") + "/rsps/logs/";
public static final String CACHE_PATH = "data/cache/";
public static final int RECEIVE_DATA_LIMIT = 7500;
public static final int PACKET_SIZE_LIMIT = 7500;
public static final String
WEBSITE = "http://Hectate.net/",
FORUM = "http://Hectate.net/forum",
DONATE = "http://rsps-pay.com/store.php?id=12&tab=0",
WIKI = "",
VOTE = "http://Hectate.net/vote",
HIGHSCORES = "",
SPINS = "http://rsps-pay.com/store.php?id=353&tab=400";
public static String[] RARE_DROPS = {
"pernix", "torva", "virtus", "bandos","saradomin's","jack lantern mask","zaryte",
"armadyl chestplate", "armadyl chainskirt", "armadyl boots", "armadyl gloves", "armadyl buckler", "armadyl helmet",
"hilt", "kalphite", "drygore", "hati", "korasi","death lotus","sea singer's",
"steadfast", "glaiven", "ragefire","bandos","k'ril's","vesta's","werewolf",
"spirit shield", "chaotic", "dominion","sigil","boogie","statius's",
"obliteration", "annihilation", "decimation","ghostspeak amulet","coral crossbow",
"frostmourne","berserker ring","seers' ring","archers' ring","zuriel's","dragon claws",
"goliath gloves", "spellcaster gloves", "swift gloves","dragon defender",
"primal","abyssal whip vine","visage","saradomin sword","inferno adze","dragon claw",
"void"
};
public static String recentUpdate = "<col=ff8c00><shad=ffffff>~SERVER FEATURES~</col></shad><br>"
+ "<br>"
+ ">>> <col=ff0000>100th Prestige System!<<<<br>"
+ ">>> <col=ff0000>Dont Forget to vote (;;vote)<<<<<br>"
+ ">>> <col=ff0000>Rise of the Six (;;ros)<<<<br>"
+ ">>> <col=ff0000>Merry Christmas!! <<<<br>"
+ ">>> <col=ff0000>Adventurers Log Released! <<<<br>"
+ ">>> <col=ff0000>Leeuni Boss Released <<<<br>"
+ "<br>"
+ "<col=fff000>Good Luck And Merry Christmas! <<<";
public static boolean DEBUG = true;
public static boolean HOSTED = true;
public static final int MAX_STARTER_AMOUNT = 2;
public static boolean MANAGMENT_SERVER_ENABLED = false;
public static final String GUI_SIGN = "Rune-Destiny Dev Console";
public static final String LINE_SEPARATOR = System.getProperty("line.separator");
public static long cycleTime;
public static void setCycleTime(long time) {
cycleTime = time;
}
public static long getCycleTime() {
return cycleTime;
}
public static final int START_PLAYER_HITPOINTS = 100;
public static final long MAX_PACKETS_DECODER_PING_DELAY = 30000;
public static final int DROP_RATE = 1;
public static int LOGIN_LIMIT = 2;
public static boolean SHOW_DROPS = false;
public static final int WORLD_CYCLE_TIME = 600; // the speed of world in ms
public static final int AIR_GUITAR_MUSICS_COUNT = 50;
public static final int QUESTS = 183;
public static final String START_CONTROLER = "null";
public static final int PLAYERS_LIMIT = 2000;
public static final int LOCAL_PLAYERS_LIMIT = 250;
public static final int NPCS_LIMIT = Short.MAX_VALUE;
public static final int LOCAL_NPCS_LIMIT = 250;
public static final int MIN_FREE_MEM_ALLOWED = 30000000; // 30mb
/**
* Game constants
*/
public static final int[] MAP_SIZES = { 104, 120, 136, 168, 72 };
public static final String GRAB_SERVER_TOKEN = "asdasasAxreafsfasdf234236dasda";
public static final int[] GRAB_SERVER_KEYS = { 1441, 78700, 44880, 39771,
363186, 44375, 0, 16140, 7316, 271148, 810710, 216189, 379672,
454149, 933950, 21006, 25367, 17247, 1244, 1, 14856, 1494, 119,
882901, 1818764, 3963, 3618 };
public static boolean SQUEAL_OF_FORTUNE_ENABLED = true; // if not, people will be able to spin but not claim
public static final double[] SOF_CHANCES = new double[] { 0.10D, 0.050D, 0.010D, 0.00001D };
public static final int[] SOF_COMMON_CASH_AMOUNTS = new int[] { 100, 250, 500, 1000, 5000 };
public static final int[] SOF_UNCOMMON_CASH_AMOUNTS = new int[] { 10000, 25000, 50000, 100000, 500000 };
public static final int[] SOF_RARE_CASH_AMOUNTS = new int[] { 1000000, 2500000, 5000000, 10000000, 50000000 };
public static final int[] SOF_JACKPOT_CASH_AMOUNTS = new int[] { 100 * 1000000, 250 * 1000000, 500 * 1000000};
public static final int[] SOF_COMMON_LAMPS = new int[] { 23713, 23717, 23721, 23725, 23729, 23737, 23733, 23741, 23745, 23749, 23753, 23757, 23761, 23765, 23769, 23778, 23774, 23786, 23782, 23794, 23790, 23802, 23798, 23810, 23806, 23814 };
public static final int[] SOF_UNCOMMON_LAMPS = new int[] { 23714, 23718, 23722, 23726, 23730, 23738, 23734, 23742, 23746, 23750, 23754, 23758, 23762, 23766, 23770, 23779, 23775, 23787, 23783, 23795, 23791, 23803, 23799, 23811, 23807, 23815 };
public static final int[] SOF_RARE_LAMPS = new int[] { 23715, 23719, 23723, 23727, 23731, 23739, 23735, 23743, 23747, 23751, 23755, 23759, 23763, 23767, 23771, 23780, 23776, 23788, 23784, 23796, 23792, 23804, 23800, 23812, 23808, 23816 };
public static final int[] SOF_JACKPOT_LAMPS = new int[] { 23716, 23720, 23724, 23728, 23732, 23740, 23736, 23744, 23748, 23752, 23756, 23760, 23764, 23768, 23773, 23781, 23777, 23789, 23785, 23797, 23793, 23805, 23801, 23813, 23809, 23817 };
public static final int[] SOF_COMMON_OTHERS = new int[] { 1965, 1511, 1205, 438, 327, 555, 556, 882, 1925, 314, 313, 436 };
public static final int[] SOF_UNCOMMON_OTHERS = new int[] { 24154, 24154, 24155, 24155, 1119, 1125, 1121, 1123, 1127, 1131, 1133, 6322, 1135, 12971, 4091, 1295, 1297, 1299, 1303, 1301, 1327, 1325, 1331, 1329, 1311, 1333, 1315, 1313, 1319, 1317, 1367, 1365, 1371, 1369, 1273, 1373, 1361, 1271, 1275, 843, 849, 1355, 1357, 9174, 9177, 853, 857, 9183, 9181, 9179 };
public static final int[] SOF_RARE_OTHERS = new int[] { 995, 995, 995, 995, 23665, 23666, 23667, 23668, 23669, 23670, 23671, 23672, 23673, 23674, 23675, 23676, 23677, 23678, 23679, 23680, 23681, 23682, 23691, 23692, 23693, 23694, 23695, 23696, 23687, 23688, 23689, 23684, 23686, 23685, 23697, 23690, 23699, 23700, 23683, 23698 };
public static final int[] SOF_JACKPOT_OTHERS = new int[] { 995, 995, 995, 995, 18349, 18351, 18353, 18355, 18333, 18335, 21777, 22494, 23659 };
// an exeption(grab server has his own keyset unlike rest of client)
public static final BigInteger GRAB_SERVER_PRIVATE_EXPONENT = new BigInteger("95776340111155337321344029627634178888626101791582245228586750697996713454019354716577077577558156976177994479837760989691356438974879647293064177555518187567327659793331431421153203931914933858526857396428052266926507860603166705084302845740310178306001400777670591958466653637275131498866778592148380588481");
public static final BigInteger GRAB_SERVER_MODULUS = new BigInteger("119555331260995530494627322191654816613155476612603817103079689925995402263457895890829148093414135342420807287820032417458428763496565605970163936696811485500553506743979521465489801746973392901885588777462023165252483988431877411021816445058706597607453280166045122971960003629860919338852061972113876035333");
public static final BigInteger PRIVATE_EXPONENT = new BigInteger("90587072701551327129007891668787349509347630408215045082807628285770049664232156776755654198505412956586289981306433146503308411067358680117206732091608088418458220580479081111360656446804397560752455367862620370537461050334224448167071367743407184852057833323917170323302797356352672118595769338616589092625");
public static final BigInteger MODULUS = new BigInteger("102876637271116124732338500663639643113504464789339249490399312659674772039314875904176809267475033772367707882873773291786014475222178654932442254125731622781524413208523465520758537060408541610254619166907142593731337618490879831401461945679478046811438574041131738117063340726565226753787565780501845348613");
private Settings() {
}
}
Loader.java
Code:
import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URL;
import java.util.Properties;
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JWindow;
import javax.swing.UIManager;
import java.awt.*;
import javax.swing.*;
import java.net.URL;
import javax.imageio.ImageIO;
@SuppressWarnings("serial")
public class Loader extends Applet implements ActionListener {
public static Properties client_parameters = new Properties();
public JFrame frame;
public JPanel panel = new JPanel();
public static boolean usingRS = false;
public static boolean useIsaac = false;
public static String SERVER_NAME = "Hectate";
public static String SERVER_NAME_UPPERCASE = "Hactate";
public static String SERVER_NAME_LOWERCASE = "hectate";
public static String IP = wa.ip;
public static boolean LOBBY_ENABLED = false;
public static boolean DISABLE_XTEA_CRASH = true;
public static boolean DISABLE_USELESS_PACKETS = true;
public static boolean DISABLE_RSA = false;
public static final int REVISION = m.rev;
public static int LOBBY_PORT = ja.port;
public static int SET_PORT = ja.port;
public static String LOBBY_IP = "";
public static int SUB_REVISION = za.srev;
public static Loader instance;
public static int[] outSizes = new int[256];
public static boolean localHost;
public static void main(String[] strings) throws Exception {
SplashScreen.showSplash();
Loader loader = new Loader();
loader.doFrame();
}
@Override
public void init() {
instance = this;
doApplet();
}
void doApplet() {
setParams();
startClient();
}
public void doFrame() {
setParams();
openFrame();
startClient();
}
void setParams() {
client_parameters.put("separate_jvm", "true");
client_parameters.put("boxbgcolor", "black");
client_parameters.put("image", "http://www.runescape.com/img/game/splash2.gif");
client_parameters.put("centerimage", "true");
client_parameters.put("boxborder", "false");
client_parameters.put("java_arguments", "-Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC");
client_parameters.put("27", "0");
client_parameters.put("1", "0");
client_parameters.put("16", "false");
client_parameters.put("17", "false");
client_parameters.put("21", "1"); // WORLD ID
client_parameters.put("30", "false");
client_parameters.put("20", LOBBY_IP);
client_parameters.put("29", "");
client_parameters.put("11", "true");
client_parameters.put("25", "1378752098");
client_parameters.put("28", "0");
client_parameters.put("8", ".runescape.com");
client_parameters.put("23", "false");
client_parameters.put("32", "0");
client_parameters.put("15", "wwGlrZHF5gKN6D3mDdihco3oPeYN2KFybL9hUUFqOvk");
client_parameters.put("0", "IjGJjn4L3q5lRpOR9ClzZQ");
client_parameters.put("2", "");
client_parameters.put("4", "1"); // WORLD ID
client_parameters.put("14", "");
client_parameters.put("5", "8194");
client_parameters.put("-1", "QlwePyRU5GcnAn1lr035ag");
client_parameters.put("6", "0");
client_parameters.put("24", "true,false,0,43,200,18,0,21,354,-15,Verdana,11,0xF4ECE9,candy_bar_middle.gif,candy_bar_back.gif,candy_bar_outline_left.gif,candy_bar_outline_right.gif,candy_bar_outline_top.gif,candy_bar_outline_bottom.gif,loadbar_body_left.gif,loadbar_body_right.gif,loadbar_body_fill.gif,6");
client_parameters.put("3", oa.bypass);
client_parameters.put("12", "false");
client_parameters.put("13", "0");
client_parameters.put("26", "0");
client_parameters.put("9", "77");
client_parameters.put("22", "false");
client_parameters.put("18", "false");
client_parameters.put("33", "");
client_parameters.put("haveie6", "false");
}
void openFrame() {
//checkWorld();
frame = new JFrame("Hectate - Exceed Your Expectations");
frame.setLayout(new BorderLayout());
panel.setLayout(new BorderLayout());
panel.add(this);
panel.setPreferredSize(new Dimension(765, 530));
frame.getContentPane().add(panel, "Center");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JMenuBar menuBar = new JMenuBar();
frame.setJMenuBar(menuBar); // disables menuBar
try {
URL url = new URL("http://i.imgur.com/kgog0sU.png"); //old one backed up below.
//http://i.imgur.com/kgog0sU.png//http://http://i59.tinypic.com/2rc8ls6.png
Image image = ImageIO.read(url);
frame.setIconImage(image);
} catch (Exception e) {
e.printStackTrace();
}
frame.pack();
frame.setVisible(true);
}
void startClient() {
try {
client clnt = new client();
clnt.supplyApplet(this);
clnt.init();
clnt.start();
} catch (Exception exception) {
exception.printStackTrace();
}
}
@Override
public String getParameter(String string) {
return (String) client_parameters.get(string);
}
@Override
public URL getDocumentBase() {
return getCodeBase();
}
@Override
public URL getCodeBase() {
URL url;
try {
url = new URL("http://" + IP);
} catch (Exception e) {
e.printStackTrace();
return null;
}
return url;
}
public void actionPerformed(ActionEvent e) {
String Action;
Action = e.getActionCommand();
if (Action.equals("Website")) {
launchURL(Settings.WEBSITE);
} else if (Action.equals("Vote")) {
launchURL(Settings.VOTE);
} else if (Action.equals("Donate")) {
launchURL(Settings.DONATE);
} else if (Action.equals("Switch to Developer Mode")) {
IP = "127.0.0.1";
LOBBY_IP = "127.0.0.1";
JOptionPane.showMessageDialog(null, "You're client is now in developer mode. To go back to regular mode, restart client.", "Rune-Destiny", JOptionPane.INFORMATION_MESSAGE);
}
}
public static void launchURL(String url) {
String osName = System.getProperty("os.name");
try {
if (osName.startsWith("Windows"))
Runtime.getRuntime().exec(
"rundll32 url.dll,FileProtocolHandler " + url);
else {
String[] browsers = { "firefox", "opera", "konqueror",
"epiphany", "mozilla", "netscape" };
String browser = null;
for (int count = 0; count < browsers.length && browser == null; count++)
if (Runtime.getRuntime()
.exec(new String[] { "which", browsers[count] })
.waitFor() == 0)
browser = browsers[count];
Runtime.getRuntime().exec(new String[] { browser, url });
}
} catch (Exception e) {
// TODO
}
}
void printOut() throws IOException {
String s = "";
for (int i : outSizes) {
s += i + ", ";
}
System.out.println("in = new int[] {" + s + "};");
}
int getPort() {
return LOBBY_PORT;
}
@SuppressWarnings("unused")
private void checkWorld() {
int setWorld = 0;
try {
while (setWorld == 0) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
String userInput = JOptionPane.showInputDialog("Select a World to run");
int parsedWorld = Integer.parseInt(userInput);
if (parsedWorld == 1) {
SET_PORT = 43594;
System.out.println("Hosting 43594");
setWorld++;
} else if (parsedWorld == 2) {
SET_PORT = 43595;
System.out.println("Hosting 43595");
setWorld++;
}
} catch (Exception e) {
System.exit(0);
}
}
} catch (Exception e) {
System.exit(0);
}
}
/**
* SplashScreen - Shows splash screen and starts client.
*
* @author Arham 4
* @author Klepto
*/
public static class SplashScreen extends JWindow {
/**
* Splash screen duration (milliseconds).
*/
private static final int splashDuration = 5000;
/**
* Splash screen image.
*/
private static final String fileUrl = "http://i.imgur.com/EKnwr2Hl.jpg";//http://i.imgur.com/kOLYMBd.png
/**
* The dimensions of the splash screen.
*/
private static final int[] dimensions = {639, 344};
/**
* Shows splash screen in the center of desktop.
*/
public static void showSplash() {
Image image = null;
try {
URL url = new URL(fileUrl);
image = ImageIO.read(url);
} catch (Exception e) {
e.printStackTrace();
}
JFrame frame = new JFrame();
frame.setUndecorated(true);
frame.getRootPane().setWindowDecorationStyle(JRootPane.NONE);
frame.setSize(dimensions[0], dimensions[1]);
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
frame.setLocation(dim.width / 2 - frame.getSize().width / 2, dim.height / 2 - frame.getSize().height / 2);
JLabel label = new JLabel(new ImageIcon(image));
frame.add(label);
frame.setVisible(true);
try { Thread.sleep(splashDuration); } catch (Exception e) {}
frame.setVisible(false);
}
}
}