Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sendKeys() {
- //console.log('here 1')
- manager.loadInventory(440, 2, true, (err,inventory) => {
- if(err){
- console.log(err);
- } else {
- const offer = manager.createOffer(a[0]);
- inventory.forEach(function(item) {
- if (item.market_name === 'Mann Co. Supply Crate Key') {
- offer.addMyItem(item);
- offer.send((err, status) => {
- if(err) {
- console.log(err);
- } else{
- console.log(status)
- const removeLines = (data, lines = []) => { //
- return data
- .split('\n')
- .filter((val, idx) => lines.indexOf(idx) === -1)
- .join('\n');
- }
- fs.readFile('data.txt', 'utf8', (err, data) => {
- if (err) throw err;
- fs.writeFile('data.txt', removeLines(data, [0]), 'utf8', function(err) {
- if (err) throw err;
- });
- }) //
- }
- });
- }
- });
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement