Jump to content

Search the Community

Showing results for tags 'tutorial'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start



Found 115 results

  1. Hello everyone, this is a basic tutorial for new coders learning how to get started when coding 718 Server. This is simply a Tutorial on how to get yourself going when Coding your own 718. I will Make sections in this tutorial you can jump to instead of reading threw all of it. I will be covering the Following Areas -Downloading Jdk and jre7 -Finding a Source to begin with -Making yourself Admin/Owner -Setting up a new Home/Xp Rates/Name and so on -Changing locations of Npc's/Adding items to Shops/Editing prices. -Making Custom Titles -Creating New Ranks - How To Add Bonus XP To Donator Ranks Downloading Jdk and Jre7: if (username.equalsIgnoreCase[/CODE] and change the name to yours once again. Secondly- You wil want to go to Commands.java once you are there scroll down threw the commands you will see some commands as this - if (cmd[0].equalsIgnoreCase("killall") && player.getUsername().equalsIgnoreCase("daniel")) {[/CODE] and some like this - [CODE]if (cmd[0].equalsIgnoreCase("donorshop")) {[/CODE] now basically what these mean is that because the 1st code has a name attached to the command only that person can perform that command which is very handy for ;;god and such. the 2nd command i have shown has no name attached so any admin can perform that command. go threw each command and change "Daniel" to your name or if you want all admins to use it just remove the : [CODE] && player.getUsername().equalsIgnoreCase("daniel"[/CODE] Allways hit save and compile. then run and you wil have admin rights in game. i no for a few such as " Lost Realm and a few others" you wil need to type ;;admin. and wil set you admin in game. [/Spoiler] Setting up a new Home/Xp Rates/Name and so on [B]Changing Server name & Home-[/B] This is pretty simple basic stuff, Firstly go to [B]Settings.java[/B] and you will see this [CODE]public static final String SERVER_NAME = "TEXT";[/CODE] after that change "TEXT" to the name you have selected for your rsps. simple and done. Scroll down to - [CODE]public static final WorldTile START_PLAYER_LOCATION = new WorldTile[/CODE] when you see that you wil see coords for the current home simply change the coords to which location you want to be home, to do so find the location you want and type ;;coords or ;;mypos ingame then press ` and it wil open the Developers Console and wil tell you, your current coords. then simply change the rest of the locations to the new one you have chosen. You wil also see Skilling xp rate, that is the xp rate your players wil recieve, you can lower or raise it to your liking. if you are making a Eco based Server i do Recommend the Skilling xp to be rather low. [/Spoiler] Changing locations of Npc's/Adding items to Shops/Editing prices. [B]Changing Npc's Location-[/B] now this can be a Drag Different for each server.. for most it wil be [B]npcspawning.java[/B] same as changing home you will want to find the coords for the new locations you want your npc's to be at, once you got coords id suggest writing them down so when you go to change there all there ready to change. simply just change the location to the coords as such - [CODE]World.spawnNPC(494, new WorldTile(2724, 3486, 0), -1, true, true);[/CODE] For me its completely different i go to [B]unpackedspawnlist.txt[/B] scroll down should find something like this - [CODE]//home shops[/CODE] under that will be Npc's Id's and coords simply edit the coords to the ones you written down so that npc wil be moved to the location you choose. once done hit save, ( Now always remeber once you pack npc's you need to search for "PackedSpawns" folder delete the folder, hit compile save your work and run, now you have moved home and your npc's. [B]Editing items within shops-[/B] This is allways a fun one to do, basically you are editing what items you want in a shop, go to [B]unpackedshops.txt[/B] you will see several rows containing - [CODE]1 995 true - Herb Store - 199 50000 201 500000 203 500000 [/CODE] pretty basic stuff 995 = You can only buy with gp. Herb Store = Store name 199-50000 = the id of the item and how many and just Repeat. [B]Editing Shop Prices[/B] - Allways a hassle to do.. but needs to be covered, Shops.java is were all of the Prices will be for your items in any shop, Basically you need to open up [B]Shop.java[/B] once you are there, you will need to scroll down or search the following photo : [IMG=http://i.imgur.com/J3GxOCQ.png] So basically "GetbuyPrice" anything under that is the Buy price. so if you added the following Code : [CODE]case 1739://cowhide item.getDefinitions().setValue(10000); break;[/CODE] Case 1739 = the item id and //Cowhide is obviously the name of the item. Now as for .setValue(10000); the 10000 is how much you want that item to buy for, and as always break; to end it. As for Selling prices Same deal except you are going to want to add it all under [IMG=http://i.imgur.com/Yw5ZMmd.png] Pretty simple but can be confusing to some people. Making Custom Titles I have allready Explained in Detail on how to Make Custom titles, please follow the link Provided for more information. [URL="http://www.runelocus.com/forums/showthread.php?91729-Custom-Titles-amp-Colours"]http://www.runelocus.com/forums/showthread.php?91729-Custom-Titles-amp-Colours[/URL] Creating new Ranks I have allready made a Detail Tutorial on how to create a new Rank please use the Following link for more Information [URL="http://www.runelocus.com/forums/showthread.php?94171-New-Ranks-In-Depth"]http://www.runelocus.com/forums/showthread.php?94171-New-Ranks-In-Depth[/URL] How To Add Bonus XP To Donator Ranks Hello, This is a quick tutorial on how to add bonus XP to Different donator ranks, such as ( Donators, Extreme Donators, and Vip Donators. It's fairly simple process, I will explain how to do it, and what it all means. Firstly Go to Skills.java, you can find this by going to, src-com-rs-game-player then scroll down to the bottom and it will be there. Now search for this line of code [IMG=http://i.imgur.com/QcmoS0O.png] once you are there you should see something like this: [IMG=http://i.imgur.com/RlDtDpJ.png] If you don't have this, then your donators wont receive bonus XP , so add this piece of code in underneath [CODE]if (skill != ATTACK && skill != DEFENCE && skill != STRENGTH && skill != MAGIC && skill != RANGE && skill != HITPOINTS) exp *= [B][COLOR="#000000"]player.isDonator[/COLOR][/B]() ? Settings.SKILLING_XP_RATE + 1 : Settings.SKILLING_XP_RATE; else exp *= player.isDonator() ? Settings.COMBAT_XP_RATE + 3 : Settings.COMBAT_XP_RATE;[/CODE] Basically, it will operate from your skilling XP rate in settings.java, then for donators you add your Bonus XP such as the ( +1 ) and it's the same for combat XP rate, this will only work for [B][COLOR="#000000"]Donators[/COLOR][/B] since we have made it as [B][COLOR="#000000"]player.isDonator[/COLOR][/B]. If you want to add more XP or lower XP for different ranks such as Extreme donators for example you would add the same line of code such as : [CODE]if (skill != ATTACK && skill != DEFENCE && skill != STRENGTH && skill != MAGIC && skill != RANGE && skill != HITPOINTS) exp *= player.isDonator() ? Settings.SKILLING_XP_RATE + 5 : Settings.SKILLING_XP_RATE; else exp *= player.is[B][COLOR="#000000"]ExtremeDonato[/COLOR][/B]r() ? Settings.COMBAT_XP_RATE + 3 : Settings.COMBAT_XP_RATE;[/CODE] Be sure to make it as Extreme Donators and not Donators, you can do this for every rank you desire, you can increase XP and Combat XP, or Decrease XP and higher Combat XP, there are a few Different ways of doing this, this is one of the most efficient ways to do this. If you have any questions feel free to let us know in the comments below! If you have any questions or any issues feel free to Contact me, or Make a help thread, Hopefully this updated Tutorial will help more people out when starting a 718 Server. If you would like another Tutorial on how to do something feel free to contact me and ill make a detail guide on it. Cheers
  2. Hello there, I wanted to post a tutorial here today for the people who are suffering with their Cache' It can be hard to understand it, it sure took me a while... So, I want to teach you guys how to change your "Cache Path" There are multiple servers still as of today, that are using C:/ as their path and are having major problems with it. This method here will make your client work with a MAC OS X as well, not to mention that, it will also locate the Cache if placed in your (C:/ Or Users.home) I have a Macbook pro and sometimes I prefer to use that for coding via (Eclipse) So I have modified this to work with MAC. Anyways, enough with the chit chat :p and back to work! [Files we will be working on today: [Signlink.java] [Client Sided] [Difficulty: 1.5/10] First thing you want to do is: 1. Open Your Client Folder, 2. Locate (Signlink.java) In Your Client Files. 3. Open File (Signlink.java) With Notepad Or Notepad++ (Preferably Notepad++ ) (Mac users use: "Sublime Text 2 Or TextEdit") 4. Once Opened, Search For: " public static String findcachedir() " 5. Once Found, Keep In Mind That Your "Code" Will Most Likely Will Be Different, But usual PI's like: Lost Leg, InsidiaX, Hyperion, Deathly will have C:/ and some Users.home. Anyways, You're going to find 2 Codes on some 3. You Can Scroll Down Slowly From " public static String findcachedir() " And Eventually You Will Find: " public static String sencondDir() { " And On Some Servers You Might Have A Third One, If You Do It Should Be Right Under " public static String sencondDir() { " It's Called: " public static String findcachedirORIG() " And If You Don't Have That It's Fine, We Will Be Adding It Today... 6. Replace All 2, If You've Found 3, Then Change/Replace All 3 Codes With These Below: (FYI) The 3 Codes Are: [CODE] 1. public static String findcachedir() 2. public static String sencondDir() { 3. public static String findcachedirORIG() [/CODE] The New Codes You Will Be Replacing The Old Ones With: [CODE] public static String findcachedir() { boolean exists = (new File(System.getProperty("user.home") + "/YourCacheNameHere/")).exists(); if (exists) { return System.getProperty("user.home") + "/YourCacheNameHere/"; } else { File f = new File(System.getProperty("user.home") + "/YourCacheNameHere/"); f.mkdir(); return System.getProperty("user.home") + "/YourCacheNameHere/"; } } public static String sencondDir() { File file = new File("c:/YourCacheNameHere/"); if (!file.exists()) file.mkdir(); return file.toString(); } public static String findcachedirORIG() { String as[] = { "c:/windows/", "c:/winnt/", "d:/windows/", "d:/winnt/", "e:/windows/", "e:/winnt/", "f:/windows/", "f:/winnt/", "c:/", "~/", "/tmp/", "", "c:/rscache", "/rscache" }; if(storeid < 32 || storeid > 34) storeid = 32; String s = ".file_store_" + storeid; for(int i = 0; i < as.length; i++) try { String s1 = as[i]; if(s1.length() > 0) { File file = new File(s1); if(!file.exists()) continue; } File file1 = new File(s1 + s); if(file1.exists() || file1.mkdir()) return s1 + s + "/"; } catch(Exception _ex) { } return null; } [/CODE] Now this should work with most PI's ... Remember this only shows/teaches you how to change your "Cache Path, IN: SIGNLINK.JAVA" It has nothing to do with your (Cache Downloader) If you have any errors, please post below and I will try to help you out. I hope this helps you guys! Good luck!
  3. [IMG]http://rspserver.com/images/motivote.png[/IMG] Download at [URL="http://www.runelocus.com/forums/showthread.php?102928-Ultimate-Vote-Script-Motivote-(SERVER-amp-WEBSITE)"]http://www.runelocus.com/forums/showthread.php?102928-Ultimate-Vote-Script-Motivote-(SERVER-amp-WEBSITE)[/URL] [SIZE=1]Note: This can be applied to any server, RL just forced me to use a thread prefix.[/SIZE] So I made [URL="http://www.runelocus.com/forums/showthread.php?102928-Ultimate-Vote-Script-Motivote-(SERVER-amp-WEBSITE)"]Motivote[/URL] pretty easy to install, right off the bat. The only real tricky part is going to be writing the code that gives the user the reward, but I've made that as simple as I can make it. [url]https://www.youtube.com/watch?v=GhOyPmwqw1s[/url] [LIST=1] [*]Create a MySQL database, user, and give the user as many privileges as you can. [*]Extract Motivote-(WHATEVER CURRENT VERSION IS)-web.rar and upload the contents into a directory on your website. I'd use /vote/. [*]Set permissions on config.php to 0777. If you don't, the script will tell you what to put in config.php by yourself. [*]Visit [url]http://yoursite.com/vote/[/url] and enter the installation information and just follow the steps. [*]MAKE SURE YOU SAVE YOUR [B]SERVER DATA CALLBACK KEY[/B] AND YOUR [B]ADMIN CONTROL PASSWORD[/B]! [/LIST] [IMG]http://i.imgur.com/pQSpAJP.png[/IMG] [I][COLOR="#FF0000"][B]Then, for the server installation, include Motivote-(current version).jar in your build path.[/B][/COLOR][/I] [SIZE=1]For PI, here's the method I added in PlayerHandler.java: [url=http://pastebin.com/T6Vvcvvd]Add to PlayerHandler.java - Pastebin.com[/url][/SIZE] Create RewardHandler.java: [CODE]import server.model.players.Client; import server.model.players.Player; import server.model.players.PlayerHandler; import com.rspserver.motivote.MotivoteHandler; import com.rspserver.motivote.Reward; public class RewardHandler extends MotivoteHandler<Reward> { [MENTION=15855]Over[/MENTION]ride public void onCompletion(Reward reward) { int itemID = -1; if (reward.rewardName().equalsIgnoreCase("gold")) { itemID = 995; } // SOME OF THIS CODE WILL BE DIFFERENT FOR YOUR SERVER, CHANGE IT ACCORDINGLY. everything to do with motivote will stay the same! if (PlayerHandler.isPlayerOn(reward.username())) { Player p = PlayerHandler.getPlayer(reward.username()); if (p != null && p.isActive == true) // check isActive to make sure player is active. some servers, like project insanity, need extra checks. { synchronized(p) { Client c = (Client)p; if (c.getItems().addItem(995, reward.amount())) { c.sendMessage("You've received your vote reward! Congratulations!"); reward.complete(); } else { c.sendMessage("Could not give you your reward item, try creating space."); } } } } } }[/CODE] Add where you initialize/start everything else: [CODE]new Motivote(new RewardHandler(), "http://yoursite.com/vote/", "server data callback key").start();[/CODE] [IMG]http://i.imgur.com/nB5EdTn.png[/IMG] Really, it's that easy. If you have any issues, just post a reply and I'll try and sort them out to the best of my ability. Thanks!
  4. RSPS Tutorials for 317 Servers available from the link Below :D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D [url]http://adf.ly/v4tQD[/url] P.S. These Tutorials where made by me, and, I hope you Subscribe
  5. I'm wanting to get into RSPS Making, and of course like any other person wanting to start, I HAVE NO CLUE WHAT IM DOING I'm pretty good about learning shit, I just need somewhere to start. I have been searching the downloads section, and google , and I've been searching for a source + client that's pretty original. I want something a learner can handle, It just seem like all the one's I find have custom garbage on them, and ect. Also I need to understand terms and the process of doing certain things within my server. Like I need a guide that tells me what stuff is in the folders I download. I'm trying not to be one of those typical noobs at rsps making who ask how to do everything, step by step, I'm going to fuck shit up, trying to teach myself, but that is the fun in it :) I don't know where to find a tutorial explaining what is what, I'm not a programmer, but I'm very interested, and I thought that learning how to code a rsps would be a fun way to learn. But I'm NEW. I don't know what stuff is when I open up a source I downloaded, terms such as Bin, Data, Deps, src, .classpath, .project, compile.bat, run.bat, and the deeper stuff within those files. What does each stand for, what goes in, what can't go in these files, which files communicate with which files(does changing 1 affect another?) dumb stuff like that I don't understand I tried googling these terms, but I can't find anything. Just was curious if anyone knew anywhere that listed stuff, a guide, or tutorial, or anything like this, I'm sure i'm not the only one who has ever asked something like this, there's gotta be something. If anyone could help it's much appreciated! P.S. I'm new to these forums, sorry If I posted this in the wrong section, or whatever :p
  6. Hello everybody. I have put too many hours into researching how to add a new skill to my server and it's impossible. So here I am posting on some forums. I don't have skills.java...or skillguides.java...I can't find anything to do with my skills except in client.java server sided. ALL I want to do is change the NAME of my skill. I understand how to edit old skills...(for example my new skill is what firemaking WAS, it's called smoking) and I have all of that worked out. My problem, guys is I can't get the icon to say "SMOKING" instead of "firemaking" or "firemaking XP" when you hover the cursor over it. I changed the picture, I remade the entire skill I just can't change that it says "firemaking" so please somebody help me out here PKPlanet Source/Bluurs Client...thank you for your time.
  7. What's the best forums software for a RSPS? You may be asking yourself this question when working on your Runescape Private Server. In today's age we have hundreds of forum software solutions each one offering different features. With all the different forum solutions how do you choose the right one for your situation? Are you looking for something more user friendly? Something that looks professional? Something that can integrate and connect to your RSPS with ease? We're going to give you a few possible forum solutions and some information to get you started! vBulletin - $249.00 When people are looking at high end forum solutions they most likely run into vBulletin first. This is said by many to be the most popular and most functional forums solution in the industry. It has a large amount of themes, plugins and modifications to go along with it so it makes it extremely easy to modify to the forum owners taste. All this will cost you $249.00 for a brand new copy of vBulletin. If you're looking for the mobile suite bundle, It's going to cost you 399.00 but this will give you added functionality and allow your website to not only run smoothly on desktops but mobile devices like the iPhone as well. For someone who has a Runescape Private Server that is just starting out this may not be the best solution, a lot of people look at illegal nulled versions of vBulletin but this is very dangerous to do. Often when people null this software they add backdoors that allow them to hack into any website running the nulled version very easily. Not only will this be a pain for you but you're putting your players safety and personal information at risk as well. If you have the money, vBulletin in a great solution, if you're short on money keep reading to check out some of the free solutions. Invision Power - $175 Invision power was initially created in 2002. It didn't really start to gain popularity until around 2009. This is when people started to realize that vBulletin wasn't the only solution when it came to high quality forums software. A lot of people are drawn to Invision Power due to it's sleek design and a admin friendly control panel. Due to it being user friendly for both the users and the administrators it's a very popular pick when it comes to forums software for Runescape Private Servers. Starting at $175 for the self hosted license it's around $50.00 cheaper then vBulletin. The price difference alone draws many new customers to this solution. Additionally they have different apps you can purchase that will give your forums more functionality. Just like vBulletin you're going to want to stay away from any type of nulled versions of Invision Power. They've been known to have nasty backdoors that give hackers a way to get into your website. Invision Power maybe $50.00 cheaper then vBulletin but for many people it's still too much for the average person starting out, next we're going to go over some free forums solutions. MyBB - Free MyBB is the most popular free forums software, the development team is constantly working hard to bring the users security patches and updates. The support forums is very active with a constant stream of people submitting new plugins, themes as well as modifications daily. The support forums has nearly 1,000,000 posts as of May 21, 2014 which just goes to show how active and dedicated the community is to making it the best open source forums software around. The free price tag gives you no reason not to use it, you don't have to worry about backdoors being added. MyBB has plenty of free themes and a whole part of the website is dedicated to sharing themes, plugins and modifications. MYBB is a very good solution for Runescape Private Server owners who want to have a good forums but aren't ready to shell out hundreds of dollars for it. Simple Machines Forums - Free Simple Machines forums is another free open source forums solution. In the most recent years it has been loosing popularity in the Runescape Private Server community but it's still a good solution for anyone who is looking for free forums software. The forums has over 3,000,000 posts which show how active it is yet but we're afraid to say that SMF peaked in 2008-2009 and the website traffic and statistics just go to show that. Even though the glory days are over for SMF the amount of themes, plugins and modifications for it are absolutely ridiculous. Anything that you can think of, SMF has a plugin and or modification to do that. The user and admin interface is outdated, but still easy to use and overall it's a solid piece of software. Missed One? So what is the best forums software for a RSPS? It all comes down to personal preference, everyone likes a different solution which is why we have so many different types of forums software. If you think we've missed a piece of forums software feel free to let us know in the comments.
  8. Hello people of Runelocus! I have to be honest, I don't use this site too much. But I have a tutorial I though might be useful to add on here. So in this tutorial, I have created a greegree system which at the moment is bug free. It handles all kinds of cases such as wearing items, removing items, performing emotes, or logging out with a greegree equipt. So here it is: The first thing to do is add this Greegree.java class in the same folder as Player.java: [CODE]package server.model.players; import server.model.players.Player; /** * Contains data for using monkey greegrees. * @author Chex * */ public class Greegree { public static enum MonkeyData { SMALL_NINJA(4024, 1480, 1386, 1380, 1381, 1383, -1), LARGE_NINJA(4025, 1481, 1386, 1380, 1381, 1383, -1), MONKEY_GUARD(4026, 1482, 1401, 1399, 1400, 1402, 1403), BEARDED_MONKEY_GUARD(4027, 1483, 1401, 1399, 1400, 1402, 1403), BLUE_FACE_MONKEY_GUARD(4028, 1484, 1401, 1399, 1400, 1402, 1403), SMALL_ZOMBIE(4029, 1485, 1386, 1382, 1381, 1383,-1), LARGE_MONKEY(4030, 1486, 1386, 1382, 1381, 1383, -1), KARAMAJA_MONKEY(4031, 1487, 222, 219, 220, 220, 221); int greegreeID, npcID, standAnim, walkAnim, runAnim, attackAnim, blockAnim; private MonkeyData(int greegreeID, int npcID, int standAnim, int walkAnim, int runAnim, int attackAnim, int blockAnim) { this.greegreeID = greegreeID; this.npcID = npcID; this.standAnim = standAnim; this.walkAnim = walkAnim; this.runAnim = runAnim; this.attackAnim = attackAnim; this.blockAnim = blockAnim; } public int getGreegreeID() { return greegreeID; } public int getNpcID() { return npcID; } public int getStandAnim() { return standAnim; } public int getWalkAnim() { return walkAnim; } public int getRunAnim() { return runAnim; } public int getBlockAnim() { return blockAnim; } public int getAttackAnim() { return attackAnim; } public static MonkeyData forId(int id) { for (MonkeyData data: MonkeyData.values()) if (data.greegreeID == id) return data; return null; } public static boolean isWearingGreegree(Player p) { return MonkeyData.forId(p.playerEquipment[Player.playerWeapon]) != null; } public static boolean isAnim(int animId) { for (MonkeyData data: MonkeyData.values()) if (data.attackAnim == animId || data.blockAnim == animId) return true; return false; } } public static boolean attemptGreegree(Player p, int weaponID) { int targetSlot = p.getItems().targetSlot(p.getItems().getItemName(weaponID).toLowerCase()); if (MonkeyData.forId(weaponID) == null && targetSlot != Player.playerWeapon && MonkeyData.isWearingGreegree(p)) { p.sendMessage("You can't equipt that while wearing a greegree."); return false; } MonkeyData data = MonkeyData.forId(weaponID); if (MonkeyData.isWearingGreegree(p) || data != null) { if (data != null) { setAnimations(p, data); } else { resetAnimations(p); } p.gfx100(359); return true; } return true; } public static void setAnimations(Player p, MonkeyData data) { p.npcId2 = data.getNpcID(); p.isNpc = true; p.playerStandIndex = data.getStandAnim(); p.playerWalkIndex = data.getWalkAnim(); p.playerRunIndex = data.getRunAnim(); p.playerTurnIndex = data.getWalkAnim(); p.playerTurn180Index = data.getWalkAnim(); p.playerTurn90CWIndex = data.getWalkAnim(); p.playerTurn90CCWIndex = data.getWalkAnim(); p.getPA().requestUpdates(); } public static void resetAnimations(Player p) { p.npcId2 = -1; p.isNpc = false; p.getPA().resetAnimation(); p.gfx100(359); } public static boolean attemptRemove(Player p, int slot) { if (slot == Player.playerWeapon && MonkeyData.isWearingGreegree(p)) { resetAnimations(p); } else if (slot != Player.playerWeapon && MonkeyData.isWearingGreegree(p)) { p.sendMessage("You can't remove items while wearing a greegree."); return false; } return true; } }[/CODE] [b]NOTE:[/b] If you don't have a method called targetSlot() in ItemAssistant.java, replace this method in Greegree.java: [CODE]public static boolean attemptGreegree(Player p, int weaponID) { int targetSlot = Item.targetSlots[weaponID]; if (MonkeyData.forId(weaponID) == null && targetSlot != Player.playerWeapon && MonkeyData.isWearingGreegree(p)) { p.sendMessage("You can't equipt that while wearing a greegree."); return false; } MonkeyData data = MonkeyData.forId(weaponID); if (MonkeyData.isWearingGreegree(p) || data != null) { if (data != null) { setAnimations(p, data); } else { resetAnimations(p); } p.gfx100(359); return true; } return true; }[/CODE] [b]NOTE:[/b] If your server used Client.java, replace all the (Player p, ...) in the methods in Greegree.java with (Client p, ...) Good. Now open up ItemAssistant.java Add this import at the top of the file: [CODE]import server.model.players.Greegree;[/CODE] Now find this: [CODE]public boolean wearItem(int wearID, int slot) {[/CODE] Add this under synchronized(c) { [CODE]boolean greegree = Greegree.attemptGreegree(c, wearID); if (!greegree) return false;[/CODE] In the method (it should be near the very end), find: [CODE]c.getCombat().getPlayerAnimIndex(c.getItems().getItemName(c.playerEquipment[Player.playerWeapon]).toLowerCase());[/CODE] and right above that add: [CODE]if (!greegree)[/CODE] Now we need to handle removing the greegree from the equipment tab. In the same class (ItemAssistant.java), find this: [CODE]public void removeItem(int wearID, int slot) {[/CODE] Now under the synchronized(c) { add this: [CODE]boolean greegree = Greegree.attemptGreegree(c, wearID); if (!greegree) return false;[/CODE] So now you are done...the next part is adding the attack and block animations for combat. Open up CombatAssistant.java Add this import at the top of the file: [CODE]import server.model.players.Greegree.MonkeyData;[/CODE] Find this method: [CODE]public int getWepAnim(String weaponName) {[/CODE] Right under that add: [CODE]MonkeyData data = MonkeyData.forId(c.playerEquipment[Player.playerWeapon]); if (data != null) return data.getAttackAnim();[/CODE] Now find this method: [CODE]public int getBlockEmote() {[/CODE] and under that add: [CODE]MonkeyData data = MonkeyData.forId(c.playerEquipment[Player.playerWeapon]); if (data != null) return data.getBlockAnim();[/CODE] Done. Now open Player.java Add this import at the top of the file: [CODE]import server.model.players.Greegree.MonkeyData;[/CODE] Now find: [CODE]public void startAnimation(int animId) {[/CODE] Under that line add: [CODE]if (MonkeyData.isWearingGreegree(this) && !MonkeyData.isAnim(animId)) { return; }[/CODE] That makes sure you can only do certain emotes as a monkey. Now if your server uses Client.java, open it otherwise stay in Player.java and find: [CODE]public void initialize() {[/CODE] In that method, find: [CODE]getCombat().getPlayerAnimIndex(getItems().getItemName(playerEquipment[playerWeapon]).toLowerCase());[/CODE] Now put this right under it: [CODE]Greegree.attemptGreegree(this, playerEquipment[playerWeapon]);[/CODE] That makes sure when you log in and have a greegree equipt, you will be the monkey. [b]NOTE:[/b] If you used Client.java, you need to add this import: [CODE]import server.model.players.Greegree;[/CODE] Thats it! If you have any questions or there are any bugs, please let me know in the comments. Thanks for reading!
  9. Hey, In this tutorial we're going to be: [LIST] [*]Adding PK Points (so they save) [*]Making it so when a player kills someone they obtain PK Points [*]A few examples on how you can add more point systems to your server. [/LIST] Alright, so first off we're going to make PKP Save on the characters file, so what we're going to want to do is go into our servers folder and edit the PlayerSave.java file (Server.Model.Players). Now we're going to press CTRL + F to search the document for this line: [CODE]} else if (token.equals("magic-book")) {[/CODE] underneath [CODE]} else if (token.equals("magic-book")) { [COLOR="#FF0000"]p.playerMagicBook = Integer.parseInt(token2);[/COLOR][/CODE] We're going to add: [CODE]} else if (token.equals("pk-points")) { p.pkPoints= Integer.parseInt(token2);[/CODE] Your code should now look like: [CODE]} else if (token.equals("magic-book")) { p.playerMagicBook = Integer.parseInt(token2); } else if (token.equals("pk-points")) { p.pkPoints= Integer.parseInt(token2);[/CODE] What we've just added is the loading for PK Points, so PKPoints is our integer that's automatically set to 0 when we create a new account (as you will see on step 3), what this does is makes the server know that PkPoints loads as PK-points. Step 2) in the same file search for [CODE]characterfile.write("teleblock-length = ", 0, 19);[/CODE] the same way we did as before (CTRL+F), you should see: [CODE]characterfile.write("teleblock-length = ", 0, 19); characterfile.write(Integer.toString(tbTime), 0, Integer.toString(tbTime).length()); characterfile.newLine();[/CODE] Underneath [CODE][COLOR="#FF0000"]characterfile.newLine();[/COLOR][/CODE] we're going to add: [CODE]characterfile.write("pk-points = ", 0, 12); characterfile.write(Integer.toString(p.pkPoints), 0, Integer.toString(p.pkPoints).length()); characterfile.newLine();[/CODE] Your code should now look like: [CODE]characterfile.write("teleblock-length = ", 0, 19); characterfile.write(Integer.toString(tbTime), 0, Integer.toString(tbTime).length()); characterfile.newLine(); characterfile.write("pk-points = ", 0, 12); characterfile.write(Integer.toString(p.PkPoints), 0, Integer.toString(p.PkPoints).length()); characterfile.newLine();[/CODE] What we've just added is saving our Pk Points, what [COLOR="#FF0000"]characterfile.newLine();[/COLOR] what this does is moves the save down to the next line, without this our teleblock timer (example was set to 60 for one second) and we had 40 PK Points would look like this 6040 (that's in seconds). [CODE]characterfile.write("pk-points = ", 0, [COLOR="#FF0000"]12[/COLOR]);[/CODE] the 12 is essential if it's anymore or any less it will crash your server as this tells the server which character slot it saves it in, [CODE]pk-points = [/CODE] is 12 characters in lenght (including the - and spaces). Now, we're going to save this by either doing it normally or pressing CTRL + S to save the file (I'm telling you this incase you're unaware, this also improves efficiency). We're going to open Player.java located in the same area as PlayerSave.java. Press CTRL+F and look for [CODE]pcPoints,[/CODE] after the comma add [CODE] pkPoints,[/CODE] our code should now look like this: [CODE]pcPoints, pkPoints,[/CODE], press CTRL+F now we're all done for PK Points (saving and loading) Adding PkP when killing an player, open PlayerAssistant.java and search for: [CODE]o.sendMessage("You have defeated " + c.playerName + "!");[/CODE] Under that code add: [CODE]o.PkPoints++;[/CODE] Our code should now look like: [CODE]o.sendMessage("You have defeated " + c.playerName + "!"); o.PkPoints++;[/CODE] Save and Compile, you've sucessfully added basic PK Points, I will write a tutorial in the future on how to prevent PKP Boosting.
  10. Tutorial: Determining your host A lot of people may ask this question when it comes to a Runescape private server “Where can I get a cheap host? Or how can I host my server for free?” Well in this little section I am going to try explain your question. Whenit comes to hosting your server, there are a few ways to do it. ·VirtualServers ·Port-forwarding ·Hamachi A virtual server is an online server ran by the host with a dedicated ip and ram. This will allow your players to access your server without having to hassle with Port-forwarding. This server will always be up and usually easy to maintain. They are easily accessible through your control panel on the website. I would suggest picking the closest server to you. That way you will receive a great connection when it comes to the server.If you live in the United States, I would pick any place, as you willget a good connection. If it is slightly out of the United States(Canada) and you live in the United States then you will still be alright. You will receive a good connection. The amount of ram youchoose will depend on the version of Runescape you are running, how customized it is, and how many players you are expecting to have. The higher version of your Runescape private server, the more processes it has to run to keep the server up. I would suggest at least 2GB fora 525+ with custom items. Any 317 leading up to 525 needs at least1GB(1.5GB to be on the safe side.) The more files you have, the morespace you will need on your virtual server. If you plan on making an intense server with several players, and storing additional backups,I would suggest at least 15GB disk space. To be sure you have enough space for your files. Bandwidth is the level of traffic allowed on your network. The more connections that are made to the server, the more bandwidth will be needed. Also, with small servers, the more bandwidth you have, the faster the connection will be for all players. AVOID “unlimited Bandwidth” as much as possible. With these options you can encounter slower connections because it is not metered. The more cores you have on your processor, the faster your server will process. I would go no lower than 2-3 cores for a small server. Port-forwarding is another way to host your server. This consists of allowing people through your network to connect to your host. Connections can/may be a lot slower than if your server is hosted on a virtual server. Often a lot of people have trouble with letting people through their host. As it can be a pain to go through the process and get it just right. The more people on your connection the slower YOUR internet will be. The internet may crash more often than it used too with the connections. Bandwidth is based off of your host and the disk space is based off of where your files are at. The upside to this is that it’s free. Hamachi is a program that gives people easier access through your host through your connection.But the free version only holds 5 people. You must have a good connection on your side for this to work. Many of the downfalls from port-forwarding apply in this method. The connection may often bevery slow. The upside is you don't have to deal with port-forwarding. http://hamachi.en.softonic.com/download Hosts:There are a variety of hosts out there that provide services for virtual servers. Provision Host: ProvisionHost is a well maintained site that hosts MC servers, virtual servers, dedicated servers, and offers web hosting. They have a variety of choices you may choose from when it comes around to renting virtual servers. All of their equipment is near/is the top of the line. They strive for customer satisfaction. They have great customer service. If you need help, just create a ticket. Within 24hours (usually 2-4 Hours) they will respond to your ticket regarding your problem and how to solve it. You may upgrade at any time with barely any hassle. FTP Accessible http://provisionhost.com/ Godaddy: Godaddy gives 3 different operating systems to choose from. Depending on the Operating system you choose, will depend on how many options you have to choose from for prices and plans. They have very little down time and easy management system. High amounts of bandwidth given for heavy traffic and faster connection speed. You are given between 1-3 dedicated ip’s and FTP accessible. If you need help they do offer tech support at any time. They offer other services as well such as web hosting and dedicated servers. http://godaddy.com/ Fragnet: Fragnet is a multi-purpose company. They host many types of servers. They offer 4 low priced plans for virtual servers. Each is slightly better than the other. All of their servers are high-performance servers for the best connections possible. They have backup batteries for their systems in case something happens with their power. They offer high amounts of bandwidth for small and big servers. You are given an online control panel which is where you will control your server.They have 24/7 monitoring to ensure all systems are working properly.They offer a small free mumble server when you buy a server. You can upgrade at any time. You have full FTP access to your server as well.Easy to connect and add files without having to open your browser. http://fragnet.net
  11. [CENTER][FONT=arial black][B]RuneUnited's Autodonation Tutorial Alright, so I had these auto donation files on my hand and decided to release it to everyone so they could make some use of it. You can either follow the tutorial listed below or if you can't figure it out, I can set it up for you for some money (Really helps towards my school tuition). [/B][/FONT] [B]Notes: [/B] [COLOR=#ff0000][B]- I'm tired, it's almost 12 pm, so there is probably spelling errors and possibly 1 or 2 things left out. Let me know.[/B][/COLOR] [/CENTER] [Spoiler=Website Side Tutorial] [B]1.) [/B] -Download the following zip file (Contains all of the website files and a sample server file). [URL="http://up.ht/1hTwlDb"]Download Here[/URL] [B]2.)[/B] Go into your webhost control panel, then navigate to "MySQL Databases". [B]3.)[/B] Once there, create a new database. [B]4.)[/B] Create a new user + password for that database. [B]5.)[/B] Add the user to the database (Bind the user to the database). [B]6.)[/B] Note: Don't forget the DATABASE NAME, DATABASE PASSWORD AND DATABASE USERNAME. Write it down somewhere. [B]7.)[/B] Navigate back to your control panel, then select "phpMyAdmin". [B]8.)[/B] Once done, select the database you've just created. [IMG]http://i.imgur.com/h6snT.png[/IMG] [SIZE=5][B]9.)[/B] Select "Import" near the top.[/SIZE] [IMG]http://i.imgur.com/jtkPZ.png[/IMG] [B]10.)[/B] Browse your computer for the donation.sql file that's in the files I just gave you. [B]11.)[/B] Upload it, then press go. Note: It should have created a "donation" table in your database. [B]12.) [/B]Go to the folder I had you download, then select the website files folder. Edit the file "db.php". [B]13.)[/B] Fill in the necessary information. (Database name, password, username). Leave localhost as is. [B]14.) [/B]Edit paypal.php, then search for "edit to your", which you'll find a space to put in your paypal e-mail. Save all of the files. [B]15.)[/B] Upload all of the "Website Files" into your webhost. Make sure they are all in the same directory. [B]16.)[/B] Go to your control panel once more and select "Remote Mysql". [IMG]http://i.imgur.com/ceOGJ.png[/IMG] [B]17.)[/B] Add the ip to that list that [U][B]Your Server is hosted on[/B][/U]. [/Spoiler] [Spoiler=Server Side Tutorial] [B]Note: You'll need to be an adequate coder in order to complete this.[/B] 1.) In the files that I have supplied you with, take the "DonationManager.java" file and edit it. Here is the part where the term "adequate" comes in. -You'll need to change all the imports to your server imports (Excluding the default java ones). -You'll also need to change every method in the file so it fits the methods in your server. (Example: player.getUsername()) - It might be different in your server so you'll need to change anything else you see. 2.) Insert the file you've changed around into your server files and compile it. (If you get errors, Fix them of course -.-) 3.) You'll need a command so the users can receive their donation. - Go to where you handle your commands and add the import for the donation manager. - Once done, then add the following command: [code] if (cmd[0].equals("::recieve")) { DonationManager.startProcess(player); } [/code] [B]Your done! Refer to the "How to change donation items" spoiler on how to set up your items.[/B] [/Spoiler] [Spoiler=How to change your donation items] [B] 1.)[/B] Start off by selecting index.php in your website files. [B]2.)[/B] Scroll down until you see value options similar to these: [code] <option value="1">10 Donator Points - $5</option> <option value="2">20 Donator Points - $10</option> <option value="3">30 Donator Points - $15</option> <option value="4">50 Donator Points - $20</option> [/code] [B] 3.)[/B] These are the options (In order) that show up on your "Select Donation Item" page. 4.) Simply change around whichever ones you want and put the price so they know how much it is. Note: Make sure the numbers are in order and none are listed twice. [B]5.)[/B] Save your file, then open paypal.php [B]6.)[/B] Scroll down until you see some things similar to this: [code] $price = '3.00'; if($_GET['prod'] == 1) $price = '5'; if($_GET['prod'] == 2) $price = '10'; if($_GET['prod'] == 3) $price = '15'; if($_GET['prod'] == 4) $price = '20'; if($_GET['prod'] == 5) $price = '30'; [/code] [B]7.)[/B] To change the price of each of your items, simply look at the value id that is listed in your index.php (The number next to your item name) [B]8.)[/B] So let's look at this example above: if ($_GET['prod'] == 1) which means if the value id is == 1 then the price will be $5. Simply change the values or add more to satisfy your needs. [B]Make it so that it adds the items into your server:[/B] [B]1.)[/B] Open up your DonationManager.java file [B]2.)[/B] Scroll down until you see this or something similar: [code] if(checkDonationItem(player.getUsername()) == 1) { //Productid 1 [/code] [B]3.)[/B] This is saying that if the product id (Or value id, Note: remember you used the value id to set the price, it's the same thing). [B]4.)[/B] Simply edit the coder under the first product id to give the items for that value. Note: DO NOT REMOVE THIS FROM EACH PRODUCT ID STATEMENT: [code] donationGiven(player.getUsername()); [/code] [/Spoiler]
  12. [CENTER][video=youtube;sPwdsgSK2_Y]https://www.youtube.com/watch?v=sPwdsgSK2_Y[/video][/CENTER]
  13. [CENTER][video=youtube;jAz1qdzYVsQ]https://www.youtube.com/watch?v=jAz1qdzYVsQ[/video][/CENTER]
  14. [CENTER][Tutorial] How to change the mybb theme background [video=youtube;i491kIy-UTc]https://www.youtube.com/watch?v=i491kIy-UTc[/video][/CENTER]
  15. When we're talking about websites this one question always seems to pop up no matter what type of website you're working on. Time and time again people ask the same question "How To Make A Website SEO Friendly?" and time and time again they give up on SEO as they think it's too hard. I'm going to give you the basics of Search Engine Optimization and why it's extremely important for your Runescape Private Server. [B]What’s SEO? [/B] SEO is the abbreviated version of Search Engine Optimization. When people refer to SEO they’re most likely talking about Search Engine Optimization. SEO is the process of positively affecting the rank of a web page on search engines. e.g (Google, Bing, Yahoo). This is most commonly done to increase the amount of visitors a web page receives. The better the SEO is on the given website the more likely the website will show up for a certain term e.g (Runescape Private Server). Every website owner is aiming for the number one spot for the terms they want to rank for. It’s important you optimize the website in the right way as if a rsps came up number one when someone types in pizza places they’re going to have an issue. They may get visitors but the visitors won’t be interested in the product the rsps is offering . This brings us to our next point which is keywords. [B]Keywords[/B] A keyword is basically a term that someone will type into Google. For instance, when people are looking for a Runescape Private Server they’ll type of 317 rps, this is known as a keyword. A keyword can be a word, a sentence, two sentences and so on. The more common the keyword the harder it is to rank for the given keyword. When you’re looking at potential keywords you want to target Google the given keyword and scout out the competition. When you’re trying to rank for lets say “Connect an RSPS to a website” you would use something called keyword stuffing which is outlined below. [B]Keyword Stuffing [/B] Keyword stuffing is when you use the keyword you’re targeting multiple times in one document. If you’re using the keyword too much Google will pick up on that and may not rank the given document, if you use it too little then Google may not find the document at all. You need to make sure that you’re using the keyword in a natural way so that way you’re ranked for the keyword but we don’t get penalized for it. This is called Keyword density. [B]Why does my RSPS need SEO? [/B] When people are creating an RSPS they usually look towards traditional forms of advertising such as buying ads on websites and paying for spots. An up side about SEO is that it's completely free to do. Not only will it help you get more visitors but it gives you a better chance for survival in the long run as not only will you have players coming in from toplists but also from Google. Do you see the big picture yet? [B]How do I get started? [/B] When you're getting started on making your website or RSPS SEO friendly I would start by downloading a SEO plugin if you're using a CMS or forums software. You do this by typing in this in your websites HTML. Include this code in the header. [CODE]<meta name="description" content="This is what will show up in the description of your website for search results. Edit this"> [/CODE] If you're wondering why we didn't include meta keywords it's because in the newest Google update they stopped using them to determine ranking, this makes them nearly useless to use. [B]Conclusion[/B] I hope we didn't give you too much information at once! If you have any comments or suggestions on this article we'd be glad to hear them in the comments below.
  16. Hey, I'm Envo and I manage the Runelocus content team. We've just started to create tutorials this week and we're reaching out to the Runelocus community to try to determine what types of tutorials people want. We're going to try to do every request that we get as we want to show the Runelocus community that we care about members. We have a team of 6 people currently that are highly skilled in the RSPS scene we can cover any topics that come our way. If you'd like to request a tutorial please fill out the form? Interested in signing up to be a part of our amazing content team? [URL="http://www.runelocus.com/forums/forumdisplay.php?153-Content-Team-Applications"]Click here[/URL] [CODE]Type of tutorial: Revision (If any): Why is it needed?: Notes: [/CODE]
  17. The following tutorial teaches you how to perform basic communication tasks to and from a server using the Structured Query Language (SQL) from either your java application, rsps server, or website. Some things this might be useful for: displaying number of players online on your website, sending important player data to an sql server for safe keeping, updating player's ranks on your forum from your server, and even a start to creating your own vote, highscores, or donation system. Pre-Requisites to Reading this thread: [LIST] [*]Know how to create an SQL database on your website or computer. [*]Know how to add a new table to your database along with adding columns to that table. [*][URL="http://echopx.com/how-to/create-mysql-database-in-cpanel"]Here's a link[/URL] incase you don't know how to do either of those. [/LIST] The two languages we'll be working with today are Java and PHP. Both have internal libraries that handle the execution of SQL related processes. [SIZE=4][U][B]PHP Section:[/B][/U][/SIZE] As said above, php offers SQL libraries to help communicate with your chosen database. This is very commonly used for systems such as forums, blogs, keeping user information, ect. [B]Sending Information using PHP: [/B][INDENT]In the below example, we create a php variable named con and apply an sql connection to it using the mysql_connect method provided by PHP. The parameters for this function is (connection IP address, the database username, the database password), which are all strings. Most leave the connection IP as localhost since their database is located on the same server as what they're running the script off of, but some might change it to a different IP depending if their database is external or not. [/INDENT] [code]<?php $con = mysql_connect("localhost", "DATABASE_USERNAME", "DATABASE_PASSWORD"); if (!$con) { die("Could not connect to database: " . mysql_error()); } mysql_select_db("DATABASE_NAME", $con); mysql_query("INSERT INTO people (name, age) VALUES ('Tommy ', 33)"); mysql_close($con); ?> [/code][INDENT]After applying the connection, we check to see if everything is alright. If the connection contains errors, we simply call the die() method, which in other terms 'exists'. By calling the mysql_error() method when calling an exit to the page, we can grab whatever the error was in the connection. Usually, it's because you didn't type the username or password correctly, so make sure all your credientials are correct! Next, we select a database to use from our server. The method mysql_select_db(your database name, the connection variable) selects the chosen database. If all went well, you're 100% connected to your database using SQL. Next, let's say you want to add something to your table in your database. The mysql_query function can be used for many different edits to your database, like editing, retrieving, adding, deleting, ect, but for this tutorial, we're going to cover just inserting and retrieving. [/INDENT] [code] mysql_query("INSERT INTO people (name, age) VALUES ('Tommy ', 33)"); [/code][INDENT]The above code is basic syntax for inserting information into your database table. INSERT INTO is followed by your table name inside your database. Keep in mind that everything is case sensitive. Following your table name is a parameter container for the columns that your table owns. In this example, my table 'people' has 2 columns, which are name and age. The name in my database is a varchar and the age is an integer. Followed by the column names is the keyword VALUES, then a container for the values. Also keep in mind that the values are in order the same as (name, age). Finally, we call mysql_close to exit the connection (although it's not really needed for this small of a script, since the connection automatically ends at the end of a script). [/INDENT] [B]Recieving Information using PHP:[/B] [code]<?php $con = mysql_connect("localhost", "DATABASE_USERNAME", "DATABASE_PASSWORD"); if ([SIZE=2]!$con) { die("Could not connect to database: " . mysql_error()); } [FONT=arial]mysql_select_db("DATABASE_NAME", $con); $data = mysql_query("SELECT * FROM people") or die(mysql_error());[/FONT][/SIZE][FONT=arial] [/FONT] while ($person = mysql_fetch_array($data)) { echo $person['name']; echo $person['age']; } mysql_close($con); ?> [/code][INDENT]The above code connects to the database just like before, but this time we're using the mysql_query in a different way. Following the SELECT keyword, we put a * to indicate grab all. This is then followed by the FROM keyword, then the name of our table. What this does is select all the rows from our table called 'people'. The variable $data now holds all the rows listed in our table (if any). Next, we loop through our data using the mysql_fetch_array($data) method. While inside the loop, we can obtain certain columns from each row recieved. For example, if you just wanted to get the persons age from the row, you would take the iterated variable, which is $person followed by ['column name']; You might be wondering, well what if I don't want to get all the rows, what if I want to search for someone's name? [/INDENT] [code] $data = mysql_query("SELECT * FROM people WHERE name='George'") or die (mysql_error()); [/code][INDENT]Using the above query will select all rows from the table where the column name is equal to "George". It could potentially return n results depending on how many "George" there are in the table. [/INDENT] [SIZE=4][U][B]Java Section: [/B][/U][/SIZE][INDENT]As stated before, Java also contains a set of useful utilities for sending and recieving information to a database using SQL. Below is an example of a Java class that uses SQL functions. [/INDENT] [code] import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class SQL { private static Connection con = null; private static Statement stmt; public static void createConnection() { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); String IP="WEB HOST IP"; String DB="DATABASE NAME"; String User="DATABASE USERNAME"; String Pass="DATABASE PASSWORD"; con = DriverManager.getConnection("jdbc:mysql://"+IP+"/"+DB, User, Pass); stmt = con.createStatement(); } catch (Exception e) { e.printStackTrace(); } } public static void process() { createConnection(); ResultSet results = statement.executeQuery("SELECT * FROM people WHERE name='George'"); while(results.next()) { String name = results.get("name"); } statement.executeQuery("DELETE FROM `people` WHERE name='GEORGE'"); destroyConnection(); } private static void destroyConnection() { try { stmt.close(); con.close(); } catch (Exception e) {} } } [/code][INDENT]The above code is very similiar to what I showed you in the PHP section, there's essentially just different names for the functions. Executing a query, as you can see, uses the same concepts from the PHP section. Since they're almost the same, I'm going to let you explore the functions Java has to offer. If you use an IDE (such as eclipse), you can view all the functions in the sql package. Mostly all of them that I know of are well documented on the [URL="http://docs.oracle.com/javase/6/docs/api/java/sql/package-summary.html"]oracle website[/URL] if you want to take a look. [/INDENT] [B]Some Sample Scripts: [/B][SPOILER="Sample Scripts"] The below script recieves the amount of players online stored in a database. It also checks to see if the server is online using fsockopen(); [code] $query = mysql_query ("SELECT * FROM status WHERE world = '1'") or die(mysql_error()); $status = false; $players = 0; while($row = mysql_fetch_array($query)) { $players = $row['players']; $timestamp = $row['timestamp']; //will use in future $host = "SERVER IP"; //only handles world 1 right now, need handle for future worlds. $port = "43594"; $connection = @fsockopen($host, $port); if (is_resource($connection)) { $status = true; //server online fclose($connection); } else { $status = false; //server offline } } [/code] [/SPOILER] Again, this is just a basic coverage of SQL communication, seening as there's a lot more content. I've done a basic version, because I feel like the RSPS community doesn't nessisarily need such advanced SQL material. Most of what you're doing is simply related to easy executions for voting, donations, and keeping small data. If you want to learn more, feel free to check out documentation, or send me a message.
  18. [B]This is a very simple and basic highscores system. It does not include the feature to view an individual player's statistics. It's purpose it just to provide those new to coding a system which shows general rankings of players. The system is entirely made from previous highscore scrips made for the RSPS community. Yes, this is very similar to my Auto-Donation tutorial, but that's only because the website integration side is basically the same thing. I do not take credit for the stylesheet. Some professional designer made it. [/B] To start, please download the following zip file: [URL]http://uppit.com/tvqw9pjfb37p/Highscores.zip[/URL] Functions.php: [URL]http://pastie.org/9016856[/URL] [SPOILER="Website Side"] [B]1.) Start by navigating to your web-host control panel and clicking on "Mysql Databases". [/B] [IMG]http://i.imgur.com/UJFQq5S.png[/IMG] [B]2.) Once there, create a new database. [B]3.) Create a new user + password for that database. [B]4.) Add the user to the database (Bind the user to the database). [B]5.) Note: Don't forget the DATABASE NAME, DATABASE PASSWORD AND DATABASE USERNAME. Write it down somewhere. [/B][/B][/B][/B][COLOR=#ff0000]Important note: Your name and username might say something like website_highscores where 'website' is part of your website name. That whole thing is your database name, not just highscores.[/COLOR] [B]6.) Navigate back to your main control panel, then select "phpMyAdmin" which should be right next to the Mysql Databases button you previously clicked in the first step. [B]7.) Once done, select the database you've just created. [/B][/B] [IMG]http://i.imgur.com/QuoW9SE.png[/IMG] [B]8.) If done correctly, it should add a bunch of tables into your database (such as attackxp or skills, ect). 9.) Navigate back to your control panel home once again and go to your file manager. Upload all of the website files to a directory of your choice (I would suggest creating a folder called "highscores" or "hs" in your main public directory). 10.) Once uploaded, find mysql.php in yourhighscoresdirectory/assets/mysql.php 11.) Edit the database information on the top to the correct information (the credentials you created the database with). [/B] [B]12.) Remaining in mysql.php go down to where it says:[/B] [code] $website = "/cody"; [/code] [B]and change /cody to whatever directory your highscores is located in. For example: [URL]http://yoursite.com/hs[/URL] or /hs 13.) Visit your highscores page to see if everything is functioning properly. If it is, you'll see NO error messages anywhere on the screen. 13.) Go back to your cpanel home and go to "Remote Mysql" which is located right next to php my admin that you clicked earlier. It will ask you to enter an IP to whitelist. Enter your server VPS IP. If you've done everything correctly and have gotten no errors, you're done with the website side. [/B] [/SPOILER] [SPOILER="Server Side"] [B]1.) In the file you downloaded there's a folder called "Server Files". Click on that and copy the Highscores.java file into your server. 2.) Open it up and change the database credentials once again (just like you did in mysql.php). 3.) You'll probably get a lot of errors towards the bottom of the file in the 'saveHighscore(Player player)' method. This is because the methods for getting the player's level and xp are different across server revisions. To fix this, you'll need to change them to how your server gets player skill information. For example: right now, the syntax in the file is:[/B] [code] player.getSkills().getXp(0); [/code] [B] but in YOUR server, it might be:[/B] [code] player.getStats().getExperience(0); [/code] [B]You'll have to change it accordingly. 4.) To save a player's highscore, simply call the method [/B] [code] Highscores.saveHighscore(player); [/code] [/SPOILER] After you're done, your highscores will look like this (players not included). [IMG]http://img841.imageshack.us/img841/8972/hsql.png[/IMG]
  19. This is sort of a "hack" of sorts to the original bland vote4cash around today. What this one does is, uses Javascript to hide the input username feild until the user clicks on 5 other links, once they have clicked on the links they will have to wait 30 seconds and then it will open the input field. If you guys don't like this I honestly don't give a shit. [url=http://forgivenx.com/vote/vote.php/]LIVE DEMO[/url] PHPCODE: [code]<?php /** * @author Stuart <RogueX | iVariable> * @version 1.1 UPDATED: 06.09.2010 * @comment fixed a few bugs */ /** * mysql database hostname */ define("MYSQL_HOST", "localhost"); /** * mysql username to connect to the database server */ define("MYSQL_USERNAME", "MYSQLUSER"); /** * mysql password the password to connect to the database server */ define("MYSQL_PASSWORD", "MYSQLPASS"); /** * mysql database the database name in which you have your vote table setup */ define("MYSQL_DATABASE", "MYSQLDATABASE"); /** * vote url this is the url which where users will be sent to on voting */ define("VOTE_URL", "FINALVOTING URL"); /** * The number of hours between voting */ define("VOTE_HOURS", 24); /** * connect() this function is used to connect to the mysql database server. */ function connect() { if ([email protected]_connect(MYSQL_HOST, MYSQL_USERNAME, MYSQL_PASSWORD)) die("Could not connect to mysql database: " . mysql_error()); if ([email protected]_select_db(MYSQL_DATABASE)) die("Could not select mysql database: " . mysql_error()); $tables = mysql_list_tables(MYSQL_DATABASE); while (list($temp) = mysql_fetch_array($tables)) { if ($temp == "votes") { return; } } query("CREATE TABLE `votes` ( `playerName` VARCHAR( 255 ) NOT NULL , `ip` VARCHAR( 255 ) NOT NULL, `time` BIGINT NOT NULL , `recieved` INT( 1 ) NOT NULL DEFAULT '0')"); } /** * query(string query) this function is used to query the mysql database server. */ function query($s) { $query = @mysql_query($s); if (!$query) die("Error running query('" . $s . "'): " . mysql_error()); return $query; } /** * anti_inject(string text) this function is used to make sure no injections can be made. */ function anti_inject($sql) { $sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"), "", $sql); $sql = trim($sql); $sql = strip_tags($sql); $sql = addslashes($sql); $sql = strtolower($sql); return $sql; } /** * clean_request(int timestamp, string username) this function is used to delete any entries if they have already expired. */ function clean_request($time, $username) { $query = query("SELECT * FROM `votes` WHERE `playerName`='" . $username . "'"); if (mysql_num_rows($query) > 0) { $row = mysql_fetch_array($query); $timerequested = $row['time']; if ($time - $timerequested > VOTE_HOURS * 3600) query("DELETE FROM `votes` WHERE time='" . $timerequested . "'"); } } /** * vote_entries(string ip) this function is used return the number of rows within the table */ function vote_entries($ip) { $query = query("SELECT * FROM `votes` WHERE ip='" . $ip . "'"); return mysql_num_rows($query); } /** * This is the actual working of the script please do not touch anything below if you do not know what you are doing... */ if (isset($_POST['submit']) || isset($_GET['username']) && isset($_GET['type'])) { connect(); if ($_POST['submit']) { if(@fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 1)) die("Sorry but you have port 80 open, this is to stop voting by proxy address."); if(isset($_COOKIE['voted'])) die("Sorry but it looks like you have already voted..."); $username = anti_inject($_POST['username']); $ip = gethostbyaddr($_SERVER['REMOTE_ADDR']); clean_request(time(), $username); if (vote_entries($ip) == 0) { setcookie ("voted", "yes", VOTE_HOURS * 3600); query("INSERT INTO `votes` (`playerName`, `ip`, `time`) VALUES ('" . $username . "', '" . $ip . "', '" . time() . "')"); header("Location: " . VOTE_URL . ""); } else { die("You have already voted once today."); } } elseif ($_GET['type'] == "checkvote") { $username = anti_inject($_GET['username']); $query = query("SELECT * FROM `votes` WHERE `playerName`='" . $username . "'"); if (mysql_num_rows($query) == 1) { $results = mysql_fetch_array($query); if ($results['recieved'] == 0) { query("UPDATE `votes` SET `recieved`='1' WHERE `playerName`='" . $username . "'"); die("user needs reward..."); } else { die("user been given reward..."); } } else { die("Vote not found... ". $username ."."); } } } ?> <html> <head> <title>ForgivenX: Vote4Cash</title> <style type="text/css"> body { background-color: #111111; font-family:Arial; } .link { cursor:pointer; color: #037; text-decoration: underline; } .link:hover { color: #3300FF; } .link-done { cursor:pointer; color: #037; text-decoration: line-through; } .link-done:hover { color: #3300FF; } #container { background-color: #222222; height: auto; width: 500px; padding: 5px; border: 1px solid #333333; margin: 0 auto auto auto; -moz-box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; box-shadow: 0 0 5px #000000; } #help { background-color: #222222; height: auto; width: 500px; padding: 5px; border: 1px solid #333333; margin: 0 auto auto auto; -moz-box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; box-shadow: 0 0 5px #000000; } </style> <script type="text/javascript"> var timer; var timeLeft = 30; var voted1 = false; var voted2 = false; var voted3 = false; var voted4 = false; var voted5 = false; function clickedLink(button) { switch(button) { case 1: voted1 = true; javascript:window.open('SITE1.com', '60', 'left = 20, top = 20, width = 800, height = 600, toolbar = 0, resizable = 0, scrollbars=1'); document.getElementById("vote1").setAttribute("class", "link-done"); break; case 2: voted2 = true; javascript:window.open('SITE2.com', '60', 'left = 20, top = 20, width = 800, height = 600, toolbar = 0, resizable = 0, scrollbars=1'); document.getElementById("vote2").setAttribute("class", "link-done"); break; case 3: voted3 = true; javascript:window.open('SITE3.com', '60', 'left = 20, top = 20, width = 800, height = 600, toolbar = 0, resizable = 0, scrollbars=1'); document.getElementById("vote3").setAttribute("class", "link-done"); break; case 4: voted4 = true; javascript:window.open('SITE4.com', '60', 'left = 20, top = 20, width = 800, height = 600, toolbar = 0, resizable = 0, scrollbars=1'); document.getElementById("vote4").setAttribute("class", "link-done"); break; case 5: voted5 = true; javascript:window.open('SITE5.com', '60', 'left = 20, top = 20, width = 800, height = 600, toolbar = 0, resizable = 0, scrollbars=1'); document.getElementById("vote5").setAttribute("class", "link-done"); break; } setSitesLeft(); if (voted1 && voted2 && voted3 && voted4 && voted5) { startCountDown(); document.getElementById('statusText').style.display = 'none'; } } function startCountDown() { timer = setInterval("doCountDown();", 1000); document.getElementById('timerText').style.display = 'block'; } function doCountDown() { document.getElementById('timeLeft').innerHTML = timeLeft; timeLeft = (timeLeft - 1); if (timeLeft <= 0) { document.getElementById('links').style.display = 'none'; document.getElementById('voted').style.display = 'block'; clearTimeout(timer); } } function setSitesLeft() { var count = 5; if (voted1) { count = (count - 1); } if (voted2) { count = (count - 1); } if (voted3) { count = (count - 1); } if (voted4) { count = (count - 1); } if (voted5) { count = (count - 1); } document.getElementById('sitesLeft').innerHTML = count; } </script> </head> <body> <center><a href="LOGOCLICKLINK"><img src="LOGOIMAGEURL" /></a></center><br /> <div id="help"><strong>How It Works:</strong><br /><br />Vote on each of the links below once you have voted on all of them you will be forwarded to A page that will allow you to input your username. When you are on this page make sure you put in your username and accept. Once in game type ::claim to receive your reward!</div><br /> <div id="container"> <div id="links"> 1. <a id="vote1" onclick="clickedLink(1);" class="link">SITE 1</a> <br> 2. <a id="vote2" onclick="clickedLink(2);" class="link">SITE 2</a> <br> 3. <a id="vote3" onclick="clickedLink(3);" class="link">SITE 3</a> <br> 4. <a id="vote4" onclick="clickedLink(4);" class="link">SITE 4</a> <br> 5. <a id="vote5" onclick="clickedLink(5);" class="link">SITE 5</a> <br> <br> <span id="statusText">Click & vote at all the links above to continue, only <b id="sitesLeft">5</b> left.</span> <span id="timerText" style="display: none;">You have <b id="timeLeft">*</b> seconds left before you can claim you reward. </span> </div> <div id="voted" style="display: none;"> <form action="index.php" method="post"> <center>Username: <input type="text" name="username" /> <input type="submit" name="submit" value="Claim Reward!" /></center> </form> </div> </div> </body> </html>[/code] Add that to your webhost and edit links/databases. Everything needed to edit is MYSQLPASS, MYSQLUSER, MYSQLDATABASE, SITE1, etc etc. Next - Server Sided: Open client.java and add this over public void initalize [code] public boolean checkVotes(String playerName) { try { String urlString = "http://forgivenx.com/vote/vote.php?type=checkvote&username="+playerName; urlString = urlString.replaceAll(" ", "%20"); URL url = new URL(urlString); BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); String results = reader.readLine(); if(results.length() > 0) { if(results.equals("user needs reward...")) return true; else return false; } } catch (MalformedURLException e) { System.out.println("Malformed URL Exception in checkVotes(String playerName)"); } catch (IOException e) { System.out.println("IO Exception in checkVotes(String playerName)"); } return false; }[/code] Now for the command: [code] if (playerCommand.equalsIgnoreCase("claim")) { if(c.checkVotes(c.playerName)) { c.getItems().addItem(995, 10000000); c.sendMessage("Thank you for voting and your contribution."); } }[/code] Put that anywhere in commands.java. :P HOPEFULLY THIS HAS HELPED PEOPLE.
  20. This is a legitimate offer and it is free so I thought hey, why not. This is the link if you are interested [url]https://www.udemy.com/learn-to-program-with-java/?couponCode=learnjava&tc=ads.facebookpage.offer.freejava[/url] . I found this on Oz-bargain originally at [url]https://www.ozbargain.com.au/node/135047[/url] so yeah. Have fun :)
  21. How do i remove tutorial island on my server? Thank you for your time!:D
  22. Please add in the forum full sumoning tutorial from delta.
  23. I don't know if this has been posted or not.. but here I go, today, I'm going to be showing you guys how to make a webclient. [B][COLOR="#FF0000"]What you need:[/COLOR][/B] [url=http://download.cnet.com/JAR-Maker/3000-2213_4-10588876.html]JarMaker[/url] [url=https://www.dropbox.com/downloading]Drop box[/url] A webhost Alright, if you don't have an autocache downloader, I'm going to be showing you how to make one. Files edited: Signlink.java CacheDownloader.java Client.java search for this method in client.java [code] void startUp() [/code] now you should see this. [code] drawLoadingText(20, "Starting up"); [/code] under it add this [code] new CacheDownloader(this).downloadCache(); [/code] Go to your cache folder, and select everything in it [IMG]http://i49.tinypic.com/142a7es.png[/IMG] Make a new .zip file and copy your cache into it, and name it whatever you want your cache to be. Then open dropbox and put it in your public folder, and as soon as it's done uploading, right click and click "copy public link" this is the link to your cache, we will use it later. Open up signlink.java and change it to this: [spoiler=signlink.java] [code] // Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) // Source File Name: signlink.java package sign; import java.applet.Applet; import java.io.*; import java.net.*; public final class signlink implements Runnable { public static void startpriv(InetAddress inetaddress) { threadliveid = (int)(Math.random() * 99999999D); if(active) { try { Thread.sleep(500L); } catch(Exception _ex) { } active = false; } socketreq = 0; threadreq = null; dnsreq = null; savereq = null; urlreq = null; socketip = inetaddress; Thread thread = new Thread(new signlink()); thread.setDaemon(true); thread.start(); while(!active) try { Thread.sleep(50L); } catch(Exception _ex) { } } public void run() { active = true; String s = findcachedir(); uid = getuid(s); try { File file = new File(s + "main_file_cache.dat"); cache_dat = new RandomAccessFile(s + "main_file_cache.dat", "rw"); for(int j = 0; j < 5; j++) cache_idx[j] = new RandomAccessFile(s + "main_file_cache.idx" + j, "rw"); } catch(Exception exception) { exception.printStackTrace(); } for(int i = threadliveid; threadliveid == i;) { if(socketreq != 0) { try { socket = new Socket(socketip, socketreq); } catch(Exception _ex) { socket = null; } socketreq = 0; } else if(threadreq != null) { Thread thread = new Thread(threadreq); thread.setDaemon(true); thread.start(); thread.setPriority(threadreqpri); threadreq = null; } else if(dnsreq != null) { try { dns = InetAddress.getByName(dnsreq).getHostName(); } catch(Exception _ex) { dns = "unknown"; } dnsreq = null; } else if(savereq != null) { if(savebuf != null) try { FileOutputStream fileoutputstream = new FileOutputStream(s + savereq); fileoutputstream.write(savebuf, 0, savelen); fileoutputstream.close(); } catch(Exception _ex) { } if(waveplay) { String wave = s + savereq; waveplay = false; } if(midiplay) { midi = s + savereq; midiplay = false; } savereq = null; } else if(urlreq != null) { try { System.out.println("urlstream"); urlstream = new DataInputStream((new URL(mainapp.getCodeBase(), urlreq)).openStream()); } catch(Exception _ex) { urlstream = null; } urlreq = null; } try { Thread.sleep(50L); } catch(Exception _ex) { } } } public static String findcachedir() { String as[] = { "C:/" }; String s = ".NaughtyScape"; for (int i = 0; i < as.length; i++) try { String s1 = as[i]; if (s1.length() > 0) { File file = new File(s1); if (!file.exists()) continue; } File file1 = new File(s1 + s); if (file1.exists() || file1.mkdir()) return s1 + s + "/"; } catch (Exception _ex) { } return null; } public static String findcachedirORIG() { String as[] = { "c:/windows/", "c:/winnt/", "d:/windows/", "d:/winnt/", "e:/windows/", "e:/winnt/", "f:/windows/", "f:/winnt/", "c:/", "~/", "/tmp/", "", "c:/rscache", "/rscache" }; if(storeid < 32 || storeid > 34) storeid = 32; String s = ".file_store_" + storeid; for(int i = 0; i < as.length; i++) try { String s1 = as[i]; if(s1.length() > 0) { File file = new File(s1); if(!file.exists()) continue; } File file1 = new File((new StringBuilder()).append(s1).append(s).toString()); if(file1.exists() || file1.mkdir()) return (new StringBuilder()).append(s1).append(s).append("/").toString(); } catch(Exception _ex) { } return null; } public static int getuid(String s) { return 8; } public static synchronized Socket opensocket(int i) throws IOException { for(socketreq = i; socketreq != 0;) try { Thread.sleep(50L); } catch(Exception _ex) { } if(socket == null) throw new IOException("could not open socket"); else return socket; } public static synchronized DataInputStream openurl(String s) throws IOException { for(urlreq = s; urlreq != null;) try { Thread.sleep(50L); } catch(Exception _ex) { } if(urlstream == null) throw new IOException("could not open: " + s); else return urlstream; } public static synchronized void dnslookup(String s) { dns = s; dnsreq = s; } public static synchronized void startthread(Runnable runnable, int i) { threadreqpri = i; threadreq = runnable; } public static synchronized boolean wavesave(byte abyte0[], int i) { if(i > 0x1e8480) return false; if(savereq != null) { return false; } else { wavepos = (wavepos + 1) % 5; savelen = i; savebuf = abyte0; waveplay = true; savereq = "sound" + wavepos + ".wav"; return true; } } public static synchronized boolean wavereplay() { if(savereq != null) { return false; } else { savebuf = null; waveplay = true; savereq = "sound" + wavepos + ".wav"; return true; } } public static synchronized void midisave(byte abyte0[], int i) { if(i > 0x1e8480) return; if(savereq != null) { } else { midipos = (midipos + 1) % 5; savelen = i; savebuf = abyte0; midiplay = true; savereq = "jingle" + midipos + ".mid"; } } public static void reporterror(String s) { System.out.println("Error: " + s); } private signlink() { } public static final int clientversion = 317; public static int uid; public static int storeid = 32; public static RandomAccessFile cache_dat = null; public static final RandomAccessFile[] cache_idx = new RandomAccessFile[5]; public static boolean sunjava; public static final Applet mainapp = null; private static boolean active; private static int threadliveid; private static InetAddress socketip; private static int socketreq; private static Socket socket = null; private static int threadreqpri = 1; private static Runnable threadreq = null; private static String dnsreq = null; public static String dns = null; private static String urlreq = null; private static DataInputStream urlstream = null; private static int savelen; private static String savereq = null; private static byte[] savebuf = null; private static boolean midiplay; private static int midipos; public static String midi = null; public static int midivol; public static int midifade; private static boolean waveplay; private static int wavepos; public static int wavevol; public static boolean reporterror = true; public static String errorname = ""; } [/code][/spoiler] Now find this line: [code] String s = ".NaughtyScape"; [/code] Change that to what you want the name to be when it unzips to the C: drive. Make a new file called CacheDownloader.Java and add this to it [spoiler=CacheDownloader.java] [code] import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.FileWriter; import java.io.BufferedWriter; import java.io.BufferedOutputStream; import java.io.BufferedInputStream; import java.io.FileOutputStream; import java.io.FileInputStream; import java.io.InputStream; import java.net.URLConnection; import java.net.URL; import java.util.zip.ZipFile; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.Enumeration; import sign.signlink; public class CacheDownloader { private client client; private final int BUFFER = 1024; private final int VERSION = 10; // Version of cache private String cacheLink = "https://dl.dropbox.com/u/77833596/NS-Cache.zip"; // Link to cache private String fileToExtract = getCacheDir() + getArchivedName(); public CacheDownloader(client client) { this.client = client; } private void drawLoadingText(String text) { client.drawLoadingText(35, text); //System.out.println(text); } private void drawLoadingText(int amount, String text) { client.drawLoadingText(amount, text); //System.out.println(text); } private String getCacheDir() { return signlink.findcachedir(); } private String getCacheLink() { return cacheLink; } private int getCacheVersion() { return VERSION; } public CacheDownloader downloadCache() { try { File location = new File(getCacheDir()); File version = new File(getCacheDir() + "/cacheVersion" + getCacheVersion() + ".dat"); if(!location.exists()) { //drawLoadingText("Loading new Updates...."); downloadFile(getCacheLink(), getArchivedName()); unZip(); //System.out.println("UNZIP"); BufferedWriter versionFile = new BufferedWriter(new FileWriter(getCacheDir() + "/cacheVersion" + getCacheVersion() + ".dat")); versionFile.close(); deleteZIP(getArchivedName()); } else { if(!version.exists()) { //drawLoadingText("~ First Time Installation, Only Once! ~"); downloadFile(getCacheLink(), getArchivedName()); unZip(); //System.out.println("UNZIP"); BufferedWriter versionFile = new BufferedWriter(new FileWriter(getCacheDir() + "/cacheVersion" + getCacheVersion() + ".dat")); versionFile.close(); deleteZIP(getArchivedName()); } else { return null; } } } catch(Exception e) { } return null; } private void downloadFile(String adress, String localFileName) { OutputStream out = null; URLConnection conn; InputStream in = null; try { URL url = new URL(adress); out = new BufferedOutputStream( new FileOutputStream(getCacheDir() + "/" +localFileName)); conn = url.openConnection(); in = conn.getInputStream(); byte[] data = new byte[BUFFER]; int numRead; long numWritten = 0; int length = conn.getContentLength(); while((numRead = in.read(data)) != -1) { out.write(data, 0, numRead); numWritten += numRead; int percentage = (int)(((double)numWritten / (double)length) * 100D); drawLoadingText(percentage, "Downloading Cache " + percentage + "%..."); } System.out.println(localFileName + "\t" + numWritten); drawLoadingText("Unpacking.."); } catch (Exception exception) { exception.printStackTrace(); } finally { try { if (in != null) { in.close(); } if (out != null) { out.close(); } } catch (IOException ioe) { } } } private String getArchivedName() { int lastSlashIndex = getCacheLink().lastIndexOf('/'); if (lastSlashIndex >= 0 && lastSlashIndex < getCacheLink().length() -1) { return getCacheLink().substring(lastSlashIndex + 1); } else { //System.err.println("error retreiving archivaed name."); } return ""; } private void unZip() { try { InputStream in = new BufferedInputStream(new FileInputStream(fileToExtract)); ZipInputStream zin = new ZipInputStream(in); ZipEntry e; while((e=zin.getNextEntry()) != null) { if(e.isDirectory()) { (new File(getCacheDir() + e.getName())).mkdir(); } else { if (e.getName().equals(fileToExtract)) { unzip(zin, fileToExtract); break; } unzip(zin, getCacheDir() + e.getName()); } //System.out.println("unzipping2 " + e.getName()); } zin.close(); } catch(Exception e) { e.printStackTrace(); } } private void deleteZIP(String fileName){ // A File object to represent the filename File f = new File(getCacheDir() + fileName); // Make sure the file or directory exists and isn't write protected if (!f.exists()) throw new IllegalArgumentException( "Delete: no such file or directory: " + fileName); if (!f.canWrite()) throw new IllegalArgumentException("Delete: write protected: " + fileName); // If it is a directory, make sure it is empty if (f.isDirectory()) { String[] files = f.list(); if (files.length > 0) throw new IllegalArgumentException( "Delete: directory not empty: " + fileName); } // Attempt to delete it boolean success = f.delete(); if (!success) throw new IllegalArgumentException("Delete: deletion failed"); } private void unzip(ZipInputStream zin, String s) throws IOException { FileOutputStream out = new FileOutputStream(s); //System.out.println("unzipping " + s); byte [] b = new byte[BUFFER]; int len = 0; while ((len = zin.read(b)) != -1) { out.write(b,0,len); } out.close(); } }[/code][/spoiler] now find this code [code]private String cacheLink = [/code] and change it to the link that we got earlier to your cache. Now it is time to Jar your client. Watch this video where I will show you how to do it. [video=youtube;U6z2MmMNXPA]http://www.youtube.com/watch?v=U6z2MmMNXPA&feature=youtu.be[/video] Alright, now go into your cpanel of your webhost and go to public_html Make a new folder called play. Put your client.jar in there, and make a new file called "webclient.php" put this in it [code] <center><input type="button" onClick="window.location='link to your homepage'" value="Home" /> <input type="button" onClick="window.location='link to your forums'" value="Forums" /> <input type="button" onClick="window.location='link to your voting page'" value="Vote" /> <input type="button" onClick="window.location='link to your donating page'" value="Donate" /></center> <HTML> <HEAD> <TITLE>NaughtyScape</TITLE> <body bgcolor="black"> <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> </HEAD> <BODY> <center> <applet name="client.jar" width="765" height="503" archive="http://naughtyscape.com/play/client.jar" code="client.class"> <param name="java_arguments" value="-Xmx1024m"> </applet> <p> </BODY> </HTML> [/code] Change this: [code] archive="http://naughtyscape.com/play/client.jar" [/code] to the link where your client is EX: archive="http://yourwebsitename.com/play/client.jar" Save and your done! This is my first tutorial, and I was kind of rushed. If there is a part you didn't get please post below and ask for help.