Thread: [PI]Adding torva effects help please!

Results 1 to 2 of 2
  1. #1 [PI]Adding torva effects help please! 
    Registered Member
    rsnerd's Avatar
    Join Date
    Mar 2010
    Posts
    1,084
    Thanks given
    70
    Thanks received
    88
    Rep Power
    84
    torva needs to be able to go up to 150 hp anyone can help me with this?
    Reply With Quote  
     

  2. #2  
    Donator

    Kickyamom's Avatar
    Join Date
    Jul 2010
    Posts
    1,606
    Thanks given
    208
    Thanks received
    157
    Rep Power
    835
    Easy..

    client.java
    Code:
    	public static int torvaBoost = 50;
    player.java
    Code:
    	public boolean hasFullTorva() {
    		return playerEquipment[playerHat] == 20159 && playerEquipment[playerLegs] == 20167 && playerEquipment[playerChest] == 20163 || playerEquipment[playerHat] == 20147 && playerEquipment[playerLegs] == 20155 && playerEquipment[playerChest] == 20151 || playerEquipment[playerHat] == 20135 && playerEquipment[playerLegs] == 20143 && playerEquipment[playerChest] == 20139;
    	}
    food.java
    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 >= 750 && c.playerLevel[3] > 0) {
                int maxHp = c.hasFulltorva() ? c.getLevelForXP(c.playerXP[3])
                        + c.torvaBoost : c.getLevelForXP(c.playerXP[3]);
                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] < maxHp || c.playerLevel[3] < maxHp2) {
                    c.playerLevel[3] += f.getHeal();
                    if (c.playerLevel[3] > maxHp)
                        c.playerLevel[3] = maxHp;
                }
                c.foodDelay = System.currentTimeMillis();
                c.getPA().refreshSkill(3);
                c.sendMessage("You eat the " + f.getName() + ".");
            }
        }
    You should know where to put those. Please note this isn't the 100% effect (such as if you take the armour off, or you brew.)


    Spoiler for Respect for the Truest:

    #TWTMP GANG 4 LYFE
    Reply With Quote  
     


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. Torva effects
    By Warlock 999 in forum Snippets
    Replies: 26
    Last Post: 05-23-2011, 10:57 PM
  2. [PI] Torva Effects [PI]
    By Mr House in forum Tutorials
    Replies: 4
    Last Post: 05-17-2011, 12:50 AM
  3. Need help with adding Korasi, Dd, Torva
    By PkedFirst in forum Requests
    Replies: 4
    Last Post: 04-04-2011, 12:35 AM
  4. Adding torva, pernix, vitrus to hybrid pvp v2?
    By Coder Miner in forum Help
    Replies: 3
    Last Post: 03-25-2011, 01:53 AM
  5. [508] Adding sound effects!
    By Oh my gawd in forum Requests
    Replies: 4
    Last Post: 02-23-2009, 07:09 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
  •