Thread: Torva,Pernix,Virtus (PI)

Page 1 of 6 123 ... LastLast
Results 1 to 10 of 52
  1. #1 Torva,Pernix,Virtus (PI) 
    Registered Member
    Mr.Client's Avatar
    Join Date
    Jun 2010
    Posts
    2,094
    Thanks given
    100
    Thanks received
    317
    Rep Power
    251
    Ive done my potion/food system differently so i downloaded soul-split PI and just added this to the default system it is basic and sure you can clean it up/redo it but its the correct effect.

    Tired of seeing all these repeated effects that aren't even correct

    Code:
    	public boolean torva() {
    		if (playerEquipment[playerHat] == 20135 && playerEquipment[playerLegs] == 20143 && playerEquipment[playerChest] == 20139
    		|| playerEquipment[playerHat] == 20147 && playerEquipment[playerLegs] == 20151 && playerEquipment[playerChest] == 20155
    		|| playerEquipment[playerHat] == 20159 && playerEquipment[playerLegs] == 20163 && playerEquipment[playerChest] == 20167) {
    			return true;
    		}
    		return false;
    	}
    Code:
    		public void doTheBrew(int itemId, int replaceItem, int slot) {
    		if (c.duelRule[6]) {
    			c.sendMessage("You may not eat in this duel.");
    			return;
    		}
    		c.startAnimation(829);
    		c.playerItems[slot] = replaceItem + 1;
    		c.getItems().resetItems(3214);
    		int[] toDecrease = {0,2,4,6};
    		
    		int[] toIncrease = {1,3};
    		for (int tD : toDecrease) {
    			c.playerLevel[tD] -= getBrewStat(tD, .10);
    			if (c.playerLevel[tD] < 0)
    				c.playerLevel[tD] = 1;
    			c.getPA().refreshSkill(tD);
    			c.getPA().setSkillLevel(tD, c.playerLevel[tD], c.playerXP[tD]);
    		}
    		c.playerLevel[1] += getBrewStat(1, .20);		
    		if (c.playerLevel[1] > (c.getLevelForXP(c.playerXP[1])*1.2 + 1)) {
    			c.playerLevel[1] = (int)(c.getLevelForXP(c.playerXP[1])*1.2);
    		}
    		c.getPA().refreshSkill(1);
    		double ammount = c.torva() ? 1.22 : 1.17;
    		c.playerLevel[3] += c.torva() ? getBrewStat(3, .21) : getBrewStat(3, .15);
    		if (c.playerLevel[3] > (c.getLevelForXP(c.playerXP[3])* ammount + 1)) {
    			c.playerLevel[3] = (int)(c.getLevelForXP(c.playerXP[3])*ammount);
    		}
    		c.getPA().refreshSkill(3);
    		message(itemId);
    	}
    Code:
    	public int gwdarmourStat(double amount) {
    		return (int)(c.getLevelForXP(c.playerXP[3]) * amount);
    	}
    Code:
    	public void eat(int id, int slot) {
    		if (c.duelRule[6]) {
    			c.sendMessage("You may not eat in this duel.");
    			return;
    		}
    		if (System.currentTimeMillis() - c.foodDelay >= 1500 && c.playerLevel[3] > 0) {
    			c.getCombat().resetPlayerAttack();
    			c.attackTimer += 2;
    			c.startAnimation(829);
    			c.getItems().deleteItem(id,slot,1);
    			FoodToEat f = FoodToEat.food.get(id);
    			if (c.playerLevel[3] < gwdarmourStat(1.41) && c.torva()) {
    				c.playerLevel[3] += f.getHeal();
    				if (c.playerLevel[3] > gwdarmourStat(1.41))
    					c.playerLevel[3] = gwdarmourStat(1.41);
    			}
    			else if (c.playerLevel[3] < c.getLevelForXP(c.playerXP[3]) && !c.torva()) {
    				c.playerLevel[3] += f.getHeal();
    				if (c.playerLevel[3] > c.getLevelForXP(c.playerXP[3]))
    					c.playerLevel[3] = c.getLevelForXP(c.playerXP[3]);
    			}
    			c.foodDelay = System.currentTimeMillis();
    			c.getPA().refreshSkill(3);
    			c.sendMessage("You eat the " + f.getName() + ".");
    		}		
    	}
    The codes are here you must add them yourselves, i hope i see no posts asking for help because all you really have to do is replace old methods.

    Updated: Forgot 1 method.

    Code:
    	public void message(int itemId) {
    		String name = c.getItems().getItemName(itemId);
    		c.sendMessage("You drink 1 dose of "+ name);
    		c.sendMessage(name.contains("(4)") ? "You now have 3 doses left" :
    		                       name.contains("(3)") ? "You now have 2 doses left" :
    		                       name.contains("(2)") ? "You now have 1 doses left" : "You now have 0 doses left");
    	}
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Registered Member
    bracket's Avatar
    Join Date
    Aug 2009
    Posts
    5,286
    Thanks given
    1,047
    Thanks received
    1,463
    Rep Power
    5000
    Nooo why are you doing this to me ...
    Reply With Quote  
     

  4. #3  
    Registered Member
    Mr.Client's Avatar
    Join Date
    Jun 2010
    Posts
    2,094
    Thanks given
    100
    Thanks received
    317
    Rep Power
    251
    Quote Originally Posted by owner pkin View Post
    Nooo why are you doing this to me ...
    Muted!, kidding
    Reply With Quote  
     

  5. #4  
    Registered Member
    Mr.Client's Avatar
    Join Date
    Jun 2010
    Posts
    2,094
    Thanks given
    100
    Thanks received
    317
    Rep Power
    251
    Note* wasn't sure if the effect is done by each part of the Armour, so i did it as whole sets but in my actual server/source i made it individual pieces, if anyone wants the codes i can offer them but my food/pot system is different and they'll have to convert.
    Reply With Quote  
     

  6. #5  
    Registered Member Dunhel's Avatar
    Join Date
    Apr 2011
    Posts
    209
    Thanks given
    16
    Thanks received
    5
    Rep Power
    10
    Well done mate this will help a few people. Also I think that effect is added for each item.
    Reply With Quote  
     

  7. #6  
    Registered Member
    Mr.Client's Avatar
    Join Date
    Jun 2010
    Posts
    2,094
    Thanks given
    100
    Thanks received
    317
    Rep Power
    251
    Quote Originally Posted by Dunhel View Post
    Well done mate this will help a few people. Also I think that effect is added for each item.
    This took like 1min lol, it wasn't hard.
    Reply With Quote  
     

  8. #7  
    Registered Member Despised Icon's Avatar
    Join Date
    Nov 2009
    Age
    28
    Posts
    605
    Thanks given
    5
    Thanks received
    6
    Rep Power
    1
    player.java or food.java?

    doesnt work for me?

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #8  
    Registered Member
    Join Date
    Mar 2011
    Posts
    523
    Thanks given
    36
    Thanks received
    27
    Rep Power
    70
    I would love how you did the individual pieces and i can get you correct bonuses for each piece if you want them Btw thanks works great i did something similar but this works the same just i only added to torva :/ but this saved me 3 mins so thanks
    Quote Originally Posted by Jack Daniels View Post
    Why wouldn't it work for PI? Do PI programmers use a different kind of Java or something?
    Genius! ^
    Reply With Quote  
     

  10. #9  
    Banned

    Join Date
    Jun 2009
    Posts
    2,918
    Thanks given
    169
    Thanks received
    806
    Rep Power
    0
    nice job =) easy though
    Reply With Quote  
     

  11. #10  
    Registered Member
    Join Date
    Mar 2011
    Posts
    523
    Thanks given
    36
    Thanks received
    27
    Rep Power
    70
    Post your code for piece by piece hp bonus? btw helm adds 60hp plate adds 200hp and legs add 140hp
    Quote Originally Posted by Jack Daniels View Post
    Why wouldn't it work for PI? Do PI programmers use a different kind of Java or something?
    Genius! ^
    Reply With Quote  
     

Page 1 of 6 123 ... 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. Hybrid Pvp Pk spawn - Torva, Virtus, Pernix! 24/7
    By LorenzoMKW in forum Advertise
    Replies: 26
    Last Post: 02-14-2016, 09:43 AM
  2. Replies: 66
    Last Post: 04-15-2012, 02:01 AM
  3. Adding torva, pernix, vitrus to hybrid pvp v2?
    By Coder Miner in forum Help
    Replies: 3
    Last Post: 03-25-2011, 01:53 AM
  4. Replies: 14
    Last Post: 03-03-2011, 05:22 PM
  5. Replies: 6
    Last Post: 02-28-2011, 04:35 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
  •