Jump to content

Search the Community

Showing results for tags 'code'.



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

  1. Hello Runelocus. Basically I'm attempting to write my own promotional code system for my new server and have come across a problem! I've tried all sorts to fix this, and now it's currently very messy and will most certainly make some of you crazy. I originally had the command sorted into a method and was being called with a parameter, but now the code is all held within the command and I'm just using some if statements. I stripped it down to try and figure out what was going wrong, but I just can't figure it out. Basically, the user can use the command ::promo (enter code here). It takes the input after ::promo and checks if it is a valid code and rewards the player with a reward for whatever code they used. This is the command I have used. [CODE] if (playerCommand.startsWith("promo")) { if (c.usedPromoCode == 0) { if (playerCommand.substring(6) == "newbie") { c.sendMessage("You have redeemed the code " + playerCommand.substring(6)); c.usedPromoCode = 1; return; } if (playerCommand.substring(6) == "banter") { c.sendMessage("You have redeemed the code " + playerCommand.substring(6)); c.usedPromoCode = 1; return; } if (playerCommand.substring(6) == "i") { c.sendMessage("You have redeemed the code " + playerCommand.substring(6)); c.usedPromoCode = 1; return; } c.sendMessage("Sorry, the promotional code " + playerCommand.substring(6) + " doesn't exist!"); } else { c.sendMessage("Sorry, you've already used a promotional code!"); } }[/CODE] The problem is, the message 'Sorry, the promotional code 'whatever' doesn't exist!'. Even if I enter the correct code, it still shows the correct code being entered, but skips the if statements and just says the code is invalid. I'm sure I have the substring stuff right, but I just have no idea how to fix it! Once I've got it working I am capable of cleaning it up into voids and such, but I am open to any suggestions! Thanks for everyone's help! PS. Revision is PI
  2. So this is one of my players issues and the first time I have EVER seen this happen on an rsps. That being said this help thread really isn't for me but I would like to find out how to stop/prevent this from happening. Image: [URL="http://i.imgur.com/bT3d4F4.jpg"]Glitched Out Hexed Up[/URL]
  3. hi so i want my friend to play my rsps with me, I have the no-ip and portforwarded my ip correctly. I'm not sure how to make other friends play because i gave them the client and it wont run on theres. (i use local client) when my friend tries to run it he gets this and i get it too when i try to press run on this so i have to use local client everytime [url]http://gyazo.com/a3db671952e42996b0abb8bfee07c781[/url] this is the client folder: [url]http://gyazo.com/9d7c95496ff42e1a8d65908091a02984[/url] this is the run: [url]http://gyazo.com/56bc6ec178faace9dc198c5ae281dc6e[/url] compiler: [url]http://gyazo.com/124d191e86dbb5186b64884d1ac9670d[/url] please help to make it work for others. i did enter 127.0.0.1 for the ip
  4. If you pay hosting i will code your server and forums! reply if you interested if you reply anything related to any other stuff i will ignore you so much that you will feel invisible C:
  5. With the help of a friend of mine, it was exciting and I feel like I learned SO much from just a few lines of code. [spoiler=Code][CODE]/*String (= text) * boolean (= true or false) * byte, short, int, long, double, ...(=numbers)*/ public class Main { /** * @param args */ public static void main(String[] args) { int cookies = 5 + 25; String message = "MMM I LOVE COOKIES!"; cookies = cookies / 10; System.out.println(message + " - " + cookies); boolean isHungry = false; if (isHungry == true) { cookies = cookies - 1; System.out.println("REALLY? Only " + cookies + " in the JAR?"); } else { System.out.println("I dont want any cookies..."); } System.out.println("continued"); int counter = 1; while (counter <= 20) { System.out .println("Our counter is still not high enough! It's only " + counter); counter = counter + 1; } for (int counter1 = 1; counter1 < 21; counter1++) { System.out.println("Still waiting on this counter.. We're at " + counter1); } int number1 = 5; if (number1 <= 5) { int number2 = 1; if (number1 == 5) { number2 = 2; } }// Math. provides math methods number2 = 5; } }[/CODE][/spoiler] I'm proud of myself. xD
  6. Hi, I want to learn how to code but I have no idea where to start or what to read. Has anybody made a good guide on coding RSPS that anybody knows of? I'd appreciate it. Thank you!
  7. Arix

    Location of some code

    Hey guys, This is just a quick question about where the code is that makes ores that are mined respawn. I'm asking this to people who might know it from their head, if not I'll look for myself. Edit: It's for revision 718 matrix (in case you didn't see the prefix) <3 thanksily
  8. hey guys title says it all hit me up on skype skype: Burnsy775 Reaperscape reaperscape.shivtr.com
  9. I'm looking for a way to shorten this: [CODE] if(absX == 3057 && absY == 2945) { aByteArrayArrayArray130[l][k][i] = 6; aByteArrayArrayArray136[l][k][i] = 1; aByteArrayArrayArray148[l][k][i] = 3; } if(absX == 3056 && absY == 2946) { aByteArrayArrayArray130[l][k][i] = 6; aByteArrayArrayArray136[l][k][i] = 1; aByteArrayArrayArray148[l][k][i] = 3; } if(absX == 3055 && absY == 2947) { aByteArrayArrayArray130[l][k][i] = 6; aByteArrayArrayArray136[l][k][i] = 1; aByteArrayArrayArray148[l][k][i] = 3; } if(absX == 3054 && absY == 2948) { aByteArrayArrayArray130[l][k][i] = 6; aByteArrayArrayArray136[l][k][i] = 1; aByteArrayArrayArray148[l][k][i] = 3; } so on, so forth... [/CODE] This is to modify tile shapes, and I need to do it for about a hundred or two sets of coordinates. Is there anyway I can just make "absX / absY == an array" or some sort of list? I've tried to do it myself, but I get the comparing int with int[] error, and I don't know how to make it read an array instead of a single int. [CODE] if(absX == "a list of x coordinates" && absY == "a list of y coordinates") { aByteArrayArrayArray130[l][k][i] = 6; aByteArrayArrayArray136[l][k][i] = 1; aByteArrayArrayArray148[l][k][i] = 3; } [/CODE] EDIT: Well after some fiddiling I did this [CODE] if(absX == 3061 && absY == 2943 || absX == 3060 && absY == 2944 || absX == 3059 && absY == 2945 || absX == 3058 && absY == 2946 || absX == 3057 && absY == 2947 || absX == 3056 && absY == 2948) { aByteArrayArrayArray130[l][k][i] = 22; aByteArrayArrayArray136[l][k][i] = 1; aByteArrayArrayArray148[l][k][i] = 0; } [/CODE] is this acceptable?
  10. I'll code for you if you can afford setting up a domain, hosting a server, and moderate advertisement costs. PI or below respond with your skype username and i'll add you.
  11. the title says it all im new to coding and I want to learn please help me out
  12. title says it all im new to coding and I wanna learn please give me some help
  13. I do not know if this person has already released a dice code, but here there is one place it under your home teleport command but here you have it [QUOTE] if(cmd[0].equalsIgnoreCase("roll")) { if (!player.isDonator()) { player.getPackets().sendGameMessage("<col=ff0000>You need to be a Donator to use this command."); return true; } final FriendChatsManager fc = player.getCurrentFriendChat(); if (fc == null) { player.getPackets().sendGameMessage("You need to be in a friend chat to use this option."); return false; } player.getPackets().sendGameMessage("Rolling..."); player.setNextGraphics(new Graphics(2075)); player.setNextAnimation(new Animation(11900)); int random = Utils.getRandom(100); int numberRolled = Utils.getRandom(100); player.setNextForceTalk(new ForceTalk("You rolled <col=FF0000>" + numberRolled + "</col> " + "on the percentile dice")); player.getPackets().sendGameMessage("rolled <col=FF0000>" + numberRolled + "</col> " + "on the percentile dice"); fc.sendDiceMessage(player, player.getUsername()+" rolled <col=FF0000>" + numberRolled + "</col> " + "on the percentile dice"); return true; } [/QUOTE] enjoin i hope i help some ppl out p.s: make sure you add it under your command home
  14. Taged

    Need Code Partner

    Hi Guys, Im Wanting To Code A Server, I Know How To Code Shops, Add Items In Game,I Want Who Ever Is Gonna Be My Partner, Fix Npc Drops,lags,bugs. If You Are Intrested Add me on skype andrey.drey14 or pm me on here and we will talk!
  15. I need a page with 3 different cool css things, and a navbar that is fixed to the top. nothing fancy, just simple navbar with options labeled, one two, and 3. and then anything cool in css! id give like 5$ for this simple job, only over paypal tho! my skype is xeexeexee2
  16. I need a page with 3 different cool css things, and a navbar that is fixed to the top. nothing fancy, just simple navbar with options labeled, one two, and 3. and then anything cool in css! id give like 5$ for this simple job, only over paypal tho!
  17. Dev part doesn't have to be major need, since I can develop. I got this sexy 718 loading 753 source that is not leeched, and needs a VPS. I do not have a way to get a VPS. This is how it's planned out for the hoster. If you host, you'll get all donations sent to you as you're the hoster. The reason I want a hoster that can code is because you'll have co-owner position. Add my skype if you're intrested: lil_rj1994
  18. I am currently coding a server if u can help me it will be some thing big :]
  19. if (command.equalsIgnoreCase("staffzone") && playerRights >= 1) { triggerTele(3075, 3084, 0); sM("You teleport to the staff zone."); }
  20. I'm trying to use the starter pack on here to learn how to program a rsps. Should I use jdk x86, or x64? I have a 64 bit computer, so normally I'd just use x64, but most people seem to be using x86...
  21. Well this is more of a follow on of he how to use a switch statement tutorial(Kind of lol) Anyway using the for loop method it will shorten your code a hell of a lot. Example: This is what was in a source I picked up. See how I can shorten that allot by just using a for loop: [CODE]if (spellId == 33) { Spell = "Shadow Blitz"; ConfigId = 81; } else if (spellId == 25) { Spell = "Blood Blitz"; ConfigId = 83; } else if (spellId == 21) { Spell = "Ice Blitz"; ConfigId = 85; } else if (spellId == 37) { Spell = "Miasmic Blitz"; ConfigId = 99; } else if (spellId == 35) { Spell = "Shadow Barrage"; ConfigId = 89; } else if (spellId == 27) { Spell = "Blood Barrage"; ConfigId = 91; } else if (spellId == 23) { Spell = "Ice Barrage"; ConfigId = 93; } else if (spellId == 39) { Spell = "Miasmic Barrage"; ConfigId = 101; } else if (spellId == 84) { Spell = "Wind Surge"; ConfigId = 47; } else if (spellId == 87) { Spell = "Water Surge"; ConfigId = 49; } else if (spellId == 89) { Spell = "Earth Surge"; ConfigId = 51; } else if (spellId == 91) { Spell = "Fire Surge"; ConfigId = 53; }[/CODE] See how long that is? Now look to what it can be shortened to: [CODE] byte[] spellIds = {33,25,21,37,35,27,23,39,84,87,89,91}; String[] spell = {"Shadow Blitz", "Blood Blitz","Ice Blitz","Misasmic Blitz","Shadow Barrage","Blood Barrage", "Ice Barrage", "Miasmic Barrage"}; byte[] configsIds ={81,83,85,99,89,91,93,101,47,49,51,53}; for(int loop = 0; loop < configsIds.length;loop++) { if(spellId == spellIds[loop]){ Spell = spell[loop]; ConfigId = configsIds[loop]; } }[/CODE] Hell of a difference right? It may look complicated but really its not. I will explain this code in a bit more detail for you guys: Right the 1st thing you will notice in the code1 is Every if statement checks a int value if the if statement is true it will then set a string value (SpellId) then set a int value (config id) So what you can do is set 3 arrays for the byte spell ids, String for the spell and the int for the configIds. You do this like so: [CODE]byte[] spellIds = {}; String[] spell = {""}; byte[] configsIds ={};[/CODE] Right after you typed all that is needed in the arrays you then will want to use the for loop. Which I will explain how it works: [CODE]for(int loop = 0; loop < configsIds.length;loop++)[/CODE] 1st you will obviously type for( After this you will define a new int for the program to loop though int loop = 0; After that but on the same line you will need to check if that int you just set is lower than the size of the arrays like this: loop < configsIds.length; After that line is true ( it will be true at the start due to you setting the loop int to 0) You will want the loop value to increase in size by typing loop++) So what that line basically dose/says in English: while the int specified is lower than the size of the array add 1 to the int specified. <<<< int loop = 0 is the int specified in he example. So now you may be thinking "Yes but how dose it loop though all the if statements" Well as you can see with what I wrote in my version of the code : [CODE]if(spellId == spellIds[loop]){ Spell = spell[loop]; ConfigId = configsIds[loop]; }[/CODE] It is now using the arrays that were defined in the if statement block: [CODE]byte[] spellIds = {33,25,21,37,35,27,23,39,84,87,89,91}; String[] spell = {"Shadow Blitz", "Blood Blitz","Ice Blitz","Misasmic Blitz","Shadow Barrage","Blood Barrage", "Ice Barrage", "Miasmic Barrage"}; byte[] configsIds ={81,83,85,99,89,91,93,101,4[/CODE] So what its saying is: if(spellId == the Byte array spellids[the current stage of the loop]{ set spell String to the String array spell[the current stage of the loop]; set the byte ConfigId to the byte array configsIds[the current stage of the loop]; } NOTE: in the if statement block (from { to } ) all the [the current stages of the loop] will be the same value So say the current stage of the loop is 0 The if statement will be checking spellIds[0]<<<<<<<Which if you check the array the 1st value is 33 if that is true then: Spell = spell[0]; chcking the array <<<<<<<which if you check the array the 1st value is "Shadow Blitz" ConfigId = configsIds[0]; <<<<<<<which if you check the array the 1st value is 81 Hope I explained this good enough but if you still don't understand please post and I am willing to help you or you could even search online for: How to loop though an array Your welcome guys! Enjoy writing code faster :)
  22. [CENTER][U][I](Alpha stage) [/I][/U] [I]Code Magic is a RSPS that has never been seen before. with a dedicated team behind the scenes and firm owners, this will surely be the RSPS of the year 2014. So do not hesitate, register now and discover Code Magic today![/I] [URL="http://www.code-magic.org/index.php?page=play"][COLOR="#0089FF"]Click here to go to Code Magic[/COLOR][/URL] [/CENTER] [B][CENTER]pictures and more info[/CENTER][/B] [COLOR="#006400"][U][I][CENTER]Custom login interface[/CENTER][/I][/U][/COLOR] [CENTER][IMG]http://i41.tinypic.com/15cjbr7.jpg[/IMG][/CENTER] [COLOR="#006400"][U][I][CENTER]High quality Website[/CENTER][/I][/U][/COLOR] [CENTER][IMG]http://i44.tinypic.com/2wp584h.jpg[/IMG][/CENTER] [U][I]Alpha stage[/I][/U] [I]Some Bosses already added Grand exchange[/I] ( [B][I]only first tab at the moment[/I][/B] ) [I]No Lagg vps hosted donor shop[/I] 1[I] working quest ( [B]more will be added [/B]) and many more.[/I] credits : Raw envy [I]just come and take a look at this amazing private server, the decision is in your hands. kindly regards and a happy new year, staff of Code Magic[/I]
×