Thread: Make a command unusable in wildy & dungeoneering.

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Make a command unusable in wildy & dungeoneering. 
    Registered Member
    Freezia's Avatar
    Join Date
    Feb 2011
    Posts
    6,013
    Thanks given
    1,147
    Thanks received
    758
    Rep Power
    1311
    This is my command... how do I make it so players cannot use it in the wilderness and in Dungeoneering.

    Code:
    			if (playerCommand.startsWith("myshop")) {
    			c.getShops().openPlayerShop(c);
    			}


    Host your RUNESCAPE PRIVATE SERVER on the cheapest and flagship provider on Rune-Server! Now equipped with DDOS Protection!.


    Reply With Quote  
     

  2. #2  
    Registered Member Gretar's Avatar
    Join Date
    Sep 2011
    Posts
    289
    Thanks given
    69
    Thanks received
    12
    Rep Power
    7
    This should work!
    if (playerCommand.startsWith("myshop")) {
    if (c.inWild() || c.isInDungeon()) {// whatever you dungeon method is
    return;
    } else
    c.getShops().openPlayerShop(c);
    }
    Owner of Roat Pkz
    Reply With Quote  
     

  3. #3  
    Registered Member
    Freezia's Avatar
    Join Date
    Feb 2011
    Posts
    6,013
    Thanks given
    1,147
    Thanks received
    758
    Rep Power
    1311
    Thanks


    Host your RUNESCAPE PRIVATE SERVER on the cheapest and flagship provider on Rune-Server! Now equipped with DDOS Protection!.


    Reply With Quote  
     

  4. #4  
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    Code:
    if (playerCommand.startsWith("myshop")) {
         if (c.inWild()) {
              c.sendMessage("You cannot use this in the wilderness.");	
              return; 
         } else
              c.getShops().openPlayerShop(c);
    }
    Use conventions and he didnt ask for the dung part.
    Reply With Quote  
     

  5. #5  
    Registered Member Gretar's Avatar
    Join Date
    Sep 2011
    Posts
    289
    Thanks given
    69
    Thanks received
    12
    Rep Power
    7
    Quote Originally Posted by animeking1120 View Post
    Code:
    if (playerCommand.startsWith("myshop")) {
         if (c.inWild()) {
              c.sendMessage("You cannot use this in the wilderness.");	
              return; 
         } else
              c.getShops().openPlayerShop(c);
    }
    Use conventions and he didnt ask for the dung part.
    cannot use it in the wilderness and in Dungeoneering.

    hmmm?
    Owner of Roat Pkz
    Reply With Quote  
     

  6. #6  
    Registered Member
    Freezia's Avatar
    Join Date
    Feb 2011
    Posts
    6,013
    Thanks given
    1,147
    Thanks received
    758
    Rep Power
    1311
    lol thx


    Host your RUNESCAPE PRIVATE SERVER on the cheapest and flagship provider on Rune-Server! Now equipped with DDOS Protection!.


    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    Quote Originally Posted by animeking1120 View Post
    Code:
    if (playerCommand.startsWith("myshop")) {
         if (c.inWild()) {
              c.sendMessage("You cannot use this in the wilderness.");	
              return; 
         } else
              c.getShops().openPlayerShop(c);
    }
    Use conventions and he didnt ask for the dung part.
    why use an else statement after a return?...

    @ First reply, if all you're going to do is return the statement and not send any messages or anything then might as well just do

    Code:
    	if (playerCommand.startsWith("myshop") && !c.inWild() && !c.inDungeoneering())
    		c.getShops().openPlayerShop(c);
    Reply With Quote  
     

  8. Thankful users:


  9. #8  
    Registered Member
    Freezia's Avatar
    Join Date
    Feb 2011
    Posts
    6,013
    Thanks given
    1,147
    Thanks received
    758
    Rep Power
    1311
    Thanks for this but I already solved it earlier this is a old thread LOL


    Host your RUNESCAPE PRIVATE SERVER on the cheapest and flagship provider on Rune-Server! Now equipped with DDOS Protection!.


    Reply With Quote  
     

  10. #9  
    Registered Member
    Join Date
    Dec 2011
    Age
    29
    Posts
    214
    Thanks given
    1
    Thanks received
    7
    Rep Power
    13
    Use conventions and he didnt ask for the dung part.
    Im pretty sure he did ask for the dung part, rofl
    Reply With Quote  
     

  11. #10  
    Registered Member
    Join Date
    Dec 2011
    Age
    29
    Posts
    214
    Thanks given
    1
    Thanks received
    7
    Rep Power
    13
    Use conventions and he didnt ask for the dung part.
    Im pretty sure he did ask for the dung part, rofl
    Reply With Quote  
     

Page 1 of 2 12 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: 3
    Last Post: 10-20-2011, 10:11 PM
  2. Make ALL commands unusable?
    By Runebay™ in forum Help
    Replies: 7
    Last Post: 05-14-2009, 11:20 PM
  3. weapon unusable in wildy
    By Icy Whip in forum Tutorials
    Replies: 9
    Last Post: 04-24-2008, 07:13 PM
  4. How to make an alert command & a bonus tut
    By Jodan Belfort in forum Tutorials
    Replies: 10
    Last Post: 08-21-2007, 07:35 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
  •