Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. else if (MSG.toUpperCase() === "!CHECK") {
  2. let theirCSGO =0,theirTF2;
  3. manager.getUserInventoryContents(SENDER.getSteamID64(),730, 2, true, (ERR2, INV, CURR) => {
  4.  
  5. if(ERR2){
  6. console.log(ERR);
  7. } else {
  8. for(var i=0;i<INV.length; i++){
  9.  
  10. var item = INV[i].market_hash_name;
  11. if (CONFIG.CSGO_Keys.indexOf(INV[i].market_hash_name) >= 0) {
  12. theirCSGO++;
  13. }
  14. }
  15. }
  16. let theirTF2 =0,theirGems;
  17. manager.getUserInventoryContents(SENDER.getSteamID64(), 440, 2, true, (ERR, INV, CURR) => {
  18.  
  19. if(ERR){
  20. console.log(ERR);
  21. } else {
  22. for(var i=0;i<INV.length; i++){
  23.  
  24. var item = INV[i].market_hash_name;
  25. if (CONFIG.TF2_Keys.indexOf(INV[i].market_hash_name) >= 0) {
  26. theirTF2++;
  27. }
  28. }
  29. }
  30. manager.getUserInventoryContents(SENDER.getSteamID64(), 753, 6, true, (ERR3, INV3, CURR) => {
  31.  
  32. if(ERR3){
  33. console.log(ERR);
  34. } else{
  35. let TheirGems = INV3.filter(gem => gem.name == "Gems");
  36. if (TheirGems === undefined || TheirGems.length == 0){
  37. theirGems =0;
  38. } else{
  39. let gem = TheirGems[0];
  40. theirGems = gem.amount
  41. }
  42.  
  43. let TF2_Msg ="",Gems_Msg ="";csgo_Msg ="";
  44.  
  45. if(theirTF2>0){
  46. TF2_Msg = "- I can give you "+(theirTF2*4400)+" Gems for them (Use !SellTF "+theirTF2+")";
  47. }
  48. if(Math.floor(theirGems/CONFIG.Rates.BUY.Gems_To_TF2_Rate) >0){
  49. 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)+")";
  50. }
  51. if(theirCSGO>0){
  52. csgo_Msg = "- I can give you "+(theirCSGO*3300)+" Gems for them (Use !SellCS "+theirCSGO+")";
  53. }
  54.  
  55. 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);
  56. }
  57. });
  58.  
  59. });
  60. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement