Advertisement
Hirsw0w

Untitled

Jan 6th, 2021 (edited)
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. var caseName = "Snowflake";
  2. var price = 0.27;
  3. var priceBe = 0.2537450999999999; // price of the case without house edge
  4. var loseReward = 0.03;
  5.  
  6. var battleHouseEdge = (price - priceBe) * 4;
  7. var battleCost = price * 4;
  8. var battleRewardSave = loseReward * 3; // the 0.03 consulation prize
  9. var battleBonus = (price * 0.05) * 4; // 5% bonus of deposit
  10. var battleAff = (price * 0.05) * 4; // 5% bonus if use own aff code
  11.  
  12.  
  13. fetch("https://api.daddyskins.com/api", {
  14. "headers": {
  15. "accept": "*/*",
  16. "accept-language": "he-IL,he;q=0.9,en-US;q=0.8,en;q=0.7,nl;q=0.6",
  17. "authorization": "Basic Og==",
  18. "content-type": "application/json",
  19. "sec-fetch-dest": "empty",
  20. "sec-fetch-mode": "cors",
  21. "sec-fetch-site": "same-site"
  22. },
  23. "referrer": "https://daddyskins.com/",
  24. "referrerPolicy": "strict-origin-when-cross-origin",
  25. "body": "{\"operationName\":\"FetchSteamCase\",\"variables\":{},\"query\":\"query FetchSteamCase {\\n case(slug: \\\"mil-spec\\\") {\\n id\\n name\\n title\\n updated_at\\n available_to\\n open_limit\\n open_times\\n type\\n description\\n slug\\n likesCount\\n jackpot\\n old_price\\n price\\n image\\n bg_image\\n active\\n free_level\\n battle_scarred\\n opskins_case_id\\n products {\\n id\\n appid\\n name\\n short_description\\n class\\n image\\n low\\n hi\\n price\\n quality\\n stattrak\\n chance\\n gameDoc {\\n platform\\n __typename\\n }\\n __typename\\n }\\n best_drops {\\n id\\n dropable_type\\n price\\n user {\\n id\\n username\\n avatar\\n __typename\\n }\\n product {\\n name\\n class\\n short_description\\n image\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}",
  26. "method": "POST",
  27. "mode": "cors",
  28. "credentials": "include"
  29. }).then(res => res.json()).then(json => {
  30. var items = json.data.case.products;
  31. var totalCosts = 0;
  32. var totalBattles = 0;
  33. var totalProfits = 0;
  34. var totalProfitsAff = 0;
  35.  
  36. for(var i = 0;i < 10000;i ++) {
  37. var winSize = 0;
  38. for(var j = 0;j < 4;j++) {
  39. var cc = 100;
  40. var rand = Math.random() * 100 + 0.001;
  41. var item = items[items.length - 1];
  42. for(var l of items) {
  43. cc -= l.chance;
  44. if(rand > cc) {
  45. item = l;
  46. break;
  47. }
  48. }
  49.  
  50. winSize += item.price / 100;
  51. }
  52.  
  53. totalCosts += price * 4;
  54. totalProfits += winSize + battleRewardSave; // adding + battleBonus will include the 5% deposit bonus on profits
  55. totalProfitsAff += winSize + battleRewardSave + battleBonus + battleAff;
  56. totalBattles++;
  57. }
  58.  
  59. console.log('Case: ' + caseName);
  60. console.log('Total Costs: ' + totalCosts + '$');
  61. console.log('Total Profits: ' + totalProfits + '$ | profit: ' + (totalProfits - totalCosts) + '$');
  62. console.log('Total Profits Affiliaties code: ' + totalProfitsAff + '$ | profit: ' + (totalProfitsAff - totalCosts) + '$');
  63. console.log('Total Battles: ' + totalBattles);
  64. });
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement