Thread: how to set buy buttons? PLZ HELP [PI]

Results 1 to 4 of 4
  1. #1 how to set buy buttons? PLZ HELP [PI] 
    Registered Member
    Join Date
    Feb 2013
    Posts
    38
    Thanks given
    3
    Thanks received
    2
    Rep Power
    11
    Okay, so I have a donator shop, and I have buy 1,5,10,50 options but anyone of them I click, it only buys the amount in this shop code - c.getItems().addItem(itemID,1);
    FULL SHOP CODE

    if (c.myShopId == 31) {
    if (c.donorPoints >= getSpecialItemValue(itemID)) {
    if (c.getItems().freeSlots() > 0){
    c.donorPoints -= getSpecialItemValue(itemID);
    c.getItems().addItem(itemID,1);
    c.getItems().resetItems(3823);


    so any button I click it will just buy 1, since the code is 1, does anyone know how I can set an amount for each buy button, like buy 5 option will buy 5 and buy 10 option will buy 10 ect.. instead of just buying one amount for all of the buy options?

    I hope this wasn't too hard to read, I'm sorry I'm kind of new to coding rsps, but still learning, so if you can help you are amazing and I will thank your reply.
    Thanks.
     

  2. #2  
    Registered Member
    Join Date
    Feb 2013
    Posts
    38
    Thanks given
    3
    Thanks received
    2
    Rep Power
    11
    yes I know I could read it, but I was asking how to code it to buy the amount on the options since I already told you I'm new to coding, I can't really write it well, but I know how to read it. I am asking these questions, so I can get better. Its not like everyone starts off as an amazing coder.
     

  3. #3  
    Irathient Developer

    mr selby's Avatar
    Join Date
    May 2011
    Age
    28
    Posts
    1,183
    Thanks given
    95
    Thanks received
    166
    Rep Power
    97
    Code:
    c.getItems().addItem(itemID,amount);
    try that?
     

  4. #4  
    Registered Member

    Join Date
    Jul 2012
    Posts
    169
    Thanks given
    43
    Thanks received
    5
    Rep Power
    0
    Quote Originally Posted by Bronze Pro View Post
    http://www.rune-server.org/runescape...ml#post4096711
    What are you doing reposting
    Code:
    c.donorPoints -= getSpecialItemValue(itemID);//line 1 to look at
    c.getItems().addItem(itemID,1);//line 2 to look at
    Thats what you need to look at.
    line 1 because if you get line 2 to work, and buy more than 1 item, it would only subtract the points for 1 item.
    line 2 because thats where you need to look.

    use code tags
    Bronze pro at his finest.
     


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: 1
    Last Post: 05-23-2010, 03:23 AM
  2. Replies: 7
    Last Post: 12-29-2009, 09:40 PM
  3. can sum1 teach me how to set up myBB? plz
    By Snow Cat123 in forum Application Development
    Replies: 2
    Last Post: 09-17-2009, 10:18 PM
  4. Replies: 4
    Last Post: 03-31-2009, 04:29 PM
  5. how to make runeclaws special work help me plz
    By pkownage135 in forum Help
    Replies: 5
    Last Post: 02-26-2009, 01:55 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
  •