Thread: RuneTopList Voting Script V1 (Vote4Items)

Page 1 of 19 12311 ... LastLast
Results 1 to 10 of 181
  1. #1 RuneTopList Voting Script V1 (Vote4Items) 
    Registered Member
    Join Date
    Nov 2011
    Posts
    86
    Thanks given
    0
    Thanks received
    120
    Rep Power
    59
    New version is out: [Only registered and activated users can see links. ]

    Spoiler for OLD V1:
    Description: How to add Vote for Items/Vote for Cash/Vote Script to your server
    Difficulty: 4/10
    What you should know: How to read, Copy+Paste, Some PHP + MySQL

    Quick note: I am the owner of RuneTopList and this is the Voting Script which we provide for free to our users.

    Hello guys, I will be showing you how to set up Vote4Items (View media spoiler for more details). This will only work if you use the new toplist (RuneTopList). I will be bring out a new version with any fixes which may be needed, more optimized and graphical improvements. When i bring out a new version it will be fully compatible to this version it will be a matter of just downloading the package and extracting it into the root folder. If you find any bugs just post on this topic or pm me if you don't want anyone knowing about them.


    How does it look like?

    Spoiler for media:


    Click below for video
    [Only registered and activated users can see links. ]









    So why should you use this Vote4Items over others?

    - No need for authcodes, user just needs to do ::check in game and gets their reward
    - Doesn't need the use of top100arena which just lets a certain amount of the same IP subnets each day. (This created problems where the users may vote on other websites like runelocus but then not receiving their reward)
    - Has analytics center where you can analyse when your getting the most votes, how good the current month is compared to last month. Who on your server has voted the most times and also what rewards are the players picking.
    - Shows the user how long they can vote again with a JS count down timer.
    - Easily editable all in the Config.php file (Which rewards are available, Which voting websites their are to vote on and many other things.)



    So how can i get it working?

    1. Download [Only registered and activated users can see links. ]and upload it to your htdocs (root folder) of your server. Then extract it. (Too many files to post them all here.)
    MySQLi version: [Only registered and activated users can see links. ]
    MySQL version: [Only registered and activated users can see links. ]

    2. Log onto your SQL service and execute this code. (This will create the database and tables where the data will be saved)
    Code:
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    
    CREATE DATABASE `website` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
    
    USE `website`;
    
    CREATE TABLE IF NOT EXISTS `items` (
     `id` int(11) NOT NULL AUTO_INCREMENT,
     `username` varchar(12) NOT NULL,
     `item_id` int(11) NOT NULL,
     `item_amount` int(11) NOT NULL DEFAULT '1',
     `claimed` int(11) NOT NULL DEFAULT '0',
     PRIMARY KEY (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ;
    
    CREATE TABLE IF NOT EXISTS `verifying_votes` (
     `callbackid` varchar(10) NOT NULL,
     KEY `callbackid` (`callbackid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    CREATE TABLE IF NOT EXISTS `votes` (
     `id` int(8) NOT NULL AUTO_INCREMENT,
     `ip` varchar(45) NOT NULL,
     `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
     PRIMARY KEY (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

    3. Add this command on to your server:
    Code:
    
    if (playerCommand.startsWith("check") || playerCommand.startsWith("reward")) {
                try {
                    SQL.checkVote(c);
                } catch(Exception e) {
                    System.out.println(e);
                }
            }
    4. Add this query into your SQL class:
    Code:
    
    public static void checkVote(Client c) {
            try {
                if(c.getItems().freeSlots() > 0) {
                    //Statement stmt = con.createStatement();
                    ResultSet rs = query("SELECT id,item_id, item_amount FROM `items` WHERE `username`= '" + c.playerName + "' AND `claimed`= '0'");
                    if(rs.next()) {
                        int rowid = rs.getInt("id");
                        int itemid = rs.getInt("item_id");
                        int amount = rs.getInt("item_amount");
                        query("UPDATE `items` SET `claimed` = 1 WHERE `username` = '" + c.playerName + "' AND `id`='" + rowid + "'");
                        c.getItems().addItem(itemid, amount);
                        c.sendMessage("You receive "+amount+" X "+c.getItems().getItemName(itemid)+".");
                    } else {
                        c.sendMessage("No items waiting for you.");
                    }
                } else {
                    c.sendMessage("Please make space for your items.");
                }
            } catch (SQLException ex) {
                System.out.println(ex);
            }
        }
    5. Create an account on [Only registered and activated users can see links. ]and when your signing up make sure that the callback URL looks like this but with your domain:



    6. Edit the file called Config.php in root/vote/php/Config.php with all the relative details like database username, database password, voting links, your server name, etc...


    If you get stuck or don't know how to do it, i can do it for free just pm me your problem and in most cases ill probably just do it for you so ill ask you for your TeamViewer details to be quicker.
    Reply With Quote  
     


  2. #2  
    Banned

    Join Date
    May 2011
    Posts
    915
    Thanks given
    20
    Thanks received
    178
    Rep Power
    0
    Looks better then most voting systems. Great job i'm loving the way you choose to display the day through charts and showing the popularity on rewards.
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Oct 2009
    Age
    27
    Posts
    320
    Thanks given
    43
    Thanks received
    45
    Rep Power
    0
    does this check if you actually voted on like runelocus etc
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Nov 2011
    Posts
    86
    Thanks given
    0
    Thanks received
    120
    Rep Power
    59
    It only checks that you have voted on RuneTopList as it has an callback feature. On RuneLocus it only checks that you have clicked the button as it doesn't have a callback feature.
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    Banned
    Join Date
    Oct 2009
    Age
    27
    Posts
    320
    Thanks given
    43
    Thanks received
    45
    Rep Power
    0
    how would i add more buttons fro more voting sites to this
    Reply With Quote  
     

  7. #6  
    Registered Member Market Banned Market Banned


    Join Date
    Feb 2010
    Age
    25
    Posts
    3,068
    Thanks given
    913
    Thanks received
    349
    Rep Power
    385
    This is Really good Thanks
    Reply With Quote  
     

  8. #7  
    Registered Member
    Join Date
    Nov 2011
    Posts
    86
    Thanks given
    0
    Thanks received
    120
    Rep Power
    59
    Quote Originally Posted by j cole View Post
    how would i add more buttons fro more voting sites to this
    Just extend this array, make sure it has the following pattern: website name, website link. YouŽll find this array in Config.php
    I've done an example for you below.

    $votelinks = array (
    'RuneTopList', 'http://runetoplist.com/?v=1&i=',
    'RuneLocus', 'http://runelocus.com',
    'another website name', 'website URL'
    );
    Reply With Quote  
     

  9. Thankful user:


  10. #8  
    Expect the Unexpected

    Acquittal's Avatar
    Join Date
    Jan 2011
    Age
    27
    Posts
    1,182
    Thanks given
    627
    Thanks received
    233
    Rep Power
    238
    If you want to not use it for Runetoplist, would it still work?
    Reply With Quote  
     

  11. #9  
    Registered Member
    Join Date
    Nov 2011
    Posts
    86
    Thanks given
    0
    Thanks received
    120
    Rep Power
    59
    Quote Originally Posted by z0mg_beast View Post
    If you want to not use it for Runetoplist, would it still work?
    It wouldn't. However I would advise to using RuneTopList .

    I'll be making a thread later about RuneTopList on the website development section where I will talk about it and its features. Have a look at it soon!
    Reply With Quote  
     

  12. Thankful user:


  13. #10  
    Expect the Unexpected

    Acquittal's Avatar
    Join Date
    Jan 2011
    Age
    27
    Posts
    1,182
    Thanks given
    627
    Thanks received
    233
    Rep Power
    238
    Interesting. I think I will try this out!
    Reply With Quote  
     

Page 1 of 19 12311 ... 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. [PI]VOte4Cash/Vote4Items 10$ Not gonig first!
    By arcane-scape in forum Buying
    Replies: 13
    Last Post: 10-08-2011, 08:44 AM
  2. Voting script + server code, anyone have?
    By jap jap in forum Requests
    Replies: 3
    Last Post: 07-22-2011, 08:18 PM
  3. Replies: 13
    Last Post: 04-30-2011, 09:29 PM
  4. RuneParty Toplist(Code name: RuneToplist)
    By Zeroth in forum Website Development
    Replies: 5
    Last Post: 12-14-2010, 11:33 PM
  5. RuneScape Stats Script & RuneScape Stats Image Script
    By Zachera in forum Website Development
    Replies: 26
    Last Post: 02-17-2010, 11:46 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
  •