Thread: [PI] Trading Question

Results 1 to 6 of 6
  1. #1 [PI] Trading Question 
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    Most people use checks like this.

    Code:
    if (!((c.playerItems[fromSlot] == itemID + 1) && (c.playerItemsN[fromSlot] > amount))) {
    				c.sendMessage("You don't have that amount!");
    				return false;
    			}
    Is this really neccessary? The trade system already has checks on this.

    Code:
    if (item.amount > amount) {
    									item.amount -= amount;
    									c.getItems().addItem(itemID, amount);
    								} else {
    									amount = item.amount;
    									offeredItems.remove(item);
    									c.getItems().addItem(itemID, amount);
    								}
    What I'm wondering if there really is a reason to have a check like that.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    go ahead remove it.... and we can all have a nice time duping on your server. Yes it is nessary, and also the second line of your code doesn't check anything other than the amount, what about the item id, if you remove the first bit of code whats checking the item id? Free party hats all around!
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  3. #3  
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    Quote Originally Posted by Martin View Post
    go ahead remove it.... and we can all have a nice time duping on your server. Yes it is nessary, and also the second line of your code doesn't check anything other than the amount, what about the item id, if you remove the first bit of code whats checking the item id? Free party hats all around!
    Your not explaining why its even neccessary. This code removes the ability to offer more then 1 at a time if the item isn't noted.
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    Quote Originally Posted by animeking1120 View Post
    Your not explaining why its even neccessary. This code removes the ability to offer more then 1 at a time if the item isn't noted.
    Yes it is nessary, and also the second line of your code doesn't check anything other than the amount, what about the item id,
    To check the item id... Otherwise you can fake it.... Fake ID = any item you want.

    Simple as,

    Code:
     && (c.playerItemsN[fromSlot] > amount)
    that bit of code is not necessary yes.
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  5. #5  
    Spoonfeed Me Bitch
    AddictivePkz's Avatar
    Join Date
    Jun 2012
    Age
    28
    Posts
    733
    Thanks given
    79
    Thanks received
    51
    Rep Power
    0
    Quote Originally Posted by Martin View Post
    go ahead remove it.... and we can all have a nice time duping on your server. Free party hats all around!
    Haha , this is common sense without this there will be
    Many dupes as this person said
    Quote Originally Posted by Fakeblitz View Post
    What does [PI] mean? (sorry i am used to 503+)
    And what base is this?
    Reply With Quote  
     

  6. #6  
    Registered Member
    Sieu's Avatar
    Join Date
    Dec 2011
    Age
    30
    Posts
    1,167
    Thanks given
    186
    Thanks received
    131
    Rep Power
    160
    anime did you fix it, because the checking 1 by one is annoying, and it spams You do not have that amount.
    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: 04-03-2012, 05:44 PM
  2. Replies: 8
    Last Post: 06-26-2011, 05:15 AM
  3. [Trading] Fiesta US Account For RS Account [Trading]
    By FreekySteve69 in forum Accounts
    Replies: 0
    Last Post: 05-15-2011, 03:06 PM
  4. 474 trading? just a question.
    By digistr in forum Help
    Replies: 0
    Last Post: 03-24-2010, 12:57 AM
  5. 100% trading! + New trading screen
    By SWAT in forum Show-off
    Replies: 70
    Last Post: 07-19-2009, 10:41 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
  •