Thread: Help please

Results 1 to 3 of 3
  1. #1 Help please 
    Donator
    kadhim's Avatar
    Join Date
    Jan 2014
    Posts
    63
    Thanks given
    13
    Thanks received
    18
    Rep Power
    15
    Hello everyone

    I want to add an item ( Santa hat ) in two points shop ( One custom minigame shop which can be bought by zombie points and one in the donator island can be bought by donator points) However, I dont want them to get mixed up, Anyone can tell me how to do that ? Thanks ( 317 pi )
    Reply With Quote  
     

  2. #2  
    Registered Member
    Edd -'s Avatar
    Join Date
    Jul 2011
    Posts
    665
    Thanks given
    62
    Thanks received
    43
    Rep Power
    84
    your point shops are probably handled like this
    Code:
    public int getSpecialItemValue(int id) {
    so you find the specialitemvalue shops..for example this is my mage point shop
    Code:
    if (c.myShopId == 17) {
    				if (c.magePoints >= getSpecialItemValue(itemID)) {
    					if (c.getItems().freeSlots() > 0){
    						c.magePoints -= getSpecialItemValue(itemID);
    						c.getItems().addItem(itemID,1);	
    						c.getItems().resetItems(3823);
    					}
    				} else {
    					c.sendMessage("You do not have enough points to buy this item.");		
    
    	
    				}
    now change it to what you want your new value to be, here i made is getpkpValue...

    Code:
    } else if (c.myShopId == ) {
    				} else if if (c.Points >= getpkpValue(itemID)) {
    					if (c.getItems().freeSlots() > 0){
    						c.Points -= getpkpItemValue(itemID);
    						c.getItems().addItem(itemID,1);
    					}
    				} else {
    					c.sendMessage("You do not have enough points to buy this item.");			
    				}
    make sure you make the c.points for your shop, if you want it to be pkp do what you have in playersave for Pkp for all of the c.points...

    then add this were this is under it..
    Code:
    public int getSpecialItemValue(int id) {
    add this under it
    Code:
    public int getpkpValue(int id) {
    		switch (id) {
    		case 1050://item id
    			return  10;//amount of points
    }
    		return 0;
    }
    you also need to add it under
    Code:
    public void buyFromShopPrice(int removeId, int removeSlot){
    somthing like this
    Code:
    if (c.myShopId == ) {//add your shop id!
      			c.sendMessage(c.getItems().getItemName(removeId)+": currently costs " + getpkpItemValue
    
    (removeId) + " Points.");
       			return;
    		}
    hopefully you can understand this, if you get errors i can help you more.
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Donator


    Join Date
    Feb 2014
    Posts
    609
    Thanks given
    121
    Thanks received
    204
    Rep Power
    117
    You mean, you don't want them to have the same point value?
    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 please?
    By Pablo... in forum Graphics
    Replies: 11
    Last Post: 11-18-2007, 04:12 AM
  2. Run Server? little help please :]
    By im so h00d in forum Tutorials
    Replies: 13
    Last Post: 11-11-2007, 03:59 AM
  3. Help, please
    By Zachyboo in forum Tutorials
    Replies: 4
    Last Post: 08-27-2007, 04:27 PM
  4. Webclient Help Please?
    By Spoonkitty in forum RS2 Client
    Replies: 1
    Last Post: 06-28-2007, 09:22 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
  •