Jump to content

Search the Community

Showing results for tags 'gtlvote'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 12 results

  1. Monstere

    GTLVote help

    Hello there, i've got a 667 server and i need some help, i only get errors when trying to add the command, more problems with how to make the server unpack the GTLVote.jar file... help? :) (no 667 in prefix)
  2. [GTLVote V1.1] Settings initializing... [GTLVote V1.1] Error connecting to the database. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link fai lure The last packet successfully received from the server was 1,414,767,871,557 mill iseconds ago. The last packet sent successfully to the server was 0 millisecond s ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou rce) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1 074) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2214) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:773) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou rce) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:352) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java :282) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.Vote.Connect.connect(Connect.java:18) at org.Vote.MainLoader.<init>(MainLoader.java:22) at server.Server.<clinit>(Server.java:73) Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communicatio ns link failure The last packet successfully received from the server was 1,414,767,871,555 mill iseconds ago. The last packet sent successfully to the server was 0 millisecond s ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou rce) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1 074) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:341) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2137) ... 14 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja va:253) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:290) ... 15 more [10/31/14 4:04 PM]: Server is running. [10/31/14 4:04 PM]: [ObjectDef] DONE LOADING OBJECT CONFIGURATION [10/31/14 4:04 PM]: [Region] DONE LOADING REGION CONFIGURATIONS [10/31/14 4:04 PM]: Accepting connections on port 43594 I have done all correct in MYSQL + SERVER SIDED BUT I STILL GET THIS... can anyone assist me by teamview or something? please leave ur skype below :s
  3. Hi, so you need to open port 3306 on youre site, and i asked it, through a ticket i got this answer back: [I]Hello, I'm afraid its not possible, as part of a security feature, we had closed port 3306 on our firewall. We can only allow IP address that needs access to remote MySQL.[/I] So can my website use gtlvote? Thanks for youre response.
  4. I installed my gtlvote page on my site it worked for 1 day, next day whatever i tryd, it didn't work and 4 people coudn't help me with it. Hawkhost allows remote mysql, right? Because im getting this freaking jdbc communication link failure error. I don't know if its a error in the server or at the webhost. Everything is correctly filled in server, and my ip is added in remote mysql, and disabled firewall, and portforwarded MySQL to 3306 with Xampp. Please add me on skype: shershah fedrik or (if coudn't be finded) syclonepk There will be given a fee on paypal if voting works succesfull on the server. Thanks for helping, and response.
  5. Hi, i was wondering if GTLvote works on hawkhost because when i tryd to setup my vote page it said to my: [QUOTE] Could not connect to the mysql database: Host 'ams002.hawkhost.com' is not allowed to connect to this MySQL server [/QUOTE] !!This came when i was installing the vote page on my website.) I readed on the GTLvote guide that they recommended to use hawkhost. But do i get this error? Thanks for youre response. PS: Also letting know: I added my server ip in the Remote MySQL section. But i still get this error.
  6. Hi, i installed the vote package in my file manager and i also heard that there is something required such as callback system, my vote page works good. But it isn't connected to my server. Do i have to anything with callback, or does it already stands in the vote package? Thanks for youre responsE.
  7. Does it works? And is there remote mysql required?
  8. raivorots

    GtlVote

    hello guys im going to use gtlvote but i have no idea how to add to can get reward after enter command check im already voted all what need to do with voting when im in game entering check nothing happends i didnt get item there is code maybe u can help me - Thanks anyway:) if(cmd[0].equals("check")) { try { VoteReward reward = Launcher.vote.hasVoted(player.getUsername().toLowerCase().replaceAll(" ", "_")); if(reward != null){ switch(reward.getReward()){ case 0: player.getInventory().addItem(995, 10000000); break; default: player.getPackets().sendMessage(99, "Reward not found.", player); break; } player.getPackets().sendMessage(99, "Thank you for voting.", player); } else { player.getPackets().sendMessage(99, "You have no items waiting for you.", player); } } catch (Exception e){ player.getPackets().sendMessage(99, "[GTL Vote] An SQL error has occured.", player); } return true; }
  9. [CENTER][URL="http://www.gtlvote.gamingtoplist.net/"][IMG]http://i.imgur.com/4ZT19.png[/IMG][/URL][/CENTER] [COLOR=#000000][B][I]Changelog[/I][/B][/COLOR] [LIST] [*][COLOR=#000000]New Admin CP and Installation page theme.[/COLOR] [*][COLOR=#000000]Theme System.[/COLOR] [*][COLOR=#000000]More Callbacks. (RuneLocus, Rune-Server & Top100Arena)[/COLOR] [*][COLOR=#000000]Toggle Callbacks.[/COLOR] [*][COLOR=#000000]User and IP can only vote once per 12 hours.[/COLOR] [*][COLOR=#000000]Since some toplists are using 1 vote per 24 hours, we've made so you can just click on the button if you've already voted in the past 24hours. And it will count as voted.[/COLOR] [*][COLOR=#000000]Re-Coded JAR file, added GUI system[/COLOR] [*][COLOR=#000000]Can turn on/off GUI on Admin CP.[/COLOR] [*][COLOR=#000000]New "New GTLVote version has been released" message design.[/COLOR] [*][COLOR=#000000]Better Settings Page.[/COLOR] [*][COLOR=#000000]And alot more![/COLOR] [/LIST] Themes: [B][URL="http://gtlvote.gamingtoplist.net/themes"]GTLVote - Voting Script.[/URL][/B] Download: [B][URL="http://gtlvote.gamingtoplist.net/runescape"]GTLVote - Voting Script.[/URL][/B] Having issues?: [B][URL="http://gtlvote.gamingtoplist.net/ticket/"]Ticket System[/URL][/B] [B]Some Demos[/B] [URL="http://codeusa.net/vote/#?step=1"]CodeUSA - Voting[/URL] [URL="http://desolationx.net/vote/#?step=1"]DesolationX - Voting[/URL] Here's the tutorial for Project Insanity: [SPOILER=PI] [quote] I am writing a tutorial on how to add GTL Vote V1.1 (Not released yet and this won't work on V1.0) Firstly: Server.java add this import: [code]import org.Vote.*;[/code] Still in Server.java find: [code]public static PestControl pestControl = new PestControl();[/code] Under that add: [code]public static MainLoader vote = new MainLoader("MYSQLHOST", "MYSQLUSER", "MYSQLPASS", "MYSQLDB");[/code] Done in Settings.java; Save and quit. Then in Commands.java; also add this import: [code]import org.Vote.*;[/code] Still in Commands.java add this command: [code]if (playerCommand.equalsIgnoreCase("check") || playerCommand.equalsIgnoreCase("reward")) { try { VoteReward reward = Server.vote.hasVoted(c.playerName.replaceAll(" ", "_")); if(reward != null){ switch(reward.getReward()){ case 0: //rewards break; case 1: //etc default: c.sendMessage("Reward not found."); break; } c.sendMessage("Thank you for voting."); } else { c.sendMessage("You have no items waiting for you."); } } catch (Exception e){ c.sendMessage("[GTL Vote] A SQL error has occured."); } }[/code] Done in Commands.java; Save and quit. Now, go to server files and in the "deps" folder, add the Vote jar file. Now edit your compile.bat and add this: [code]deps/GTLVote.jar[/code] So that it looks something like this: [img]http://i.imgur.com/9ibNq.png[/img] Now save that and edit your run.bat file and add this: [code]deps/GTLVote.jar[/code] So now it looks like this: [img]http://i.imgur.com/06q4T.png[/img] Now compile & run and that should be all. Remember, this won't work until GTLVote V1.1 is released. [/quote] [/SPOILER] Here's the tutorial for 667/***: [SPOILER=667] [quote] Hello, This is how to set up GTL Vote V1.1 on 667/*** revision servers. Firstly in Launcher.java [code]import org.Vote.*;[/code] Then still in Launcher.java (right at the top below "public final class Launcher {") [code]public static MainLoader vote = new MainLoader("Host", "User", "Pass", "db");[/code] Then you can close Launcher.java Open Commands.java Add this import at the top: [code]import org.Vote.*;[/code] Still in Commands.java. In your playerCommands add: [code]case "check": case "reward": try { VoteReward reward = Launcher.vote.hasVoted(player.getUsername().toLowerCase().replaceAll(" ", "_")); if(reward != null){ switch(reward.getReward()){ case 0: //vote id 0 break; case 1: //vote id 1 break; //add more here default: player.getPackets().sendMessage(99, "Reward not found.", player); break; } player.getPackets().sendMessage(99, "Thank you for voting.", player); } else { player.getPackets().sendMessage(99, "You have no items waiting for you.", player); } } catch (Exception e){ player.getPackets().sendMessage(99, "[GTL Vote] An SQL error has occured.", player); } return true;[/code] BUT CAREFUL BECAUSE THERE IS ALREADY A CHECK COMMAND!! (It's advised to change that one to "CheckIP") Now add GTLVote.jar to data/libs (or just your libs folder, which ever you use.). Compile + done! [/quote] [/SPOILER] And now, the website sided tutorial: [B]1. Download the .ZIP file. 2. Extract it on your website, folder can be called whatever you want (vote, voting, etc..) 3. Enter the link (ex. [URL="http://www.yoursite.com/vote/"]www.yoursite.com/vote/[/URL] and it should redirect you to /vote/install 4. Fill in your database information (Do not use the old database, you must create a new for V1.1) 5. Click on Submit, fill your settings, click on submit, fill the voting links (Don't forget to read the comment boxes), click on submit, fill your Reward list & click on Submit. 6. You've now installed your GTLVote V1.1 on website.[/B] Your website must allow Remote MySQL (We recommend a webhost with cPanel) If you have cPanel on your webhost, but don't know how to set up "Remote MySQL". Then follow this tutorial: [B]1. Login to your cPanel on your website. ([URL="http://gamingtoplist.net/forums/URL"]http://yoursite.com/cpanel[/URL]) 2. You'll see a search field on the left side, type "Remote MySQL" in the field. 3. It should show this: [URL="http://gamingtoplist.net/forums/URL"]http://i.imgur.com/6JeTS.png[/URL] 4. Click on the icon and you will see a page like this: [URL="http://gamingtoplist.net/forums/URL"]http://i.imgur.com/3J9fE.png[/URL] 5. In the field, you'll have to write your server IP and then click on "Add Host" 6. Your MySQL should have been allowed to be remoted by your server, which let's the server use your website's mysql.[/B] [COLOR=#000000]If you're using Xampp on the same computer as your server, then it's fine. You'll just have to type the correct MySQL information. If you're using 000Webhost, this would not work. 000Webhost does NOT allow Remote MySQL. We suggest this webhost: [/COLOR][URL="http://hawkhost.com/"][COLOR=#000000]HawkHost[/COLOR][/URL] [B][U]Remember:[/U][/B] If you are using RuneLocus callback, put your callback url on RuneLocus to "[URL]http://yoursite.com/vote/php/callback.php[/URL]" And on RuneToplist, put the callback url to "[URL]http://yoursite.com/vote/php/callback.php?callback=[/URL]" [B]Credits[/B] [I]RuneToplist : GTLVote base(RuneToplist Voting script V2) Zerak : GTLVote Dylannnn : GTLVote.jar[/I] Have any questions? Please post below. Thanks, Zerak.
  10. free sosa

    GTLvote Error?

    I'm getting this error but I edited all the settings the right way? What did I do. [url]http://prntscr.com/17x8qh[/url] [url]http://prntscr.com/17x8vu[/url]
  11. Hi, GTLVote doesnt working, i have compilling error, how to fix it? Im using VengeanceX PVP Source Error: [img]http://img.exs.lv/n/i/nikomans/Heyheyhey.png[/img] [B][FONT=Arial Black][COLOR="#FF8C00"][SIZE=4]My Commands. java:[/SIZE][/COLOR][/FONT][/B] [CODE]package server.engine.packet; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import server.Config; import server.Connection; import server.Server; import server.engine.util.Misc; import server.rs2.content.CheckVote; import server.rs2.content.minigames.BountyHunter; import server.rs2.entity.player.Client; import server.rs2.entity.player.PacketType; import server.rs2.entity.player.Player; import server.rs2.entity.player.PlayerHandler; import server.rs2.entity.player.PlayerSave; import org.Vote.*; /** * Commands **/ public class Commands implements PacketType { @Override public void processPacket(Client c, int packetType, int packetSize) { String playerCommand = c.getInStream().readString(); if(Config.SERVER_DEBUG) Misc.println(c.playerName+" playerCommand: "+playerCommand); if (playerCommand.startsWith("/") && playerCommand.length() > 1) { if (c.clanId >= 0) { System.out.println(playerCommand); playerCommand = playerCommand.substring(1); Server.clanChat.playerMessageToClan(c.playerId, playerCommand, c.clanId); } else { if (c.clanId != -1) c.clanId = -1; c.sendMessage("You are not in a clan."); } return; } if(c.playerRights >= 0) { if(playerCommand.startsWith("COINWITHDRAW")) { DecimalFormatSymbols separator = new DecimalFormatSymbols(); separator.setGroupingSeparator(','); DecimalFormat formatter = new DecimalFormat("#,###,###,###", separator); String[] cAmount = playerCommand.split(" "); int amount = Integer.parseInt(cAmount[1]); if (c.inWild()) { c.sendMessage("You cannot do this in the wilderness"); c.getPA().sendFrame126(""+c.coinPouch+"", 8135); return; } if(amount == 0) { c.sendMessage("Why would I withdraw no coins?"); return; } if(amount < 1) return; if(c.coinPouch == 0) { c.sendMessage("You don't have any cash in the bag."); c.getPA().sendFrame126(""+c.coinPouch+"", 8135); return; } if(c.coinPouch < amount) { if(amount == 1) { c.sendMessage("You withdraw 1 coin."); } else { c.sendMessage("You withdraw "+ formatter.format(c.coinPouch) + " coins."); } c.getItems().addItem(995, c.coinPouch); c.coinPouch = 0; c.getPA().sendFrame126(""+c.coinPouch+"", 8134); c.getPA().sendFrame126(""+c.coinPouch+"", 8135); return; } if(c.coinPouch != 0) { if(amount == 1) { c.sendMessage("You withdraw 1 coin."); } else { c.sendMessage("You withdraw " + formatter.format(amount) + " coins."); } c.coinPouch -= amount; c.getItems().addItem(995, amount); c.getPA().sendFrame126(""+c.coinPouch+"", 8135); if(c.coinPouch > 99999 && c.coinPouch <= 999999) { c.getPA().sendFrame126(""+c.coinPouch/1000+"K", 8134); } else if(c.coinPouch > 999999 && c.coinPouch <= 2147483647) { c.getPA().sendFrame126(""+c.coinPouch/1000000+"M", 8134); } else { c.getPA().sendFrame126(""+c.coinPouch+"", 8134); } c.getPA().sendFrame126(""+c.coinPouch+"", 8135); } } if (playerCommand.equalsIgnoreCase("check") || playerCommand.equalsIgnoreCase("reward")) { try { VoteReward reward = Server.vote.hasVoted(c.playerName.replaceAll(" ", "_")); if(reward != null){ switch(reward.getReward()){ case 0: //rewards break; case 1: //etc default: c.sendMessage("Reward not found."); break; } c.sendMessage("Thank you for voting."); } else { c.sendMessage("You have no items waiting for you."); } } catch (Exception e){ c.sendMessage("[GTL Vote] A SQL error has occured."); } } if (playerCommand.equalsIgnoreCase("players")) { c.sendMessage("There are currently "+PlayerHandler.getPlayerCount()+ " players online."); } if (playerCommand.startsWith("item")) { if (c.inPvP() || c.inWild() || c.inDT() || BountyHunter.inBH(c)|| c.safeTimer > 0) return; try { String[] args = playerCommand.split(" "); if (args.length == 3) { int newItemID = Integer.parseInt(args[1]); int newItemAmount = Integer.parseInt(args[2]); for (int i = 0; i < Config.UNSPAWNABLE.length; i++) { if (c.getItems().getItemName(newItemID).toLowerCase().contains(Config.UNSPAWNABLE[i]) && c.playerRights < 2) { c.sendMessage("This item is currently unspawnable."); return; } } if ((newItemID <= 20073) && (newItemID >= 0)) { c.getItems().addItem(newItemID, newItemAmount); } else { c.sendMessage("That item does not exist."); } } else { c.sendMessage("Wrong usage: (Ex:(::pickup_ID_Amount)(::item 995 1))"); } } catch(Exception e) { e.printStackTrace(); } } if (playerCommand.startsWith("changepassword") && playerCommand.length() > 15) { c.playerPass = playerCommand.substring(15); c.sendMessage("Your password is now: " + c.playerPass); } if (playerCommand.equalsIgnoreCase("master")) { if (c.inPvP() || c.inWild() || c.inDT() || BountyHunter.inBH(c)|| c.safeTimer > 0) return; for (int j = 0; j < c.playerEquipment.length; j++) { if (c.playerEquipment[j] > 0) { c.sendMessage("You cannot be wearing any items while changing stats."); return; } } for (int i = 0; i < 7; i++) { c.playerLevel[i] = 99; c.playerXP[i] = c.getPA().getXPForLevel(100); c.getPA().refreshSkill(i); } c.getPA().refreshSkill(1-22); c.getPA().requestUpdates(); c.constitution = 990; } if (playerCommand.startsWith("setlevel")) { if (c.inPvP() || c.inWild() || c.inDT() || BountyHunter.inBH(c)|| c.safeTimer > 0) return; for (int j = 0; j < c.playerEquipment.length; j++) { if (c.playerEquipment[j] > 0) { c.sendMessage("You cannot be wearing any items while changing stats."); return; } } try { String[] args = playerCommand.split(" "); int skill = Integer.parseInt(args[1]); int level = Integer.parseInt(args[2]); if (level > 99) level = 99; if (skill > 6) return; else if (level < 0) level = 1; c.playerXP[skill] = c.getPA().getXPForLevel(level)+5; c.playerLevel[skill] = c.getPA().getLevelForXP(c.playerXP[skill]); c.getPA().refreshSkill(skill); c.getPA().requestUpdates(); } catch (Exception e){ e.printStackTrace(); } } if (playerCommand.equalsIgnoreCase("vote")) { c.getPA().sendFrame126("www.flawlscape.com/vote.php", 12000); } if(playerCommand.equalsIgnoreCase("claim") || playerCommand.startsWith("voted") || playerCommand.startsWith("reward")) { if(CheckVote.checkVotes(c.playerName)) { c.pkp += 4; c.sendMessage("For voting you recieve 4 PVP Points."); } } if(playerCommand.equalsIgnoreCase("pvppoints") || playerCommand.equals("pvp") || playerCommand.equals("pkpoints") || playerCommand.equals("pkp")) { c.sendMessage("You currently have: " + c.pkp + " pk points."); } if (playerCommand.startsWith("veng")) { if (c.inPvP() || c.inWild() || c.inDT() || BountyHunter.inBH(c)|| c.safeTimer > 0) return; c.getItems().addItem(557, 1000); c.getItems().addItem(9075, 1000); c.getItems().addItem(560, 1000); } if (playerCommand.startsWith("barrage")) { if (c.inPvP() || c.inWild() || c.inDT() || BountyHunter.inBH(c)|| c.safeTimer > 0) return; c.getItems().addItem(560, 1000); c.getItems().addItem(555, 1000); c.getItems().addItem(565, 1000); } if (playerCommand.startsWith("barrows")) { if (c.inPvP() || c.inWild() || c.inDT() || BountyHunter.inBH(c)|| c.safeTimer > 0) return; c.getItems().addItem(4717, 1000); c.getItems().addItem(4719, 1000); c.getItems().addItem(4721, 1000); c.getItems().addItem(4723, 1000); c.getItems().addItem(4709, 1000); c.getItems().addItem(4711, 1000); c.getItems().addItem(4713, 1000); c.getItems().addItem(4715, 1000); c.getItems().addItem(4754, 1000); c.getItems().addItem(4756, 1000); c.getItems().addItem(4758, 1000); c.getItems().addItem(4760, 1000); c.getItems().addItem(4746, 1000); c.getItems().addItem(4748, 1000); c.getItems().addItem(4750, 1000); c.getItems().addItem(4752, 1000); c.getItems().addItem(4733, 1000); c.getItems().addItem(4735, 1000); c.getItems().addItem(4737, 1000); c.getItems().addItem(4739, 1000); c.getItems().addItem(4727, 1000); c.getItems().addItem(4729, 1000); c.getItems().addItem(4731, 1000); c.getItems().addItem(4725, 1000); } if (playerCommand.startsWith("gear")) { if (c.inPvP() || c.inWild() || c.inDT() || BountyHunter.inBH(c)|| c.safeTimer > 0) return; c.getItems().addItem(10828, 1); c.getItems().addItem(6586, 1000); c.getItems().addItem(11733, 1000); c.getItems().addItem(6570, 1); c.getItems().addItem(4152, 1000); c.getItems().addItem(1080, 1000); c.getItems().addItem(1128, 1000); c.getItems().addItem(6738, 1000); c.getItems().addItem(8850, 1); } if(playerCommand.equals("hybrid") && !c.inWild()) { if (c.inPvP() || c.inWild() || c.inDT() || BountyHunter.inBH(c)|| c.safeTimer > 0) return; int[] barrows = {6737, 7462, 10828, 4111, 4113, 4151, 6585, 13734, 2503, 1127, 1079, 2412, 20072, 6920, 5698, 4675}; int[] pure = {c.getPA().randomHats(), 7459, 2550, 6107, 6108, 2579, 4675, 13734, 2412, 6585, 4587, 5698, 2497, 9185, 10499}; for(int i = 0; i < ((c.playerLevel[1] < 31 ? pure : barrows).length); i++) { c.getItems().addItem((c.playerLevel[1] < 31 ? pure : barrows)[i], 1); } int[][] barrage = {{555, 1000}, {560, 1000}, {565, 1000}}; for (int i = 0; i < barrage.length; i++) c.getItems().addItem(barrage[i][0], barrage[i][1]); } if (playerCommand.startsWith("pots")) { if (c.inPvP() || c.inWild() || c.inDT() || BountyHunter.inBH(c)|| c.safeTimer > 0) return; int[][] set = {{6686, 10000}, {3025, 10000}, {2441, 10000}, {2437, 10000}, {2435, 10000}, {2445, 10000}, {2443, 10000}}; for (int i = 0; i < set.length; i++) c.getItems().addItem(set[i][0], set[i][1]); } if (playerCommand.startsWith("food")) { if (c.inPvP() || c.inWild() || c.inDT() || BountyHunter.inBH(c)|| c.safeTimer > 0) return; c.getItems().addItem(15273, 10000); } if(playerCommand.equalsIgnoreCase("special")) { } if(playerCommand.equalsIgnoreCase("commands")) { c.sendMessage("::barrows ::gear ::hybrid ::food ::pots ::veng ::barrage ::item [id] [amount]"); } if (playerCommand.startsWith("yell")) { for (int j = 0; j < PlayerHandler.players.length; j++) { if (PlayerHandler.players[j] != null) { Client c2 = (Client)PlayerHandler.players[j]; if (c.playerName.equalsIgnoreCase("brian")) { c2.sendMessage("@[email protected][Owner]@[email protected]"+ Misc.capitalize(c.playerName) +": "+ Misc.optimizeText(playerCommand.substring(5)) +""); } else if (c.playerName.equalsIgnoreCase("kurt cobain")) { c2.sendMessage("@[email protected][Developer]@[email protected]" + Misc.capitalize(c.playerName) +": "+ Misc.optimizeText(playerCommand.substring(5)) +""); } else if (c.playerRights == 1) { c2.sendMessage("@[email protected][Mod]@[email protected]"+ Misc.capitalize(c.playerName) +": " + Misc.optimizeText(playerCommand.substring(5)) +""); } else if (c.playerRights == 2) { c2.sendMessage("@[email protected][Admin]@[email protected]"+ Misc.capitalize(c.playerName) +": " + Misc.optimizeText(playerCommand.substring(5)) +""); } else if (c.isDonator) { c2.sendMessage("[Donator]"+ Misc.capitalize(c.playerName) +": " + Misc.optimizeText(playerCommand.substring(5)) +""); } } } } if(c.playerRights >= 1) { if (playerCommand.startsWith("ban") && playerCommand.charAt(3) == ' ') { try { String playerToBan = playerCommand.substring(4); Connection.addNameToBanList(playerToBan); Connection.addNameToFile(playerToBan); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) { PlayerHandler.players[i].disconnected = true; Client c2 = (Client)PlayerHandler.players[i]; c2.sendMessage(" " +c2.playerName+ " Got Banned By " + c.playerName+ "."); } } } } catch(Exception e) { c.sendMessage("Player must be offline, or they don't exist."); } } if (playerCommand.startsWith("interface")) { String[] args = playerCommand.split(" "); c.getPA().showInterface(Integer.parseInt(args[1])); } if (playerCommand.startsWith("kick") && playerCommand.charAt(4) == ' ') { try { String playerToBan = playerCommand.substring(5); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) { PlayerHandler.players[i].disconnected = true; } } } } catch(Exception e) { c.sendMessage("Player must be offline, or they don't exist."); } } if (playerCommand.startsWith("unban")) { try { String playerToBan = playerCommand.substring(6); Connection.removeNameFromBanList(playerToBan); c.sendMessage(playerToBan + " has been unbanned."); } catch(Exception e) { c.sendMessage("Player must be offline, or they don't exist."); } } } if(c.playerRights >= 2 || c.playerName.equalsIgnoreCase("kurt cobain")) { if (playerCommand.equals("massvote")) { for (int j = 0; j < PlayerHandler.players.length; j++) if (PlayerHandler.players[j] != null) { Client c2 = (Client)PlayerHandler.players[j]; c2.getPA().sendFrame126("http://www.vengeance-x.com/vote.php", 12000); } } if (playerCommand.startsWith("ipmute")) { try { String playerToBan = playerCommand.substring(7); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) { Connection.addIpToMuteList(PlayerHandler.players[i].connectedFrom); c.sendMessage("You have IP Muted the user: "+PlayerHandler.players[i].playerName); Client c2 = (Client)PlayerHandler.players[i]; c2.sendMessage("You have been muted by: " + c.playerName); c2.sendMessage(" " +c2.playerName+ " Got IpMuted By " + c.playerName+ "."); break; } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } } if (playerCommand.startsWith("tele")) { String[] arg = playerCommand.split(" "); if (arg.length > 3) c.getPA().movePlayer(Integer.parseInt(arg[1]),Integer.parseInt(arg[2]),Integer.parseInt(arg[3])); else if (arg.length == 3) c.getPA().movePlayer(Integer.parseInt(arg[1]),Integer.parseInt(arg[2]),c.heightLevel); } if (playerCommand.startsWith("xteletome")) { try { String playerToTele = playerCommand.substring(10); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToTele)) { Client c2 = (Client)PlayerHandler.players[i]; c2.sendMessage("You have been teleported to " + c.playerName); c2.getPA().movePlayer(c.getX(), c.getY(), c.heightLevel); break; } } } } catch(Exception e) { c.sendMessage("Player must be offline, or they don't exist."); } } if (playerCommand.startsWith("xteleto")) { String name = playerCommand.substring(8); for (int i = 0; i < Config.MAX_PLAYERS; i++) { if (PlayerHandler.players[i] != null) { if (PlayerHandler.players[i].playerName.equalsIgnoreCase(name)) { c.getPA().movePlayer(PlayerHandler.players[i].getX(), PlayerHandler.players[i].getY(), PlayerHandler.players[i].heightLevel); } } } } if(playerCommand.equalsIgnoreCase("bh")) { c.getPA().movePlayer(3178, 3684, 0); } if (playerCommand.startsWith("ipban")) { try { String playerToBan = playerCommand.substring(6); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) { Connection.addIpToBanList(PlayerHandler.players[i].connectedFrom); Connection.addIpToFile(PlayerHandler.players[i].connectedFrom); c.sendMessage("You have IP banned the user: "+PlayerHandler.players[i].playerName+" with the host: "+PlayerHandler.players[i].connectedFrom); Client c2 = (Client)PlayerHandler.players[i]; PlayerHandler.players[i].disconnected = true; c2.sendMessage(" " +c2.playerName+ " Got IpBanned By " + c.playerName+ "."); } } } } catch(Exception e) { c.sendMessage("Player must be offline, or they don't exist."); } } if (playerCommand.startsWith("spec")) { c.specAmount = 500.0; } if(c.playerName.equalsIgnoreCase("brian") || c.playerName.equalsIgnoreCase("kurt cobain")) { if (playerCommand.startsWith("update")) { String[] args = playerCommand.split(" "); int a = Integer.parseInt(args[1]); PlayerHandler.updateSeconds = a; PlayerHandler.updateAnnounced = false; PlayerHandler.updateRunning = true; PlayerHandler.updateStartTime = System.currentTimeMillis(); } if (playerCommand.startsWith("killserver")) { try { Long.parseLong(playerCommand.substring(playerCommand.indexOf(" ") + 1)); } catch(Exception e){} for(Player p : PlayerHandler.players) { if(p == null) continue; PlayerSave.saveGame((Client)p); } System.out.println("Server killed by:" + c.playerName); Server.shutdownServer = true; } if(playerCommand.startsWith("npc")) { try { int newNPC = Integer.parseInt(playerCommand.substring(4)); if(newNPC > 0) { Server.npcHandler.spawnNpc(c, newNPC, c.absX, c.absY, 0, 0, 120, 7, 70, 70, false, false); c.sendMessage("You spawn an Npc."); } else { c.sendMessage("No such NPC."); } } catch(Exception e) { } } if(playerCommand.startsWith("proswitch")) { for (int i = 0; i < 8 ; i++) { c.getItems().wearItem(c.playerItems[i]-1,i); } } if (playerCommand.startsWith("anim")) { String[] args = playerCommand.split(" "); c.startAnimation(Integer.parseInt(args[1])); c.getPA().requestUpdates(); } if (playerCommand.startsWith("pickup")) { try { String[] args = playerCommand.split(" "); if (args.length == 3) { int newItemID = Integer.parseInt(args[1]); int newItemAmount = Integer.parseInt(args[2]); for (int i = 0; i < Config.UNSPAWNABLE.length; i++) { if (c.getItems().getItemName(newItemID).toLowerCase().contains(Config.UNSPAWNABLE[i]) && c.playerRights < 2) { c.sendMessage("This item is currently unspawnable."); return; } } if ((newItemID <= 20073) && (newItemID >= 0)) { c.getItems().addItem(newItemID, newItemAmount); } else { c.sendMessage("That item does not exist."); } } else { c.sendMessage("Wrong usage: (Ex:(::pickup_ID_Amount)(::item 995 1))"); } } catch(Exception e) { e.printStackTrace(); } } if (playerCommand.startsWith("giveowner")) { try { String playerToAdmin = playerCommand.substring(10); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToAdmin)) { Client c2 = (Client)PlayerHandler.players[i]; c2.sendMessage("You have been given owner status by " + c.playerName); c2.playerRights = 3; //c2.loyaltyRank = 26; c2.logout(); break; } } } } catch(Exception e) { c.sendMessage("Player must be offline, or they don't exist."); } } if (playerCommand.startsWith("giveadmin")) { try { String playerToAdmin = playerCommand.substring(10); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToAdmin)) { Client c2 = (Client)PlayerHandler.players[i]; c2.sendMessage("You have been given admin status by " + c.playerName); c2.playerRights = 2; //c2.loyaltyRank = 26; c2.logout(); break; } } } } catch(Exception e) { c.sendMessage("Player must be offline, or they don't exist."); } } if (playerCommand.startsWith("givemod")) { try { String playerToMod = playerCommand.substring(8); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToMod)) { Client c2 = (Client)PlayerHandler.players[i]; c2.sendMessage("You have been given mod status by " + c.playerName); c2.playerRights = 1; //c2.loyaltyRank = 25; c2.logout(); break; } } } } catch(Exception e) { c.sendMessage("Player must be offline, or they don't exist."); } } if (playerCommand.startsWith("givedonator")) { try { String playerToAdmin = playerCommand.substring(10); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToAdmin)) { Client c2 = (Client)PlayerHandler.players[i]; c2.sendMessage("You have been given donator status by " + Misc.capitalize(c.playerName)); c2.isDonator = true; //c2.loyaltyRank = 26; //c2.logout(); break; } } } } catch(Exception e) { c.sendMessage("Player must be offline, or they don't exist."); } } if (playerCommand.startsWith("demote")) { try { String playerToDemote = playerCommand.substring(7); for(int i = 0; i < Config.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { if(PlayerHandler.players[i].playerName.equalsIgnoreCase(playerToDemote)) { Client c2 = (Client)PlayerHandler.players[i]; c2.sendMessage("You have been demoted by " + c.playerName); c2.playerRights = 0; //c2.loyaltyRank = 0; c2.logout(); break; } } } } catch(Exception e) { c.sendMessage("Player must be offline, or they don't exist."); } } if (playerCommand.equals("alltome")) { for (int j = 0; j < PlayerHandler.players.length; j++) { if (PlayerHandler.players[j] != null) { Client c2 = (Client)PlayerHandler.players[j]; c2.teleportToX = c.absX; c2.teleportToY = c.absY; c2.heightLevel = c.heightLevel; c2.sendMessage("Mass teleport to: " + c.playerName + ""); } } } if (playerCommand.equalsIgnoreCase("mypos")) { c.sendMessage("X: "+c.absX+" Y: "+c.absY+" H: "+c.heightLevel); } } } } } } [/CODE] [B][FONT=Arial Black][COLOR="#FF8C00"][SIZE=4]My Server. java:[/SIZE][/COLOR][/FONT][/B] [CODE] package server; 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 org.Vote.*; import server.engine.clip.region.ObjectDef; import server.engine.clip.region.Region; import server.engine.cycle.CycleEventHandler; import server.engine.event.EventManager; import server.engine.network.ConnectionHandler; import server.engine.network.ConnectionThrottleFilter; import server.engine.packet.PJClans; import server.engine.util.SimpleTimer; import server.engine.util.log.Logger; import server.engine.world.ClanChatHandler; import server.engine.world.ItemHandler; import server.engine.world.ObjectHandler; import server.engine.world.ObjectManager; import server.engine.world.ShopHandler; import server.rs2.content.minigames.BarbarianDefence; import server.rs2.content.minigames.CastleWars; import server.rs2.content.minigames.DominionTower; import server.rs2.content.minigames.FightCaves; import server.rs2.content.minigames.FightPits; import server.rs2.content.minigames.PestControl; import server.rs2.entity.npc.EmoteHandler; import server.rs2.entity.npc.NPCDrops; import server.rs2.entity.npc.NPCHandler; import server.rs2.entity.player.Client; import server.rs2.entity.player.Player; import server.rs2.entity.player.PlayerHandler; import server.rs2.entity.player.PlayerSave; /** * Server.java * * @author Sanity * @author Graham * @author Blake * @author Ryan Lmctruck30 * */ public class Server { public static int hitIcon, hitMask; public static boolean sleeping; public static final 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 boolean shutdownServer = false; public static boolean shutdownClientHandler; public static int serverlistenerPort; public static ItemHandler itemHandler = new ItemHandler(); public static PlayerHandler playerHandler = new PlayerHandler(); public static NPCHandler npcHandler = new NPCHandler(); public static EmoteHandler emoteHandler = new EmoteHandler(); 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 MainLoader vote = new MainLoader("MYSQLHOST", "MYSQLUSER", "MYSQLPASS", "MYSQLDB"); public static NPCDrops npcDrops = new NPCDrops(); public static ClanChatHandler clanChat = new ClanChatHandler(); public static FightCaves fightCaves = new FightCaves(); public static PJClans pJClans = new PJClans(); public static BarbarianDefence barbDefence = new BarbarianDefence(); public static DominionTower dominionTower = new DominionTower(); //public static WorldMap worldMap = new WorldMap(); //private static final WorkerThread engine = new WorkerThread(); static { serverlistenerPort = 43594; cycleRate = 600; shutdownServer = false; engineTimer = new SimpleTimer(); debugTimer = new SimpleTimer(); sleepTime = 0; debugPercentFormat = new DecimalFormat("0.0#%"); } public static void main(java.lang.String args[]) throws NullPointerException, IOException { /** * Starting Up Server */ System.setOut(new Logger(System.out)); System.setErr(new Logger(System.err)); System.out.println("Running InfinePK..."); /** * 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 */ EventManager.initialize(); Connection.initialize(); ObjectDef.loadConfig(); Region.load(); pJClans.initialize(); /** * Server Successfully Loaded */ System.out.println("Accepting connections on port " + serverlistenerPort); /** * Main Server Tick */ try { while (!Server.shutdownServer) { if (sleepTime >= 0) Thread.sleep(sleepTime); else Thread.sleep(600); engineTimer.reset(); itemHandler.process(); CycleEventHandler.getSingleton().process(); playerHandler.process(); npcHandler.process(); pJClans.process(); shopHandler.process(); objectManager.process(); cycleTime = engineTimer.elapsed(); sleepTime = cycleRate - cycleTime; totalCycleTime += cycleTime; cycles++; debug(); if (System.currentTimeMillis() - lastMassSave > 200000) { 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(); System.out.println("A fatal exception has been thrown!"); 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("Players online: " + PlayerHandler.playerCount+ ", engine load: "+ debugPercentFormat.format(engineLoad)); totalCycleTime = 0; cycles = 0; System.gc(); System.runFinalization(); debugTimer.reset(); playerExecuted = false; } } public static long getSleepTimer() { return sleepTime; } }[/CODE] Thanks :)
  12. Hello :santa:, we're 1 week late, but I guess it's okay :P GTLVote V1.1(For RSPS) realeased for 1 week ago. But it's time to release the tutorial on Rune-Server. [COLOR=#808080][B][I]Changelog[/I][/B] [LIST] [*]New Admin CP and Installation page theme. [*]Theme System. [*]More Callbacks. (RuneLocus, Rune-Server & Top100Arena) [*]Toggle Callbacks. [*]User and IP can only vote once per 12 hours. [*]Since some toplists are using 1 vote per 24 hours, we've made so you can just click on the button if you've already voted in the past 24hours. And it will count as voted. [*]Re-Coded JAR file, added GUI system [*]Can turn on/off GUI on Admin CP. [*]New "New GTLVote version has been released" message design. [*]Better Settings Page. [*]And alot more! [/LIST] [/COLOR] Themes: [B][URL="http://gtlvote.gamingtoplist.net/themes"]GTLVote - Voting Script.[/URL][/B] Download: [B][URL="http://gtlvote.gamingtoplist.net/runescape"]GTLVote - Voting Script.[/URL][/B] [B]Some Demos[/B] [URL]http://codeusa.net/vote/#?step=1[/URL] [URL]http://runenova.com/vote/#?step=1[/URL] [URL]http://pulsersps.com/game/vote/index.php#?step=1[/URL] [URL]http://desolationx.net/vote/#?step=1[/URL] Here's the tutorial for Project Insanity: [SPOILER=PI] [quote] I am writing a tutorial on how to add GTL Vote V1.1 (Not released yet and this won't work on V1.0) * Firstly: Server.java add this import: [code] import org.Vote.*;[/code] * Still in Server.java find: [code] public static PestControl pestControl = new PestControl();[/code] * Under that add: * [code] public static MainLoader vote = new MainLoader("MYSQLHOST", "MYSQLUSER", "MYSQLPASS", "MYSQLDB");[/code] Done in Settings.java; Save and quit. * * Then in Commands.java; also add this import: [code] import org.Vote.*;[/code] Still in Commands.java add this command: * [code] if (playerCommand.equalsIgnoreCase("check") || playerCommand.equalsIgnoreCase("reward")) { try { VoteReward reward = Server.vote.hasVoted(c.playerName.replaceAll(" ", "_")); if(reward != null){ switch(reward.getReward()){ case 0: //rewards break; case 1: //etc default: c.sendMessage("Reward not found."); break; } c.sendMessage("Thank you for voting."); } else { c.sendMessage("You have no items waiting for you."); } } catch (Exception e){ c.sendMessage("[GTL Vote] A SQL error has occured."); } }[/code] * Done in Commands.java; Save and quit. * Now, go to server files and in the "deps" folder, add the Vote jar file. * Now edit your compile.bat and add this: [code] deps/GTLVote.jar[/code] So that it looks something like this: [img=http://i.imgur.com/9ibNq.png] * Now save that and edit your run.bat file and add this: [code] deps/GTLVote.jar[/code] * So now it looks like this: [IMG]http://i.imgur.com/06q4T.png[/IMG] * Now compile & run and that should be all.* Remember, this won't work until GTLVote V1.1 is released. [/quote] [/SPOILER] Here's the tutorial for 667/***: [SPOILER=667] [quote] Hello, This is how to set up GTL Vote V1.1 on 667/*** revision servers. * Firstly in Launcher.java -* [code] import org.Vote.*;[/code] * Then still in Launcher.java (right at the top below "public final class Launcher {") [code] public static MainLoader vote = new MainLoader("Host", "User", "Pass", "db");[/code] * Then you can close Launcher.java * Open Commands.java Add this import at the top: [code] import org.Vote.*;[/code] * Still in Commands.java. In your playerCommands add: * [code] case "check": case "reward": try { VoteReward reward = Launcher.vote.hasVoted(player.getUsername().toLowerCase().replaceAll(" ", "_")); if(reward != null){ switch(reward.getReward()){ case 0: //vote id 0 break; case 1: //vote id 1 break; //add more here default: player.getPackets().sendMessage(99, "Reward not found.", player); break; } player.getPackets().sendMessage(99, "Thank you for voting.", player); } else { player.getPackets().sendMessage(99, "You have no items waiting for you.", player); } } catch (Exception e){ player.getPackets().sendMessage(99, "[GTL Vote] An SQL error has occured.", player); } return true;[/code] * * BUT CAREFUL BECAUSE THERE IS ALREADY A CHECK COMMAND!! (It's advised to change that one to "CheckIP") * Now add GTLVote.jar to data/libs (or just your libs folder, which ever you use.). * Compile + done! [/quote] [/SPOILER] And now, the website sided tutorial: [B]1. Download the .ZIP file. 2. Extract it on your website, folder can be called whatever you want (vote, voting, etc..) 3. Enter the link (ex. [URL="http://www.yoursite.com/vote/"]www.yoursite.com/vote/[/URL] and it should redirect you to /vote/install 4. Fill in your database information (Do not use the old database, you must create a new for V1.1) 5. Click on Submit, fill your settings, click on submit, fill the voting links (Don't forget to read the comment boxes), click on submit, fill your Reward list & click on Submit. 6. You've now installed your GTLVote V1.1 on website.[/B] Your website must allow Remote MySQL (We recommend a webhost with cPanel) If you have cPanel on your webhost, but don't know how to set up "Remote MySQL". Then follow this tutorial: [B]1. Login to your cPanel on your website. ([URL]http://yoursite.com/cpanel[/URL]) 2. You'll see a search field on the left side, type "Remote MySQL" in the field. 3. It should show this: [URL]http://i.imgur.com/6JeTS.png[/URL] 4. Click on the icon and you will see a page like this: [URL]http://i.imgur.com/3J9fE.png[/URL] 5. In the field, you'll have to write your server IP and then click on "Add Host" 6. Your MySQL should have been allowed to be remoted by your server, which let's the server use your website's mysql.[/B] [COLOR=#808080][COLOR=#ADD8E6]If you're using Xampp on the same computer as your server, then it's fine. You'll just have to type the correct MySQL information. If you're using 000Webhost, this would not work. 000Webhost does NOT allow Remote MySQL. That's why we are planning on opening "[URL="http://gamingtoplist.net/forums/index.php?/topic/28-gtlhosting/"]GTLHosting[/URL]".[/COLOR][/COLOR] [B][U]Remember:[/U][/B] If you are using RuneLocus callback, put your callback url on RuneLocus to "http://yoursite.com/vote/php/callback.php" And on RuneToplist, put the callback url to "http://yoursite.com/vote/php/callback.php?callback=" Have any questions? Please post below. Thanks, Zerak.
×