Jump to content

Search the Community

Showing results for tags 'ranks'.



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

  1. Server Ideas 1. Need help on figuring out how i can make some custom ranks that can be applied to a user after a certain time period. 2. A random item drop script that would allow me as the owner to type a command and everyone in the server will get a random item of any sort, or a random time everyday or a set time. 3. A vote system that would be so awesome if someone could help me figure out how that could be achievable. 4. I know a bit about coding but with me being out of the game so long help in editing quest scripts etc would be a huge help in like explanation on how to edit that. Looking forward to hearing opinions and answers thanks everyone in advance
  2. hi guys can anybody help me with adding multiple group ranks on ipb forums ? i added but it only shows 1 , can someone post like a steps to add multiple group rank ?? like all of them visible on the players profile ?
  3. need help getting my rsps online, willing to pay or give ranks. i am using a vps running os windows 2008, you can pm me here and ill give my team viewer and you can get my skype and tell me what one you want ranks, or money i can do around 5-10 bucks. thanks :) p.s. if you want you can do it for free :D
  4. 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[/IMG] once you are there you should see something like this: [IMG]http://i.imgur.com/RlDtDpJ.png[/IMG] 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!
  5. How do I enter more ranks to it? I currently can't use it as an admin/owner case WARMING_FLAME: if (!player.isExtremeDonator()) { player.getPackets().sendGameMessage("You need to be Extreme donator to use this pet."); return false; }
  6. Seen as no-one has released this, Just the shitty version of stopping ranks trading all together; Version: 1.0 Knowledge needed: none Revision: 317 project Insanity Files edited: TradeAndDuel.java What your adding: Your stopping a certain player rank from trading certain items go to tradeandduel.java and find [CODE]public boolean tradeable(int itemId) {[/CODE] under it you should see [CODE]for (int i : Config.ITEM_TRADEABLE) { if(i == itemID) { c.sendMessage("You can't trade this item."); return false; } } [/CODE] under that add [CODE]for (int i : Config.DONOR_ITEMS) { if (i == (itemID) && c.isDonator >= (1)) { c.sendMessage("You can't trade this item."); return false; } }[/CODE] now open up config.java and add this anywhere with the rest of the ints [CODE]public static final int[] DONOR_ITEMS = {####,#####,#####,######,#####,}; [/CODE] "#####" is your item id if you want to change the rank its for change "c.isdonator" to "c.playerRights" and ">=" to "=="
  7. Would it be possible to create different donator ranks, with different benefits? For example: [B]One with [/B] Special in-game and forums rank ‘’ ::yell ’’ function 10m in game money [B]and[/B] [B]Other with[/B] Special in-game and forums rank Double Xp Weekend ‘’ ::yell ’’ function 20m in game money
  8. Hey guys, I've Recently added this new rank to my server, so i thought id share it around, there are others out there but i'll show you a in depth guide to making a new Rank for your RSPS. Firstly you need to Decide what kind of rank this will be, either a Staff rank, Server veterans, King donator rank, a Vip Rank for donators. for this Tutorial i have Chosen VIP Donator Rank, so once you have figured that out. simply open[B][COLOR="#000000"] player.java[/COLOR][/B] Search for this piece of coding: [CODE]private boolean donator;[/CODE] Once you have found that simply underneath it add the following code: [CODE]private boolean Vip;[/CODE] once you have done that Search for the following piece of code: [CODE]public boolean isExtremePermDonator() { return extremeDonator; }[/CODE] simply under that add this piece of code: [CODE]public boolean isVip() { return Vip; } public void setVip(boolean Vip) { this.Vip = Vip; }[/CODE] now to make your selected rank have a public chat icon search for the following code: [CODE]public int getMessageIcon() {[/CODE] and add to it - [CODE]isVip() ? 5[/CODE] now basically to find out the icon you want for the selected rank type ingame ;;yell <img=1> - up to 13 find the one you like for the chosen rank. and place it were my (5) is once you have done all of that open up [B][COLOR="#000000"]Commands.java[/COLOR][/B] Here we are going to Create a command+ yells, and ;;players. preferably in Admin commands section, add this piece of code: [CODE]case "makevip": name = ""; for (int i = 1; i < cmd.length; i++) name += cmd[i] + ((i == cmd.length - 1) ? "" : " "); target = World.getPlayerByDisplayName(name); if (target == null) return true; target.getAppearence().setTitle(67879); target.setVip(true); target.getPackets().sendGameMessage( "<shad=33CCCC>Thankyou for supporting our server, you've been promoted to V.I.P donator status by " + Utils.formatPlayerNameForDisplay(player .getUsername()), true); player.getPackets().sendGameMessage( "You've Successfully given Vip Status to " + Utils.formatPlayerNameForDisplay(target .getUsername()), true); World.sendWorldMessage("<img=5><col=ff0000>News: "+target.getDisplayName()+"Has just been awarded V.I.P Donator!", false); return true;[/CODE] Now this is the command that i use on my server, it displays a world message that the player i have choosen will be awarded VIP rank, also sets them a title, to learn how to make a title. take a look at my [URL="http://www.runelocus.com/forums/showthread.php?91729-Custom-Titles-amp-Colours"]Custom Title Tutorial here[/URL] To remove a a Vip Rank from a player add this command underneath: [CODE]case "takevip": name = ""; for (int i = 1; i < cmd.length; i++) name += cmd[i] + ((i == cmd.length - 1) ? "" : " "); target = World.getPlayerByDisplayName(name); if (target == null) return true; target.getAppearence().setTitle(0); target.setVip(false); target.getPackets().sendGameMessage( "<shad=33CCCC>You're Vip Donator Rank was taken by " + Utils.formatPlayerNameForDisplay(player .getUsername()), true); player.getPackets().sendGameMessage( "You've Successfully taken Vip Status from " + Utils.formatPlayerNameForDisplay(target .getUsername()), true); World.sendWorldMessage("<img=1><col=ff0000>News: "+target.getDisplayName()+" has just lost their V.I.P Rank!", false); return true;[/CODE] What this command does, is simply removes the Rank from Selected player, and also Removes the title provided. once you have done that Search [B][COLOR="#000000"]Players[/COLOR][/B], in [COLOR="#000000"][B]commands.java[/B] [/COLOR] add this piece of coding into your command ;;players [CODE]if (p5.isVip()) { titles = "[<img=5><col=33CCCC>V.I.P Donator</col></shad>]"; }[/CODE] once you have done that search for the following code: [CODE]public static void sendYell[/CODE] - should be close to row 2886, add the following code underneath: [CODE]else if (player.isVip() && player.getRights() == 0) World.sendWorldMessage("[<img=5><col=33CCCC>V.I.P</col>] <img=5>" + player.getDisplayName() + ": <col=33CCCC>" + message + "</col>", false);[/CODE] you can pick your own hex colours of course, so basically what we have done with this tutorial, you have created a new Rank, you have chosen and added your rank to ;;players + added icons for ingame chats, also added a yell, And created a nice command for the rank. - Danielxx
  9. Hds

    Donator Ranks

    [CENTER]I was just wondering, but why are all of the Donator ranks exactly the same colour and star? Could you not give them different ones to distinguish each rank better? Just a though, Leave any comments below :)[/CENTER]
  10. Gircat

    Adding Ranks

    Only reason why I'm asking on how to do this is because I've never done it before and I'm not too sure how it works. I just want to know how you would go on about adding a new rank into the game. Let's say for example if I want to add a Forum Mod rank with a crown into the server. How would I do that? Lol. I tried last night but it didn't turn out too well.
  11. Base: Project Insanity (The one you get from RuneLocus Revision: 317 The Problem: I can't seem to find where to add staff members, ranks and such. Can somebody please point me in the right direction. I also need a bit of help with portforwarding, I'm not sure if I did it right, but that can be done via PM if someone would be kind enough to help me. Information & Media: Got none sorry.
  12. I need help trying to add new ranks with crowns. I can't find it in my client.java. My source:TrisidiaX
  13. Well I'm going to tell you how to add the loyalty programme ranks and on right click also! [B]Server Sided:[/B] Go to Player.java and declare this: [CODE]public int loyaltyRank;[/CODE] now find playerProps.writeByte(combatLevel); and replace [CODE]playerProps.writeWord(0);[/CODE] with: [CODE]playerProps.writeWord(loyaltyRank);[/CODE] Now save and exit and head to PlayerSave and add these in it (YOU SHOULD KNOW WHERE): [CODE]} else if (token.equals("loyalty-rank")) { p.loyaltyRank = Integer.parseInt(token2);[/CODE] [CODE]characterfile.write("loyalty-rank = ", 0, 15); characterfile.write(Integer.toString(p.loyaltyRank), 0, Integer .toString(p.loyaltyRank).length()); characterfile.newLine();[/CODE] Finished server sided Now... [B]Client Sided:[/B] Declare this in client.java [CODE] //thanks to Nouish for getting the titles and me for programming. public final String loyaltyRank(final int i) { switch (i) { case 1: return "Lord"; case 2: return "Lady"; case 3: return "Sir"; case 4: return "Dame"; case 5: return "Duderino"; case 6: return "Dudette"; case 7: return "Lionheart"; case 8: return "Crusader"; case 9: return "Hellraiser"; case 10: return "Desperado"; case 11: return "Baron"; case 12: return "Baroness"; case 13: return "Count"; case 14: return "Countess"; case 15: return "Overlord"; case 16: return "Overlordess"; case 17: return "Bandito"; case 18: return "Duke"; case 19: return "Duchess"; case 20: return "Big Cheese"; case 21: return "Bigwig"; case 22: return "King"; case 23: return "Queen"; case 24: return "Wunderkind"; default: return ""; } }[/CODE] now in the same class find [CODE]private void buildAtPlayerMenu[/CODE] and there should be [CODE]s = player.name + " (skill-" + player.skill + ")";[/CODE] after the else and replace that with: [CODE]s = "@[email protected]" + loyaltyRank(player.skill) + "@[email protected] " + player.name + combatDiffColor(myPlayer.combatLevel, player.combatLevel) + " (level-" + player.combatLevel + ")";[/CODE] Preview: [img]http://i52.tinypic.com/314cyfb.jpg[/img] Post errors....
  14. [size=6][size=7]taken down because everyone is an ignorant fuck[/size][/size]
  15. axter

    Post Count Ranks

    I've noticed post count ranks have changed... I never saw a thread, is there gunna be more, or what? lolking
  16. OCD

    [PI] Ranks help

    So I've been searching on how to fix it for a few days now, and I have no clue on how to do this.. I keep getting those weird colors & bold's for ranks.. Example: Moderator: [COLOR="#FFFF00"][I][B]Hello, I'm a Mod![/B][/I][/COLOR] Owner: [COLOR="#FF0000"][U][I][B]Hello, I'm an Owner![/B][/I][/U][/COLOR] so yeah, that's pretty much the problm I got there.. I have no clue on how to fix that..
  17. I think that there should be more post count ranks, and user sidebars. It may not be 'useful' per say, but it would be cool ;) Maybe one of the sites GFX'rs could make sidebars? Just a simple suggestion
  18. * is currently working on a system which ranks players based on a rating they get per kill, this rating depends on the kill death ratio of the enemy player. players are ranked on highscores. in certain areas of the wilderness there will be the old school bounty hunter like pking, in which it gives you a target to kill. this target will be around your rating, and should pose a fair challenge. come check us out at * and see what you think. -- we are also looking for staff members, and dedicated players to get the server going. please leave any questions or comments below, or send me a private message in game. and keep those donations rolling in!
  19. i cant find money pouch for 667/*** could anybody send me link or something for a guide to set the codes + Where can i set donor ranks such as reg. donor , super donor , extreme donor such a thing. is there a rights or sumthing for it?
  20. A fully complete set of forum ranks... [CENTER][IMG]http://i47.tinypic.com/5u1i9.jpg[/IMG][/CENTER] Meh, due to the fact that I don't give a f... Released them.. enjoy! [ATTACH]6140[/ATTACH] [ATTACH]6139[/ATTACH]
  21. Ok, so i'm adding PK Ranks and I have no names in mind so I was wondering if you guys can give me some suggestions. Please be serious while posting, or you'll be ignored and reported for spamming post count.
  22. [B][I][COLOR="#000000"]Discription : [COLOR="#00FF00"]We will add more ranks into the Demethium 637 Source[/COLOR][/COLOR][/I][/B] [B][I][COLOR="#000000"]Difficulty : [COLOR="#00FF00"]1/10[/COLOR][/COLOR][/I][/B] [B][I][COLOR="#000000"]Knoledge : [COLOR="#00FF00"]N/A[/COLOR][/COLOR][/I][/B] [B][I][COLOR="#000000"]Location : [COLOR="#00FF00"]org.Demethium.net.Actionmanager.java[/COLOR][/COLOR][/I][/B] [B][COLOR="#000000"]In the end i will also let you add custom commands for these ranks.[/COLOR][/B] [B][COLOR="#0000FF"]step one:[/COLOR][/B] [B][SIZE=2][COLOR="#000000"]Go to Actionmanager.java. Search for:[/COLOR][/SIZE][/B] [code] public static void loginResponse(Player player) { [/code] [B][SIZE=2][COLOR="#000000"]Replace that with this, and all under it.[/COLOR][/SIZE][/B] [code] public static void loginResponse(Player player) { /* the staff under here, Right 2 = Admin, Right 1 = Moderator, Right 5 = Head Moderator, Hidden Admin Right = 3, */ /* Hidden Moderator right = 6 , Donator Right = 4 */ player.getAppearance().resetAppearence(); for (String admin : ADMINS) if (player.getUsername().equalsIgnoreCase(admin)) player.getDefinition().setRights(2); for (String mod : MODERATORS) if (player.getUsername().equalsIgnoreCase(mod)) player.getDefinition().setRights(1); for (String hmod : HEADMODERATORS) if (player.getUsername().equalsIgnoreCase(hmod)) player.getDefinition().setRights(5); for (String hadmin : HIDDENADMINS) if (player.getUsername().equalsIgnoreCase(hadmin)) player.getDefinition().setRights(3); for (String hhmod : HIDDENMODERATORS) if (player.getUsername().equalsIgnoreCase(hhmod)) player.getDefinition().setRights(6); for (String donor : DONATORS) if (player.getUsername().equalsIgnoreCase(donor)) player.getDefinition().setRights(4); [/code] [B][SIZE=2][COLOR="#000000"]stop at:[/COLOR][/SIZE][/B] [code] // MessageBuilder bldr = new MessageBuilder(); [/code] [B][SIZE=2][COLOR="#000000"]In The Top look for:[/COLOR][/SIZE][/B] [code] public static void packet108(Player player, int i1, int i2) { MessageBuilder bldr = new MessageBuilder(108); bldr.writeByteA(i1); bldr.writeByteS(i2); player.write(bldr.toMessage()); } [/code] [B][SIZE=2][COLOR="#000000"]Put one space under the '}' and then add this under it:[/COLOR][/SIZE][/B] [code] public static final String[] ADMINS = { "Delano", "Mod Cain","Delano413","Mod Crown","Mod Ehno", "Mod Tank Da"}; /* Admin ranks here, easier to see. */ public static final String[] MODERATORS = { "", "", "", "", "", "", ""}; /* Mod ranks here, easier to see. */ public static final String[] HEADMODERATORS = { "", "", "", "", "", "", ""}; /* Head Moderators Here, Admin -Ban , Easier to see [BETA] */ public static final String[] HIDDENADMINS = { "", "", "", "", "", "", ""}; /* Hiden Administrators, All admin ranks - the Admin Crown [BETA] */ public static final String[] HIDDENMODERATORS = { "", "", "", "", "", "", ""}; /* Hiden Moderators, all mod ranks - the Mod Crown [BETA] */ public static final String[] DONATORS = { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}; /* Donator Ranks [BETA] */ [/code] [B][SIZE=2][COLOR="#000000"]Under that leave 1 space open[/COLOR][/SIZE][/B] [COLOR="#0000FF"]Step 2:[/COLOR] [B][SIZE=2][COLOR="#000000"]Go to Commands.java inside org.Dementhium.contect, and look for:[/COLOR][/SIZE][/B] [code] if (player.getRights() == 2) { adminCommands(player, command); } [/code] [B][SIZE=2][COLOR="#000000"]under that add this:[/COLOR][/SIZE][/B] [code] if (player.getRights() == 5) { jagexmodCommands(player, command); /* Head Moderators Rank */ } if (player.getRights() == 3) { hiddenadminCommands(player, command); } if (player.getRights() == 6) { hiddenmodsCommands(player, command); } if (player.getRights() == 4) { donatorCommands(player, command); } [/code] [B][SIZE=2][COLOR="#000000"]If there is a rank you aren't using, make a comment block out of it. Now Search for:[/COLOR][/SIZE][/B] [code] public static void adminCommands(final Player player, String[] command) { [/code] [B][SIZE=2][COLOR="#000000"]Above that add:[/COLOR][/SIZE][/B] [code] public static void ######(final Player player, String[] command) { } } [/code] [B][SIZE=2][COLOR="#000000"]You replace the '######' with example;[/COLOR][/SIZE][/B] [code] jagexmodCommands hiddenadminCommands hiddenmodsCommands donatorCommands [/code] [B][SIZE=2][COLOR="#000000"]Above the first '}' add the commands you want them to have.[/COLOR][/SIZE][/B] [B][I][COLOR="#008000"]Hope i helped, Took me a little while so thanks is appriciated <3[/COLOR][/I][/B]
  23. Hash

    Updates & Ranks

    Its been a long time that nobody has changed rank, like graphic artist or such. We could add some new ranks that will be earned temporarily, like 1 or 2 weeks, that will be given for either skills or devotion for RuneLocus. Something new like new themes, new forums layout or something in this type would be great for the forums and give a different look. People get bored fast with the same looking forums, not that they're ugly or anything, but anything can be worked on. I totally agree with with the awards and like the concept, but don't make too much different kinds, and don't hand this out too easily; it must be something hard enough to earn and have a challenge. That's pretty much what I had as ideas. You can take them or not, they are only suggestions and I hope it can help to revive the forums!
  24. So basically i have a dialogue and stuff that shows the different loyalty titles. Can someone give me a code to make it work? Like i obiouvsly know where it goes but i dont really know the code. like something like c.loyaltyrank += 1;? Well i came up with this [code] else if(c.dialogueAction == 2342) { if (c.loyaltyrank == 0) { c.loyaltyrank += 1; } } [/code] But i get importing errors, and i really dont get that as import.server.model.players.Client; and .Players is already imported. but im using the dialogue action 2342, could someone right a code that if you click on it, it makes ur loyalty rank 1? 2? etc.... Im sure if you give me first code i can do the rest. But ya just need a code to make there loyalty rank go to what ever number i put. thanks
  25. Okay so this is just vbulletin integration with a method to grab the user's rank from the forums. PS: If you're hosting this on a shitty vps/computer this is not ideal to use. [spoiler=Code] org.dementhium.mysql vBulletin.java [code]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.dementhium.mysql; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; /** * * @author James <[email protected].info> * Created on Nov 6, 2011 */ public class vBulletin { private static Connection connection = null; private static Statement statement = null; private static String HOST = ""; private static String DATABASE = ""; private static String USER = ""; private static String PASS = ""; public static void init() { System.out.println("Connecting to forums..."); createConnection(); } public static void createConnection() { try { Class.forName("com.mysql.jdbc.Driver"); } catch (Exception e2) { System.out.println("Cannot find mySql Driver."); return; } try { connection = DriverManager.getConnection("jdbc:mysql://" + HOST + "/" + DATABASE, USER, PASS); statement = connection.createStatement(); System.out.println("Successful connection to forums."); } catch (Exception e) { System.out.println("Connetion rejected, wrong info, denied remote connection, or host is down."); connection = null; //e.printStackTrace(); createConnection(); } } public static int[] checkData(String playerName, String passWord) { /* * int checkPass = forumResponce[0]; * int isAdmin = forumResponce[1]; * int isMod = forumResponce[2]; * int isPremium = forumResponce[3]; */ int[] resultData = {0, 0, 0, 0}; try { ResultSet results = null; String query = "SELECT * FROM user WHERE username LIKE '" + playerName + "'"; try { if (statement == null) { statement = connection.createStatement(); } } catch (Exception e5) { statement = null; connection = null; createConnection(); statement = connection.createStatement(); } results = statement.executeQuery(query); while (results.next()) { String playerPw = results.getString("password").toLowerCase(); String salt = results.getString("salt"); String encrypted = generate(passWord.toLowerCase()); int forumRank = results.getInt("usergroupid"); encrypted = generate(new StringBuilder(encrypted).append(salt).toString()); if (forumRank == 10 || forumRank == 25 || forumRank == 6) { resultData[1] = 1; //admin } if (forumRank == 5) { //mod resultData[2] = 1; } if (forumRank == 23) { //bronze prem resultData[3] = 1; } if (forumRank == 21) { //silver prem resultData[3] = 2; } if (forumRank == 22) { //gold prem resultData[3] = 3; } if (forumRank == 2) { //banned i think - can't remember resultData[1] = 0; resultData[2] = 0; resultData[3] = 0; } if (playerPw.equals(encrypted)) { resultData[0] = 1; //login good return resultData; } } return resultData; } catch (Exception e) { //e.printStackTrace(); } return resultData; } private static String convertToHex(byte[] data) { StringBuilder buf = new StringBuilder(); for (int i = 0; i < data.length; i++) { int halfbyte = (data[i] >>> 4) & 0x0F; int two_halfs = 0; do { if ((0 <= halfbyte) && (halfbyte <= 9)) { buf.append((char) ('0' + halfbyte)); } else { buf.append((char) ('a' + (halfbyte - 10))); } halfbyte = data[i] & 0x0F; } while (two_halfs++ < 1); } return buf.toString(); } public static String generate(String text) throws NoSuchAlgorithmException, UnsupportedEncodingException { MessageDigest md = MessageDigest.getInstance("MD5"); byte[] md5hash = new byte[32]; md.update(text.getBytes("iso-8859-1"), 0, text.length()); md5hash = md.digest(); return convertToHex(md5hash); } }[/code] org.dementhium.net ActionSender.java - add this under your loginResponce method And make sure you add this too [code]import org.dementhium.mysql.vBulletin;[/code] [code]if (!Constants.TESTING_LOCALHOST) { int[] forumResponce = vBulletin.checkData(player.getUsername(), player.getPassword()); int checkPass = forumResponce[0]; //unused int isAdmin = forumResponce[1]; int isMod = forumResponce[2]; int isPremium = forumResponce[3]; if (isAdmin == 1) { player.getDefinition().setRights(2); } if (isMod == 1) { player.getDefinition().setRights(1); } if (isPremium == 1) { player.getDefinition().setDonor(1); } if (isPremium == 2) { player.getDefinition().setDonor(2); } if (isPremium == 3) { player.getDefinition().setDonor(3); } }[/code] org.dementhium.io PlayerLoader.java - replace your load method with this [code]public PlayerLoadResult load(GameSession connection, PlayerDefinition def) { Player player = null; int code = 2; if (def.getName() == null || def.getPassword() == null) { code = Constants.INVALID_PASSWORD; } if (def.getPassword().length() < 2 || def.getName().length() > 12 || def.getName().startsWith(" ") || def.getName().endsWith(" ")) { code = 11; //Too weak password. } Player lobbyPlayer = World.getWorld().getPlayerOutOfLobby(def.getName()); if (World.getWorld().isOnList(def.getName()) && lobbyPlayer == null) { code = Constants.ALREADY_ONLINE; } if (lobbyPlayer == null) { if (!Constants.TESTING_LOCALHOST) { int[] forumResponce = vBulletin.checkData(def.getName(), def.getPassword()); int checkPass = forumResponce[0]; if (code == 2 && checkPass == 0) { code = Constants.INVALID_PASSWORD; } } else { if (FileUtilities.exists(DIRECTORY + def.getName() + EXTENSION) && !loadPassword(def.getName(), def.getPassword())) { code = Constants.INVALID_PASSWORD; } } } if (code == 2) { player = new Player(connection, def); } if (player != null) { int count = 2; String ip = PunishHandler.formatIp(player.getConnection().getChannel().getRemoteAddress().toString()); for (Player pl : World.getWorld().getPlayers()) { if (pl != null && pl.getLastConnectIp().equals(ip)) { if (--count == 0) { return new PlayerLoadResult(null, 9); } } } if (World.getWorld().getPunishHandler().isBanned(player)) { code = Constants.BANNED; return new PlayerLoadResult(null, code); } if (!FileUtilities.exists(DIRECTORY + def.getName() + EXTENSION)) { save(player); } } return new PlayerLoadResult(player, code); }[/code] And make sure you import the vBulletin class. org.dementhium RS2ServerBootstrap.java add this somewhere [code]vBulletin.init();[/code] and again make sure you import it. [/spoiler]
×