Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var caseName = "Snowflake";
- var price = 0.27;
- var priceBe = 0.2537450999999999; // price of the case without house edge
- var loseReward = 0.03;
- var battleHouseEdge = (price - priceBe) * 4;
- var battleCost = price * 4;
- var battleRewardSave = loseReward * 3; // the 0.03 consulation prize
- var battleBonus = (price * 0.05) * 4; // 5% bonus of deposit
- var battleAff = (price * 0.05) * 4; // 5% bonus if use own aff code
- fetch("https://api.daddyskins.com/api", {
- "headers": {
- "accept": "*/*",
- "accept-language": "he-IL,he;q=0.9,en-US;q=0.8,en;q=0.7,nl;q=0.6",
- "authorization": "Basic Og==",
- "content-type": "application/json",
- "sec-fetch-dest": "empty",
- "sec-fetch-mode": "cors",
- "sec-fetch-site": "same-site"
- },
- "referrer": "https://daddyskins.com/",
- "referrerPolicy": "strict-origin-when-cross-origin",
- "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\"}",
- "method": "POST",
- "mode": "cors",
- "credentials": "include"
- }).then(res => res.json()).then(json => {
- var items = json.data.case.products;
- var totalCosts = 0;
- var totalBattles = 0;
- var totalProfits = 0;
- var totalProfitsAff = 0;
- for(var i = 0;i < 10000;i ++) {
- var winSize = 0;
- for(var j = 0;j < 4;j++) {
- var cc = 100;
- var rand = Math.random() * 100 + 0.001;
- var item = items[items.length - 1];
- for(var l of items) {
- cc -= l.chance;
- if(rand > cc) {
- item = l;
- break;
- }
- }
- winSize += item.price / 100;
- }
- totalCosts += price * 4;
- totalProfits += winSize + battleRewardSave; // adding + battleBonus will include the 5% deposit bonus on profits
- totalProfitsAff += winSize + battleRewardSave + battleBonus + battleAff;
- totalBattles++;
- }
- console.log('Case: ' + caseName);
- console.log('Total Costs: ' + totalCosts + '$');
- console.log('Total Profits: ' + totalProfits + '$ | profit: ' + (totalProfits - totalCosts) + '$');
- console.log('Total Profits Affiliaties code: ' + totalProfitsAff + '$ | profit: ' + (totalProfitsAff - totalCosts) + '$');
- console.log('Total Battles: ' + totalBattles);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement