CameronFitzy

Points

Nov 24th, 2020 (edited)
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(Followage.includes(`has been following`))
  2. {FF=Followage.slice(User.length+Channel.length+27).split(`:`);datum=new Date(Date.UTC(parseInt(FF[2]),parseInt(FF[1]),parseInt(FF[0]),parseInt(FF[3].slice(0,2)),parseInt(FF[3].slice(2,4)),parseInt(FF[3].slice(4))))}
  3. else
  4. {Message=`NoFollow`;FF=Time;datum=new Date(Date.UTC(parseInt(FF[0]),parseInt(FF[1]),parseInt(FF[2]),parseInt(FF[3]),parseInt(FF[4]),parseInt(FF[5])))};
  5.  
  6. Two=``;
  7. Three=``;
  8.  
  9. if(Query.length>0)
  10. {One=Query[0].toLowerCase();
  11. if(Query.length>1)
  12. {Two=Query[1].toLowerCase();
  13. if(Query.length>2)
  14. {There=Query[2].toLowerCase()}}};
  15.  
  16. PH=parseInt(Settings.Points[0])*3600;
  17. PM=parseInt(Settings.Points[1])*60;
  18. PS=parseInt(Settings.Points[2]);
  19. PF=PH+PM+PS;
  20.  
  21. CH=parseInt(Settings.CooldownPeriod[0])*3600;
  22. CM=parseInt(Settings.CooldownPeriod[1])*60;
  23. CS=parseInt(Settings.CooldownPeriod[2]);
  24. CF=CH+CM+CS;
  25.  
  26. ShopItems=``;
  27. ItemPrice=``;
  28. BuyLimitItems=``;
  29. PriceF=0;
  30. PlusMinus=`Plus`;
  31. PlusMinusTotal=0;
  32. Message=`Error`;
  33. ItemName=`Null`;
  34. BuyAmountsList=``;
  35. BuyNumberCheck=0;
  36. BuyAmounts=``;
  37.  
  38. UserData=Data.filter(x=>x==User.toLowerCase()+x.slice(User.length));
  39.  
  40. ExtraPoints=0;
  41.  
  42. for(x=0;x<UserData.length;x++)
  43. {DataTemp=UserData[x].split(` `);
  44. if(DataTemp[1]==`Plus`)
  45. {ExtraPoints=ExtraPoints+parseInt(DataTemp[2])}
  46. else
  47. if(DataTemp[1]==`Minus`)
  48. {ExtraPoints=ExtraPoints-parseInt(DataTemp[2])};
  49. BuyAmounts=DataTemp.splice(3,DataTemp.length)};
  50.  
  51. datum2=new Date(Date.UTC(parseInt(Time[0]),parseInt(Time[1]),parseInt(Time[2]),parseInt(Time[3]),parseInt(Time[4]),parseInt(Time[5])));
  52.  
  53. A=datum.getTime()/1000;
  54. B=datum2.getTime()/1000;
  55. FinalTime=B-A-CF;
  56.  
  57. TotalAdd=Math.floor(FinalTime/PF);
  58. TotalReward=TotalAdd*Settings.Reward+ExtraPoints;
  59.  
  60. for(x in Settings.Shop.Items)
  61. {ShopItems+=`,`+x}
  62. ShopList=ShopItems.toLowerCase().slice(1).split(`,`);
  63. ShopListU=ShopItems.slice(1).split(`,`);
  64.  
  65. for(x=0;x<ShopListU.length;x++)
  66. {if(BuyAmounts.length>BuyNumberCheck)
  67. {Settings.Shop.Items[ShopListU[x]].ItemID=BuyAmounts[x];
  68. BuyNumberCheck++}
  69. else
  70. {Settings.Shop.Items[ShopListU[x]].ItemID=0}};
  71.  
  72. if(One==`buy`)
  73. {if(Two!=``&&ShopList.includes(Two))
  74. {if(TotalReward>=Settings.Shop.Items[ShopListU[ShopList.indexOf(Two)]].Price)
  75. {if(Settings.Shop.Items[ShopListU[ShopList.indexOf(Two)]].Price>0)
  76. {PlusMinus=`Minus`}
  77. else
  78. if(Settings.Shop.Items[ShopListU[ShopList.indexOf(Two)]].Price<=0)
  79. {PlusMinus=`Plus`};
  80. PlusMinusTotal=Settings.Shop.Items[ShopListU[ShopList.indexOf(Two)]].Price;
  81. if(Settings.Shop.Items[ShopListU[ShopList.indexOf(Two)]].BuyLimit==0||Settings.Shop.Items[ShopListU[ShopList.indexOf(Two)]].BuyLimit>Settings.Shop.Items[ShopListU[ShopList.indexOf(Two)]].ItemID)
  82. {Message=`BuySuccess`}
  83. else
  84. {Message=`TooMany`;
  85. PlusMinus=`Plus`;
  86. PlusMinusTotal=0};
  87. ItemName=Settings.Shop.Items[ShopListU[ShopList.indexOf(Two)]].Name;
  88. Settings.Shop.Items[ShopListU[ShopList.indexOf(Two)]].ItemID=Math.floor(parseInt(Settings.Shop.Items[ShopListU[ShopList.indexOf(Two)]].ItemID)+1)}
  89. else
  90. {Message=`BuyFail`;
  91. ItemName=Settings.Shop.Items[ShopListU[ShopList.indexOf(Two)]].Name}}
  92. else
  93. {Message=`NoItem`;
  94. if(Two==``)
  95. {ItemName=`NoItem`}
  96. else
  97. {ItemName=Two}}};
  98.  
  99. for(x=0;x<ShopListU.length;x++)
  100. {BuyAmountsList+=`%20`+Settings.Shop.Items[ShopListU[x]].ItemID};
  101.  
  102. if(ShopList.includes(One))
  103. {Message=`Description`;
  104. ItemName=One};
  105.  
  106. if(One==`shop`)
  107. {Message=`ItemList`};
  108.  
  109. if(One==`points`)
  110. {Message=`Points`};
  111.  
  112. if(One==`help`||One==``)
  113. {Message=`Help`};
  114.  
  115. if(PlusMinusTotal!=0)
  116. {TokenFinal=Token}
  117. else
  118. {TokenFinal=Token};
  119.  
  120. `${TokenFinal}&data=,${User}%20${PlusMinus}%20${PlusMinusTotal}${BuyAmountsList} ${Message} ${ItemName} ${TotalReward}`
Add Comment
Please, Sign In to add comment