Thread: Buy item by only a specific player

Results 1 to 2 of 2
  1. #1 Buy item by only a specific player 
    Registered Member
    Join Date
    Sep 2013
    Posts
    10
    Thanks given
    0
    Thanks received
    1
    Rep Power
    11
    I am trying to add so that a person can buy a specific item in the shop. This is what I have so far, but doesn't work. I get no compile errors.
    Code:
    if (id == 20069) {
    		if (!c.playerName.equalsIgnoreCase("carlos")) {
    		c.sendMessage("Sorry you cannot purchase this");
    		c.isShopping = false;
    		} else { 
    		if (c.playerName.equalsIgnoreCase("carlos")) {
    		c.isShopping = true;
    		c.sendMessage("Thank you for buying");
    		return 700;
    		}}
    Reply With Quote  
     

  2. #2  
    -Founder Off Returnofpk-


    Join Date
    Oct 2012
    Age
    24
    Posts
    659
    Thanks given
    97
    Thanks received
    211
    Rep Power
    297
    Quote Originally Posted by carlosr17 View Post
    I am trying to add so that a person can buy a specific item in the shop. This is what I have so far, but doesn't work. I get no compile errors.
    Code:
    if (id == 20069) {
    		if (!c.playerName.equalsIgnoreCase("carlos")) {
    		c.sendMessage("Sorry you cannot purchase this");
    		c.isShopping = false;
    		} else { 
    		if (c.playerName.equalsIgnoreCase("carlos")) {
    		c.isShopping = true;
    		c.sendMessage("Thank you for buying");
    		return 700;
    		}}
    here you go

    Code:
    if (itemID == 20069) {
    	    if (c.playerName.equalsIgnoreCase("carlos")) {
    		c.isShopping = true;
    		c.sendMessage("Thank you for buying");
    		} else { 
    		c.sendMessage("Sorry you cannot purchase this");
    		c.isShopping = false;
    		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. Replies: 5
    Last Post: 10-14-2012, 11:09 PM
  2. NPC only disappears for it's specific player
    By Herewizard in forum Help
    Replies: 0
    Last Post: 04-28-2012, 06:38 PM
  3. Making shops NOT buy items from players
    By Pingster in forum Help
    Replies: 6
    Last Post: 02-05-2012, 09:15 PM
  4. Replies: 3
    Last Post: 09-02-2010, 12:08 PM
  5. Replies: 2
    Last Post: 08-18-2010, 11:42 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
  •