Jump to content
McKay Development

Recommended Posts

Hey, I've created a bot and when I write to him !sell [item], he displays me how much i need to pay and creates a offer - with the item and his payment.
The problem is it sometimes sends me the payment and I shouldn't give him anything. I've checked it with itemsToGive ItemsToRecieve and it didn't work.
Then I saw the isGlitched() method but everytime the bot sends a trade, it shows that it's glitched although sometimes it isn't..

Link to comment
Share on other sites

/*

theirItem - > value from the !sell [theirItem]

 

inventory - > 

manager.getUserInventoryContents(steamID, 440, 2, true, function(err, inventory)

everything is fine though, it just sometimes creates offers without taking anything but when it works, it works good.

also, I've checked the RecieveItems and ItemsToGive values when im not taking anything in the offer and everything was correct, the item should've been there but it's not.

Edited by nikita2150
Link to comment
Share on other sites

Im telling that I'm offering items from my side but the problem is it's not adding items in their side ItemsToRecieve and I've already said, it sometimes puts the items, sometimes not.

I though you wanted only 1 adding but here you go:

                                           /*

keysLeft, scrapLeft .. is how much of the specific metal I should add..

Edited by nikita2150
Link to comment
Share on other sites

First of all, I've checked it does.

Secondly, I've already written that the value of offer.itemsToReceive when it adds the item and when it does not is the same, that means it should add the item, it found it but it didn't....

For an example, in this image : https://prnt.sc/jffw8l

You could see what I'm talking about

Edited by nikita2150
Link to comment
Share on other sites

So.. I've just created a function that checks the values of the toGive toRecieve with the inventories , compared the values from the price list and if im giving too much it cancels it..

 

Edit:

Actually the problem was with the timings. The scipt wasn't fast enough to seatch through the whole inventory to get the item its needed, by this time the script already sent the offer.

Edited by nikita2150
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...