Jump to content
McKay Development

heaventea

Member
  • Posts

    5
  • Joined

  • Last visited

Everything posted by heaventea

  1. Hi Mckay, I showed him your post. This was the error we are facing on the website. We are using socket io. database is on mysql. Will this error help to identify whats the issue? <p>Message: Undefined index: assetid</p> public function deposit_item() { if ($this->input->server('REQUEST_METHOD') == 'POST') { $message = $_POST['items']; pr($message['items_to_receive'],1); $items_update_detail = array( 'name' => json_encode($message) ); $this->Inventory_model->test_trade_update($items_update_detail); if ($message['type'] == "deposit") { $bot_id = $message['bot_id']; $steam_id = $message['steam_id']; $trade_id = $message['tradeid']; $trade_offer_id = $message['tradeofferid']; $trade_msg = $message['message']; $deposit_detail = array( 'deposit_steam_id' => $steam_id, 'bot_id' => $bot_id, 'asset_id' => '', 'trade_offer_id' => $trade_offer_id, 'trade_id' => $trade_id, 'trade_message' => $trade_msg, 'trade_created' => date('Y-m-d H:i:s', $message['time_created']), 'trade_updated' => date('Y-m-d H:i:s', $message['time_updated']), 'trade_expiry' => date('Y-m-d H:i:s', $message['expiration_time']), ); $reg_exp = "~Token: (.*?)$~"; preg_match($reg_exp, $trade_msg, $tokens); $security_token = $tokens[1]; $items = $message['items_to_receive']; $items_update_detail = array( 'name' => json_encode($items) ); $this->Inventory_model->test_trade_update($items_update_detail); //$new_items = $message['new_assets']; $new_items = $_POST['new_items']; $new_items_detail = array( 'name' => json_encode($new_items) ); $this->Inventory_model->test_trade_update($new_items_detail); $return_array = array(); $asset_ids = array(); foreach ($items as $key => $item) { $asset_id = $item['assetid']; $new_asset_id = $new_items[$key]['assetid']; $asset_ids[] = $new_asset_id; $item_detail = $this->Inventory_model->get_inventory_item_assetid($asset_id); if (count($item_detail) > 0) { $item_id = $item_detail['id']; $update_inventory = array( 'new_asset_id' => $new_asset_id, 'item_type' => 1, 'class_id' => $new_items[$key]['classid'], 'instance_id' => $new_items[$key]['instanceid'], 'security_token' => $security_token ); $test_trade_update_detail = array( 'name' => json_encode($update_inventory) ); $this->Inventory_model->test_trade_update($test_trade_update_detail); if ($this->Inventory_model->update_item($item_id, $update_inventory)) { $deposit_detail['asset_id'] = $new_asset_id; if ($this->Deposit_model->deposit_item($deposit_detail)) { $return_array['status'] = 1; } } } } $trade_asset_ids = implode(",", $asset_ids); $bot_trade_detail = array( 'bot_id' => $bot_id, 'user_steam_id' => $steam_id, 'trade_id' => $trade_id, 'trade_offer_id' => $trade_offer_id, 'trade_type' => $message['type'], 'trade_status' => $message['trade_offer_state'], 'asset_ids' => $trade_asset_ids, 'security_token' => $security_token ); $this->Deposit_model->add_bot_trade($bot_trade_detail); // $return_array['deposit_items'] = $this->refresh_inventory_box($steam_id); } else { $return_array = array( 'status' => 0, 'msg' => 'Please try again..!!' ); } echo json_encode($return_array); } } The scenario/issue we are facing, bots is able to trade and receive through socket communication, we are able to deposit 20 items, but the ajax which doesn't update the web inventory correctly, instead of having 20 items in our web inventory, we only received 10, or maybe 13/14 out of the 20 items. Thanks
  2. Hi, I have tried to deposit 56 items using node bot, and on accepting Trade it returns only 29 Items as new items. I am using getReceivedItems() to get the Items with update assetid.Here is the link, https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOffer#getreceiveditemsgetactions-callback On accepting Trade, i have manageed "sentOfferChanged" event and with in that i have called getReceivedItems og TradeOffer objct to get updated information of Items in Trade as Below: tradeOffer.getReceivedItems(function(err,items){ }) I'm asking on behalf for my developer. any help appreciated!
  3. Yeah my developer is using the 2fa mobile login confirmation trade. He said his using this steam user library, https://www.npmjs.com/package/steam-user , so I assume there wouldn't be any new machine cooldown right when I asked him to transfer the bots from his local machine to the new vps.
  4. Yup thanks for your replies. I have googled out and told him about the socket.io and website, his able to proceed. Just another side note, because the bots that his doing is on his local machine, i have decided to put the bots like on amazon web services which has expressjs etc. How do I bypass the 7 days trade ban while login in from a new machine? , I read something about to do with secrets and cookies. Am I on the right track.
  5. Hi, I'm currently asking on behalf of my coder who is not really good with English. He has trouble getting items being displayed on the website when the bots received them. The NodeBot is working fine and is able to trade items back and forth with me. Now once I've deposited the items on the bots, I'm trying to get it linked to my website inventory which belongs to mine account when I signed in through steam, showing my "web" inventory which I have deposited with the bots. I read on google about storing it in a database, doing array etc. And something about connecting the Nodebot to the website through socket.io, I'm not familiar with all these as I'm not a coder. Any help would be appreciated. Thanks
×
×
  • Create New...