Thread: [667/***] Potions/Flasks

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 [667/***] Potions/Flasks 
    Donator [667/***] Potions/Flasks Market Banned



    Join Date
    May 2012
    Posts
    350
    Thanks given
    30
    Thanks received
    28
    Rep Power
    115
    This is my first release in this section [503+] so positive feedback please

    Well im very new to 667 so im going through the folders looking for the stuff to learn and i started with potions, and here it is for anyone who doesnt know how to make them/ how they work.



    Note: they are not tested but any issues post below and ill fix



    first of go to

    src/com/rs/game/player/content/pots.java


    Under


    Code:
    SUMMONING_POTION(new int[] { 12140, 12142, 12144, 12146 },
    				Effects.SUMMONING_POT);

    add the following

    Code:
            HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
                    Effects.HUNTER_POTION),
    
            HUNTER_FLASK(new int[] { 23435, 23437, 23439, 23441 },
                    Effects.HUNTER_POTION),
    
            AGILITY_MIX(new int[] { 11461, 11463 },
                    Effects.AGILITY_MIX),
    
            COMBAT_MIX(new int[] { 11445, 11447 },
                    Effects.COMBAT_MIX),
    
            COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 23457 },
                    Effects.COMBAT_MIX),
    The red code is all the forms of the potion so the first number is the first form (4), (2), (6) and so on after

    Lime color is the effect name which will come in later

    Blue color is the potion/mix/flask name



    Next find this

    Code:
    		STRENGTH_POTION(Skills.STRENGTH) {
    			@Override
    			public int getAffectedSkill(Player player, int skillId,
    					int actualLevel, int realLevel) {
    				int level = actualLevel > realLevel ? realLevel : actualLevel;
    				return (int) (level + 3 + (realLevel * 0.1));
    			}
    		},
    and under the

    Code:
    },

    add this

    Code:
            AGILITY_MIX(Skills.AGILITY) {
                @Override
                public int getAffectedSkill(Player player, int skillId,
                                            int actualLevel, int realLevel) {
                    player.heal(60);
                    int level = actualLevel > realLevel ? realLevel : actualLevel;
                    return (int) (level + 3 + (realLevel * 0.25));
    
                }
            },
            HUNTER_POTION(Skills.HUNTER) {
                @Override
                public int getAffectedSkill(Player player, int skillId,
                                            int actualLevel, int realLevel) {
                    int level = actualLevel > realLevel ? realLevel : actualLevel;
                    return (int) (level + 3 + (realLevel * 0.25));
    
                }
            },
            COMBAT_MIX(Skills.STRENGTH, Skills.ATTACK) {
                @Override
                public int getAffectedSkill(Player player, int skillId,
                                            int actualLevel, int realLevel) {
                    player.heal(30);
                    int level = actualLevel > realLevel ? realLevel : actualLevel;
                    return (int) (level + 3 + (Math.random() * (12 - 3)) + (realLevel * 0.15));
    
                }
            },
    red is the Potion name

    blue is the skills involved in this potion

    green is how much the skill increases

    orange is other affects these only include heal though





    I will be releasing more to do with 667, and if you have any requests for help/tut/snippet made ask and ill get too it




    EDIT: (CREDITS TO PARTYHAT FOR THE FLASK CRUMBLING BELOW)

    Code:
    if (dosesLeft == 0 && name.contains("flask")) {
    		player.getInventory().deleteItem(229, 1);
                    player.getPackets().sendGameMessage("As you finish your last dose, your potion flask crumbles to dust");
    		}
    Reply With Quote  
     

  2. #2  
    Super Donator
    Kova+'s Avatar
    Join Date
    Jan 2012
    Posts
    937
    Thanks given
    124
    Thanks received
    249
    Rep Power
    13
    Also add how to delete the flasks so that they don't turn into a vial after you have finished the flask. They crumble.

    Code:
    if (dosesLeft == 0 && name.contains("flask")) {
    		player.getInventory().deleteItem(229, 1);
                    player.getPackets().sendGameMessage("As you finish your last dose, your potion flask crumbles to dust");
    		}
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Donator [667/***] Potions/Flasks Market Banned



    Join Date
    May 2012
    Posts
    350
    Thanks given
    30
    Thanks received
    28
    Rep Power
    115
    Quote Originally Posted by Partyhatz View Post
    Also add how to delete the flasks so that they don't turn into a vial after you have finished the flask. They crumble.

    Code:
    if (dosesLeft == 0 && name.contains("flask")) {
    		player.getInventory().deleteItem(229, 1);
                    player.getPackets().sendGameMessage("As you finish your last dose, your potion flask crumbles to dust");
    		}

    thanks mate never new that dont play rs cheers will add this into tut and give you credits
    Reply With Quote  
     

  5. #4  
    Super Donator
    Kova+'s Avatar
    Join Date
    Jan 2012
    Posts
    937
    Thanks given
    124
    Thanks received
    249
    Rep Power
    13
    Quote Originally Posted by asteria-X View Post
    thanks mate never new that dont play rs cheers will add this into tut and give you credits
    Okay, thanks and good tutorial.
    Reply With Quote  
     

  6. #5  
    Banned

    Join Date
    Jan 2012
    Age
    25
    Posts
    2,703
    Thanks given
    906
    Thanks received
    630
    Rep Power
    0
    Sorry To Ask Where Do I Put The
    if (dosesLeft == 0 && name.contains("flask")) {
    player.getInventory().deleteItem(229, 1);
    player.getPackets().sendGameMessage("As you finish your last dose, your potion flask crumbles to dust");
    }
    Reply With Quote  
     

  7. #6  
    Donator [667/***] Potions/Flasks Market Banned



    Join Date
    May 2012
    Posts
    350
    Thanks given
    30
    Thanks received
    28
    Rep Power
    115
    anywhere
    Reply With Quote  
     

  8. #7  
    BetNation RS Poker & Dice
    Rune's Avatar
    Join Date
    Jun 2010
    Posts
    417
    Thanks given
    7
    Thanks received
    14
    Rep Power
    20
    Fixed it.
    Reply With Quote  
     

  9. #8  
    Sexy boi <3

    ByteValue's Avatar
    Join Date
    May 2012
    Age
    28
    Posts
    829
    Thanks given
    11
    Thanks received
    80
    Rep Power
    80
    Quote Originally Posted by Coder Mark View Post
    Im getting these errors

    starting...
    src\com\rs\game\player\content\Pots.java:76: error: invalid method declaration;
    return type required
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: illegal start of type
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: ')' expected
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: ';' expected
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: illegal start of type
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: <identifier> expected
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: ';' expected
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: illegal start of type
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: <identifier> expected
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: <identifier> expected
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: illegal start of type
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: <identifier> expected
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: ';' expected
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:76: error: illegal start of type
    HUNTER_POTION(new int[] { 9998, 10000, 10002, 10004 },
    ^
    src\com\rs\game\player\content\Pots.java:77: error: ';' expected
    Effects.HUNTER_POTION),
    ^
    src\com\rs\game\player\content\Pots.java:77: error: <identifier> expected
    Effects.HUNTER_POTION),
    ^
    src\com\rs\game\player\content\Pots.java:77: error: illegal start of type
    Effects.HUNTER_POTION),
    ^
    src\com\rs\game\player\content\Pots.java:79: error: illegal start of type
    HUNTER_FLASK(new int[] { 23435, 23437, 23439, 23441 },
    ^
    src\com\rs\game\player\content\Pots.java:79: error: ')' expected
    HUNTER_FLASK(new int[] { 23435, 23437, 23439, 23441 },
    ^
    src\com\rs\game\player\content\Pots.java:79: error: not a statement
    HUNTER_FLASK(new int[] { 23435, 23437, 23439, 23441 },
    ^
    src\com\rs\game\player\content\Pots.java:79: error: ';' expected
    HUNTER_FLASK(new int[] { 23435, 23437, 23439, 23441 },
    ^
    src\com\rs\game\player\content\Pots.java:79: error: illegal start of type
    HUNTER_FLASK(new int[] { 23435, 23437, 23439, 23441 },
    ^
    src\com\rs\game\player\content\Pots.java:79: error: ';' expected
    HUNTER_FLASK(new int[] { 23435, 23437, 23439, 23441 },
    ^
    src\com\rs\game\player\content\Pots.java:80: error: illegal start of type
    Effects.HUNTER_POTION),
    ^
    src\com\rs\game\player\content\Pots.java:80: error: ';' expected
    Effects.HUNTER_POTION),
    ^
    src\com\rs\game\player\content\Pots.java:82: error: invalid method declaration;
    return type required
    AGILITY_MIX(new int[] { 11461, 11463 },
    ^
    src\com\rs\game\player\content\Pots.java:82: error: illegal start of type
    AGILITY_MIX(new int[] { 11461, 11463 },
    ^
    src\com\rs\game\player\content\Pots.java:82: error: ')' expected
    AGILITY_MIX(new int[] { 11461, 11463 },
    ^
    src\com\rs\game\player\content\Pots.java:82: error: ';' expected
    AGILITY_MIX(new int[] { 11461, 11463 },
    ^
    src\com\rs\game\player\content\Pots.java:82: error: illegal start of type
    AGILITY_MIX(new int[] { 11461, 11463 },
    ^
    src\com\rs\game\player\content\Pots.java:82: error: <identifier> expected
    AGILITY_MIX(new int[] { 11461, 11463 },
    ^
    src\com\rs\game\player\content\Pots.java:82: error: ';' expected
    AGILITY_MIX(new int[] { 11461, 11463 },
    ^
    src\com\rs\game\player\content\Pots.java:82: error: illegal start of type
    AGILITY_MIX(new int[] { 11461, 11463 },
    ^
    src\com\rs\game\player\content\Pots.java:82: error: <identifier> expected
    AGILITY_MIX(new int[] { 11461, 11463 },
    ^
    src\com\rs\game\player\content\Pots.java:82: error: ';' expected
    AGILITY_MIX(new int[] { 11461, 11463 },
    ^
    src\com\rs\game\player\content\Pots.java:82: error: illegal start of type
    AGILITY_MIX(new int[] { 11461, 11463 },
    ^
    src\com\rs\game\player\content\Pots.java:83: error: ';' expected
    Effects.AGILITY_MIX),
    ^
    src\com\rs\game\player\content\Pots.java:83: error: <identifier> expected
    Effects.AGILITY_MIX),
    ^
    src\com\rs\game\player\content\Pots.java:83: error: illegal start of type
    Effects.AGILITY_MIX),
    ^
    src\com\rs\game\player\content\Pots.java:85: error: illegal start of type
    COMBAT_MIX(new int[] { 11445, 11447 },
    ^
    src\com\rs\game\player\content\Pots.java:85: error: ')' expected
    COMBAT_MIX(new int[] { 11445, 11447 },
    ^
    src\com\rs\game\player\content\Pots.java:85: error: not a statement
    COMBAT_MIX(new int[] { 11445, 11447 },
    ^
    src\com\rs\game\player\content\Pots.java:85: error: ';' expected
    COMBAT_MIX(new int[] { 11445, 11447 },
    ^
    src\com\rs\game\player\content\Pots.java:85: error: illegal start of type
    COMBAT_MIX(new int[] { 11445, 11447 },
    ^
    src\com\rs\game\player\content\Pots.java:85: error: ';' expected
    COMBAT_MIX(new int[] { 11445, 11447 },
    ^
    src\com\rs\game\player\content\Pots.java:86: error: illegal start of type
    Effects.COMBAT_MIX),
    ^
    src\com\rs\game\player\content\Pots.java:86: error: ';' expected
    Effects.COMBAT_MIX),
    ^
    src\com\rs\game\player\content\Pots.java:88: error: invalid method declaration;
    return type required
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: illegal start of type
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: ')' expected
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: ';' expected
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: illegal start of type
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: <identifier> expected
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: ';' expected
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: illegal start of type
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: <identifier> expected
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: <identifier> expected
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: illegal start of type
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: <identifier> expected
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: <identifier> expected
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: illegal start of type
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: <identifier> expected
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },
    ^
    src\com\rs\game\player\content\Pots.java:88: error: ';' expected
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },

    ^
    src\com\rs\game\player\content\Pots.java:88: error: illegal start of type
    COMBAT_FLASK(new int[] { 23447, 23449, 23451, 23453, 23455, 2345
    7 },

    ^
    src\com\rs\game\player\content\Pots.java:89: error: ';' expected
    Effects.COMBAT_MIX),
    ^
    src\com\rs\game\player\content\Pots.java:89: error: <identifier> expected
    Effects.COMBAT_MIX),
    ^
    src\com\rs\game\player\content\Pots.java:89: error: illegal start of type
    Effects.COMBAT_MIX),
    ^
    src\com\rs\game\player\content\Pots.java:89: error: <identifier> expected
    Effects.COMBAT_MIX),
    ^
    src\com\rs\game\player\content\Pots.java:92: error: ';' expected
    private int[] id;
    ^
    src\com\rs\game\player\content\Pots.java:92: error: illegal start of type
    private int[] id;
    ^
    src\com\rs\game\player\content\Pots.java:92: error: <identifier> expected
    private int[] id;
    ^
    src\com\rs\game\player\content\Pots.java:92: error: ';' expected
    private int[] id;
    ^
    72 errors
    Press any key to continue . . .
    Post a picture of your Pots class near HUNTER_MIX.
    Reply With Quote  
     

  10. #9  
    BetNation RS Poker & Dice
    Rune's Avatar
    Join Date
    Jun 2010
    Posts
    417
    Thanks given
    7
    Thanks received
    14
    Rep Power
    20
    Quote Originally Posted by Partyhatz View Post
    Also add how to delete the flasks so that they don't turn into a vial after you have finished the flask. They crumble.

    Code:
    if (dosesLeft == 0 && name.contains("flask")) {
    		player.getInventory().deleteItem(229, 1);
                    player.getPackets().sendGameMessage("As you finish your last dose, your potion flask crumbles to dust");
    		}
    Where do I actually add this?
    Reply With Quote  
     

  11. #10  
    Registered Member
    Join Date
    Jul 2010
    Posts
    287
    Thanks given
    38
    Thanks received
    4
    Rep Power
    1
    this isnt everything bad tut
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. 667 Flasks not switching.
    By Derrezed in forum Help
    Replies: 1
    Last Post: 04-08-2012, 11:11 AM
  2. [667/704] Potions in wilderness
    By erica in forum Tutorials
    Replies: 16
    Last Post: 03-24-2012, 06:06 PM
  3. Replies: 1
    Last Post: 03-17-2012, 10:08 PM
  4. Replies: 4
    Last Post: 03-17-2012, 10:05 PM
  5. Replies: 2
    Last Post: 03-16-2012, 03:48 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •