Thread: [718] 100% Runescape mystery box

Page 6 of 6 FirstFirst ... 456
Results 51 to 57 of 57
  1. #51  
    Registered Member
    Join Date
    Mar 2013
    Posts
    6
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Can anyone help me with this, i'm new to the java coding community and seriously need some help making this work on my 718. Any help is appreciated, i just really don't have any idea of what to do with this snipper!
    Reply With Quote  
     

  2. #52  
    van 't stad

    Shnek's Avatar
    Join Date
    Oct 2013
    Posts
    1,065
    Thanks given
    343
    Thanks received
    297
    Rep Power
    109
    Quote Originally Posted by Guggu3d View Post
    Can anyone help me with this, i'm new to the java coding community and seriously need some help making this work on my 718. Any help is appreciated, i just really don't have any idea of what to do with this snipper!
    add me on skype: dayinthenight
    Attached image

    Do not use the vps from ovh, blocking vps without reason and no customer support
    Reply With Quote  
     

  3. #53  
    Registered Member
    Join Date
    Apr 2014
    Posts
    17
    Thanks given
    0
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by Four Nations View Post
    Well i think its time to release something since its been over a week now since i have released anything.

    100% Rune-scape mystery box with correct items, chances, quantity, grammar, sounds, text etc. Enjoy!

    Always taking criticism and suggestions on how to make it better.

    Code:
    package com.rs.game.player.content.items;
    
    import com.rs.cache.loaders.ItemDefinitions;
    import com.rs.game.player.Player;
    import com.rs.utils.Utils;
    
    /**
     * @author HerBrightSkies @rune-server.org
     */
    public class MysteryBox {
    
        private static final int COMMON[][] = {{995, 5000}, {685, 1}, {1623, 1}, {559, 1}, {1925, 1}, {1965, 1}, {956, 1},
                {1061, 1}, {1957, 1}, {592, 1}, {359, 1}};
        private static final int UNCOMMON[][] = {{3589, 1}, {1621, 1}, {7937, 30}, {1119, 1}, {1442, 1}, {1444, 1}};
        private static final int RARE[][] = {{1601, 1}, {563, 10}, {561, 20}, {1329, 1}, {1315, 1}, {1123, 1}, {1454, 1}};
        private static final int VERY_RARE[][] = {{1127, 1}, {985, 1}, {987, 1}};
        private static int reward, r, c, q;
    
        private static void handle(Player p) {
            r = Utils.random(10);
            p.getInventory().deleteItem(6199, 1);
            p.getPackets().sendSound(98, 0, 1);
    
            switch (r) {
                case 1:
                    r = Utils.random(VERY_RARE.length);
                    q = VERY_RARE[r][1];
                    p.getInventory().addItem(VERY_RARE[r][0], q);
                    reward = VERY_RARE[r][0];
                    p.sm("You open the box and find " + getGrammar() + " " + getNameForItem() + ", awesome!");
                    break;
                case 2:
                case 3:
                    r = Utils.random(RARE.length);
                    q = RARE[r][1];
                    p.getInventory().addItem(RARE[r][0], q);
                    reward = RARE[r][0];
                    p.sm("You open the box and find " + getGrammar() + " " + getNameForItem() + ", excellent.");
                    break;
                case 4:
                case 5:
                case 6:
                    r = Utils.random(UNCOMMON.length);
                    q = UNCOMMON[r][1];
                    p.getInventory().addItem(UNCOMMON[r][0], q);
                    reward = UNCOMMON[r][0];
                    p.sm("You open the box and find " + getGrammar() + " " + getNameForItem() + ", not bad.");
                    break;
                default:
                    c = Utils.random(COMMON[0][1]);
                    r = Utils.random(COMMON.length);
                    q = COMMON[r][1];
                    p.getInventory().addItem(COMMON[r][0], COMMON[r][0] == (995) ? c : q);
                    reward = COMMON[r][0];
                    p.sm((String) "You open the box and find " + (COMMON[r][0] == (995) ? c : getGrammar()) + " "
                            + getNameForItem() + ", " + (COMMON[r][0] == (995) ? "sweet!" : "better luck next time."));
                    break;
            }
        }
    
        private static String getGrammar() {
            if (q == 1) {
                return sw("a") || sw("u") || sw("o") ? "an" : "a";
            }
            return q + "";
        }
    
        private static boolean sw(String n) {
            return getNameForItem().startsWith(n);
        }
    
        private static String getNameForItem() {
            switch (reward) {
                case 995:
                    return COMMON[r][1] == (1) ? "coin" : "coins";
                case 1061:
                    return "pair of leather boots";
                case 592:
                    return "ash";
                case 563:
                    return "law runes";
                case 561:
                    return "nature runes";
                case 1329:
                    return "mithril scimitar";
                case 1315:
                    return "mithril two handed sword";
            }
            return ItemDefinitions.getItemDefinitions(reward).getName().toLowerCase();
        }
    
        public static boolean isBox(int itemId, Player p) {
            switch (itemId) {
                case 6199:
                    handle(p);
                    return true;
            }
            return false;
        }
    }

    Code:
            if (MysteryBox.isBox(itemId, player)) {
                return;
            }

    If you like my releases, Hit the thanks button and show some appreciation so I can keep sharing cool stuff
    If someone could explain exactly where to put this that would be amazing sorry im a noob at java!
    Reply With Quote  
     

  4. #54  
    Registered Member

    Join Date
    Sep 2014
    Posts
    300
    Thanks given
    122
    Thanks received
    91
    Rep Power
    158
    Quote Originally Posted by ZAcrofyse View Post
    Code:
    Compiling...
    src\com\rs\game\player\content\items\MysteryBox.java:30: error: cannot find symb
    ol
                    player.sendGameMessage("You open the box and find " + getGrammar
    () + " " + getNameForItem() + ", awesome!");
                    ^
      symbol:   variable player
      location: class MysteryBox
    src\com\rs\game\player\content\items\MysteryBox.java:38: error: cannot find symb
    ol
                    player.getPackets().sendGameMessage("You open the box and find "
     + getGrammar() + " " + getNameForItem() + ", excellent.");
                    ^
      symbol:   variable player
      location: class MysteryBox
    src\com\rs\game\player\content\items\MysteryBox.java:47: error: cannot find symb
    ol
                    player.getPackets().sendGameMessage("You open the box and find "
     + getGrammar() + " " + getNameForItem() + ", not bad.");
                    ^
      symbol:   variable player
      location: class MysteryBox
    src\com\rs\game\player\content\items\MysteryBox.java:55: error: cannot find symb
    ol
                    player.getPackets().sendGameMessage((String) "You open the box a
    nd find " + (COMMON[r][0] == (995) ? c : getGrammar()) + " "
                    ^
      symbol:   variable player
      location: class MysteryBox
    4 errors
    Press any key to continue . . .
    Help please xD
    Pm me your skype.
    Reply With Quote  
     

  5. #55  
    Registered Member
    bracket's Avatar
    Join Date
    Aug 2009
    Posts
    5,278
    Thanks given
    1,059
    Thanks received
    1,465
    Rep Power
    5000
    Quote Originally Posted by ZAcrofyse View Post
    Code:
    Compiling...
    src\com\rs\game\player\content\items\MysteryBox.java:30: error: cannot find symb
    ol
                    player.sendGameMessage("You open the box and find " + getGrammar
    () + " " + getNameForItem() + ", awesome!");
                    ^
      symbol:   variable player
      location: class MysteryBox
    src\com\rs\game\player\content\items\MysteryBox.java:38: error: cannot find symb
    ol
                    player.getPackets().sendGameMessage("You open the box and find "
     + getGrammar() + " " + getNameForItem() + ", excellent.");
                    ^
      symbol:   variable player
      location: class MysteryBox
    src\com\rs\game\player\content\items\MysteryBox.java:47: error: cannot find symb
    ol
                    player.getPackets().sendGameMessage("You open the box and find "
     + getGrammar() + " " + getNameForItem() + ", not bad.");
                    ^
      symbol:   variable player
      location: class MysteryBox
    src\com\rs\game\player\content\items\MysteryBox.java:55: error: cannot find symb
    ol
                    player.getPackets().sendGameMessage((String) "You open the box a
    nd find " + (COMMON[r][0] == (995) ? c : getGrammar()) + " "
                    ^
      symbol:   variable player
      location: class MysteryBox
    4 errors
    Press any key to continue . . .
    Help please xD
    You're missing the parameter player in the method(s).
    Reply With Quote  
     

  6. #56  
    Registered Member
    rebecca's Avatar
    Join Date
    Aug 2017
    Posts
    1,071
    Thanks given
    862
    Thanks received
    915
    Rep Power
    5000
    Quote Originally Posted by purple pking View Post
    Hey there, I am new to coding so I know you might not be happy with me asking where to insert the code, but could you possibly help me with doing so? It would mean a lot thank you very much. If you can't, no worries I understand and thank you anyway
    read the name of the file, make a MysteryBox class and put this in it..
    Reply With Quote  
     

  7. #57  
    Registered Member
    rebecca's Avatar
    Join Date
    Aug 2017
    Posts
    1,071
    Thanks given
    862
    Thanks received
    915
    Rep Power
    5000
    Code:
    package com.rs.game.player.content.items;
    Reply With Quote  
     

Page 6 of 6 FirstFirst ... 456

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [718] Mystery Box Help
    By Vulcan in forum Help
    Replies: 10
    Last Post: 09-22-2014, 02:13 AM
  2. [718] 100% RuneScape Squeal of Fortune
    By _jordan in forum Show-off
    Replies: 32
    Last Post: 12-05-2013, 06:24 AM
  3. [Pi] Mystery Box for 718.
    By ericuh in forum Help
    Replies: 8
    Last Post: 05-20-2013, 03:19 AM
  4. Mystery box for 718?
    By ericuh in forum Help
    Replies: 5
    Last Post: 05-19-2013, 05:52 PM
  5. 718 Mystery box Codes
    By L3git in forum Requests
    Replies: 12
    Last Post: 12-23-2012, 06:47 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •