Thread: Project Insanity (Adding stats to potions)

Results 1 to 8 of 8
  1. #1 Project Insanity (Adding stats to potions) 
    Banned
    Join Date
    Jul 2010
    Age
    29
    Posts
    1,143
    Thanks given
    7
    Thanks received
    48
    Rep Power
    0
    Yes I have added overloads to my project insanity base but I wanna know somethings.

    1. How do you add drinking to them

    2. How do you make them raise your attack, strength, defence

    Thats all I need anyways please post any help
     

  2. #2  
    Endeavor

    Mikey`'s Avatar
    Join Date
    Dec 2007
    Posts
    4,434
    Thanks given
    715
    Thanks received
    1,435
    Rep Power
    1202
    Potions class HINTHINT.
     

  3. #3  
    Banned
    Join Date
    Jul 2010
    Age
    29
    Posts
    1,143
    Thanks given
    7
    Thanks received
    48
    Rep Power
    0
    Quote Originally Posted by Mikey` View Post
    Potions class HINTHINT.
    Quote Originally Posted by Fresh View Post
    24 hour bump rule.. I know what to do but it's not worth telling you you'll learn more from looking at current potions using z-filesearcher to find current potion IDS and see how things work if you need help explaining a peice of code post and I'll help.

    Mikey its not in potions.java I looked



    Fresh yes I would love your help I just never added potions before never had done nothing with them so I could use the help I have the ints in item.def for overloads so thats good I just need help adding the stats to the potions and how to make them drinkable
     

  4. #4  
    PHP DEVELOPER

    Join Date
    Mar 2009
    Posts
    357
    Thanks given
    50
    Thanks received
    41
    Rep Power
    16
    Search in Players folder all the things you need are in there use other potions as guides not hard if u really can't find it pm me and ill help tomorow because its 5 am atm :x
     

  5. #5  
    Registered Member
    Core's Avatar
    Join Date
    Sep 2007
    Posts
    4,194
    Thanks given
    11
    Thanks received
    393
    Rep Power
    1985
    Code:
    playerLevel[0] = getLevelForXP(playerXP[0]) + (getLevelForXP(playerXP[0]) * 10 / 100);
    refreshSkill(0);
    Study off of this for raising levels, that piece of code raises your attack level 10%.
     

  6. #6  
    Banned
    Join Date
    Jul 2010
    Age
    29
    Posts
    1,143
    Thanks given
    7
    Thanks received
    48
    Rep Power
    0
    Where would I add this?
     

  7. #7  
    Registered Member Satan666's Avatar
    Join Date
    May 2010
    Posts
    449
    Thanks given
    65
    Thanks received
    100
    Rep Power
    15
    Look for this code in Potions.java

    Code:
    public void handlePotion(int itemId, int slot) {
    under that u will see stuff like this,

    Code:
     				case 6685:	//brews
    				doTheBrew(itemId, 6687, slot);
    				break;
    				case 6687:
    				doTheBrew(itemId, 6689, slot);
    				break;
    just add your 4 potions under it..

    2. If you wanna give them an effect like giving bonus to atk/str/def just do add this method:

    Code:
    	public void doOverload(int itemId, int replaceItem, int slot) {
    		c.startAnimation(829);
    		c.playerItems[slot] = replaceItem + 1;
    		c.getItems().resetItems(3214);
    		int[] toIncrease = {0,2,5};
    		c.playerLevel[0] += getBrewStat(0, .20);		
    		if (c.playerLevel[0] > (c.getLevelForXP(c.playerXP[0])*1.2 + 1)) {
    			c.playerLevel[0] = (int)(c.getLevelForXP(c.playerXP[0])*1.2);
    		}
    		c.playerLevel[2] += getBrewStat(2, .20);		
    		if (c.playerLevel[2] > (c.getLevelForXP(c.playerXP[2])*1.2 + 1)) {
    			c.playerLevel[2] = (int)(c.getLevelForXP(c.playerXP[2])*1.2);
    		}
    		c.playerLevel[5] += getBrewStat(5, .20);		
    		if (c.playerLevel[5] > (c.getLevelForXP(c.playerXP[5])*1.2 + 1)) {
    			c.playerLevel[5] = (int)(c.getLevelForXP(c.playerXP[5])*1.2);
    		}
    		c.getPA().refreshSkill(0);
    		c.getPA().refreshSkill(2);
    		c.getPA().refreshSkill(5);
    	}
    now make your at your potion drinking u have something like this

    Code:
     
    				case potionID:
    				doOverload(itemId, 6687, slot);
    				break;
     

  8. #8  
    Banned
    Join Date
    Jul 2010
    Age
    29
    Posts
    1,143
    Thanks given
    7
    Thanks received
    48
    Rep Power
    0
    Quote Originally Posted by Satan666 View Post
    Look for this code in Potions.java


    2. If you wanna give them an effect like giving bonus to atk/str/def just do add this method:

    Code:
    	public void doOverload(int itemId, int replaceItem, int slot) {
    		c.startAnimation(829);
    		c.playerItems[slot] = replaceItem + 1;
    		c.getItems().resetItems(3214);
    		int[] toIncrease = {0,2,5};
    		c.playerLevel[0] += getBrewStat(0, .20);		
    		if (c.playerLevel[0] > (c.getLevelForXP(c.playerXP[0])*1.2 + 1)) {
    			c.playerLevel[0] = (int)(c.getLevelForXP(c.playerXP[0])*1.2);
    		}
    		c.playerLevel[2] += getBrewStat(2, .20);		
    		if (c.playerLevel[2] > (c.getLevelForXP(c.playerXP[2])*1.2 + 1)) {
    			c.playerLevel[2] = (int)(c.getLevelForXP(c.playerXP[2])*1.2);
    		}
    		c.playerLevel[5] += getBrewStat(5, .20);		
    		if (c.playerLevel[5] > (c.getLevelForXP(c.playerXP[5])*1.2 + 1)) {
    			c.playerLevel[5] = (int)(c.getLevelForXP(c.playerXP[5])*1.2);
    		}
    		c.getPA().refreshSkill(0);
    		c.getPA().refreshSkill(2);
    		c.getPA().refreshSkill(5);
    	}
    Where would i add this at?



    Edit: Never mind but when I add that in potions.java it still wont give me effect for my stats going to 125
     


Thread Information
Users Browsing this Thread

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


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •