Thread: Needing some assistance

Results 1 to 10 of 10
  1. #1 Needing some assistance 
    Registered Member
    Join Date
    Jan 2016
    Posts
    20
    Thanks given
    0
    Thanks received
    1
    Rep Power
    11
    Code:
    private void SwordEffects(Entity player) {
    if (c.item == 5680 + c.MonsterHealth = <100) {
    else if (ItemCheck.wearingDeadlyDagger(attacker, "DeadlyDagger")) {
    			effectiveAccuracy *= 2.5;
    		}
    		return (int) (effectiveAccuracy * specAccuracy);
    	}
    player.getPlayer().send(new SendMessage("Your weapon pierces the monsters skin & you deal a deadly blow."));
    I just wrote this up, I know it has no chance of working, but are things along these lines actually able to work? Like will the certain item deal more damage once his health or any other aspect of the monster is lowered? This was just a draft... Used a dragon dagger in the code for an example
    Reply With Quote  
     

  2. #2  
    Community Veteran

    Songoty's Avatar
    Join Date
    Dec 2007
    Posts
    2,740
    Thanks given
    211
    Thanks received
    1,034
    Rep Power
    2455
    Yea that wont compile what so ever.

    Yes, you can do anything you want man. That's what's cool about programming. The computer will do what you tell it to do, and only messes up if you make it mess up.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2016
    Posts
    20
    Thanks given
    0
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by Songoty View Post
    Yea that wont compile what so ever.

    Yes, you can do anything you want man. That's what's cool about programming. The computer will do what you tell it to do, and only messes up if you make it mess up.
    Yeah I didn't expect that to work ahahaha
    But was just wondering if things like that do work... Thanks man, you got any tips or advice on how to get it to work? Don't spoon feed me though, just a little help would be nice (:
    Reply With Quote  
     

  4. #4  
    Community Veteran

    Songoty's Avatar
    Join Date
    Dec 2007
    Posts
    2,740
    Thanks given
    211
    Thanks received
    1,034
    Rep Power
    2455
    Quote Originally Posted by ImProdigy View Post
    Yeah I didn't expect that to work ahahaha
    But was just wondering if things like that do work... Thanks man, you got any tips or advice on how to get it to work? Don't spoon feed me though, just a little help would be nice (:
    Code:
    public void preAttackCheck(Player p, NPC n) {
        if(n.getHealth() <= WHATEVER && p.getEquipment().getWeapon().getNormalizedId() == SOMETHING) {
             p.setPotentialDamageHandicap(10);
        }
    }
    Something like that is what I would do, but I'm not 100% sure I understand what you are needing!
    Reply With Quote  
     

  5. Thankful user:

    Community VeteranSub

  6. #5  
    Registered Member
    Join Date
    Jan 2016
    Posts
    20
    Thanks given
    0
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by Songoty View Post
    Code:
    public void preAttackCheck(Player p, NPC n) {
        if(n.getHealth() <= WHATEVER && p.getEquipment().getWeapon().getNormalizedId() == SOMETHING) {
             p.setPotentialDamageHandicap(10);
        }
    }
    Something like that is what I would do, but I'm not 100% sure I understand what you are needing!
    That's a lot tidier than what I had ahhaa

    I will show you what I'm trying to do...
    Code:
    package com.vencillio.rs2.entity.mob.impl.wild;
    
    import com.vencillio.core.util.Utility;
    import com.vencillio.rs2.content.combat.Hit;
    import com.vencillio.rs2.entity.Animation;
    import com.vencillio.rs2.entity.Entity;
    import com.vencillio.rs2.entity.Graphic;
    import com.vencillio.rs2.entity.Location;
    import com.vencillio.rs2.entity.mob.Mob;
    import com.vencillio.rs2.entity.player.net.out.impl.SendMessage;
    
    /**
     * Handles the Callisto boss
     * @author Daniel
     * @editor Jarrod
     *
     */
    public class Callisto extends Mob {
    	
    	/**
    	 * Callisto
    	 */
    	public Callisto() {
    		super(6609, true, new Location(3295, 3851, 0));
    	}
    	
    	/**
    	 * Handles Callisto hitting entity
    	 */
    	@Override
    	public void onHit(Entity entity, Hit hit) {
    		if (entity != null && !entity.isNpc()) {
    			if (entity.getPlayer().isStunned()) {
    				return;
    			}
    			int random = Utility.random(10);
    			if (random == 1) {
    				knockBack(entity.getPlayer());
    			}
    		}
    	}
    
    	/**
    	 * Handles Callisto's knock back effect
    	 * @param player
    	 */
    	private void knockBack(Entity player) {
    		player.stun(2);
    		player.hit(new Hit(2));
    		player.getUpdateFlags().sendGraphic(new Graphic(80, true));
    		player.getUpdateFlags().sendAnimation(new Animation(3170));
    		player.getPlayer().send(new SendMessage("Callisto's roar sends you backwards."));
    		player.getPlayer().teleport(new Location(player.getX() + Utility.random(3), player.getY() - Utility.random(5), 0));						
    	}
    
    }
    Alright, that's the Callisto code, I want to make it so a certain weapon works best against this guy, but you can attack him with whatever, but with a certain weapon it hits better & every now & then has a chance of piercing him for a harder hit, does that make sense??
    DON'T SPOON FEED ME!!! But give me a tiny bit of help, much appreciated bro!! (:
    Reply With Quote  
     

  7. #6  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by ImProdigy View Post
    That's a lot tidier than what I had ahhaa

    I will show you what I'm trying to do...
    Code:
    package com.vencillio.rs2.entity.mob.impl.wild;
    
    import com.vencillio.core.util.Utility;
    import com.vencillio.rs2.content.combat.Hit;
    import com.vencillio.rs2.entity.Animation;
    import com.vencillio.rs2.entity.Entity;
    import com.vencillio.rs2.entity.Graphic;
    import com.vencillio.rs2.entity.Location;
    import com.vencillio.rs2.entity.mob.Mob;
    import com.vencillio.rs2.entity.player.net.out.impl.SendMessage;
    
    /**
     * Handles the Callisto boss
     * @author Daniel
     * @editor Jarrod
     *
     */
    public class Callisto extends Mob {
    	
    	/**
    	 * Callisto
    	 */
    	public Callisto() {
    		super(6609, true, new Location(3295, 3851, 0));
    	}
    	
    	/**
    	 * Handles Callisto hitting entity
    	 */
    	@Override
    	public void onHit(Entity entity, Hit hit) {
    		if (entity != null && !entity.isNpc()) {
    			if (entity.getPlayer().isStunned()) {
    				return;
    			}
    			int random = Utility.random(10);
    			if (random == 1) {
    				knockBack(entity.getPlayer());
    			}
    		}
    	}
    
    	/**
    	 * Handles Callisto's knock back effect
    	 * @param player
    	 */
    	private void knockBack(Entity player) {
    		player.stun(2);
    		player.hit(new Hit(2));
    		player.getUpdateFlags().sendGraphic(new Graphic(80, true));
    		player.getUpdateFlags().sendAnimation(new Animation(3170));
    		player.getPlayer().send(new SendMessage("Callisto's roar sends you backwards."));
    		player.getPlayer().teleport(new Location(player.getX() + Utility.random(3), player.getY() - Utility.random(5), 0));						
    	}
    
    }
    Alright, that's the Callisto code, I want to make it so a certain weapon works best against this guy, but you can attack him with whatever, but with a certain weapon it hits better & every now & then has a chance of piercing him for a harder hit, does that make sense??
    DON'T SPOON FEED ME!!! But give me a tiny bit of help, much appreciated bro!! (:
    It is easier to write down everything you want to do then go and do it code wise.
    Cause right now when you say you wish to make certain weapon hit better, do you mean in damage or accuracy or both?
    Also what should the chance be?
    What weapon would be effected?
    How much better would each weapon have?
    etc...


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  8. #7  
    Registered Member
    Join Date
    Jan 2016
    Posts
    20
    Thanks given
    0
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by arch337 View Post
    It is easier to write down everything you want to do then go and do it code wise.
    Cause right now when you say you wish to make certain weapon hit better, do you mean in damage or accuracy or both?
    Also what should the chance be?
    What weapon would be effected?
    How much better would each weapon have?
    etc...
    That's what I tried to do, but it's so sloppy & doesn't work half the time.
    And both bro, I want it to have higher hits & better accuracy, if that makes sense?
    I can pick the weapon later, chance would be like 10%
    And the weapon should only be like 30% better, so every other weapon is still viable, but the weapon selected is better...
    Reply With Quote  
     

  9. #8  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by ImProdigy View Post
    That's what I tried to do, but it's so sloppy & doesn't work half the time.
    And both bro, I want it to have higher hits & better accuracy, if that makes sense?
    I can pick the weapon later, chance would be like 10%
    And the weapon should only be like 30% better, so every other weapon is still viable, but the weapon selected is better...
    You should check your accuracy and damage codes in your source. In there you can then make this happend.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  10. #9  
    Registered Member
    Join Date
    Jan 2016
    Posts
    20
    Thanks given
    0
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by arch337 View Post
    You should check your accuracy and damage codes in your source. In this method you can then make this happend.
    Thanks bro!!
    Most people on here are negative tbh... You're really helpful, thanks a lot!!
    Reply With Quote  
     

  11. #10  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by ImProdigy View Post
    Thanks bro!!
    Most people on here are negative tbh... You're really helpful, thanks a lot!!
    It all comes down to how your source is coded by the amount of work you need to do. Also make sure the entity is a player vs npc so you are not getting it wrong.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    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. need some assistance :D
    By jelleplomp in forum Help
    Replies: 0
    Last Post: 02-24-2014, 08:30 PM
  2. Need some expert developing assistance!
    By Nick-000 in forum Help
    Replies: 21
    Last Post: 03-10-2013, 09:10 PM
  3. I need some assistance. 2 problems
    By koso in forum Help
    Replies: 3
    Last Post: 07-31-2012, 06:03 AM
  4. Replies: 11
    Last Post: 03-22-2010, 07:52 AM
  5. Need some assistance.
    By bmaw in forum Help
    Replies: 2
    Last Post: 10-27-2009, 05:50 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
  •