Thread: [667/718] Adding a Multiplier.

Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1. #1 [667/718] Adding a Multiplier. 
    Banned
    Join Date
    Jun 2013
    Posts
    362
    Thanks given
    112
    Thanks received
    31
    Rep Power
    0
    Hi.
    I've added a damage Multiplier. All it does is X10 your hit depending on what your multiplier is. I've made the multiplier, i've made a system to upgrade the multiplier etc. Now i want it too X10 the hit. So if your damage multiplier is 500, you'll be hitting 5000's. Any idea?

    Edited:
    Quote Originally Posted by sjonsen View Post
    Write proper sentences when explaining something please, I have no idea what that's even meant to say.
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Jun 2013
    Posts
    362
    Thanks given
    112
    Thanks received
    31
    Rep Power
    0
    Bump
    Reply With Quote  
     

  3. #3  
    Registered Member Sjonsen's Avatar
    Join Date
    May 2012
    Posts
    321
    Thanks given
    15
    Thanks received
    44
    Rep Power
    20
    Quote Originally Posted by askid12 View Post
    Hi.
    I've added damage Multiplier. Where it needs a npc to upgrade the multiplier. It's all added but now i need to make it so if your multiplier is 10 You'll be hitting constant 100's but if its like 200 you'll hit constant 2k's and only on a certain NPC and a certain place any idea?
    Write proper sentences when explaining something please, I have no idea what that's even meant to say.
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Jun 2013
    Posts
    362
    Thanks given
    112
    Thanks received
    31
    Rep Power
    0
    Quote Originally Posted by sjonsen View Post
    Write proper sentences when explaining something please, I have no idea what that's even meant to say.

    Oh mb. Lemme edit it...
    Reply With Quote  
     

  5. #5  
    Banned
    Join Date
    Jun 2013
    Posts
    362
    Thanks given
    112
    Thanks received
    31
    Rep Power
    0
    Anybody?
    Reply With Quote  
     

  6. #6  
    Success is the worst teacher

    Santa Hat's Avatar
    Join Date
    Oct 2012
    Age
    27
    Posts
    3,334
    Thanks given
    807
    Thanks received
    1,185
    Rep Power
    190
    Quote Originally Posted by askid12 View Post
    Anybody?
    I suggest looking in the PlayerCombat class, the processWithDelay method contains a "multiplier" variable


    Reply With Quote  
     

  7. #7  
    Banned
    Join Date
    Jun 2013
    Posts
    362
    Thanks given
    112
    Thanks received
    31
    Rep Power
    0
    Quote Originally Posted by Santa Hat View Post
    I suggest looking in the PlayerCombat class, the processWithDelay method contains a "multiplier" variable

    I've been looking at that. I've used this as the example.
    Code:
    case 19784: // korasi sword
    				player.setNextAnimation(new Animation(14788));
    				player.setNextGraphics(new Graphics(1729));
    				int korasiDamage = getMaxHit(player, weaponId, attackStyle,
    						false, true, 1);
    				double multiplier = 0.5;
    				multiplier += Math.random();
    				korasiDamage *= multiplier;
    				delayNormalHit(weaponId, attackStyle,
    						getMagicHit(player, korasiDamage));
    				break;
    Also another thing the NPC shit for the damage stuff is npc.java so would i add the a int for the multi
    Code:
    final Player p2 = (Player) source;
    			int dmg = (hit.getDamage() * 3); //*1 means if u wanna make it so if u hit a 250 u get 250 tokens
    			if(this.getId()==131)    // 131 is the npc id
    			p2.getPackets().sendGameMessage ("You have gained <col=FF0000>" + dmg + "</col> " + "damage tokens");
    			if(this.getId()==131) 
    			p2.getInventory().addItem(13653,dmg);
    If i make the hit.getDamage into player.getDamageMP it'll just say change into a static int or something and then your multiplier doesn't save you got team viewer?
    Reply With Quote  
     

  8. #8  
    Success is the worst teacher

    Santa Hat's Avatar
    Join Date
    Oct 2012
    Age
    27
    Posts
    3,334
    Thanks given
    807
    Thanks received
    1,185
    Rep Power
    190
    Quote Originally Posted by askid12 View Post
    I've been looking at that. I've used this as the example.
    Code:
    case 19784: // korasi sword
    				player.setNextAnimation(new Animation(14788));
    				player.setNextGraphics(new Graphics(1729));
    				int korasiDamage = getMaxHit(player, weaponId, attackStyle,
    						false, true, 1);
    				double multiplier = 95.5;
    				multiplier += Math.random();
    				korasiDamage *= multiplier;
    				delayNormalHit(weaponId, attackStyle,
    						getMagicHit(player, korasiDamage));
    				break;
    Did it work? and do you want it with every weapon or just specific ones?


    Reply With Quote  
     

  9. #9  
    Banned
    Join Date
    Jun 2013
    Posts
    362
    Thanks given
    112
    Thanks received
    31
    Rep Power
    0
    Quote Originally Posted by Santa Hat View Post
    Did it work? and do you want it with every weapon or just specific ones?
    I want it with every weapon but the thing is that's the playercombat.java where would i add it for npc's? like you said check the multiplier in playercombat.java i couldn't find your example so i checked korasi's idk what to do...

    I edited it to show the code for the NPC i've got any help
    Reply With Quote  
     

  10. #10  
    Banned
    Join Date
    Jun 2013
    Posts
    362
    Thanks given
    112
    Thanks received
    31
    Rep Power
    0
    Quote Originally Posted by Santa Hat View Post
    Did it work? and do you want it with every weapon or just specific ones?
    Any ide amate? check what i did in the edited post. thats for penguins and it shows npc.java and playercombat.java idk where to add it i got multiplier etc added already. but idk how to make it so if you got a 100 multiplier it hits 1000's etc
    Reply With Quote  
     

Page 1 of 3 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. Replies: 87
    Last Post: 09-14-2015, 04:04 PM
  2. 667/718 Interface 394 and 396 adding models
    By hiloser12221 in forum Help
    Replies: 3
    Last Post: 07-01-2013, 12:37 AM
  3. (667/704+)Adding LRC Mining Concentrated Gold/Coal
    By zander988 in forum Tutorials
    Replies: 28
    Last Post: 06-02-2013, 01:53 PM
  4. 667 Shops Adding new items.
    By 'Brad in forum Help
    Replies: 1
    Last Post: 05-21-2012, 12:00 PM
  5. 667/704+ Adding a new currency shop!
    By zander988 in forum Tutorials
    Replies: 7
    Last Post: 05-14-2012, 09:56 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
  •