Thread: SabsabiOnline - A to be public base

Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 40
  1. #21  
    Extreme Donator

    nbness2's Avatar
    Join Date
    Aug 2011
    Posts
    692
    Thanks given
    274
    Thanks received
    139
    Rep Power
    430
    Earlier in my rsps life i wanted something exactly like this. Interesting name, as I used to play Sabsabi online when it came out with its 459 revision. will watch this.
    Reply With Quote  
     

  2. #22  
    Respected Member


    George's Avatar
    Join Date
    Mar 2009
    Posts
    7,099
    Thanks given
    2,226
    Thanks received
    3,146
    Rep Power
    5000
    Quote Originally Posted by nbness View Post
    Earlier in my rsps life i wanted something exactly like this. Interesting name, as I used to play Sabsabi online when it came out with its 459 revision. will watch this.
    In which year did you play Sabsabi?

    P.S
    Name is just for kicks, cause u kno, i used to run SabsabiOnline.
    Attached image

    Spoiler for Spoilers!:
    Attached image
    Attached image
    Attached image
    Attached image
    Reply With Quote  
     

  3. Thankful user:


  4. #23  
    Registered Member Hyped's Avatar
    Join Date
    Dec 2016
    Posts
    171
    Thanks given
    21
    Thanks received
    7
    Rep Power
    4
    pretty cool
    learning, learning, learning, learning
    Reply With Quote  
     

  5. #24  
    Finland

    Zoltus's Avatar
    Join Date
    Dec 2015
    Age
    24
    Posts
    977
    Thanks given
    671
    Thanks received
    779
    Rep Power
    5000
    Good luck
    Attached image

    Spoiler for God:
    Attached image
    Reply With Quote  
     

  6. #25  
    xd


    Join Date
    Oct 2007
    Age
    28
    Posts
    6,078
    Thanks given
    98
    Thanks received
    488
    Rep Power
    5000
    10/10 would be proud if u actually followed thru with this instead of quitting after u make some money u cuck

    gl tho
    Quote Originally Posted by clem585 View Post
    Wat. Reading java doc isn't going to teach you anything. It's like reading the dictionary to learn grammatical rules.
    Reply With Quote  
     

  7. Thankful user:


  8. #26  
    Respected Member


    George's Avatar
    Join Date
    Mar 2009
    Posts
    7,099
    Thanks given
    2,226
    Thanks received
    3,146
    Rep Power
    5000
    Thought i'd release this server with a trade post system. Writing backend atm, interface will be done eventually.

    Code:
    package org.sabsabionline.rs2.model.trade_post;
    
    import org.sabsabionline.rs2.model.Item;
    
    /**
     * 
     * @author kronn
     *
     *         A class used to construct new products for the trading post
     *
     */
    
    public class Product {
    
    	/**
    	 * 
    	 * Constructs a new product
    	 * 
    	 * @param productVendor
    	 *            The vendor of the product
    	 * @param date
    	 *            The date
    	 * @param productItem
    	 *            The product item
    	 * @param productValue
    	 *            The product value
    	 */
    	public Product(String productVendor, final String date, Item productItem, int productValue) {
    		this.productVendor = productVendor;
    		this.date = date;
    		this.productItem = productItem;
    		this.productValue = productValue;
    	}
    
    	/**
    	 * @return the productVendor
    	 */
    	public String getProductVendor() {
    		return productVendor;
    	}
    
    	/**
    	 * @return The date
    	 */
    	public String getReleaseDate() {
    		return this.date;
    	}
    
    	/**
    	 * @return the productItem
    	 */
    	public Item getProductItem() {
    		return productItem;
    	}
    
    	/**
    	 * @return the productValue
    	 */
    	public int getProductValue() {
    		return productValue;
    	}
    
    	/**
    	 * The vendor of the product
    	 */
    	private final String productVendor;
    
    	/**
    	 * The date of the product release
    	 */
    	private final String date;
    
    	/**
    	 * The product item
    	 */
    	private final Item productItem;
    
    	/**
    	 * The value of the product
    	 */
    	private final int productValue;
    
    }
    Code:
    package org.sabsabionline.rs2.model.trade_post;
    
    import java.io.FileReader;
    import java.io.IOException;
    import java.lang.reflect.Type;
    import java.nio.file.Path;
    import java.nio.file.Paths;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.logging.Logger;
    
    import com.google.gson.Gson;
    import com.google.gson.reflect.TypeToken;
    
    /**
     * 
     * @author kronn
     *
     *         A class used to parse current listed {@link Product}s
     *
     */
    
    public class TradePostParser {
    
    	/**
    	 * Java utility logger
    	 */
    	private static final Logger LOGGER = Logger.getLogger(TradePostParser.class.getName());
    
    	/**
    	 * Path to the product file
    	 */
    	private static final Path PATH = Paths.get("data", "trade_post");
    
    	/**
    	 * A list of concurrent products
    	 */
    	private static final List<Product> PRODUCTS = new ArrayList<Product>();
    
    	/**
    	 * Parses saved trade post products, using the gson library
    	 */
    	public static final void parse() {
    		LOGGER.info("Loading trade post products...");
    		try {
    			final Gson gson = new Gson();
    			final Type token = new TypeToken<ArrayList<Product>>() {
    			}.getType();
    			final FileReader reader = new FileReader(PATH + "/products.json");
    			final List<Product> in = gson.fromJson(reader, token);
    			reader.close();
    			PRODUCTS.addAll(in);
    		} catch (IOException e) {
    			e.printStackTrace();
    		}
    		LOGGER.info(PRODUCTS.size() + " trade post products loaded...");
    	}
    }
    Code:
    [
      {
        "productVendor": "Mopar",
        "date": "20-05-2017 09:10:14",
        "productItem": {
          "id": 4151,
          "count": 1
        },
        "productValue": 100000
      },
      {
        "productVendor": "Lev518",
        "date": "20-05-2017 09:10:14",
        "productItem": {
          "id": 11802,
          "count": 1
        },
        "productValue": 100000000
      }
    ]
    Attached image

    Spoiler for Spoilers!:
    Attached image
    Attached image
    Attached image
    Attached image
    Reply With Quote  
     

  9. Thankful users:


  10. #27  
    Left to be damned

    Join Date
    Nov 2014
    Age
    27
    Posts
    119
    Thanks given
    28
    Thanks received
    6
    Rep Power
    26
    Quote Originally Posted by Idiot Dansker View Post
    Thought i'd release this server with a trade post system. Writing backend atm, interface will be done eventually.

    Code:
    package org.sabsabionline.rs2.model.trade_post;
    
    import org.sabsabionline.rs2.model.Item;
    
    /**
     * 
     * @author kronn
     *
     *         A class used to construct new products for the trading post
     *
     */
    
    public class Product {
    
    	/**
    	 * 
    	 * Constructs a new product
    	 * 
    	 * @param productVendor
    	 *            The vendor of the product
    	 * @param date
    	 *            The date
    	 * @param productItem
    	 *            The product item
    	 * @param productValue
    	 *            The product value
    	 */
    	public Product(String productVendor, final String date, Item productItem, int productValue) {
    		this.productVendor = productVendor;
    		this.date = date;
    		this.productItem = productItem;
    		this.productValue = productValue;
    	}
    
    	/**
    	 * @return the productVendor
    	 */
    	public String getProductVendor() {
    		return productVendor;
    	}
    
    	/**
    	 * @return The date
    	 */
    	public String getReleaseDate() {
    		return this.date;
    	}
    
    	/**
    	 * @return the productItem
    	 */
    	public Item getProductItem() {
    		return productItem;
    	}
    
    	/**
    	 * @return the productValue
    	 */
    	public int getProductValue() {
    		return productValue;
    	}
    
    	/**
    	 * The vendor of the product
    	 */
    	private final String productVendor;
    
    	/**
    	 * The date of the product release
    	 */
    	private final String date;
    
    	/**
    	 * The product item
    	 */
    	private final Item productItem;
    
    	/**
    	 * The value of the product
    	 */
    	private final int productValue;
    
    }
    Code:
    package org.sabsabionline.rs2.model.trade_post;
    
    import java.io.FileReader;
    import java.io.IOException;
    import java.lang.reflect.Type;
    import java.nio.file.Path;
    import java.nio.file.Paths;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.logging.Logger;
    
    import com.google.gson.Gson;
    import com.google.gson.reflect.TypeToken;
    
    /**
     * 
     * @author kronn
     *
     *         A class used to parse current listed {@link Product}s
     *
     */
    
    public class TradePostParser {
    
    	/**
    	 * Java utility logger
    	 */
    	private static final Logger LOGGER = Logger.getLogger(TradePostParser.class.getName());
    
    	/**
    	 * Path to the product file
    	 */
    	private static final Path PATH = Paths.get("data", "trade_post");
    
    	/**
    	 * A list of concurrent products
    	 */
    	private static final List<Product> PRODUCTS = new ArrayList<Product>();
    
    	/**
    	 * Parses saved trade post products, using the gson library
    	 */
    	public static final void parse() {
    		LOGGER.info("Loading trade post products...");
    		try {
    			final Gson gson = new Gson();
    			final Type token = new TypeToken<ArrayList<Product>>() {
    			}.getType();
    			final FileReader reader = new FileReader(PATH + "/products.json");
    			final List<Product> in = gson.fromJson(reader, token);
    			reader.close();
    			PRODUCTS.addAll(in);
    		} catch (IOException e) {
    			e.printStackTrace();
    		}
    		LOGGER.info(PRODUCTS.size() + " trade post products loaded...");
    	}
    }
    Code:
    [
      {
        "productVendor": "Mopar",
        "date": "20-05-2017 09:10:14",
        "productItem": {
          "id": 4151,
          "count": 1
        },
        "productValue": 100000
      },
      {
        "productVendor": "Lev518",
        "date": "20-05-2017 09:10:14",
        "productItem": {
          "id": 11802,
          "count": 1
        },
        "productValue": 100000000
      }
    ]
    Why don't you make use of a RDBMS?
    Reply With Quote  
     

  11. #28  
    🎶 As you're falling down 🎶


    uint32_t's Avatar
    Join Date
    Feb 2015
    Posts
    1,396
    Thanks given
    6,177
    Thanks received
    776
    Rep Power
    5000
    Quote Originally Posted by Damianos View Post
    Why don't you make use of a RDBMS?
    No point since it's not being hosted, it's just going to be publicly released. If someone wants to write it to incorporate an RDBMS they can after it's released.
    Quote Originally Posted by Idiot Bird View Post
    Quote Originally Posted by Velocity View Post
    lol np mate looks like the community brought ur rep down to ur IQ
    Not too sure about that, it's at 0 . It would have to go minus to even be remotely close to his IQ.
    Reply With Quote  
     

  12. #29  
    Registered Member
    _Ali's Avatar
    Join Date
    Apr 2014
    Posts
    382
    Thanks given
    67
    Thanks received
    147
    Rep Power
    252
    Quote Originally Posted by i_pk_pjers_i View Post
    No point since it's not being hosted, it's just going to be publicly released. If someone wants to write it to incorporate an RDBMS they can after it's released.
    Nothing to do with it being hosted lol?. Using a RDBMS like mysql allows users to save/extract data from and into more flexible. Also allows simultaneous access to information from multiple users. Trading post is great example of where rdbms can be useful in many ways. I'd write more but on my phone xd.

    @idiot - you can implement a map structure with vendor being the key and your product class you can implement the item container. Would be better imo. But either way a list implementation will do but you should consider using an item container for something like this. Youll see down the line as you do the trading post it makes life 2x easier and easy to manage. Good job either way .
    Reply With Quote  
     

  13. Thankful user:


  14. #30  
    🎶 As you're falling down 🎶


    uint32_t's Avatar
    Join Date
    Feb 2015
    Posts
    1,396
    Thanks given
    6,177
    Thanks received
    776
    Rep Power
    5000
    Quote Originally Posted by _Ali View Post
    Nothing to do with it being hosted lol?. Using a RDBMS like mysql allows users to save/extract data from and into more flexible. Also allows simultaneous access to information from multiple users. Trading post is great example of where rdbms can be useful in many ways. I'd write more but on my phone xd.

    @idiot - you can implement a map structure with vendor being the key and your product class you can implement the item container. Would be better imo. But either way a list implementation will do but you should consider using an item container for something like this. Youll see down the line as you do the trading post it makes life 2x easier and easy to manage. Good job either way .
    I know very well the benefits of an RDBMS, I'm not like the average R-S person who doesn't know anything about DBs. I know about the benefits and trade-offs and history like how Boyce invented SQL, how Codd invented the relational model of databases and how they both worked together on a normal form of DB normalization called BCNF (with DB normalization being a trade-off between reduced data redundancy and reduced performance because of increased table joins although performance isn't really reduced that much in normalization these days because of powerful modern hardware), etc. I'm saying it's not as necessary because it's not a large production server and if people want to use an RDBMS they could modify the server to implement one once it is released.

    Jack is writing this simply as base, and an RDBMS would complicate the base IMO and I am sure Jack agrees otherwise he would have used an RDBMS in the first place.

    However, I will admit, the way that RDBMS handles concurrent data access versus flat-file DBs is beneficial and that is a good point.
    Quote Originally Posted by Idiot Bird View Post
    Quote Originally Posted by Velocity View Post
    lol np mate looks like the community brought ur rep down to ur IQ
    Not too sure about that, it's at 0 . It would have to go minus to even be remotely close to his IQ.
    Reply With Quote  
     

Page 3 of 4 FirstFirst 1234 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. RS Map Tool - (Soon To Be) Public Map Editor
    By .fabian in forum Projects
    Replies: 56
    Last Post: 01-19-2015, 01:32 PM
  2. Replies: 46
    Last Post: 03-08-2012, 07:34 AM
  3. Replies: 11
    Last Post: 10-08-2010, 04:10 AM
  4. A text-based to-be-RPG.
    By jameskmonger in forum Application Development
    Replies: 1
    Last Post: 02-14-2010, 09:58 AM
  5. [508] set ignore list.. seems not to be public?
    By veer in forum RS 503+ Client & Server
    Replies: 4
    Last Post: 11-30-2008, 01:14 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •