Jump to content

Search the Community

Showing results for tags 'dicing'.



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

  1. this is the code in clickitems.java [IMG]http://i50.tinypic.com/2rhs8d2.png[/IMG] it doesnt seem to work in game and ive tried to edit it but cant seem to get it right? any ideas? pls post <3
  2. [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/CP.png[/IMG] ----------------------------------- Chaotic Paradise Owners Skype: kidsims [color=green] CLIENT: [url]http://www.mediafire.com/?wm8jio1p04p3q01[/url] FORUMS: [url]http://chaotic-paradise.co.cc/forum[/url] WERE VPS 24/7 Hosted Pi! New Things! ::elite (Training/ Better Then Crabs) ::chill (Dice Hosting/ Afk Skills) ::corp (Corp Beast) ::avatar ::nomad Owner: Yes Im Mike Co: Cy Admin: Angl30fD3ath Head Mod: Eric Mod: Ozil Mod: Demetrius [/color] [color=navy]- 634 Graphics/Animations/Items - PvP Armor/Curses released - New F-Keys - Unique features - Economic - Great stability - No dupes - Constant Updates - Great Staff Team - Nomad - Daily/Weekly Updates - Dicing Features: - New Firecape TokzHaar Kal - Lava, Water, Poison, Ice Whips! (Boosted Stats) - Frost Dragons -::chill -::elite (new training) -::owner - Avatar - Nomad - Dicing - 634 graphics - Great Donator Benefits - Chaotic Weapons - Great Rushing System! (PvP Rushing) - Anti-Starter-Transferring - Clue Scrolls and great rewards! - Name changing - Turmoil/Soul Split, with proper effects - Quick, optional tutorial. -Highscores System -Scrolling Interfaces! -Top level bug support. -100% drop party room -Puzzle boxes -Unique starter packs -Spirit shields with proper effects, i.e: -Divine: Always reduces 30% of damage, taking 5% of the 30% from your -Prayer. -Elysian: 70% chance of reducing 25% damage taken. -Perfect xlogging fix -Duel arena -Pk leaderboards -Account recovery -Godwars bosses -Unique donor system -Slayer points -Perfect revamped banking -Revamped PvP System -Revamped PvM System -Perfect, revamped shopping -Perfect private messaging -All private chat options work properly -Pest control -Slayer points -All skillcape emotes work -Perfect combat -Amazing pking -Buy 50, sell 50 -No rollbacks -Pest control -All skills are trainable -Item dropping works properly. -Highscores -Pk points and pk point store. -All PvP Items and Armors. (Morrigans, Vesta, Statius, and Zuriels) Donation Benefits: -Custom ::yell Tag! [Brony] [Large Dick] [Sexy Mod] [ Co-Owner ] [ Top PKer ] [ Top Staker ] Donate For More. -Access to the items in the donator shop -Donator Zone -VPS[/color] Pictures:[/b] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/test1.png[/IMG] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/shop.png[/IMG] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/summoning.png[/IMG] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/torva.png[/IMG] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/curses.png[/IMG] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/ely.png[/IMG] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/host.png[/IMG] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/tokhaar.png[/IMG] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/lavawhipdrop.png[/IMG] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/superdonor.png[/IMG] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/pvmshop.png[/IMG] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/cape.png[/IMG] [IMG]http://i864.photobucket.com/albums/ab202/OMGPHATCLAW/ava.png[/IMG]
  3. hey guys can someone help me with adding dice to my 667/704? the dicebag only has a "use" option have a nice day
  4. [CENTER]Give possitive feedback please. If I explained something wrong just correct me. There isn't really anything to explain in Dialogue. [SIZE="3"][COLOR="Red"]NOTE: You need to get the [URL="http://www.rune-server.org/runescape-development/rs-503-client-server/snippets/369039-dementhium-stackbag-converted.html"]StackBag[/URL] snippet by [URL="http://www.rune-server.org/members/jilic-matt/"]Jilic-Matt[/URL][/COLOR][/SIZE] Go into DialogueManager.java this is in src/org/dementhium/content First import this [CODE]import java.util.Random;[/CODE] Search for [CODE]switch (id) {[/CODE] Under this if you are every wanting an npc to start a dialogue you need to put the case as the npc id Under that add [CODE] case 2998: //Gambler sendDialogue(player, HAPPY_TALKING, 2998, 12000, "My bag of cash contains " + player.getStackBag() + " coins.", "Wanna play me for it?"); return true;[/CODE] This is the Gambler (2998). The number 12000 is the case number it will go to. HAPPY_TALKING is obviously the emotion the npc or you will be showing. Changing 2998 (not the case) will let the player talk. I'll show some more emotions at the bottom but you should be able to find them at the very bottom of DialogueManager.java. The player.getStackBag is getting the StackBag method from player.java and sending it into this file. Next search for [CODE]switch (stage) {[/CODE] Under that add [CODE] case 12000: sendOptionDialogue(player, new int[]{12001, -1}, "Alright", "Nah, I'm good"); return true;[/CODE] This is sending 2 options with 2 arrarys. The arrays are 12001 and -1. If the number is -1 than you want it to stop after you click continue if the number is anything else it will go to that case number. Like 12001 is the first option ("Alright") going into case 12001. Now under that add [CODE] case 12001: if (!player.getInventory().contains(995)) { sendDialogue(player, MEAN_FACE, 2998, -1, "You need some money to play me!"); } else { sendDialogue(player, HAPPY_TALKING, -1, 12002, "Alright."); } return true;[/CODE] This is saying if you don't have and coins in your inventory than you won't play If statements are like cause and effect. If you don't have this than you will be playing without gambling really This "!" in front of this if statement means not or doesn't. You can remove this and figure out what your gonna do next [CODE]if (!player.getInventory().contains(995, 10000000)) {[/CODE] Under that add this [CODE] case 12002: World.getWorld().getNpcs().getById(2998).animate(Animation.create(11900, 0)); World.getWorld().getNpcs().getById(2998).graphics(Graphic.create(2075, 0)); sendDisplayBox(player, 12003, "Rolling..."); player.animate(Animation.create(11900, 0)); player.graphics(Graphic.create(2075, 0)); return true; case 12003: Random dice = new Random(); int roll = 0; int npcRoll = 0; for (int counter = 1; counter <= 1; counter++) { roll = 1 + dice.nextInt(100); npcRoll = 1 + dice.nextInt(100); if (npcRoll < roll) { sendDialogue(player, HAPPY_TALKING, -1, 12004, "I win! I rolled " + roll + " and you got " + npcRoll); } else if (npcRoll == roll) { sendDialogue(player, SAD, 2998, -1, "Dang. We tied with " + npcRoll + "to" + roll +"."); } else if (npcRoll > roll) { sendDialogue(player, SAD, -1, 12005, "No! How did you get " + npcRoll + " and I got " + roll + "?!"); } } return true;[/CODE] his is a for loop. The 1 + dice.nextInt(100); is using the numbers 1 - 100. The int counter = 1; counter <= 1; is making it so it will only put out 1 number. The counter++ is incrementing 1. I can't really explain anything else about that, so go learn it yourself. [CODE]for (int counter = 1; counter <= 1; counter++) { roll = 1 + dice.nextInt(100); npcRoll = 1 + dice.nextInt(100);[/CODE] After all that add this [CODE] case 12004: sendDisplayBox(player, -1, "You recieved " + player.getStackBag() + " from the Smuggler."); player.getInventory().addItem(StackBag.STORED_STACK, player.getStackBag()); return true; case 12005: sendDisplayBox(player, -1, "You lost all of your cash to the Smuggler."); player.addToBag(); return true;[/CODE] This is getting the STORED_STACK item from from StackBag.java and giving it to the player. It will give all the coins put into the stackbag. [CODE]player.getInventory().addItem(StackBag.STORED_STACK, player.getStackBag());[/CODE] Post errors[/CENTER] Here is different type of npc dicing if you don't want to do the stackbag tutorial It's also better Go into DialogueManager.java Import this [CODE]import java.util.Random;[/CODE] Next Search for [CODE]switch (stage) {[/CODE] Under that add this [CODE] case 9050: sendOptionDialogue(player, new int[]{9051, -1}, "Sure", "No thank you"); return true; case 9051: sendDialogue(player, HAPPY_TALKING, -1, 9052, "Sure, why not."); return true; case 9052: Random bet = new Random(); for (int counter = 1; counter <= 1; counter++) { player.bet = 1 + bet.nextInt(9999999); if (!player.getInventory().contains(995)) { sendDialogue(player, MEAN_FACE, 2998, -1, "You need some money to play me!"); } else if (player.getBet() >= 1000) { sendDialogue(player, HAPPY_TALKING, 2998, 9053, "I'll start off with a bet of " + player.bet / 1000 + "K."); player.setBet(player.bet); } } return true; case 9053: World.getWorld().getNpcs().getById(2998).animate(Animation.create(11900, 0)); World.getWorld().getNpcs().getById(2998).graphics(Graphic.create(2075, 0)); sendDisplayBox(player, 9056, "Rolling..."); player.animate(Animation.create(11900, 0)); player.graphics(Graphic.create(2075, 0)); return true; case 9056: Random dice = new Random(); for (int counter = 1; counter <= 1; counter++) { player.roll = 1 + dice.nextInt(100); player.npcRoll = 1 + dice.nextInt(100); if (player.npcRoll < player.roll) { player.setAttribute("cantMove", Boolean.TRUE); sendDialogue(player, WHAT_THE_CRAP, -1, 9054, "Ha loser! I rolled " + player.roll + " and you got " + player.npcRoll + "."); } else if (player.npcRoll == player.roll) { player.setAttribute("cantMove", Boolean.TRUE); sendDialogue(player, MEAN_FACE, 2998, -1, "Shit! How did we tie with " + player.npcRoll); } else if (player.npcRoll > player.roll) { player.setAttribute("cantMove", Boolean.TRUE); sendDialogue(player, MEAN_FACE, -1, 9055, "Fuck! How did you get " + player.npcRoll + "?! I only got " + player.roll + "?!"); } } return true; case 9054: if (!player.getInventory().contains(995, player.getBet())) { player.setAttribute("cantMove", Boolean.FALSE); player.sendMessage("You need that amount of cash to earn the money."); } else if (player.getBet() >= 1000) { player.setAttribute("cantMove", Boolean.FALSE); player.getInventory().addItem(995, player.getBet()); sendDisplayBox(player, -1, "You have recieved " + player.getBet() / 1000 + "<col=00ff00>K</col> from the gambler."); } else { player.setAttribute("cantMove", Boolean.FALSE); player.getInventory().addItem(995, player.getBet()); sendDisplayBox(player, -1, "You have recieved " + player.getBet() + " coins from the gambler."); } return true; case 9055: if (!player.getInventory().contains(995, player.getBet())) { player.setAttribute("cantMove", Boolean.FALSE); player.sendMessage("You need that amount of cash to earn the money."); } else if (player.getBet() >= 1000) { player.setAttribute("cantMove", Boolean.FALSE); player.getInventory().deleteItem(995, player.getBet()); sendDisplayBox(player, -1, "You have lost " + player.getBet() / 1000 + "<col=00ff00>K</col> from the gambler."); } else { player.setAttribute("cantMove", Boolean.FALSE); player.getInventory().deleteItem(995, player.getBet()); sendDisplayBox(player, -1, "You have lost " + player.getBet() + " coins from the gambler."); } return true;[/CODE] Now search for [CODE]switch (id) {[/CODE] Under that add this [CODE]case 2998: sendDialogue(player, HAPPY_TALKING, 2998, 9050, "Hello, @[email protected], would you like to play a game of dice?"); return true;[/CODE] Now go into player.java and add these. The int bet would usually be a private but I'm using it in this. [CODE] public int bet = 0; public int roll = 0; public int npcRoll = 0;[/CODE] [CODE] public void setBet(int bet) { this.bet = bet; } public int getBet() { return bet; }[/CODE] I've got some replys on runelocus that you can't enter the amount of money you want to bet. The only thing I can get so you can enter your amount is on the commands prompt. I have no idea how to get it in the game. So this is giving a random bet amount. You cannot give or take the amount of cash you have bet unless you have that amount. The max bet is 9.99M btw cuz I'm too lazy to put if (player.getBet() >= 1000000) { sendMessage("whatever" + player.getBet() / 100000); or whatever you divide by to get the right number This doesn't let you move until you have already rolled and lost/received your reward
  5. [IMG]http://www.revisi0n.com/Revision%20banner.jpg[/IMG][IMG]http://www.revisi0n.com/Revision%20banner.jpg[/IMG] [URL="http://www.revisi0n.com/"]Forums[/URL] [URL="http://dl.dropbox.com/u/53673205/Revision%20Client%203.jar"]Downloadable Client[/URL] [URL="http://www.revisi0n.com/webclient.htm"]WebClient[/URL] [COLOR="#FF0000"]For the haters:[/COLOR] I GIVE CREDIT TO THE FOLLOWING PEOPLE FOR THEIR SOURCES AND THE THINGS I IMPLEMENTED USING THEM: -> [COLOR="#0000FF"]Insidiax[/COLOR] -> [COLOR="#0000FF"]Me for fixing most of the bugs on the source.[/COLOR] [B][FONT=Impact][SIZE=5]Revision is a new, fast growing Runescape Private server with the best gameplay and player base community on the internet[/SIZE].[/FONT][/B] FEATURES: [LIST] -[COLOR="#FF0000"] Active Forums - Great Staff - Ganodermic armour - Polypore staff - Armadyl Battlestaff - [COLOR="#800080"]WORKING NEX NPC ON 317![/COLOR] - ALL working Skills except construction. - Dungeoneering with Rewards - Primal, Promethium, Gorgonite, Celestial, Sagittarian - ALL working Chaotics including crossbow and shield - Korasi with working Special Attack - Nex Armour fully working with HP Boost - Most working 630+ special attacks working - 600+ revision items on a 317 - Working summoning with Familiars and pets - [COLOR="#800080"]Titans, Pack Yak, Unicorn Stallion, Bunyip, Wolpertinger Specials working[/COLOR] - [COLOR="#800080"]New Runescape Steadfast, Glaiven, and Ragefire Boots.[/COLOR] - FUN balanced Pking and Pking skill that rewards players - [COLOR="#800080"]TONS OF BOSSES TO FIGHT[/COLOR] - GREAT PVM drops with decent drop rates - All game ruining dupes and exploits fixed - Custom Interfaces - Completionist Cape with Emote - Instant Switching [COLOR="#800080"]- Bank Book for Donators[/COLOR] - Instant Slayer task changing for Donators - Fully Working HandCannon [COLOR="#0000FF"][SIZE=3]- FUlly dedicated VPS Hosting[/SIZE][/COLOR] [/COLOR] [/LIST] Media: [URL="http://www.youtube.com/watch?v=dOkA48rty8o"]REVISION Promotional Video[/URL] [IMG]http://desmond.imageshack.us/Himg824/scaled.php?server=824&filename=alloftheseitemswork100.jpg&res=medium[/IMG][IMG]http://desmond.imageshack.us/Himg842/scaled.php?server=842&filename=avatarofcreation.jpg&res=medium[/IMG] [IMG]http://desmond.imageshack.us/Himg138/scaled.php?server=138&filename=balanceelemental.jpg&res=medium[/IMG][IMG]http://desmond.imageshack.us/Himg12/scaled.php?server=12&filename=bulwarkbeast.jpg&res=medium[/IMG] [IMG]http://desmond.imageshack.us/Himg851/scaled.php?server=851&filename=korask.jpg&res=medium[/IMG][IMG]http://desmond.imageshack.us/Himg19/scaled.php?server=19&filename=nightgazero.jpg&res=medium[/IMG] [IMG]http://desmond.imageshack.us/Himg819/scaled.php?server=819&filename=thepummler.jpg&res=medium[/IMG][IMG]http://desmond.imageshack.us/Himg703/scaled.php?server=703&filename=custominterfacesfortons.jpg&res=medium[/IMG] [IMG]http://desmond.imageshack.us/Himg192/scaled.php?server=192&filename=nexlf.png&res=medium[/IMG][IMG]http://desmond.imageshack.us/Himg857/scaled.php?server=857&filename=nexwithallworkinganimat.jpg&res=medium[/IMG] [IMG]http://desmond.imageshack.us/Himg96/scaled.php?server=96&filename=workingarmastorm1.jpg&res=medium[/IMG][IMG]http://desmond.imageshack.us/Himg69/scaled.php?server=69&filename=uniquehomeandactiveplay.jpg&res=medium[/IMG] [IMG]http://img706.imageshack.us/img706/1348/spam2u.png[/IMG][IMG]http://img585.imageshack.us/img585/315/spam1h.png[/IMG] [FONT=Arial Black][SIZE=5][B][U]COME PLAY TODAY!!! ONLINE 24/7!!!![/U][/B][/SIZE][/FONT]
  6. This is a tutorial on how to add dicing to a 562 RS2HD server. I know theres many tutorials on this, lets see if mine is any more efficient or easier then the other ones. =D Files edited: ItemPacketHandler.java, Dicegame.java, Dicegame2.java, Dicegame3.java, Dicegame4.java, Dicegame5.java, Dicegame6.java, Dicegame7.java, Dicegame8.java First of all, lets add the 8 different types of dice. Open: src>com>rs2hd>content>minigames. Make a new file in the minigames folder, name it DiceGame.java [CODE]package com.rs2hd.content.minigames; import com.rs2hd.model.Player; import com.rs2hd.model.World; import com.rs2hd.util.Misc; import java.util.Random; /** * * @author Killed */ public class DiceGame { public static void rollDice(Player player) { if (!player.getInventory().contains(15086, 1)) { return; } int LOWEST = 1; int HIGHEST = 6; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } private static void generateRolledNumber(int lowest, int highest, Random r, Player player) { if (lowest > highest) { return; } long range = (long) highest - (long) lowest + 1; long fraction = (long) (range * r.nextDouble()); int numberRolled = (int) (fraction + lowest); sendNumber(player, numberRolled); } private static void sendNumber(Player player, int numberRolled) { for (Player pl : World.getInstance().getPlayers()) { pl.sm("Player <shad=0FFFF>" + Misc.formatPlayerNameForDisplay(player.getUsername()) + "</shad> rolled a <shad=00FF00>" + numberRolled + "</shad> " + "On the 6 Sided Die."); } } }[/CODE] Next, in the minigames folder make another file, name it DiceGame2.java [CODE]package com.rs2hd.content.minigames; import com.rs2hd.model.Player; import com.rs2hd.model.World; import com.rs2hd.util.Misc; import java.util.Random; /** * * @author Killed */ public class DiceGame2 { public static void rollDice(Player player) { if (!player.getInventory().contains(15088, 1)) { return; } int LOWEST = 1; int HIGHEST = 12; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } private static void generateRolledNumber(int lowest, int highest, Random r, Player player) { if (lowest > highest) { return; } long range = (long) highest - (long) lowest + 1; long fraction = (long) (range * r.nextDouble()); int numberRolled = (int) (fraction + lowest); sendNumber(player, numberRolled); } private static void sendNumber(Player player, int numberRolled) { for (Player pl : World.getInstance().getPlayers()) { pl.sm("Player <shad=0FFFF>" + Misc.formatPlayerNameForDisplay(player.getUsername()) + "</shad> rolled a <shad=00FF00>" + numberRolled + "</shad> " + "on the 8 Sided Die."); } } }[/CODE] Repeat: in the minigames folder make another file, name it DiceGame3.java [CODE]package com.rs2hd.content.minigames; import com.rs2hd.model.Player; import com.rs2hd.model.World; import com.rs2hd.util.Misc; import java.util.Random; /** * * @author Killed */ public class DiceGame3 { public static void rollDice(Player player) { if (!player.getInventory().contains(15090, 1)) { return; } int LOWEST = 1; int HIGHEST = 8; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } private static void generateRolledNumber(int lowest, int highest, Random r, Player player) { if (lowest > highest) { return; } long range = (long) highest - (long) lowest + 1; long fraction = (long) (range * r.nextDouble()); int numberRolled = (int) (fraction + lowest); sendNumber(player, numberRolled); } private static void sendNumber(Player player, int numberRolled) { for (Player pl : World.getInstance().getPlayers()) { pl.sm("Player <shad=0FFFF>" + Misc.formatPlayerNameForDisplay(player.getUsername()) + "</shad> rolled a <shad=00FF00>" + numberRolled + "</shad> " + "on the 8 Sided Die."); } } }[/CODE] Repeat: in the minigames folder make another file, name it DiceGame4.java [CODE]package com.rs2hd.content.minigames; import com.rs2hd.model.Player; import com.rs2hd.model.World; import com.rs2hd.util.Misc; import java.util.Random; /** * * @author Killed */ public class DiceGame4 { public static void rollDice(Player player) { if (!player.getInventory().contains(15092, 1)) { return; } int LOWEST = 1; int HIGHEST = 10; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } private static void generateRolledNumber(int lowest, int highest, Random r, Player player) { if (lowest > highest) { return; } long range = (long) highest - (long) lowest + 1; long fraction = (long) (range * r.nextDouble()); int numberRolled = (int) (fraction + lowest); sendNumber(player, numberRolled); } private static void sendNumber(Player player, int numberRolled) { for (Player pl : World.getInstance().getPlayers()) { pl.sm("Player <shad=0FFFF>" + Misc.formatPlayerNameForDisplay(player.getUsername()) + "</shad> rolled a <shad=00FF00>" + numberRolled + "</shad> " + "on the 10 Sided Die."); } } }[/CODE] Repeat: in the minigames folder make another file, name it DiceGame5.java [CODE]package com.rs2hd.content.minigames; import com.rs2hd.model.Player; import com.rs2hd.model.World; import com.rs2hd.util.Misc; import java.util.Random; /** * * @author Killed */ public class DiceGame5 { public static void rollDice(Player player) { if (!player.getInventory().contains(15094, 1)) { return; } int LOWEST = 1; int HIGHEST = 12; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } private static void generateRolledNumber(int lowest, int highest, Random r, Player player) { if (lowest > highest) { return; } long range = (long) highest - (long) lowest + 1; long fraction = (long) (range * r.nextDouble()); int numberRolled = (int) (fraction + lowest); sendNumber(player, numberRolled); } private static void sendNumber(Player player, int numberRolled) { for (Player pl : World.getInstance().getPlayers()) { pl.sm("Player <shad=0FFFF>" + Misc.formatPlayerNameForDisplay(player.getUsername()) + "</shad> rolled a <shad=00FF00>" + numberRolled + "</shad> " + "on the 12 Sided Dice."); } } }[/CODE] Repeat: in the minigames folder make another file, name it DiceGame6.java [CODE]package com.rs2hd.content.minigames; import com.rs2hd.model.Player; import com.rs2hd.model.World; import com.rs2hd.util.Misc; import java.util.Random; /** * * @author Killed */ public class DiceGame6 { public static void rollDice(Player player) { if (!player.getInventory().contains(15096, 1)) { return; } int LOWEST = 1; int HIGHEST = 20; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } private static void generateRolledNumber(int lowest, int highest, Random r, Player player) { if (lowest > highest) { return; } long range = (long) highest - (long) lowest + 1; long fraction = (long) (range * r.nextDouble()); int numberRolled = (int) (fraction + lowest); sendNumber(player, numberRolled); } private static void sendNumber(Player player, int numberRolled) { for (Player pl : World.getInstance().getPlayers()) { pl.sm("Player <shad=0FFFF>" + Misc.formatPlayerNameForDisplay(player.getUsername()) + "</shad> rolled a <shad=00FF00>" + numberRolled + "</shad> " + "on the 20 Sided Die."); } } }[/CODE] Repeat: in the minigames folder make another file, name it DiceGame7.java [CODE]package com.rs2hd.content.minigames; import com.rs2hd.model.Player; import com.rs2hd.model.World; import com.rs2hd.util.Misc; import java.util.Random; /** * * @author Killed */ public class DiceGame7 { public static void rollDice(Player player) { if (!player.getInventory().contains(15098, 1)) { return; } int LOWEST = 1; int HIGHEST = 100; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } private static void generateRolledNumber(int lowest, int highest, Random r, Player player) { if (lowest > highest) { return; } long range = (long) highest - (long) lowest + 1; long fraction = (long) (range * r.nextDouble()); int numberRolled = (int) (fraction + lowest); sendNumber(player, numberRolled); } private static void sendNumber(Player player, int numberRolled) { for (Player pl : World.getInstance().getPlayers()) { pl.sm("Player <shad=0FFFF>" + Misc.formatPlayerNameForDisplay(player.getUsername()) + "</shad> rolled a <shad=00FF00>" + numberRolled + "</shad> " + "on the Percentile Dice."); } } }[/CODE] Repeat: in the minigames folder make another file, name it DiceGame8.java [CODE]package com.rs2hd.content.minigames; import com.rs2hd.model.Player; import com.rs2hd.model.World; import com.rs2hd.util.Misc; import java.util.Random; /** * * @author Killed */ public class DiceGame8 { public static void rollDice(Player player) { if (!player.getInventory().contains(15100, 1)) { return; } int LOWEST = 1; int HIGHEST = 4; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } private static void generateRolledNumber(int lowest, int highest, Random r, Player player) { if (lowest > highest) { return; } long range = (long) highest - (long) lowest + 1; long fraction = (long) (range * r.nextDouble()); int numberRolled = (int) (fraction + lowest); sendNumber(player, numberRolled); } private static void sendNumber(Player player, int numberRolled) { for (Player pl : World.getInstance().getPlayers()) { pl.sm("Player <shad=0FFFF>" + Misc.formatPlayerNameForDisplay(player.getUsername()) + "</shad> rolled a <shad=00FF00>" + numberRolled + "</shad> " + "on the 4 Sided Die."); } } }[/CODE] Now for the last part, what you want to do is open up ItemPacketHandler.java src>com>rs2hd>packethandler>ItemPacketHandler.java At the top of that file, add the imports: [CODE]import com.rs2hd.content.minigames.DiceGame; import com.rs2hd.content.minigames.DiceGame2; import com.rs2hd.content.minigames.DiceGame3; import com.rs2hd.content.minigames.DiceGame4; import com.rs2hd.content.minigames.DiceGame5; import com.rs2hd.content.minigames.DiceGame6; import com.rs2hd.content.minigames.DiceGame7; import com.rs2hd.content.minigames.DiceGame8;[/CODE] Now after the imports are added, search for: [CODE]case 14219:[/CODE] Below that case, add this: [CODE] case 15084: player.getActionSender().sendChatboxInterface(234); player.getActionSender().sendString("What would you like to roll?", 234, 1); player.getActionSender().sendString("One 6-sided die", 234, 2); player.getActionSender().sendString("Two 6-sided dice", 234, 3); player.getActionSender().sendString("One 4-sided die", 234, 4); player.getActionSender().sendString("One 8-sided die", 234, 5); player.getActionSender().sendString("More...", 234, 6); break; case 15086://Dice (6 Sided) if (player.potDelay == 0) { DiceGame.rollDice(player); player.potDelay = 3; player.animate(11900, 0); } break; case 15088://Dice (Two 6 Sided) if (player.potDelay == 0) { DiceGame2.rollDice(player); player.potDelay = 3; player.animate(11900, 0); } break; case 15090://Dice (8 Sided) if (player.potDelay == 0) { DiceGame3.rollDice(player); player.potDelay = 3; player.animate(11900, 0); } break; case 15092://Dice (10 Sided) if (player.potDelay == 0) { DiceGame4.rollDice(player); player.potDelay = 3; player.animate(11900, 0); } break; case 15094://Dice (12 Sided) if (player.potDelay == 0) { DiceGame5.rollDice(player); player.potDelay = 3; player.animate(11900, 0); } break; case 15096://Die (20 Sided) if (player.potDelay == 0) { DiceGame6.rollDice(player); player.potDelay = 3; player.animate(11900, 0); } break; case 15098://Dice (Percentile) if (player.potDelay == 0) { DiceGame7.rollDice(player); player.potDelay = 3; player.animate(11900, 0); } break; case 15100://Dice (4 Sided) if (player.potDelay == 0) { DiceGame8.rollDice(player); player.potDelay = 3; player.animate(11900, 0); } break;[/CODE] Save everything, compile the source. Now your finished with all 8 Dice fully working.
  7. Note: This is used on [SIZE=5][COLOR="#FF0000"]317 PI[/COLOR][/SIZE](HybridPVP in my case) So basically all you really need is a few simple case's in itemclick2.java, and in client, item.def add a few things. No biggie right? Now for the codes.. Itemdef.java changes [CODE] case 15088: itemDef.itemActions = new String[5]; itemDef.itemActions[2] = "Roll"; break; case 15098: itemDef.itemActions = new String[5]; itemDef.itemActions[2] = "Roll"; break; [/CODE] and for itemclick2.java [CODE] case 15098: c.forcedText =(""+c.playerName+" rolled a " + Misc.random(100) + " with the 1-100 dice!"); c.startAnimation(11900); c.gfx0(2075); c.forcedChatUpdateRequired = true; c.updateRequired = true; break; case 15088: c.forcedText =""+c.playerName+" rolled a " + Misc.random(12) + " with the 1-12 dice!"; c.startAnimation(11900); c.gfx0(2075); c.forcedChatUpdateRequired = true; c.updateRequired = true; break; [/CODE] Simply, and not perfect, but if you do the itemdef and the itemclick2, it works perfectly fine. Hope this helps.
  8. [SIZE=6][COLOR="#00FF00"][CENTER]ZetaX[/CENTER][/COLOR][/SIZE] [img]http://www.upload.ee/image/1895165/Sponsor.gif[/img] [IMG]http://i39.tinypic.com/2qcqhsm.png[/IMG] [img]http://i56.tinypic.com/imijbl.png[/img][URL="http://zetax.net/forums/index.php?page=dlm"]Download[/URL] [img]http://i44.tinypic.com/9j41t1.jpg[/img][URL="http://zetax.net/forums"]Forums[/URL] [SIZE=3][COLOR="#0000FF"][FONT=Comic Sans MS]ZetaX Mission Statement[/FONT][/COLOR][/SIZE] ZetaX staff is always willing to help a player. For players inputs and thoughts about what must happen we use the chain of command idea. This meaning is that players will tell mods and supporting members about what they would like to see. The Supporting members and mods would then tell an owner the options that are possible. This will limit the stress put on an owner and allow them to play the server with the players more often. ZetaX also welcomes constructive criticism to help better the server. The main goal of ZetaX staff is not to make money like most server staff members but it is to satisfy the players needs. ZetaX also would like to insure the players that we put our all into maintaining the server's quality. To do this we are tracking every penny that is received and using to make the server more entertaining. Even if you are not a fan of the server we would still appreciate if you use our forums to discuss topics and give your feedback. [img]http://i40.tinypic.com/2ymwvg5.jpg[/img] [COLOR="#FF0000"][SIZE=3][FONT=Century Gothic]Main Features[/FONT][/SIZE][/COLOR] [LIST] [*]10+ bosses droping various items [*]5+ Minigames [*]Custom Item effects(Ex. Demon horn necklace prayer restore different then runescape) [*]99% uptime guarantee [*]Nex armour effects [*]95% Effigys like runescape [*]Clue Scrolls [*]Custom Bounty System [*]Questing [*]Creative and enjoyable events [*]Summoning [*]Weekly updates planed [/LIST] [COLOR="#00FF00"][SIZE=3]Media[/SIZE][/COLOR] Our official youtube channel [url=http://www.youtube.com/ZetaX317]ZetaX317 - YouTube[/url] [video=youtube;cvU9sw8pu9I]http://www.youtube.com/watch?v=cvU9sw8pu9I[/video] [video=youtube;S_I-mnoEYcs]http://www.youtube.com/watch?v=S_I-mnoEYcs[/video] [b]All clue scroll levels!![/b] [IMG]http://i42.tinypic.com/jb00f9.jpg[/IMG] [b]Korasi Spec hits with mage![/b] [img]http://i40.tinypic.com/2612fyp.jpg[/img] [b]Custom Bounty Hunter System[/b] [IMG]http://i43.tinypic.com/dzf8yw.jpg[/IMG] [spoiler=Pics] [b]Custom Quests[/b] [IMG]http://i42.tinypic.com/2hogpcp.jpg[/IMG] [b]Custom Barbarian Assault[/b] [img]http://i39.tinypic.com/iqc1ag.png[/img] [b]All of the newest items.[/b] [img]http://i39.tinypic.com/w8tker.png[/img] [B]Dungeneering with Item Binding[/B] [IMG]http://i42.tinypic.com/swsdug.jpg[/IMG] [b]Pack Yak banks for you[/b] [IMG]http://i41.tinypic.com/2v9vyc1.jpg[/IMG] [b]ZetaX[/b] [img]http://i41.tinypic.com/20sarsh.png[/img] [b]New animations[/b] [img]http://i39.tinypic.com/2rh04g7.png[/img] [b]Lakhranaz[/b] [img]http://i41.tinypic.com/9s89sh.png[/img] [b]Troll Queen[/b] [img]http://i39.tinypic.com/21d03sx.png[/img] [b]Nomad[/b] [img]http://i44.tinypic.com/2cwwlf5.png[/img] [b]Giant Sea Snake[/b] [img]http://i41.tinypic.com/14bt4k3.png[/img] [b]Avatar of Destruction[/b] [img]http://i43.tinypic.com/34zx6jm.png[/img] [b]95% Effigys[/b] [IMG]http://i42.tinypic.com/nna06u.jpg[/IMG] [b]Dragonkin Lamp allows xp in any skill!! [IMG]http://i39.tinypic.com/2wlrg9d.jpg[/IMG] [b]Just client loading nothing big[/b] [IMG]http://i42.tinypic.com/24dlk77.jpg[/IMG] [/spoiler] Any feedback on update suggestions would be thanked:D
  9. [B][CENTER][IMG]http://i54.tinypic.com/sm93k3.jpg[/IMG] [COLOR="#008000"]Friend Chat = "SecretDice"[/COLOR] [COLOR=#800080]Secret Dice is a whole new Dicing Clan that you can trust! Most other cc's are known as scammers and we want to ensure you a legit, trustworthy, and fun time gambling! The Hosts are Handpicked by Kill Joy (me) and Host Clon (co-owner). They will also be earned. The goal of the clan is to become a trusted and respected dicing clan.[/COLOR] [SIZE=5][COLOR=#ff8c00][B][U]Official Worlds:[/U][/B] [/COLOR][/SIZE] World 2 - May be switched to 9. World 3 [SIZE=5][COLOR=#ff8c00][B][U]Rules:[/U][/B][/COLOR][/SIZE] [COLOR=#800080]No scamming No spamming No talking of macros/bots No trolling No racism No repeatedly saying a Host Scammed you. Take your issue to The Owner or Co-Owner[/COLOR][/CENTER][/B] [CENTER][B][U][COLOR=#ff8c00][SIZE=5]Ranks:[/SIZE][/COLOR][/U][/B] [COLOR=#800080][B]As said before Hosts are Handpicked and are deemed trusted by The Owner or Co-Owner. Contact Host Xerxes (me) In-game if you have any questions.[/B][/COLOR][B] [COLOR=#ff0000][B]NOTE:[/B] The higher the person is ranked the more he is trusted.[/COLOR] [COLOR=#ff8c00]Current Rank List:[/COLOR] [COLOR=#800080]Host Xerxes (me)- Owner Host Clon (my friend)- General MasterChip (xJames' brother) - Captain Gingernosou1 (Sick`) - Captain [/COLOR][/B][/CENTER] Thread will be edited later.
  10. iiMack

    317 RSPS Dicing

    So Im using [Pi] Based from Zepsity and i was wondering how would i add dicing
  11. We now have Dungeoneering with new monsters and the max level set to 120! We also have a new Dungeoneering token system where you can redeem 50+ new items! Also a new summoning update, instead of buying pouches you can actually make them now! All monsters have a charm drop Website: [url]www.rune-world.info[/url] Webclient: webclient.rune-world.info Download: download.rune-world.info Some Features: [color=red][B]Skills:[/B] Perfect combat All 24 skills are fully trainable, even farming, construction, etc Skilling arena to help you level up Ancient and lunar magic Ancient curses, so you can use that amazing turmoil 100% working range and magic Great leveling up Double XP events Real pking and drops, just like Runescape! [/color] [color=darkblue][B]Minigames:[/B] (NEW) Pyramid Plunder (NEW) Domination Tower Barrows Pest Control Duel Arena Castle Wars Tzhaar Fight Caves Tzhaar Fight Pits Barbarian Assault Warrior's Guild[/color] [color=green][B]Monsters:[/B] Frost Dragons Complete GWD, with all 4 gods Giant Mole, with real burrowing Strykywerms Tormented Demons Kalphite Queen KBD Daggonoth Kings Chaos Elemental Everlasting Nomad Corporal Beast Dungeoneering Monsters Complete Brimhaven Dungeon Complete Taverly Dungeon Complete Slayer Tower Complete Varrock Sewers 100+ Other Spawned NPC's to be trained on.[/color] [color=indigo][B]Items:[/B] ALL Chaotic Weapons Extreme Potions Royal Torva Dicing and Gambling Few Customs Dragon Claws Koraski Ceremonial Colored Whips ALL THE NEW ITEMS ON RUNESCAPE :D[/color] [b][color=orange]Images[/color][/b] [spoil] [IMG]http://screensnapr.com/e/yvXWSQ.png[/IMG] [IMG]http://screensnapr.com/e/FesgG5.png[/IMG] [IMG]http://screensnapr.com/e/O8y8Kr.png[/IMG] [IMG]http://screensnapr.com/e/XOFwbp.png[/IMG] [IMG]http://screensnapr.com/e/uj1Fhj.png[/IMG] [IMG]http://screensnapr.com/e/OVr8d9.png[/IMG] [IMG]http://i.imgur.com/gDkGP.png[/IMG] [IMG]http://i.imgur.com/vI8Ll.png[/IMG] [IMG]http://i.imgur.com/tfCw8.png[/IMG] [IMG]http://i.imgur.com/1yqYQ.png[/IMG] [IMG]http://i.imgur.com/UBswm.png[/IMG] [IMG]http://i.imgur.com/O9SYR.png[/IMG] [IMG]http://i.imgur.com/TxIoi.png[/IMG] [IMG]http://i.imgur.com/tTRZW.png[/IMG] [IMG]http://i.imgur.com/z9omf.png[/IMG] [IMG]http://i.imgur.com/N5q2g.png[/IMG] [IMG]http://i.imgur.com/PsRvA.png[/IMG] [IMG]http://i.imgur.com/SNtRj.png[/IMG] [IMG]http://i.imgur.com/jh4el.png[/IMG] [IMG]http://i.imgur.com/Bb5TT.png[/IMG] [IMG]http://i.imgur.com/FSqzx.png[/IMG] [IMG]http://i.imgur.com/4ZqFi.png[/IMG] [IMG]http://i.imgur.com/fgISV.png[/IMG] [IMG]http://i.imgur.com/v4JEG.png[/IMG] [IMG]http://i.imgur.com/b88v7.png[/IMG] [IMG]http://i.imgur.com/zYxxh.png[/IMG] [IMG]http://i.imgur.com/21yKZ.png[/IMG] [IMG]http://i.imgur.com/A6SDx.png[/IMG] [IMG]http://i.imgur.com/YMQgZ.png[/IMG] [IMG]http://i.imgur.com/S9o8R.png[/IMG] [IMG]http://i.imgur.com/3ynMD.png[/IMG] [IMG]http://i.imgur.com/mQohC.png[/IMG] [IMG]http://i.imgur.com/MtI4s.png[/IMG] [IMG]http://i.imgur.com/F38fh.png[/IMG] [IMG]http://i.imgur.com/NkhNV.png[/IMG] [IMG]http://i.imgur.com/fCtH4.png[/IMG] [IMG]http://i.imgur.com/fjQni.png[/IMG] [IMG]http://i.imgur.com/vOCxu.png[/IMG] [IMG]http://i.imgur.com/kxZWy.png[/IMG] [IMG]http://i.imgur.com/442bi.png[/IMG] [IMG]http://i.imgur.com/WEbTh.png[/IMG]
  12. okay so this is my first tut so please dont flame, just give criticism and u will be thanked for helping me make my tuts better next time. lets get down to it Credits: Evolocity for the tut i advanced on this will make all the dice work. just if u wanted to make it so they all work must have done the tut [URL="http://www.************.org/runescape-development/rs-503-client-server/tutorials/338218-562-dicing-tutorial-loading-602-cache.html"][562] Dicing Tutorial Loading 602 Cache[/URL] Files edited: DiceGame.java & ItemPacketHandler.java ok first open up ItemPacketHandler and search for "case 15098" now replace the case with this one [CODE]case 15086: if (player.potDelay == 0) { com.rs2hd.content.DiceGame.rollDice2(player); player.potDelay = 4; player.animate(11900); player.graphics(2072); } break; case 15088: if (player.potDelay == 0) { com.rs2hd.content.DiceGame.rollDice3(player); player.potDelay = 4; player.animate(11900); player.graphics(2074); } break; case 15090: if (player.potDelay == 0) { com.rs2hd.content.DiceGame.rollDice4(player); player.potDelay = 4; player.animate(11900); player.graphics(2071); } break; case 15092: if (player.potDelay == 0) { com.rs2hd.content.DiceGame.rollDice5(player); player.potDelay = 4; player.animate(11900); player.graphics(2070); } break; case 15094: if (player.potDelay == 0) { com.rs2hd.content.DiceGame.rollDice6(player); player.potDelay = 4; player.animate(11900); player.graphics(2073); } break; case 15096: if (player.potDelay == 0) { com.rs2hd.content.DiceGame.rollDice7(player); player.potDelay = 4; player.animate(11900); player.graphics(2068); } break; case 15098: if (player.potDelay == 0) { com.rs2hd.content.DiceGame.rollDice8(player); player.potDelay = 4; player.animate(11900); player.graphics(2075); } break; case 15100: if (player.potDelay == 0) { com.rs2hd.content.DiceGame.rollDice1(player); player.potDelay = 4; player.animate(11900); player.graphics(2069); } break;[/CODE] now save that and exit. next open DiceGame.java and replace the whole file with this [CODE]package com.rs2hd.content; import com.rs2hd.model.Player; import com.rs2hd.model.World; import com.rs2hd.util.Misc; import java.util.Random; /** * * @author James <[email protected]> * @created Jul 3, 2011 */ public class DiceGame { public static void rollDice1(Player player) { if(!player.getInventory().contains(15100, 1)) { return; } int LOWEST = 1; int HIGHEST = 4; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } public static void rollDice2(Player player) { if(!player.getInventory().contains(15086, 1)) { return; } int LOWEST = 1; int HIGHEST = 6; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } public static void rollDice3(Player player) { if(!player.getInventory().contains(15088, 1)) { return; } int LOWEST = 1; int HIGHEST = 12; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } public static void rollDice4(Player player) { if(!player.getInventory().contains(15090, 1)) { return; } int LOWEST = 1; int HIGHEST = 8; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } public static void rollDice5(Player player) { if(!player.getInventory().contains(15092, 1)) { return; } int LOWEST = 1; int HIGHEST = 10; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } public static void rollDice6(Player player) { if(!player.getInventory().contains(15094, 1)) { return; } int LOWEST = 1; int HIGHEST = 12; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } public static void rollDice7(Player player) { if(!player.getInventory().contains(15096, 1)) { return; } int LOWEST = 1; int HIGHEST = 20; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } public static void rollDice8(Player player) { if (!player.getInventory().contains(15098, 1)) { return; } int LOWEST = 1; int HIGHEST = 100; Random r = new Random(); generateRolledNumber(LOWEST, HIGHEST, r, player); } private static void generateRolledNumber(int lowest, int highest, Random r, Player player) { if (lowest > highest) { return; } long range = (long) highest - (long) lowest + 1; long fraction = (long) (range * r.nextDouble()); int numberRolled = (int) (fraction + lowest); sendNumber(player, numberRolled); } private static void sendNumber(Player player, int numberRolled) { player.sm("Rolling...");//can be deleted if you want player.sm("rolled <col=FF0000>" + numberRolled + "</col> " + "on the percentile dice");//correct message when number is rolled } }[/CODE] save exit then compile and your done . also this may be messy ino but its just how i made it handle all of the dice and again also if u have any errors post them here and i will try help. EDIT: sorry if i missed credits EDIT EDIT: soz changed the 150100 to proper id, soz for that little mistake, but its simple to fix, anyways its actually 15100 and has now be changed :)
  13. Jig

    612 Dicing ?

    Well i was looking aroudn and cant seem to find it so im asking here, does anyone know how i can add dicing to my 614 rsps?
  14. Hi, This is a tutorial on adding 100% dicing to your 562 server, including clan chat, private roll and dicing bag. Go to src > com > rs2hd > PacketHandler > ItemPacketHandler.java > search "private void itemSelect(final Player player, final Packet packet) {". Add this code after the ID switch. [CODE] case 15086: player.dicingtime = 6; player.dice = id; player.lowest = 1; player.highest = 6; player.getInventory().deleteItem(id, 1); player.animate(11900); player.graphics(2072); player.sm("Rolling..."); break; case 15088: player.dicingtime = 6; player.dice = id; player.lowest = 1; player.highest = 12; player.getInventory().deleteItem(id, 1); player.animate(11900); player.graphics(2074); player.sm("Rolling..."); break; case 15090: player.dicingtime = 6; player.dice = id; player.lowest = 1; player.highest = 8; player.getInventory().deleteItem(id, 1); player.animate(11900); player.graphics(2071); player.sm("Rolling..."); break; case 15092: player.dicingtime = 6; player.dice = id; player.lowest = 1; player.highest = 10; player.getInventory().deleteItem(id, 1); player.animate(11900); player.graphics(2070); player.sm("Rolling..."); break; case 15094: player.dicingtime = 6; player.dice = id; player.lowest = 1; player.highest = 12; player.getInventory().deleteItem(id, 1); player.animate(11900); player.graphics(2073); player.sm("Rolling..."); break; case 15096: player.dicingtime = 6; player.dice = id; player.lowest = 1; player.highest = 20; player.getInventory().deleteItem(id, 1); player.animate(11900); player.graphics(2068); player.sm("Rolling..."); break; case 15098: player.dicingtime = 6; player.dice = id; player.lowest = 1; player.highest = 100; player.getInventory().deleteItem(id, 1); player.animate(11900); player.graphics(2075); player.sm("Rolling..."); break; case 15100: player.dicingtime = 6; player.dice = id; player.lowest = 1; player.highest = 4; player.getInventory().deleteItem(id, 1); player.animate(11900); player.graphics(2069); player.sm("Rolling..."); break; [/CODE] Open src > com > rs2hd > model > Player.java, declare the codes below. Search "tick()" and add the following code above it. [CODE] public int dice, dicingtime, lowest, highest = -1; public int generateRolledNumber(Random r, Player player) { if (lowest > highest) { return -1; } long range = (long) highest - (long) lowest + 1; long fraction = (long) (range * r.nextDouble()); int numberRolled = (int) (fraction + lowest); return numberRolled; } public String DiceText(int dice) { switch(dice) { case 15086: return "a six-sided"; case 15088: return "two six-sided"; case 15090: return "an eight-sided"; case 15092: return "a ten-sided"; case 15094: return "a twelve-sided"; case 15096: return "a a twenty-sided"; case 15098: return "the percentile"; case 15100: return "a four-sided"; } return ""; } [/CODE] In "tick()" add the countdown code below (could be done easier but was to lazy to add a event). [CODE] if(dicingtime > 1) { dicingtime--; } if(dicingtime == 1) { Random r = new Random(); getInventory().addItem(dice, 1); World.getWorld().getClanManager().sendDiceMessage(this, "Clan Chat channel-mate <col=db3535>"+getDisplayName()+"</col> rolled <col=db3535>"+generateRolledNumber(r, this)+"</col> on "+DiceText(dice)+" die.", "You rolled <col=db3535>"+generateRolledNumber(r, this)+"</col> on "+DiceText(dice)+" die."); dicingtime = -1; } [/CODE] Open src > com > rs2hd > content > clans > ClanManager.java and search "sendClanMessage". Add under the sendClanMessage method the code below. [CODE] public void sendDiceMessage(Player player, String text, String text2) { Clan c = clans.get(Misc.formatPlayerNameForProtocol(player.getSettings().getClanOwner())); if (c == null) { player.sm(text2); return; } for (Player pl : c.getMembers()) { if (pl.getIndex() == player.getIndex()) { continue; } pl.sm(text); } player.sm(text); } [/CODE] For TkoScape open src > com > rs2hd > PacketHandler > DialogueOptions.java, if you want to have a dice bag of course, you will need to convert this to another source base yourself. Replace the whole "case 234: //make over.". [CODE] case 234: //make over. if(player.roll == 1) { if (buttonId == 2) { player.getInventory().deleteItem(15084, 1); player.getInventory().addItem(15086, 1); player.getActionSender().sendCloseChatboxInterface(); } if (buttonId == 3) { player.getInventory().deleteItem(15084, 1); player.getInventory().addItem(15088, 1); player.getActionSender().sendCloseChatboxInterface(); } if (buttonId == 4) { player.getInventory().deleteItem(15084, 1); player.getInventory().addItem(15100, 1); player.getActionSender().sendCloseChatboxInterface(); } if (buttonId == 5) { player.getInventory().deleteItem(15084, 1); player.getInventory().addItem(15090, 1); player.getActionSender().sendCloseChatboxInterface(); } if (buttonId == 6) { player.getActionSender().sendChatboxInterface(234); player.getActionSender().sendString("What would you like to roll?", 234, 1); player.getActionSender().sendString("One 10-sided die", 234, 2); player.getActionSender().sendString("One 12-sided die", 234, 3); player.getActionSender().sendString("One 20-sided die", 234, 4); player.getActionSender().sendString("Two 10-sided dice for 1-100", 234, 5); player.getActionSender().sendString("Back...", 234, 6); player.roll = 2; //player.sm("roll = "+player.roll+""); } } else if(player.roll == 2) { if (buttonId == 2) { player.getInventory().deleteItem(15084, 1); player.getInventory().addItem(15092, 1); player.getActionSender().sendCloseChatboxInterface(); } if (buttonId == 3) { player.getInventory().deleteItem(15084, 1); player.getInventory().addItem(15094, 1); player.getActionSender().sendCloseChatboxInterface(); } if (buttonId == 4) { player.getInventory().deleteItem(15084, 1); player.getInventory().addItem(15096, 1); player.getActionSender().sendCloseChatboxInterface(); } if (buttonId == 5) { player.getInventory().deleteItem(15084, 1); player.getInventory().addItem(15098, 1); player.getActionSender().sendCloseChatboxInterface(); } if (buttonId == 6) { player.getActionSender().sendChatboxInterface(234); player.getActionSender().sendString("What would you like to roll?", 234, 1); player.getActionSender().sendString("One 6-sided die", 234, 2); player.getActionSender().sendString("Two 6-sided dice", 234, 3); player.getActionSender().sendString("One 4-sided die", 234, 4); player.getActionSender().sendString("One 8-sided die", 234, 5); player.getActionSender().sendString("More...", 234, 6); player.roll = 1; //player.sm("roll = "+player.roll+""); } } break; [/CODE] Again in ItemPacketHandler.java add at the "itemselect" method (same as the first part of this tutorial). [CODE] case 15084: player.getActionSender().sendChatboxInterface(234); player.getActionSender().sendString("What would you like to roll?", 234, 1); player.getActionSender().sendString("One 6-sided die", 234, 2); player.getActionSender().sendString("Two 6-sided dice", 234, 3); player.getActionSender().sendString("One 4-sided die", 234, 4); player.getActionSender().sendString("One 8-sided die", 234, 5); player.getActionSender().sendString("More...", 234, 6); player.roll = 1; break; [/CODE] Enjoy your almost 100% dicing, you just have to get the correct item option packets to add the other options 100%. Credits - Apache Ah64 Kind regards, Apache Ah64
  15. [B]H[/B]ey , I'm trying to find tutorial , how to code/add Dicing to 317 server. [B]C[/B]ould anyone be so nice and share their knowledge ? :) [B]I[/B] would appreciate it alot. [B]Mr C[/B]
  16. pkingbandit

    color to dicing

    So i added dicing to with foreced text but i need to change its color, i tried to add the <col> thing it didnt work or i didnt add in rite spot, anyone help?
  17. pkingbandit

    dicing 317 pi

    so im trying to add dicing and it says to add this [CODE]In client.java add to process() Code: FetchDice(); Add these two voids.[/CODE] but idk where to add that, im using this guide. [URL="http://www.rune-server.org/runescape-development/rs2-server/snippets/335315-pi-99-dicing.html"]http://www.rune-server.org/runescape-development/rs2-server/snippets/335315-pi-99-dicing.html[/URL] and i dont have that code that says fetch dice in there but when i click on roll dice, it just says rolling, never gives me a number. And i tried all the dice.... I have (for now) added a diff dice but when it yells it, it just shows up as a normal person talking. Here is the code: [CODE] case 15084: c.forcedText =(""+c.playerName+" rolled a " + Misc.random(100) + " with the 1-100 dice!");[CODE] i was wandering what i would add to make it color?
  18. [SIZE=4]I was once a host of "Diamonds" dicing clan chat before getting hacked, i will post a couple of my achievement screenshots[/SIZE] [ATTACH=CONFIG]3353[/ATTACH] [ATTACH=CONFIG]3354[/ATTACH] [ATTACH=CONFIG]3355[/ATTACH] [ATTACH=CONFIG]3356[/ATTACH] [ATTACH=CONFIG]3357[/ATTACH] [B][SIZE=5][COLOR="#FF0000"]I was hacked at 1b bank, Goodbye Dicing. Had Fun.[/COLOR][/SIZE][/B]
  19. [RSGP]Paying 7m or a membership 40 days for a source with dicing. i'm paying 7m or a 40 days membership Level Up card,if you give me a source with dice added,562+ talk me msn or skype: skype : joker22157 msn : [email][email protected][/email] Thanks Vestass.
  20. I am creating a new dicing clan named Ped0dicing. Our home will be world 22, g.e Rank Req: 1. Show cash pile 2. Show dice bags (should be 2,6 sided and 1-100 percentile) 3. List how much cash you are willing to pay out(you'll be ranked lower on behalf of pay out sacrificing) --------- If anyone scams you, make a video for proof, and someone will refund your cash. --------- WHY THIS DICE CLAN IS BEING MADE: I got cleaned hard (500M), and there are alot of scam dicers out there, so I'd like to make a legitimante one. I only have 80m, so I won't be hosting big pots. This channel will be the main channel of the dicing clan. Any other channel with these types of names: -Ped0Dicing -Ped0 dice -Ped0 Dicing or anything that involves with that, please send me a message in game, or on youtube, and the account will be reported by myself, or anyone that wants to, and the account will be terminated. ---------- A little bit more rank discussion...... If you see any fake, "wanna be" names that have ped0dog 69s on it report to me, and add them to your ignore list. ------- Remember that I am: Level 84 And I always wear gilded, a Level 3 Duellist's Cap, Infinty Gloves & Boots, and a Staff Of Fire, along with a Dragon Defender. VID: [url]http://www.youtube.com/watch?v=cQKqJoRudFM[/url] Song on vid is the ped0bearrrrrrrrr song. RSN: Ped0dog 69s [SIZE=7][COLOR="#FF0000"]MAIIIIIIIIIIIN WORLD IS NOW WORLD 131,G.E[/COLOR][/SIZE]
  21. [center]Hey Sythe Users, I am starting up a dicing clan, before I go any further, if you are unsure of what dicing is, please take a look at the link [url=http://runescape.wikia.com/wiki/Dicing]here[/url]. [b]Why would I want to be in a dicing clan?[/b] Basically dicing is the runescape form of gambling, it is a simple effecient way to make fast millions, especially if your clans get really popular, people will begin to practically hand you money. _________________________________________________________ [SIZE="4"] [color=red][b]To join: Friends Chat: Join user "Im amazinq" (With a q intead of g)[/b][/color][/SIZE] _________________________________________________________ Now that you know the basics of dicing, this is where the money starts to come pouring in. I am trying to get as many people as possible to help recruit people into the Friends chat, aswell as host the dicing. We will be hosting the dicing on world 1 in the Friends chat "Im amazinq" (the g is a q). [u][b] - Current Team - [/b][/u] [b] - Leader - [/b] Will [Im amazinq] [b]- Captains -[/b] - Sloth - - Open - - Open - [b]- Seargents -[/b] - 5 Open Spots - [b]- Recruits -[/b] - 10 Open Spots - [b]- Members -[/b] - Unlimited - *Advertisers will be paid to promote the Friends Chat - Join the Friends Chat and let me know you are advertising* To join simply let me know, or leave a reply on this topic, ranks are earned. [b]Also! I will be hosting weekly give aways + Drop partys for all members of rs-ps.org/Amazing Dicing.[/b] Thanks, Please consider joining, Will[/center]
  22. will

    Amazinq Dicing

    [center]Hey R-S Users, I am starting up a dicing clan, before I go any further, if you are unsure of what dicing is, please take a look at the link [url=http://runescape.wikia.com/wiki/Dicing]here[/url]. [b]Why would I want to be in a dicing clan?[/b] Basically dicing is the runescape form of gambling, it is a simple effecient way to make fast millions, especially if your clans get really popular, people will begin to practically hand you money. _________________________________________________________ [SIZE="4"][color=red][b]To join: Friends Chat: Join user "Im amazinq" (With a q intead of g)[/b][/color][/SIZE] _________________________________________________________ Now that you know the basics of dicing, this is where the money starts to come pouring in. I am trying to get as many people as possible to help recruit people into the Friends chat, aswell as host the dicing. We will be hosting the dicing on world 1 in the Friends chat "Im amazinq" (the g is a q). [u][b] - Current Team - [/b][/u] [b] - Leader - [/b] Will [Im amazinq] [b]- Captains -[/b] - Sloth - - Open - - Open - [b]- Seargents -[/b] - PvMiMattz - - 4 Open Spots - [b]- Recruits -[/b] - 10 Open Spots - [b]- Members -[/b] - Unlimited - *Advertisers will be paid to promote the Friends Chat - Join the Friends Chat and let me know you are advertising* To join simply let me know, or leave a reply on this topic, ranks are earned. [b]Also! I will be hosting weekly give aways + Drop partys for all members of rs-ps.org/Amazing Dicing.[/b] Thanks, Please consider joining, Will[Im amazinq][/center]
  23. will

    Amazinq Dicing

    [center]Hey R-S Users, I am starting up a dicing clan, before I go any further, if you are unsure of what dicing is, please take a look at the link [url=http://runescape.wikia.com/wiki/Dicing]here[/url]. [b]Why would I want to be in a dicing clan?[/b] Basically dicing is the runescape form of gambling, it is a simple effecient way to make fast millions, especially if your clans get really popular, people will begin to practically hand you money. _________________________________________________________ [SIZE="4"][color=red][b]To join: Friends Chat: Join user "Im amazinq" (With a q intead of g)[/b][/color][/SIZE] _________________________________________________________ Now that you know the basics of dicing, this is where the money starts to come pouring in. I am trying to get as many people as possible to help recruit people into the Friends chat, aswell as host the dicing. We will be hosting the dicing on world 1 in the Friends chat "Im amazinq" (the g is a q). [u][b] - Current Team - [/b][/u] [b] - Leader - [/b] Will [Im amazinq] [b]- Captains -[/b] - Sloth - - Open - - Open - [b]- Seargents -[/b] - PvMiMattz - - 4 Open Spots - [b]- Recruits -[/b] - 10 Open Spots - [b]- Members -[/b] - Unlimited - *Advertisers will be paid to promote the Friends Chat - Join the Friends Chat and let me know you are advertising* To join simply let me know, or leave a reply on this topic, ranks are earned. [b]Also! I will be hosting weekly give aways + Drop partys for all members of rs-ps.org/Amazing Dicing.[/b] Thanks, Please consider joining, Will[Im amazinq][/center]
  24. [CENTER][IMG]http://i1015.photobucket.com/albums/af280/iownukid/newnew.png[/IMG][/CENTER] [SIZE=3][COLOR="#0000FF"]So! Let's get started :D[/COLOR][/SIZE] [CENTER][COLOR="#cc3333"][SIZE=5]Clan chat: Dicin Host[/SIZE][/COLOR][/CENTER] [COLOR="#00FF00"][SIZE=4]If you want a rank, you have to be committed to this clan. I want it to get big and the only way for that to happen is to have COMMITTED hosts.[/SIZE][/COLOR] [COLOR="#800080"]Rules:[/COLOR] [SIZE=3]#1.)No sCamming (Hosts)[/SIZE] [SIZE=3]#2.)If a host [I]actually does scam[/I], report him to the owner (Dicin_Host). Do not shout it repeatedly in the clan chat. This will result in a kick.[/SIZE] [SIZE=3]#3.)No declining.[/SIZE] [SIZE=3]#4.)No mean or racial comments to others.[/SIZE] [SIZE=3]#5.)No sPamming in the clan chat.[/SIZE] Doing any of those things will result in a kick and or revoke of rank. Doing a #3 will end up with 2 warnings until a kick and demote by 1 rank. Next time, fully demoted. [CENTER][COLOR="#008000"]About the clan:[/COLOR] [SIZE=4]ALWAYS IN WORLD 2 NO MATTER WHAT[/SIZE] Always 55x2 hosting. Will give drop parties once or twice a week if we get 15+ people [/CENTER] You currently do NOT pay anything for ranks although you need to be someone I deem trustworthy and you must have 40M or more [CENTER][SIZE=5][COLOR="#006633"] NEXT PERSON GETS GENERAL FREE [/COLOR][/SIZE] [SIZE=5][COLOR="#4B0082"]THIRD GETS CAPTAIN![/COLOR][/SIZE][/CENTER] You also must have ATLEAST 40M to become a dice host in this clan [SIZE=4][CENTER][COLOR="#00FFFF"]Current Hosts:[/COLOR] [COLOR="#ff33cc"]1.)Dicin_Host - [COLOR="#FF8C00"]OWNER[/COLOR][/COLOR] [COLOR="#99ff00"]2.)Theminer2335 - [COLOR="#FFFF00"]GENERAL[/COLOR][/COLOR][/SIZE][/CENTER]
  25. James

    Dicing Clan!

    [CENTER] [SIZE=5]~ Welcome to my Dicing Clan Thread ~[/SIZE] I've decided to make a dicing clan to earn a little bit of cash, but at the same time, you have to be legit! Clan Name ( Join the Friends Chat ) [SIZE=6]I Gravity l[/SIZE] Private message me to be able to get ranked on the Chat. I will tell you more information once you've private messaged me.[/CENTER]
×