Thread: 317 [PI] question.

Results 1 to 8 of 8
  1. #1 317 [PI] question. 
    GravityScape & SimpliCity Developer.

    RSWSkiller's Avatar
    Join Date
    Dec 2013
    Age
    27
    Posts
    754
    Thanks given
    184
    Thanks received
    68
    Rep Power
    172
    Do anyone know if there is released any snippet for this:
    To disable some items on pk.

    Example: I don't want owner to wear pring on pk [etc edge, green dragon, and other pking areas.] Or disable pk tele if someone's wearing pring.
    Any idea ? o-O
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Oct 2012
    Posts
    4,710
    Thanks given
    1,679
    Thanks received
    1,105
    Rep Power
    0
    yes

    add this in attackplayer method

    Code:
    if (c.playerEquipment[c.playerRing] == itemID) {
    return;
    }
    with this you don't need to add anything else
    Reply With Quote  
     

  3. Thankful users:


  4. #3  
    GravityScape & SimpliCity Developer.

    RSWSkiller's Avatar
    Join Date
    Dec 2013
    Age
    27
    Posts
    754
    Thanks given
    184
    Thanks received
    68
    Rep Power
    172
    Thanks
    Reply With Quote  
     

  5. #4  
    anInt69

    Max _'s Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,801
    Thanks given
    426
    Thanks received
    727
    Rep Power
    599
    Not sure if you have the wilderness line in your server where you have to cross, but they can always enter while wearing a P'ring, I personally just removed the P'Ring altogether.
    Reply With Quote  
     

  6. #5  
    GravityScape & SimpliCity Developer.

    RSWSkiller's Avatar
    Join Date
    Dec 2013
    Age
    27
    Posts
    754
    Thanks given
    184
    Thanks received
    68
    Rep Power
    172
    Quote Originally Posted by MaxiiPad View Post
    Not sure if you have the wilderness line in your server where you have to cross, but they can always enter while wearing a P'ring, I personally just removed the P'Ring altogether.
    Naw it's was example, i actually need to disable loads of items from pking. So i think luzo method works
    Reply With Quote  
     

  7. #6  
    anInt69

    Max _'s Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,801
    Thanks given
    426
    Thanks received
    727
    Rep Power
    599
    Or a better way would to to have a array of items, and if the player is wearing any of the items from the array, don't allow him to attack/be attacked.
    Reply With Quote  
     

  8. #7  
    GravityScape & SimpliCity Developer.

    RSWSkiller's Avatar
    Join Date
    Dec 2013
    Age
    27
    Posts
    754
    Thanks given
    184
    Thanks received
    68
    Rep Power
    172
    Quote Originally Posted by MaxiiPad View Post
    Or a better way would to to have a array of items, and if the player is wearing any of the items from the array, don't allow him to attack/be attacked.
    Yeah , it's should be better way
    Reply With Quote  
     

  9. #8  
    Banned

    Join Date
    Mar 2013
    Posts
    3,036
    Thanks given
    82
    Thanks received
    375
    Rep Power
    0
    Code:
    int[] cantEquip = { 1, 2, 3, 4 };
    		for (int cant : cantEquip) {
    			if (c.playerEquipment[c.playerHat] == cant) {
    				c.sendMessage("You can't equip these items!");
    				return;
    			}
    		}
    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. Help Command [317 PI]
    By king dark in forum Snippets
    Replies: 3
    Last Post: 08-14-2016, 02:32 PM
  2. 317 PI blank, fixed eclipse warnings
    By Exidia in forum Requests
    Replies: 3
    Last Post: 06-05-2013, 06:29 PM
  3. RuneMaster 317 PI Come Now ECO
    By boystar50 in forum Advertise
    Replies: 8
    Last Post: 06-01-2013, 05:00 PM
  4. Replies: 2
    Last Post: 04-23-2013, 08:23 PM
  5. a 317 pi command question
    By OodlesOfNoodles in forum Help
    Replies: 2
    Last Post: 07-27-2011, 10:22 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
  •