[Nillus] [Java] Mobiles Disco server

Page 3 of 5 FirstFirst 12345 LastLast
Results 31 to 45 of 73
  1. #31
    Valued Member jaricaaf is offline
    MemberRank
    Feb 2008 Join Date
    Netherlands (off course)Location
    131Posts

    Re: [Nillus] [Java] Mobiles Disco server

    i thought u were dead nillus!
    good release
    (this one uses mysql :P )

  2. #32
    RMS Kornflake Nillus is offline
    MemberRank
    Feb 2007 Join Date
    The NetherlandsLocation
    2,626Posts

    Re: [Nillus] [Java] Mobiles Disco server

    Quote Originally Posted by jaricaaf View Post
    i thought u were dead nillus!
    good release
    (this one uses mysql :P )
    Yeah and if you write the classes for eg, XML or FS (filesystem) implementation, you can easily switch the database backend without changing any 'highlevel' code.
    You just write the implementations for the classes (User, Space etc), so if you wrote for a 'flatfile database' you would write FSUser, FSSpace and FSDatabase, that do the same as the default implementation (SQLUser, SQLSpace and SQLDatabase) but then for filesystem.
    Then you change 'SQL' to 'FS' in blunk.properties 'db.impl=...' and you made it work with a flatfile database.

    Aka, no where you are changing the retrieving of user objects etc etc, as they all 'think' on the level of 'User' while the DataObjectFactory produces a <DATABASE TYPE>User for that object.

    - Nillus

  3. #33
    Account Upgraded | Title Enabled! iAwesome is offline
    MemberRank
    Oct 2008 Join Date
    In my roomLocation
    233Posts

    Re: [Nillus] [Java] Mobiles Disco server

    Does anyone has this server compiled? Then upload it, and give us the link! :D

  4. #34
    Alpha Member Moogly is offline
    MemberRank
    Feb 2008 Join Date
    Pool LidoLocation
    2,322Posts

    Re: [Nillus] [Java] Mobiles Disco server

    Quote Originally Posted by iAwesome View Post
    Does anyone has this server compiled? Then upload it, and give us the link! :D
    Compile it yourself O_o not that hard, imo if you can't compile something you shouldn't be allowed to use it... compiling is the easiest thing to do...

  5. #35
    RMS Kornflake Nillus is offline
    MemberRank
    Feb 2007 Join Date
    The NetherlandsLocation
    2,626Posts

    Re: [Nillus] [Java] Mobiles Disco server

    Quote Originally Posted by iAwesome View Post
    Does anyone has this server compiled? Then upload it, and give us the link! :D
    Please...
    Just take the time to install either the JDK (java development kit) that comes with the java compiler ('javac' command on shell)
    OR install Eclipse or similar to compile it, it's for your own interest etc!
    (learn something instead of copypasta and feeding the spoon up the ass of the b00n )

    This is a fully working Mobiles Disco server and no crappy and buggy thing like stuff released in the past, dedicate some time to it!

    - Nillus

  6. #36
    Member goldjulos is offline
    MemberRank
    May 2007 Join Date
    64Posts

    Re: [Nillus] [Java] Mobiles Disco server

    what is the project file i have to open in eclipse? (im a java noob :p)

  7. #37
    RMS Kornflake Nillus is offline
    MemberRank
    Feb 2007 Join Date
    The NetherlandsLocation
    2,626Posts

    Re: [Nillus] [Java] Mobiles Disco server

    In Eclipse you go like on the workbench, rightclick and then 'Import...', then you go to 'filesystem' and you point to the .project file.

    - Nillus

  8. #38
    Novice Jabaticus is offline
    MemberRank
    Mar 2009 Join Date
    2Posts

    Re: [Nillus] [Java] Mobiles Disco server

    What exactly is missing on the server? I read in some PDF about Fuse powered projects of Habbo that talked specifically about Mobiles Disco and they basically talked about 'Events' or something I can't really recall what it said, but what exactly is missing?

  9. #39
    The next don TheAJ is offline
    DeveloperRank
    May 2007 Join Date
    Toronto, CanadaLocation
    3,946Posts

    Re: [Nillus] [Java] Mobiles Disco server

    Looks a bit like my runescape server i sent you :P (ajscape)

    PHP Code:
    /********************************************\
     * ##########################################
     * # RageScape 508 Server
     * ##########################################
     * # Copyright (c) 2006 - 2009 TheAJP
     * # http://theajp.com/ <truebrown@live.ca>
     * # ---------------------------------------
     * # @class        | Server
     * # @version        | 2.0.4
     * ##########################################
    \********************************************/

    package ajscape;

    import java.io.*;
    import ajscape.net.SocketListener;
    import ajscape.net.*;
    import ajscape.players.PlayerSave;
    import ajscape.util.Misc;
    import java.sql.*;
    import ajscape.io.MySQL;
    import ajscape.world.Shop;
    import ajscape.web.UpdateTaskManager;
    import ajscape.quests.Quest;

    public class 
    Server
    {

       
    /**
        * MySQL Settings
        */
        
    public static String dbuser "yourmoms";
        public static 
    String dbpass "pussy";
           public static 
    String dbname "fosho";
           public static 
    Connection DBConnection null;
           public static 
    String motw "..";

       
    /**
        * The engine used to update almost everything, such as players, items, and NPCs.
        */
           
    public static Engine engine;
           public static 
    UpdateTaskManager taskmgr;

       
    /**
        * Listens for incoming connections and accepts them.
        */
        
    public static SocketListener socketListener;

       
    /**
        * Save character files.
        */
        
    private static PlayerSave playerSave;

       
    /**
        * Banned accounts list.
        */
        
    public static String[] bannedUsers = new String[100];

       
    /**
        * Main method for running the server.
        */
        
    public static void main(String[] args)
        {
            
    Misc.println("##########################################");
            
    Misc.println("# RaGESCAPE Dedicated Server             #");
            
    Misc.println("#----------------------------------------#");
            
    Misc.println("# Version: 2.0 - Core MySQL              #");
            
    Misc.println("#----------------------------------------#");
            
    Misc.println("# CopyRight(C) TheAJP.com (2006-2009)    #");
            
    Misc.println("##########################################");
            
    Misc.println(" ");
            
    Misc.println(" ");

            
    int port Integer.parseInt(args[0]);

                if (
    AutoRestarter.autoRestart
                {
                    new 
    AutoRestarter();
                }

                   
    /**
                      * MySQL server connection
                      */
                
    try
                {
                    
    Misc.println("[MySQL] Connecting to MySQL Server on 127.0.0.1:3306 using JDBC..");
                    Class.
    forName("com.mysql.jdbc.Driver").newInstance();
                    
    DBConnection DriverManager.getConnection("jdbc:mysql:///" dbnamedbuserdbpass);

                    if(!
    DBConnection.isClosed())
                    {
                        
    Misc.println("[MySQL] Connected to MySQL Server. Database is '" dbname "'.");
                    }
                    else
                    {
                        
    Misc.println("[MySQL] Could not connect to MySQL Server. Unknown error occured.");
                        while(
    true){ }
                    }
                }

                catch(
    Exception e)
                {
                    
    e.printStackTrace();
                    
    Misc.println("Could not connect to MySQL Server! For details see error above.");
                    while(
    true){ }
                }

                    finally
                    {
                        
    Misc.println(" ");
                        
    Misc.println("[MySQL] Performing initial database tasks..");
                        
    MySQL.executeUpdate("UPDATE users SET online = '0'");
                        
    MySQL.executeUpdate("UPDATE server_dump SET users_online = '0', online = '1' LIMIT 1");
                        
    MySQL.executeUpdate("DELETE FROM tasks");
                        
    Misc.println("[MySQL] ..OK!");

                        
    ResultSet RS MySQL.executeQuery("SELECT motw FROM settings LIMIT 1");

                            try
                            {
                                if(
    RS.next())
                                {
                                    
    motw RS.getString(1);
                                }
                                else
                                {
                                    
    motw "No message is currently set";
                                }
                            }
                            catch(
    SQLException e)
                            {
                                
    Misc.println("Could not load Message of the Week!");
                            }
                            
    Misc.println(" ");
                    }

                    
    loadBannedUsers();
                    
    loadQuests();
                    
    loadShops();

                    
    Misc.println(" ");

                try
                {
                    
    Misc.println("[UpdateTaskManager] Now Initializing..");
                    
    taskmgr = new UpdateTaskManager();
                }

                catch(
    Exception e)
                {
                    
    e.printStackTrace();
                }
                
    Misc.println(" ");

                    try
                    {
                        
    Misc.println("[SERVER] Attempting to set up socket listener on port " port "..");
                        
    socketListener = new SocketListener(port);
                    }
                    catch(
    Exception e)
                    {
                                
    e.printStackTrace();
                        
    Misc.println("Could not set up server on port " port ". For details see error above.");

            while(
    true){ }        
            }
                
    engine = new Engine();
                
    playerSave = new PlayerSave();
                
    socketListener.run();
            }


       
    /**
        * Loads all banned users
        */
        
    public static void loadBannedUsers()
        {
            
    bannedUsers = new String[50];
            
    SocketListener.bannedHosts = new String[50];

            
    int counter 0;
            
    int counter2 0;

            
    ResultSet RS MySQL.executeQuery("SELECT name FROM bannedusers ORDER BY id DESC");

                try
                {
                    while(
    RS.next())
                    {
                        
    counter++;
                        
    bannedUsers[counter] = RS.getString(1);
                    }
                }
                catch(
    SQLException e)
                {
                    
    Misc.println("Error loading banned users");
                }

                
    ResultSet RS2 MySQL.executeQuery("SELECT ip FROM bannedips ORDER BY id DESC");

            try
            {
                while(
    RS2.next())
                {
                    
    counter2++;
                    
    SocketListener.bannedHosts[counter] = RS2.getString(1);
                }
            }

            catch(
    SQLException e)
            {
                
    Misc.println("Error loading banned ips");
            }

            
    Misc.println("[SERVER] Loaded " counter " banned user(s) and " counter2 " IP ban(s).");
        }

       
    /**
        * Loads all quests
        */
        
    public static void loadQuests()
        {
            
    int counter 0;

            
    ResultSet RS MySQL.executeQuery("SELECT id,name,finalStage,points FROM quests ORDER BY id ASC");

            try
            {
                while(
    RS.next())
                {
                    
    counter++;

                    
    int id RS.getInt(1);
                    
    String name RS.getString(2);
                    
    int finalStage RS.getInt(3);
                    
    int qPoints RS.getInt(4);

                    
    Engine.quests[id] = new Quest(idnamefinalStageqPoints);
                }
            }

            catch(
    Exception e)
            {
                
    Misc.println("Error loading quests:");
                
    e.printStackTrace();
            }

            
    Misc.println("[SERVER] Loaded " counter " quest(s).");
        }

        
    /**
         * Load shop data
         */
        
    public static void loadShops()
        {
            
    int counter 0;

            
    ResultSet RS MySQL.executeQuery("SELECT id,name,items,itemCosts FROM shops ORDER BY id DESC");

            try
            {
                while(
    RS.next())
                {
                    
    counter++;

                    
    int id RS.getInt(1);
                    
    String name RS.getString(2);
                    
    String items RS.getString(3);
                    
    String ammounts RS.getString(4);
                    
    String costs RS.getString(4);

                    
    Engine.shops[id] = new Shop(iditemscostsname);
                }
            }

            catch(
    SQLException e)
            {
                
    Misc.println("Error loading shops:");
                
    e.printStackTrace();
            }

            
    Misc.println("[SERVER] Loaded " counter " shop(s).");
        }


    Nice job though

  10. #40
    Proficient Member superdaan44 is offline
    MemberRank
    Jan 2009 Join Date
    in a chest.Location
    182Posts

    Re: [Nillus] [Java] Mobiles Disco server

    Sorry but this like one of the oldest versions from habbo hotel.

  11. #41
    Occasional Visitor Cecer is offline
    MemberRank
    Aug 2006 Join Date
    EnglandLocation
    743Posts

    Re: [Nillus] [Java] Mobiles Disco server

    And, what is wrong with that?

  12. #42
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: [Nillus] [Java] Mobiles Disco server

    Thanks for this- May I edit this?

  13. #43
    Account Upgraded | Title Enabled! myhotel6 is offline
    MemberRank
    Oct 2008 Join Date
    ragezone! 1MIL POSTSLocation
    743Posts

    Re: [Nillus] [Java] Mobiles Disco server

    Looks nice nillus I will download

  14. #44
    Enthusiast Olivernoerd is offline
    MemberRank
    Nov 2008 Join Date
    At home! :D.Location
    32Posts

    Re: [Nillus] [Java] Mobiles Disco server

    Great release m8! :D.

    But I have a problem; it wont start, this is copied from the .bat file:

    Exception in thread "main" java.lang.NoClassDefFoundError: net/nillus/mobilesdis
    co/MobilesDisco
    Caused by: java.lang.ClassNotFoundException: net.nillus.mobilesdisco.MobilesDisc
    o
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: net.nillus.mobilesdisco.MobilesDisco. Program wi
    ll exit.
    Tryk p

  15. #45
    RMS Kornflake Nillus is offline
    MemberRank
    Feb 2007 Join Date
    The NetherlandsLocation
    2,626Posts

    Re: [Nillus] [Java] Mobiles Disco server

    [quote=Olivernoerd;4900186]Great release m8! :D.

    But I have a problem; it wont start, this is copied from the .bat file:

    Exception in thread "main" java.lang.NoClassDefFoundError: net/nillus/mobilesdis
    co/MobilesDisco
    Caused by: java.lang.ClassNotFoundException: net.nillus.mobilesdisco.MobilesDisc
    o
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: net.nillus.mobilesdisco.MobilesDisco. Program wi
    ll exit.
    Tryk p



Page 3 of 5 FirstFirst 12345 LastLast

Advertisement