Thread: Drop Tables.

Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1 Drop Tables. 
    Registered Member

    Join Date
    Jun 2008
    Posts
    1,957
    Thanks given
    7
    Thanks received
    256
    Rep Power
    445
    Well after reading a bunch of thoughts about how runescape does there drops, explanations on the wealth ring and some more i came to a conclusion. Should we be using a table instead of large arrays or cfg files to configure the drop?

    Example: (obviously different but thats just a prime example)


    Discuss...
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jan 2009
    Age
    34
    Posts
    3,143
    Thanks given
    27
    Thanks received
    92
    Rep Power
    0
    A table, definitely.
    The one you're showing looks much easier than the cfg files or the arrays used. Are the tables used for PvP and Npc drops in rs?
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Jun 2008
    Posts
    1,957
    Thanks given
    7
    Thanks received
    256
    Rep Power
    445
    Quote Originally Posted by Antebellum View Post
    A table, definitely.
    The one you're showing looks much easier than the cfg files or the arrays used. Are the tables used for PvP and Npc drops in rs?
    Almost all the articles(Theory's) i've read relate to tables. Even Runewiki.
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Mar 2008
    Posts
    2,595
    Thanks given
    128
    Thanks received
    191
    Rep Power
    0
    CFG files are tables (the way we format them)


    HUR DA DUR
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    brb ridin da storm

    blakeman8192's Avatar
    Join Date
    Dec 2012
    Age
    31
    Posts
    2,012
    Thanks given
    818
    Thanks received
    1,361
    Rep Power
    329
    rate should be displayed as a percentage
    rest in peace Qemist, Izzy, Colton, TeChNo PuNk, Impulser, & bootnecklad
    Reply With Quote  
     

  7. #6  
    Registered Member

    Join Date
    Jun 2008
    Posts
    1,957
    Thanks given
    7
    Thanks received
    256
    Rep Power
    445
    Quote Originally Posted by zykl0n View Post
    rate should be displayed as a percentage
    Yea, will. Had to eat real quick.
    Reply With Quote  
     

  8. #7  
    brb ridin da storm

    blakeman8192's Avatar
    Join Date
    Dec 2012
    Age
    31
    Posts
    2,012
    Thanks given
    818
    Thanks received
    1,361
    Rep Power
    329
    Quote Originally Posted by bando View Post
    Yea, will. Had to eat real quick.
    just a recommendation
    rest in peace Qemist, Izzy, Colton, TeChNo PuNk, Impulser, & bootnecklad
    Reply With Quote  
     

  9. #8  
    Registered Member

    Join Date
    Jan 2008
    Posts
    2,340
    Thanks given
    20
    Thanks received
    575
    Rep Power
    1202
    hmm easy to use i like it

    Code:
    /*
     * Copyright (c) 1995 - 2008 Sun Microsystems, Inc.  All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     *   - Redistributions of source code must retain the above copyright
     *     notice, this list of conditions and the following disclaimer.
     *
     *   - Redistributions in binary form must reproduce the above copyright
     *     notice, this list of conditions and the following disclaimer in the
     *     documentation and/or other materials provided with the distribution.
     *
     *   - Neither the name of Sun Microsystems nor the names of its
     *     contributors may be used to endorse or promote products derived
     *     from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
     * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */ 
    
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    import java.awt.event.*;
    
    public class DropTable extends JPanel {
        public DropTable() {
            super(new GridLayout(1,0));
            JTable table = new JTable(new MyTableModel()) {};
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            table.setFillsViewportHeight(true);
            JScrollPane scrollPane = new JScrollPane(table);
            add(scrollPane);
        }
    
        private static void createAndShowGUI() {
            JFrame frame = new JFrame("Drop Table");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JComponent newContentPane = new DropTable();
            newContentPane.setOpaque(true);
            frame.setContentPane(newContentPane);
            frame.pack();
            frame.setVisible(true);
        }
    
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
                }
            });
        }
    
       class MyTableModel extends AbstractTableModel {
    	String[] columnNames = {"ITEM","ID", "RATE", "SPECIAL"};
    
    	Object[][] data = {
        		{"Abyssal Whip", new Integer(4151), new Integer(150), new Boolean(true)},
        		{"Dark Bow", new Integer(15156), new Integer(145), new Boolean(true)},
    	};
    
            public String getColumnName(int col) {
                return columnNames[col];
            }
    
            public int getColumnCount() {
                return columnNames.length;
            }
    
            public int getRowCount() {
                return data.length;
            }
    
            public Object getValueAt(int row, int col) {
                return data[row][col];
            }
    
            public Class getColumnClass(int c) {
                return getValueAt(0, c).getClass();
            }
        }
    }
    Reply With Quote  
     

  10. #9  
    Registered Member

    Join Date
    Jun 2008
    Posts
    1,957
    Thanks given
    7
    Thanks received
    256
    Rep Power
    445
    Quote Originally Posted by Preedatyel View Post
    hmm easy to use i like it
    Yea, basicly. It's open source for a reason, make use of it, remove it please so others can look/learn for themselves.
    Reply With Quote  
     

  11. #10  
    brb ridin da storm

    blakeman8192's Avatar
    Join Date
    Dec 2012
    Age
    31
    Posts
    2,012
    Thanks given
    818
    Thanks received
    1,361
    Rep Power
    329
    Quote Originally Posted by Preedatyel View Post
    hmm easy to use i like it

    Code:
    /*
     * Copyright (c) 1995 - 2008 Sun Microsystems, Inc.  All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     *   - Redistributions of source code must retain the above copyright
     *     notice, this list of conditions and the following disclaimer.
     *
     *   - Redistributions in binary form must reproduce the above copyright
     *     notice, this list of conditions and the following disclaimer in the
     *     documentation and/or other materials provided with the distribution.
     *
     *   - Neither the name of Sun Microsystems nor the names of its
     *     contributors may be used to endorse or promote products derived
     *     from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
     * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */ 
    
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    import java.awt.event.*;
    
    public class DropTable extends JPanel {
        public DropTable() {
            super(new GridLayout(1,0));
            JTable table = new JTable(new MyTableModel()) {};
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            table.setFillsViewportHeight(true);
            JScrollPane scrollPane = new JScrollPane(table);
            add(scrollPane);
        }
    
        private static void createAndShowGUI() {
            JFrame frame = new JFrame("Drop Table");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JComponent newContentPane = new DropTable();
            newContentPane.setOpaque(true);
            frame.setContentPane(newContentPane);
            frame.pack();
            frame.setVisible(true);
        }
    
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
                }
            });
        }
    
       class MyTableModel extends AbstractTableModel {
    	String[] columnNames = {"ITEM","ID", "RATE", "SPECIAL"};
    
    	Object[][] data = {
        		{"Abyssal Whip", new Integer(4151), new Integer(150), new Boolean(true)},
        		{"Dark Bow", new Integer(15156), new Integer(145), new Boolean(true)},
    	};
    
            public String getColumnName(int col) {
                return columnNames[col];
            }
    
            public int getColumnCount() {
                return columnNames.length;
            }
    
            public int getRowCount() {
                return data.length;
            }
    
            public Object getValueAt(int row, int col) {
                return data[row][col];
            }
    
            public Class getColumnClass(int c) {
                return getValueAt(0, c).getClass();
            }
        }
    }
    why is that copyrighted to sun
    rest in peace Qemist, Izzy, Colton, TeChNo PuNk, Impulser, & bootnecklad
    Reply With Quote  
     

  12. Thankful user:


Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •