Thread: Duel Help

Results 1 to 6 of 6
  1. #1 Duel Help 
    Banned
    Join Date
    Sep 2011
    Posts
    261
    Thanks given
    62
    Thanks received
    41
    Rep Power
    0
    I want to make it so that every time someone boxes, boxing gloves are given. What I have so far is:

    Code:
    if (c.duelRule[14] && c.duelRule[16]) { // add boxing gloves
    			c.getItems().wearItem(Misc.random(1) == 1 ? 7971 : 7973, Config.WEAPON);
    		}
    Code:
    if (c.duelRule[14] && c.duelRule[16]) { // remove boxing gloves
    			c.getItems().wearItem(-1, Config.WEAPON);
    		}
    But I'm guessing that since the rule is made so no items are allowed to be worn, it is blocking it from giving the players the items. How would I fix that?

    The rules (14 & 16 are as follows):
    Code:
    if (c.duelRule[14] && targetSlot == 3) {
    			c.sendMessage("Wielding weapons has been disabled in this duel!");
    			return false;
    		}
    Code:
    if (c.duelRule[16] && (targetSlot == 5 || is2handed(wearID))) {
    			c.sendMessage("Wearing shield/2h has been disabled in this duel!");
    			return false;
    		}
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Aug 2011
    Posts
    2,760
    Thanks given
    297
    Thanks received
    534
    Rep Power
    1596
    if (itemId != /*boxing glove id*/)
    Quote Originally Posted by Aj View Post
    This is not even a tutorial. It's fail for rep. It's fail for life.
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Banned
    Join Date
    Sep 2011
    Posts
    261
    Thanks given
    62
    Thanks received
    41
    Rep Power
    0
    Edit: I derped.
    Thanks Spike.
    Reply With Quote  
     

  5. #4  
    Interfacing with your sister

    Streax's Avatar
    Join Date
    Jun 2009
    Posts
    2,308
    Thanks given
    784
    Thanks received
    175
    Rep Power
    229
    you're using if (c.duelRule[14] && c.duelRule[16]) { // add boxing gloves

    you would have to enable both of those rules to get boxing gloves,

    but you should use a differ duelRule, try looking at a class file called, "ClickingButtons.java" or w.e, and search duelRule, use the duelRule that corresponds with the button that you're using, like "Fun Items Only"

    Edit: dang I might have been too late :/

    but like spike said..
    Attached image
    Reply With Quote  
     

  6. Thankful user:


  7. #5  
    Banned
    Join Date
    Sep 2011
    Posts
    261
    Thanks given
    62
    Thanks received
    41
    Rep Power
    0
    Quote Originally Posted by Mayhem' View Post
    you're using if (c.duelRule[14] && c.duelRule[16]) { // add boxing gloves

    you would have to enable both of those rules to get boxing gloves,

    but you should use a differ duelRule, try looking at a class file called, "ClickingButtons.java" or w.e, and search duelRule, use the duelRule that corresponds with the button that you're using, like "Fun Items Only"

    Edit: dang I might have been too late :/

    but like spike said..
    Yea, I tried Spike's way and it didn't exactly work out.
    I'll give yours a go now.
    Reply With Quote  
     

  8. #6  
    Banned
    Join Date
    Sep 2011
    Posts
    261
    Thanks given
    62
    Thanks received
    41
    Rep Power
    0
    I got it so that gloves can be worn, but I can't get it so that gloves are given when everything is not selected.

    Any help with that ?
    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. [PI] Duel Arena Tripple Duel Dupe
    By Jinx in forum Snippets
    Replies: 1
    Last Post: 04-25-2012, 11:41 AM
  2. Replies: 21
    Last Post: 03-25-2012, 12:46 AM
  3. Duel Kingdom - 100% Duel Base
    By Trace in forum Projects
    Replies: 10
    Last Post: 12-02-2009, 02:33 AM
  4. Replies: 1
    Last Post: 10-17-2009, 08:10 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
  •