Jump to content
  • 0
Sign in to follow this  
KaozVirtuz

Pay 4 Fix 7$ , How to Turn online?

Question

Hi Agian got my other problem fixed for free :| ( giving the money to whoever helps with the problem first )
leave hotmail to paypal or skype so i can send it another way
its 7$ not that much but its still money :|

i cant turn on the server , i have no idea why , maybe the cache or something? not sure but
this is my server ip

dkfscapes.no-ip.org

maybe you could fix it and i copy and paste or something?

Server.Java on Source Side
[CODE]package server;n

import java.io.IOException;
import java.net.InetSocketAddress;
import java.text.DecimalFormat;

import org.apache.mina.common.IoAcceptor;
import org.apache.mina.transport.socket.nio.SocketAcceptor;
import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;

import server.event.EventManager;
import server.util.ControlPanel;
import server.model.npcs.NPCHandler;
import server.model.npcs.NPCDrops;
import server.model.players.PlayerHandler;
import server.model.players.Player;
import server.model.players.Client;
import server.model.players.PlayerSave;
import server.model.minigames.*;
import server.net.ConnectionHandler;
import server.net.ConnectionThrottleFilter;
import server.util.ShutDownHook;
import server.util.SimpleTimer;
import server.util.log.Logger;
import server.event.Event;
import server.event.EventContainer;
import server.world.ItemHandler;
import server.world.ObjectHandler;
import server.world.ObjectManager;
//import server.util.MadTurnipConnection;
import server.world.ShopHandler;
import server.world.map.VirtualWorld;
import server.world.ClanChatHandler;
import server.world.WorldMap;
import server.world.WalkingHandler;
import server.model.objects.Doors;
import server.model.objects.DoubleDoors;


/**
* Server.java
*
* [MENTION=52317]auth[/MENTION]or Sanity
* [MENTION=52317]auth[/MENTION]or Graham
* [MENTION=52317]auth[/MENTION]or Blake
* [MENTION=52317]auth[/MENTION]or Ryan Lmctruck30
*
*/

public class Server {

public static lottery lottery = new lottery();
public static boolean sleeping;
public static int cycleRate;
public static boolean UpdateServer = false;
public static long lastMassSave = System.currentTimeMillis();
private static IoAcceptor acceptor;
private static ConnectionHandler connectionHandler;
private static ConnectionThrottleFilter throttleFilter;
private static SimpleTimer engineTimer, debugTimer;
private static long cycleTime, cycles, totalCycleTime, sleepTime;
private static DecimalFormat debugPercentFormat;
public static ZombieCaves zombieCaves = new ZombieCaves();
public static boolean shutdownServer = false;
public static boolean shutdownClientHandler;
public static int serverlistenerPort;
public static ItemHandler itemHandler = new ItemHandler();
public static ControlPanel panel = new ControlPanel(true); // false if you want it off
public static PlayerHandler playerHandler = new PlayerHandler();
public static NPCHandler npcHandler = new NPCHandler();
public static ShopHandler shopHandler = new ShopHandler();
public static ObjectHandler objectHandler = new ObjectHandler();
public static ObjectManager objectManager = new ObjectManager();
public static CastleWars castleWars = new CastleWars();
public static FightPits fightPits = new FightPits();
public static PestControl pestControl = new PestControl();
public static int days, hours, minutes, secundes;
public static NPCDrops npcDrops = new NPCDrops();
public static ClanChatHandler clanChat = new ClanChatHandler();
public static FightCaves fightCaves = new FightCaves();
public static RFD rfd = new RFD();
//public static WorldMap worldMap = new WorldMap();
public static long[] TIMES = new long[5];
public static void shutdown() {
shutdownServer = true;
System.exit(0);
}
//private static final WorkerThread engine = new WorkerThread();

static {
if(!Config.SERVER_DEBUG) {
serverlistenerPort = 43594;
} else {
serverlistenerPort = 43594;
}
cycleRate = 474;
shutdownServer = false;
engineTimer = new SimpleTimer();
debugTimer = new SimpleTimer();
sleepTime = 0;
debugPercentFormat = new DecimalFormat("0.0#%");
}
//height,absX,absY,toAbsX,toAbsY,type
/*public static final boolean checkPos(int height,int absX,int absY,int toAbsX,int toAbsY,int type)
{
return I.I(height,absX,absY,toAbsX,toAbsY,type);
}*/
public static void main(java.lang.String args[]) throws NullPointerException, IOException {
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
for(Player p : PlayerHandler.players) {
if(p == null)
continue;
System.out.println("Saving all players...");
PlayerSave.saveGame((Client)p);
}
}
});
try {
WalkingHandler.getSingleton().initialize();
} catch(Exception ex) {
ex.printStackTrace();
}

/**
* Starting Up Server
*/

System.setOut(new Logger(System.out));
System.setErr(new Logger(System.err));
System.out.println("Launching "+Config.SERVER_NAME+" Coded And created By Owner Kyle");
//MadTurnipConnection md = new MadTurnipConnection();
//md.start();

/**
* World Map Loader
*/
//if(!Config.SERVER_DEBUG)
//VirtualWorld.init();
//WorldMap.loadWorldMap();

/**
* Script Loader
*/
//ScriptManager.loadScripts();

/**
* Accepting Connections
*/
acceptor = new SocketAcceptor();
connectionHandler = new ConnectionHandler();

SocketAcceptorConfig sac = new SocketAcceptorConfig();
sac.getSessionConfig().setTcpNoDelay(false);
sac.setReuseAddress(true);
sac.setBacklog(100);

throttleFilter = new ConnectionThrottleFilter(Config.CONNECTION_DELAY);
sac.getFilterChain().addFirst("throttleFilter", throttleFilter);
acceptor.bind(new InetSocketAddress(serverlistenerPort), connectionHandler, sac);

/**
* Initialise Handlers
*/
//VoteForCash.createConnection();
EventManager.initialize();
Doors.getSingleton().load();
DoubleDoors.getSingleton().load();
Connection.initialize();
//PlayerSaving.initialize();
//MysqlManager.createConnection();

/**
* Clipped Following (NPC)
*/
try {
WalkingHandler.getSingleton().initialize();
} catch(Exception ex) {
ex.printStackTrace();
}
/**
* Server Successfully Loaded
*/
System.out.println("DKF-Scape Ip: dkfscapes.no-ip.org:" + serverlistenerPort);
/**
* Main Server Tick
*/
try {
while (!Server.shutdownServer) {
if (sleepTime > 0)
Thread.sleep(sleepTime);
engineTimer.reset();
itemHandler.process();
playerHandler.process();
npcHandler.process();
shopHandler.process();
objectManager.process();
lottery.process();
fightPits.process();
pestControl.process();
cycleTime = engineTimer.elapsed();
if(cycleTime < 575)
sleepTime = cycleRate - cycleTime;
else
sleepTime = 0;
totalCycleTime += cycleTime;
cycles++;
debug();
if(Config.SERVER_DEBUG)
//System.out.println(cycleTime+"--"+sleepTime);
secundes++;
if(secundes == 120){
minutes++;
secundes = 0;
}
if(minutes == 60){
hours++;
minutes = 0;
}
if(hours == 24){
days++;
hours = 0;
}
if(hours == 2 && minutes == 0 && secundes == 20){
PlayerHandler.updateSeconds = 60;
PlayerHandler.updateAnnounced = false;
PlayerHandler.updateRunning = true;
PlayerHandler.updateStartTime = System.currentTimeMillis();
}
if(UpdateServer) {
if (System.currentTimeMillis() - PlayerHandler.updateStartTime > 15000) {

System.gc();
Server.shutdown();

}
}

if (System.currentTimeMillis() - lastMassSave > 10000000) {
for(Player p : PlayerHandler.players) {
if(p == null)
continue;
PlayerSave.saveGame((Client)p);
System.out.println("Saved game for " + p.playerName + ".");
lastMassSave = System.currentTimeMillis();
}

}
}
} catch (Exception ex) {
ex.printStackTrace();
for(Player p : PlayerHandler.players) {
if(p == null)
continue;
PlayerSave.saveGame((Client)p);
System.out.println("Saved game for " + p.playerName + ".");
}
}
acceptor = null;
connectionHandler = null;
sac = null;
System.exit(0);
}

public static void processAllPackets() {
for (int j = 0; j < playerHandler.players.length; j++) {
if (playerHandler.players[j] != null) {
while(playerHandler.players[j].processQueuedPackets());
}
}
}

public static boolean playerExecuted = false;
private static void debug() {
if (debugTimer.elapsed() > 360*1000 || playerExecuted) {
long averageCycleTime = totalCycleTime / cycles;
System.out.println("Average Cycle Time: " + averageCycleTime + "ms");
double engineLoad = ((double) averageCycleTime / (double) cycleRate);
System.out.println("There are " + PlayerHandler.playerCount+ " Players On DKF-Scape");
System.out.println("DKF-Scape is Running the Egine with: " + debugPercentFormat.format(engineLoad) + "Strain");
totalCycleTime = 0;
cycles = 0;
System.gc();
System.runFinalization();
debugTimer.reset();
playerExecuted = false;
}
}

public static long getSleepTimer() {
return sleepTime;
}

}
[/CODE]

And the Client Looks Something Like this
Gonna ADD IN REPLY , THIS IS TO LONG :|

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
Are you getting an error when you're running it?

Share this post


Link to post
Share on other sites
  • 0
Gui Client Sided
[CODE]import javax.swing.*;
import java.awt.*;
import java.lang.String;
import java.awt.event.*;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.net.InetAddress;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Hashtable;
import java.util.List;
import javax.swing.*;
import javax.swing.plaf.metal.MetalLookAndFeel;
import sign.signlink;
import java.awt.*;
import java.awt.event.*;


public class Gui extends client implements ActionListener, FocusListener {

public int frameTheme = 1;
public static void main(String args[]) {
new Gui(args);
}
public Gui(String args[]) {
super();
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
sign.signlink.startpriv(InetAddress.getByName("dkfscapes.no-ip.org"));
initUI();
} catch(Exception ex) {
ex.printStackTrace();
}
}

public void launchURL(String s)
{
String s1 = System.getProperty("os.name");
try
{

if(s1.startsWith("Windows"))
{
Runtime.getRuntime().exec((new StringBuilder()).append("rundll32 url.dll,FileProtocolHandler ").append(s).toString());
} else
{
String as[] = {
"firefox", "opera", "konqueror", "epiphany", "mozilla", "netscape"
};
String s2 = null;
for(int i = 0; i < as.length && s2 == null; i++)
if(Runtime.getRuntime().exec(new String[] {
"which", as[i]
}).waitFor() == 0)
s2 = as[i];

if(s2 == null)
throw new Exception("Could not find web browser");
Runtime.getRuntime().exec(new String[] {
s2, s
});
}
}
catch(Exception exception)
{
System.out.println("An error occured while trying to open the web browser!\n");
}
}

private void initUI() {
try {
JFrame.setDefaultLookAndFeelDecorated(true);
JPopupMenu.setDefaultLightWeightPopupEnabled(false);
frame = new JFrame(setTitle);


frame.setLayout(new BorderLayout());
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel gamePanel = new JPanel();
gamePanel.setLayout(new BorderLayout());
gamePanel.add(this);
gamePanel.setPreferredSize(new Dimension(765, 503));
JCheckBox CheckButton;


/*String[] mainButtons = new String[]
{
"Item list", "Vote", "Donate", "Forums", "-", "Exit"
};*/

/*for (String name : mainButtons)
{
JMenuItem menuItem = new JMenuItem(name);
if (name.equalsIgnoreCase("-"))
//fileMenu.addSeparator();
else
{
menuItem.addActionListener(this);
//fileMenu.add(menuItem);
}
}*/

//JMenuBar menuBar = new JMenuBar();
//JMenuBar jmenubar = new JMenuBar();
//frame.add(jmenubar);
//frame.getContentPane().add(jmenubar, "South");
// menuBar.add(fileMenu);

//frame.getContentPane().add(menuBar, BorderLayout.NORTH);
Toolkit toolkit = Toolkit.getDefaultToolkit();
frame.getContentPane().add(gamePanel, BorderLayout.CENTER);
frame.pack();

frame.setVisible(true);
frame.setResizable(false);
init();

}
catch (Exception e)
{
e.printStackTrace();
}
}

public void WorldSelect() {
try
{
String s1 = JOptionPane.showInputDialog(this, (new StringBuilder()).append("Current server:"), "Enter Server", 3);
if(s1 == null){
System.out.println("Canceled");
} else if(s1.equalsIgnoreCase("")) {
System.out.println("Sorry, have to have some input");
} else {
System.out.println((new StringBuilder()).append("Set world to: ").append(s1).toString());
}
} catch(Exception e) {
System.out.println((new StringBuilder()).append("You must enter a numeric value!: ").append(e).toString());
}
}

public static void Launch(String launch) {
String operatingSystem = System.getProperty("os.name");
try {
if(operatingSystem.startsWith("Windows")) {
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler "+launch);
} else {
}
} catch(Exception exception) {
System.err.println("Error launching url.");
exception.printStackTrace();
}
}

public URL getCodeBase() {
try {
return new URL("https://dl.dropbox.com/u/80555744/TrisidiaX_Cache_Webclient_V1.3.zip");
} catch (Exception e) {
return super.getCodeBase();
}
}

public URL getDocumentBase() {
return getCodeBase();
}

public void loadError(String s) {
System.out.println("loadError: " + s);
}

public String getParameter(String key) {
if (key.equals("nodeid"))
return "10";
else if (key.equals("portoff"))
return "0";
else if (key.equals("lowmem"))
return "1";
else if (key.equals("free"))
return "0";
else
return "";
}

//ACTIONS DONE
public void actionPerformed(ActionEvent evt) {
String cmd = evt.getActionCommand();
if (cmd != null) {
/**if (cmd.equalsIgnoreCase("Forums")) {
launchURL("www.DKF-Scape.com/");
}
if (cmd.equalsIgnoreCase("Vote")) {
launchURL("http://triidiax.net78.net/vote.php");
}
if (cmd.equalsIgnoreCase("Donate")) {
launchURL("");
}*/
if (cmd.equalsIgnoreCase("Exit")) {
int i1;
if((i1 = JOptionPane.showConfirmDialog(this, "Do you really want to exit the client?")) == 0)
System.exit(0);
return;
}
if (cmd.equalsIgnoreCase("Item List")){
launchURL("IL.bat");
System.out.println("The Item List is loading...");

}

}



}
public static String currentDate() {
SimpleDateFormat simpleDate = new SimpleDateFormat("MM/dd/yyyy");
Date currentDate = new Date();
return simpleDate.format(currentDate);
}
private static boolean isApplet = false;
public int theme;
protected static JTextArea textArea;
protected JScrollPane scrollPane;
private static final String newline = "\n";
public static String browserPath = "C:/Program Files/Internet Explorer/iexplore.exe";
public static String url = "";
private JTabbedPane jTabbedPane1;
private String setTitle = "DKF-Scape Client";
public JFrame frame;
}
[/CODE]

Share this post


Link to post
Share on other sites
  • 0
[quote name='Emily']Are you getting an error when you're running it?[/QUOTE]

[IMG]http://i50.tinypic.com/2hi85le.png[/IMG]


[IMG]http://i49.tinypic.com/etbepe.png[/IMG]



Those things are minor , they still work ingame some how but it looks like it connects fine but i cant seem to log in , i posted it on a server list site when they make the webclient for you , cant see to log on there aswell , anything to do with the cache?

Share this post


Link to post
Share on other sites
  • 0
It's dealing with not being able to find UsersMuted.txt, IpsMuted.txt FirstStarters.txt and other files. This should be server sided, in your Data folder, in DKF-Scape Player folder. Do you have teamviewer?

Share this post


Link to post
Share on other sites
  • 0
I can also fix this, Skype: Maxieg4 or if you would rather have Emily do it, that's cool.

Share this post


Link to post
Share on other sites
  • 0
FIXED IT but it says servers online and i portforwarded , i went to canyouseeme.org and it says its online ive done multi tests and rswebclients says its online , but i cant log in neither can i log into from rswebs , emily said it might have to be with the portforward side idk what she means be it looks like someone who created the source (TrisXV3) did something wrong to it help? Edited by KaozVirtuz

Share this post


Link to post
Share on other sites
Sign in to follow this  

×