Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if (MSG.toUpperCase() === "!CHECK") {
- let theirCSGO =0,theirTF2;
- manager.getUserInventoryContents(SENDER.getSteamID64(),730, 2, true, (ERR2, INV, CURR) => {
- if(ERR2){
- console.log(ERR);
- } else {
- for(var i=0;i<INV.length; i++){
- var item = INV[i].market_hash_name;
- if (CONFIG.CSGO_Keys.indexOf(INV[i].market_hash_name) >= 0) {
- theirCSGO++;
- }
- }
- }
- let theirTF2 =0,theirGems;
- manager.getUserInventoryContents(SENDER.getSteamID64(), 440, 2, true, (ERR, INV, CURR) => {
- if(ERR){
- console.log(ERR);
- } else {
- for(var i=0;i<INV.length; i++){
- var item = INV[i].market_hash_name;
- if (CONFIG.TF2_Keys.indexOf(INV[i].market_hash_name) >= 0) {
- theirTF2++;
- }
- }
- }
- manager.getUserInventoryContents(SENDER.getSteamID64(), 753, 6, true, (ERR3, INV3, CURR) => {
- if(ERR3){
- console.log(ERR);
- } else{
- let TheirGems = INV3.filter(gem => gem.name == "Gems");
- if (TheirGems === undefined || TheirGems.length == 0){
- theirGems =0;
- } else{
- let gem = TheirGems[0];
- theirGems = gem.amount
- }
- let TF2_Msg ="",Gems_Msg ="";csgo_Msg ="";
- if(theirTF2>0){
- TF2_Msg = "- I can give you "+(theirTF2*4400)+" Gems for them (Use !SellTF "+theirTF2+")";
- }
- if(Math.floor(theirGems/CONFIG.Rates.BUY.Gems_To_TF2_Rate) >0){
- Gems_Msg = "- I can give you "+(Math.floor(theirGems/CONFIG.Rates.BUY.Gems_To_TF2_Rate))+" TF2 Keys for Your "+((Math.floor(theirGems/CONFIG.Rates.BUY.Gems_To_TF2_Rate))*CONFIG.Rates.BUY.Gems_To_TF2_Rate)+" Gems (Use !BuyTF "+Math.floor(theirGems/CONFIG.Rates.BUY.Gems_To_TF2_Rate)+")";
- }
- if(theirCSGO>0){
- csgo_Msg = "- I can give you "+(theirCSGO*3300)+" Gems for them (Use !SellCS "+theirCSGO+")";
- }
- client.chatMessage(SENDER,"ā You have: \r\n\r\nā"+theirTF2+" TF2 Keys "+TF2_Msg+"\r\nā"+theirGems+" Gems "+Gems_Msg+"\r\n"+theirCSGO+" CS:GO Keys "+csgo_Msg);
- }
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement