Jump to content

Search the Community

Showing results for tags 'database'.



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 21 results

  1. Ziek`

    avDariR.jpg

    1. Cart

      Cart

      WeirdChamp

    2. Ziek`

      Ziek`

      This is a 100% real screenshot from MSN days

    3. Ziek`

      Ziek`

      I also have

       kDaDoS0.png

  2. Hello! I am looking for a file containing RuneLocus's entire item database. Is it open to the public? If not, why not release a copy? I have been looking for an item database that contains valuable information about items and which equipment slot they pertain to, if any. Fortunately RuneLocus provides just that, but I cannot find an open source of the database. It was extremely painful to create a program with 10 worker threads to grab a substantial amount of the information I needed only to be halted because of too many connections being made. If anyone has any resources on equipment slot information they can provide, please let me know. Or, if RuneLocus does provide a copy of the database. If this is not the correct section then please feel free to either direct me or have the thread directed personally.
  3. [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
  4. Sometimes while browsing the forums and I click a link I [I]randomly[/I] encounter a DB error. I do not know what causes this error, but here is what it looks like [img]http://i.imgur.com/FQK1nRO.png[/img]
  5. I get this error when Im starting my server, the server runs, but the gtlvote doesnt [ATTACH=CONFIG]8456[/ATTACH] Whats the solutiion? I have my Remote MYSQL with the server IP, but something's wrong with my server connecting to the database. I also changed the stuff in Server.Java same as the database info. SomeOne Help pelase <3
  6. Hey, So I noticed that there are multiple databases or multiple user tables... In my opinion, this is kind of annoying... Having 2-3 different accounts within 1 website? I had to create a separate username to log in and create a server. I just think there should be a universal user table or even better, 1 database. I know vBulletin makes it's own Database but I believe you guys are beyond capable of creating your own forum ;) Anyways, I just wanted to suggest a single user table or a single database.
  7. Hello everyone, I'm looking to have a DataBase with our server 718 loading 737. We're looking for: [LIST] [*]Must have a forum account to play the game; [*]Usergroup will be changed though ACP; [*]MCP/ACP will be the only option to ban a player; [/LIST] It's your offer. I'm not going first unless you're trusted. Here's my Skype: Sabrinaa.Dreamer Thanks you.:gg:
  8. [3/3/13 4:49 AM]: java.sql.SQLException: No suitable driver found for websiteip [3/3/13 4:49 AM]: at java.sql.DriverManager.getConnection(Unknown Source) [3/3/13 4:49 AM]: at java.sql.DriverManager.getConnection(Unknown Source) [3/3/13 4:49 AM]: at server.util.Highscores.process(Highscores.java:20) [3/3/13 4:49 AM]: at server.Server.main(Server.java:162) I have checked if i entered the wrong details, but everything is right with info of mysql databases on my webhosts cpanel... I'm seriously out of ideas..
  9. RuneScape is turning into a better RSPS resource website than Runelocus it self :D It can be found here : [url]http://services.runescape.com/m=itemdb_rs/bestiary/[/url] It will give you ID of NPCs, attack levels, defense, etc.. and maybe there could be a possible way to find out about emote ids ;) Works only on latest Chrome browser.
  10. Ok so I am trying to get SRSCP v4.0 for my site. This has just really stumped me... First I went to my webhost and set up my database.. [IMG]http://i.imgur.com/vkG9W.jpg[/IMG] Then I goto the setup page & fill it out... [IMG]http://i.imgur.com/ofKDa.jpg[/IMG] Then I click submit... [IMG]http://i.imgur.com/Jwfbu.jpg[/IMG] FAIL.... :mad: Can someone please help me?
  11. Lore

    NPC Database?

    I used to use the RuneScape Wiki to find all my monster related needs, such as max hits, health, drops, etc. Now that EoC has hit the entire database (and many others) have completely changed and hardly any of the information is relevant for older servers. Is there somewhere I can go to find a database for NPC? I need max hits, health, drops, pickpocket information, dialogues, okay pretty much everything. Is there any good database with some or all of my needs? Dialogues are pretty much impossible to find so don't worry about that. [URL="http://www.global-rs.com/database/monsters/viewmonster.php?id=5"]This[/URL] for example has older information, but it lacks a lot of useful stuff (such as max hit). [URL="http://runescape.wikia.com/wiki/Man"]This[/URL] is great, but hardly any of the information is relevant for pre-EoC servers.
  12. I have made this because I know that it can be messy and frustrating to perform sql querys. It is easy to use and it should work. Any questions? Pm me about them or post them here. Latest version: [ATTACH]6740[/ATTACH] I did not test all functions as I have made this in like 10 minutes. It's a VERY little and simple tool but really useful to keep your code clean. You can do: [LIST] [*]insert queries [*]update queries [*]get queries [*]custom sql queries (with possible return value) [/LIST] == CHANGELOG == V2: added the condition object (WHERE clause, thanks to [MENTION=11]Daedalus[/MENTION])
  13. [B]A Basic Contact Form Using A MySQL Database[/B] This tutorial will take you through all steps in making a simple contact me/us form that stores the information into a database. This will be a very basic yet fully functional script that you can go on to develop further or I may come back to in a few days/weeks if requested. First we're going to start with the structure of the database table and what each column does/mean. You will need to setup a MySQL database and a user that has privileges to that database first. So our table name for this will be, 'messages'. We will need: [LIST] [*]id (int) [*]name (TEXT) [*]email (VARCHAR) [*]message (VARCHAR) [*]date (DATE) [/LIST] You can run this following script under "SQL" in phpMyAdmin (in your database) [CODE] CREATE TABLE IF NOT EXISTS `messages` ( `id` int(8) NOT NULL AUTO_INCREMENT, `name` text NOT NULL, `email` varchar(100) NOT NULL, `message` varchar(1000) NOT NULL, `date` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; [/CODE] Now that we have our database, database user and table structure up we can begin with our PHP. We will be using a form that is running an action in the same file, so for the form action we use: [PHP]<?php echo $_SERVER['PHP_SELF']; ?>[/PHP] and just as normal we will be using post as the method. The start of the form should look a little like this: [HTML]<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">[/HTML] I've gone ahead and I found a nice, basic style on the web. I won't be explaining anything to do with the style but here's the CSS you can attatch if you want: [CODE] @charset "utf-8"; /* CSS Document */ fieldset { width: 500px; } legend { font-size: 20px; } label.field { text-align: right; width: 100px; float: left; font-weight: bold; } [/CODE] Here's what my whole form looks like, I'll break it down into little parts but remember I'm not talking about the style (or much HTML) in anyway. [HTML] <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <fieldset> <legend>Shipping Address</legend> <label class="field" for="name">Name: </label><input type="text" name="name" /><br /> <label class="field" for="email">Email: </label><input type="text" name="email" /><br /> <label class="field" for="message">Message: </label><textarea cols="40" rows="10" name="message"></textarea><br /> <label class="field" for="submit"><input type='submit' name='submit' value='Submit Form' /></label> </fieldset> </form> [/HTML] The webpage should look somewhat like this: [IMG]http://surreal.raxweb.com/KZONw8.jpg[/IMG] I've already explained the action and method of the form, I'll now take the line for one of the inputs and explain it further: [HTML]<label class="field" for="name">Name: </label><input type="text" name="name" /><br />[/HTML] The above code includes the style, our script will still function if we only were to have: [HTML]Name: <input type="text" name="name" />[/HTML] The input tag is what shows the little input box, type="text" is simply all we need as we're saying that the input is going to hold text and as for name="name" this is how we will go about retrieving the value set in PHP ($_POST['name']). That's about all we need to know for the form, moving on to some PHP. So because we are limiting this done to only one page we need to tell the script when to show certain things, obviously we want to show the form BEFORE it has been submitted. We can do this by checking if the post variable for submit if set ([I]isset[/I]) or not. We can put our form in an [I]if[/I] statement that looks like this. [PHP]<?php if(!isset($_POST['submit'])) { ?> //form in here <?php } ?>[/PHP] So the if statement here is basically saying [I]if[/I] [I]$_POST['submit'][/I] is not set ([I]!isset[/I]) to then display whatever is between [I]{[/I] and [I]}[/I] which in our case is the form. After this our form now looks something like this: [PHP] <?php if(!isset($_POST['submit'])) { ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <fieldset> <legend>Shipping Address</legend> <label class="field" for="name">Name: </label><input type="text" name="name" /><br /> <label class="field" for="email">Email: </label><input type="text" name="email" /><br /> <label class="field" for="message">Message: </label><textarea cols="40" rows="10" name="message"></textarea><br /> <label class="field" for="submit"><input type='submit' name='submit' value='Submit Form' /></label> </fieldset> </form> <?php } ?> [/PHP] Simple, yeah? Now we're onto the part for when AFTER the form is complete. This time we're going to check if all inputs have been set using an [I]if[/I] statement and [I]isset[/I] (lets hope you remember). To check the name, email, message and submit all at once in a single [I]if[/I] statement we can use [I]and[/I]. Here's what I have: [PHP] if(isset($_POST['submit']) and isset($_POST['name']) and isset($_POST['email']) and isset($_POST['message'])) { //code here ?> [/PHP] Still following? That's nearly all of the simple stuff out of the way! To save time and make things easier for us we'll set our post variables to something easier by doing this: [PHP] if(isset($_POST['submit']) and isset($_POST['name']) and isset($_POST['email']) and isset($_POST['message'])) { $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; } [/PHP] Now instead of using $_POST['whatever'] all the time we just use $whatever. To make life even more simple for us we want to set a datetime variable using PHP's [I]date[/I] function. [PHP]$datetime = date("d/m/y : H:i:s", time());[/PHP] This will throw us back something like this: [QUOTE]11/07/12 : 13:36:44[/QUOTE] Pretty self explanatory? d = day, m = month, y = year, H = hours (24), i = minutes and s = seconds. Have a play around with it and you'll understand it all better. Before we get onto PDO/SQL here's what your script should look like so far. [HTML] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css.css" type="text/css" rel="stylesheet" /> <title>Surreal's Basic MySQL Contact Form</title> </head> <body> <?php if(!isset($_POST['submit'])) { ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <fieldset> <legend>Shipping Address</legend> <label class="field" for="name">Name: </label><input type="text" name="name" /><br /> <label class="field" for="email">Email: </label><input type="text" name="email" /><br /> <label class="field" for="message">Message: </label><textarea cols="40" rows="10" name="message"></textarea><br /> <label class="field" for="submit"><input type='submit' name='submit' value='Submit Form' /></label> </fieldset> </form> <?php } if(isset($_POST['submit']) and isset($_POST['name']) and isset($_POST['email']) and isset($_POST['message'])) { $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $datetime = date("d/m/y : H:i:s", time()); } </body> </html> [/HTML] Now, using PDO is the fun part :D. A good read up on PDO can be found [URL="http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/"]here at TutsPlus[/URL]. For what we're doing today with just inserting your PDO code will end up looking a bit like this: [PHP] try { $dbh = new PDO("mysql:host=localhost;dbname=database_name", "database_user", "database_password"); $insert = $dbh->exec("INSERT INTO messages (name, email, message, date) VALUES ('$name', '$email', '$message', '$datetime')"); $dbh = null; } catch(PDOException $e){ echo $e->getMessage(); } [/PHP] To learn more about PDOException go [URL="http://php.net/manual/en/class.pdoexception.php"]here[/URL]. Okay so time to explain all this. The first line: [PHP]$dbh = new PDO("mysql:host=localhost;dbname=database_name", "database_user", "database_password");[/PHP] dbh stands for "Database Handle", you don't need to use dbh but I guess it's just best practice, you'll find most people will as you can easily identify it. [CODE]mysql:host=localhost;dbname=database_name", "database_user", "database_password[/CODE] The above is all stuff that we have to change/configure according to our web server/database. The host, in 90% of cases is localhost. There are some web hosts such as 000webhost that may have it different. dbname is simply the database that you would've created at the start. For cPanel users it looks something like cpanellogin_database. "database_user" is simply the username that you granted privileges to the database at the very start. Again for cPanel users it looks similiar to cpanellogin_user. "database_password" this should require any explanation what-so-ever. Simply the password to the database user. So that's all for the connection. Yay! [PHP]$insert = $dbh->exec("INSERT INTO messages (name, email, message, date) VALUES ('$name', '$email', '$message', '$datetime')");[/PHP] So this is simply executing (exec) a SQL query through our connection ($dbh). [CODE]INSERT INTO messages[/CODE] The code above means that it's going to enter information that is following the columns. We left out id as id is going to automatically increment +1 for each entry. [CODE](name, email, message, date)[/CODE] The above is the columns that we want to insert data into, the order is, of course important. [CODE]VALUES ('$name', '$email', '$message', '$datetime')[/CODE] Remember how we set our post variables to something simpler? Well here they are! VALUES is simply giving the values in which they will be imported into the opposing column. name was the first column so the string/information the user originally inputted into the form and which we saved as $name will be inserted into that column as they are both first, then email and $email and so on... The final thing we MUST remember to do is to close the connection, for PDO we simply add the following line under our query('s). [PHP]$dbh = null;[/PHP] This will kill the connection. Wohooo! We've made it! Now you have a very basic contact form that stores the information into your database. You can edit this script further to maybe add a CAPTHCA/anti-bot or there's a wide range of features that can be added using the skills learned in this tutorial! Here's the finished script so you can check over incase of any errors/mistakes you may have made: [PHP] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css.css" type="text/css" rel="stylesheet" /> <title>Surreal's Basic MySQL Contact Form</title> </head> <body> <?php if(!isset($_POST['submit'])) { ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <fieldset> <legend>Shipping Address</legend> <label class="field" for="name">Name: </label><input type="text" name="name" /><br /> <label class="field" for="email">Email: </label><input type="text" name="email" /><br /> <label class="field" for="message">Message: </label><textarea cols="40" rows="10" name="message"></textarea><br /> <label class="field" for="submit"><input type='submit' name='submit' value='Submit Form' /></label> </fieldset> </form> <?php } if(isset($_POST['submit']) and isset($_POST['name']) and isset($_POST['email']) and isset($_POST['message'])) { $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $datetime = date("d/m/y : H:i:s", time()); try { $dbh = new PDO("mysql:host=localhost;dbname=database_name", "database_user", "database_password"); $insert = $dbh->exec("INSERT INTO messages (name, email, message, date) VALUES ('$name', '$email', '$message', '$datetime')"); $dbh = null; } catch(PDOException $e){ echo $e->getMessage(); } } ?> </body> </html> [/PHP] This tutorial took me a bloody long time so feedback will be hugely appreciated! I actually didn't get the chance to test this yet but will do soon/tomorrow. Any mistakes you see be sure to tell me! :D Thank you :)
  14. Blackmark.java [CODE]package com.rs.game.Punishment; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import com.rs.Settings; import com.rs.game.player.Player; import com.rs.utils.Utils; /** * * @author Taylor<Axter> * */ public class Blackmark { /** * Cunstructor ads a blackmark to a players 'record' * @param player * @param reset */ public Blackmark(final Player player, final boolean reset) { if (reset) { player.BlackMarks = 0; player.out("<col=ff0000>Your black marks have been reset.", 0); return; } player.BlackMarks +=1; if (needMute(player)) { player.setMuted(Utils.currentTimeMillis() + (player.getRights() >= 1 ? (48 * 60 * 60 * 1000) : (1 * 60 * 60 * 1000))); player.out("<col=ff0000>You have been muted due to to many reports. If you feel this is a mistake,", 0); player.out("<col=ff0000>please visit " + Settings.WEBSITE_LINK + "", 0); } else if (needIPMute(player)) { player.setMuted(Utils.currentTimeMillis() + (player.getRights() >= 1 ? (48 * 60 * 60 * 1000) : (1 * 60 * 60 * 1000))); } else if (needBan(player)) { try { new Blackmark(player, false); BufferedWriter bf = new BufferedWriter(new FileWriter( "Needed Banned/" + player.getDisplayName() + " Ban.txt", true)); bf.append("=================================================="); bf.newLine(); bf.write("Current BlackMarks: "+ player.getBlackMarks() + ""); bf.newLine(); bf.write("Offence: " + player.offence + ""); bf.newLine(); bf.write("Rank: " + player.getRank() + ""); bf.newLine(); bf.write("Type: Ban"); bf.newLine(); bf.write("Status: " + player.getReportLevel(player.getBlackMarks(), player) + ""); bf.newLine(); bf.append("=================================================="); bf.newLine(); bf.flush(); bf.close(); } catch (IOException ignored) { } } else if (needIPBan(player)) { try { new Blackmark(player, false); BufferedWriter bf = new BufferedWriter(new FileWriter( "Needed Banned/" + player.getDisplayName() + " Ban.txt", true)); bf.append("=================================================="); bf.newLine(); bf.write("Current BlackMarks: "+ player.getBlackMarks() + ""); bf.newLine(); bf.write("Offence: " + player.offence + ""); bf.newLine(); bf.write("Rank: " + player.getRank() + ""); bf.newLine(); bf.write("Type: IP Ban"); bf.newLine(); bf.write("Status: " + player.getReportLevel(player.getBlackMarks(), player) + ""); bf.newLine(); bf.append("=================================================="); bf.newLine(); bf.flush(); bf.close(); } catch (IOException ignored) { } } } /** * Determines if he or she needs to be muted * @param player * @return */ public boolean needMute(Player player) { if(player.getOffence().equals("chat") && player.getBlackMarks() == 5) { return true; } return false; } /** * Determines if he or she needs to be muted * @param player * @return */ public boolean needIPMute(Player player) { if(player.getOffence().equals("chat") && player.getBlackMarks() == 10) { return true; } return false; } /** * Determines if he or she needs to be banned * @param player * @return */ public boolean needBan(Player player) { if(player.getOffence().equals("non-chat") && player.getBlackMarks() == 5) { return true; } return false; } /** * Determines if he or she needs to be banned * @param player * @return */ public boolean needIPBan(Player player) { if(player.getOffence().equals("non-chat") && player.getBlackMarks() == 10) { return true; } return false; } } [/CODE] Report.java [CODE]package com.rs.game.Punishment; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.util.Calendar; import com.rs.game.player.Player; /** * * @author Taylor<Axter> * */ public class Report { /** * Sends a report out to a folder named "Report Database". * The report will contain the following information: * * Current BlackMarks: (players blackmarks) * Offence: (The offence) 2 options, "chat" or "non-chat". no others will work. * Status: (players current status) Example: Green Zone * * @param player * @param offence */ public Report(Player player, String offence) { try { new Blackmark(player, false); player.offence = offence; BufferedWriter bf = new BufferedWriter(new FileWriter( "Report Database/" + player.getDisplayName() + " Offences.txt", true)); bf.append("=================================================="); bf.newLine(); bf.write("Current BlackMarks: "+ player.getBlackMarks() + ""); bf.newLine(); bf.write("Offence: " + offence + ""); bf.newLine(); //bf.write("Other details: " + details + ""); //bf.newLine(); bf.write("Status: " + player.getReportLevel(player.getBlackMarks(), player) + ""); bf.newLine(); bf.append("=================================================="); bf.newLine(); bf.flush(); bf.close(); } catch (IOException ignored) { } } } [/CODE] [CODE]/** * Report system * * @return */ public int getBlackMarks() { return BlackMarks; } private int BlackMarks; private String offence; public String getOffence() { if (offence == null) { return "none"; } return offence; } public String getReportLevel(int BlackMarks, Player player) { switch (BlackMarks) { case 0: return "Safe (0 black marks)"; case 1: return "Green Zone"; case 2: return "Yellow Zone"; case 3: return "ORANGE ZONE"; case 4: return "RED ZONE"; case 5: return "" + player.getOffence().equals("chat") != null ? "Muted(chance to recover)" : "Banned(chance to recover)"; case 6: return "EXTREME RED ZONE"; case 7: return "EXTREME RED ZONE (Requires $5)"; case 8: return "EXTREME RED ZONE (Requires $10)"; case 9: return "EXTREME RED ZONE (Requires $15)"; case 10: return "(Requires $25)"; case 11: return "(Requires $30)"; case 12: return "(Requires $40)"; case 13: return "permanently " + "" + player.getOffence().equals("chat") != null ? "Muted" : "Banned"; } return "permanently " + "" + player.getOffence().equals("chat") != null ? "Muted" : "Banned"; } [/CODE] if the offence = chat, its mute. if the offence = other, it's banned. If there are any problems, let me know. And by problems i mean PROBLEMS, BUGS not "How do i send a report". Enjoy
  15. Ok so we have our vote4cash all set up. But we can't connect to our MYSQL because the people that made the base already had theirs connected :( Please someone help us over TV, reply and PM if you can help us!!!!!!
  16. i wanted a sql file with the auth code maker can any 1 help me?
  17. ampx

    One: Chat AI

    Hey guys! Its been awhile since Ive been on here but I thought this would be the best place to get some suggestion on a project. I coded the whole thing myself (about two hours) and just used a free-domain. Anyways, I got home yesterday and started messing around with siri on a 4s and liked the whole idea around AI's. So I decided to make a little Chat AI on a free domain. I have no knowledge of how to program ai's so instead I just wanted to make a database system where you ask it something and it looks for the response if it doesn't have a response it asks the user. So the more users the more it know pretty simple... I just whipped this up in an hour or so its not pretty and very young(27 records in the database) but its actually pretty addicting. Here it is:[URL="http://oneai.co.cc"]http://oneai.co.cc[/URL] I'm really looking for some suggestions to improve it! Thanks!
  18. I get this error when I compile my source. I checked and server.database and server.database.DatabaseConnection both exist. Please help? Btw I'm using InsidiaX source [IMG]http://i1127.photobucket.com/albums/l635/CaMzGB/untitled.png[/IMG]
  19. Can any1 get me databases for that? i need to make a hiscores and vote4 cash working, already got server sided but now i need database for MySQL, can any1 make it and post it here? For hiscores, heres my hiscores saving file [CODE]package com.rs2hd; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import com.rs2hd.model.Player; import com.rs2hd.model.Skills; public class Hiscores { public static Connection con = null; public static Statement stmt; public static boolean connectionMade; public static void createConnection() { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection( "jdbc:mysql://localhost", "root", "####"); stmt = con.createStatement(); } catch (Exception e) { } } public static ResultSet query(String s) throws SQLException { try { if (s.toLowerCase().startsWith("select")) { ResultSet rs = stmt.executeQuery(s); return rs; } else { stmt.executeUpdate(s); } return null; } catch (Exception e) { destroyConnection(); } return null; } public static void destroyConnection() { try { stmt.close(); con.close(); } catch (Exception e) { } } public static boolean saveHighScore(Player player) { try { Statement st = con.createStatement(); Skills skills = player.getSkills(); int val2 = st.executeUpdate("DELETE FROM `hiscore` WHERE username = '"+player.getDisplayName()+"';"); int val = st.executeUpdate("INSERT INTO `hiscore` (`playerName`, `lvl`, `xp`, `rights`) VALUES ('"+player.getDisplayName()+"', '"+skills.getLevel(0)+" :"+skills.getLevel(1)+" :"+skills.getLevel(2)+" :"+skills.getLevel(3)+" :"+skills.getLevel(4)+" :"+skills.getLevel(5)+" :"+skills.getLevel(6)+" :"+skills.getLevel(7)+" :"+skills.getLevel(8)+" :"+skills.getLevel(9)+" :"+skills.getLevel(10)+" :"+skills.getLevel(11)+" :"+skills.getLevel(12)+" :"+skills.getLevel(13)+" :"+skills.getLevel(14)+" :"+skills.getLevel(15)+" :"+skills.getLevel(16)+" :"+skills.getLevel(17)+" :"+skills.getLevel(18)+" :"+skills.getLevel(19)+" :"+skills.getLevel(20)+" :"+skills.getLevel(22)+" :"+skills.getLevel(21)+" :"+skills.getLevel(23)+"', '"+skills.getXp(0)+" DefenceXP:"+skills.getXp(1)+" StrengthXP:"+skills.getXp(2)+" HitpointsXP:"+skills.getXp(3)+" RangedXP:"+skills.getXp(4)+" PrayerXP:"+skills.getXp(5)+" MagicXP:"+skills.getXp(6)+" CookingXP:"+skills.getXp(7)+" WoodcuttingXP:"+skills.getXp(8)+" FletchingXP:"+skills.getXp(9)+" FishingXP:"+skills.getXp(10)+" FiremakingXP:"+skills.getXp(11)+" CraftingXP:"+skills.getXp(12)+" SmithingXP:"+skills.getXp(13)+" MiningXP:"+skills.getXp(14)+" HerbloreXP:"+skills.getXp(15)+" AgilityXP:"+skills.getXp(16)+" ThievingXP:"+skills.getXp(17)+" SlayerXP:"+skills.getXp(18)+" FarmingXP:"+skills.getXp(19)+" RunecraftingXP:"+skills.getXp(20)+" ConstructionXP:"+skills.getXp(22)+" HunterXP:"+skills.getXp(21)+" SummoningXP:"+skills.getXp(23)+"', '"+player.getRights()+"');"); System.out.println("Inserting highscores done."); } catch (SQLException s){ System.out.println("SQL statement is not executed!"); } return true; } } [/CODE] And vote database heres my file: [CODE]package com.rs2hd.packethandler; import java.sql.*; import java.security.MessageDigest; public class MYSQL { public static Connection con = null; public static Statement stm; public static void createConnection() { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost/vote_db", "root", "#####"); stm = con.createStatement(); } catch (Exception e) { e.printStackTrace(); } } public static ResultSet query(String s) throws SQLException { try { if (s.toLowerCase().startsWith("select")) { ResultSet rs = stm.executeQuery(s); return rs; } else { stm.executeUpdate(s); } return null; } catch (Exception e) { System.out.println("MySQL Error:"+s); e.printStackTrace(); } return null; } public static void destroyCon() { try { stm.close(); con.close(); } catch (Exception e) { e.printStackTrace(); } } public static boolean checkVotes(String playerName) { try { Statement statement = con.createStatement(); String query = "SELECT * FROM Votes WHERE username = '" + playerName + "'"; ResultSet results = statement.executeQuery(query); while(results.next()) { int recieved = results.getInt("recieved"); if(recieved == 0) { return true; } } } catch(SQLException e) { e.printStackTrace(); } return false; } public static boolean voteGiven(String playerName) { try { query("UPDATE Votes SET recieved = 1 WHERE username = '" + playerName + "'"); } catch (Exception e) { e.printStackTrace(); return false; } return true; } }[/CODE]
  20. Hello, I have been seeing many scams for people programming for money, So I thought I would create a website that would hopefully prevent these scams from happening! Website is 100% Free ofcourse and you can find programmers there. It has a database in it, which holds programmers with trust, not so much anymore but hopefully will be alot when more people apply. the database shows details we judge on the programmer, We will put them through a test after they grade themself and we see if they match the level and if so we will grade them on their programming, speed to finish, and list what base they use (Maybe multiple) contact email and we will leave a description on all. [url]http://rspsdata.elementfx.com/[/url] If you apply you will also be given the chance to earn cash faster, be first to apply, members will see YOU first. We will get a domain soon :) Thank you Legacy508!
  21. i got database info from a forum and idk what to do with it? how can i gain the admin's password?
×