Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

<?

php
header("Content-type: text/plain");
date_default_timezone_set('UTC');

/* EDITABLE CODE */
$date = new DateTime('2020-03-20'); //input day
$plusHours = 0; //input hours
$neededRP = 300000; // input amount of RP you need to create
/* END EDITABLE CODE */

/* DO NOT EDIT CODE from this line */


createFileDay($date, $neededRP, $plusHours);
function createFileDay($date, $neededRP = 300000, $plusHours = 0){
$startTime = $date->getTimestamp();
//echo $date->format('D');
if($plusHours > 0){
$startTime+=$plusHours*60*60 + 10*60;
}
$startTime+=27;
$fullString = '{
"transactions": [
allRace
]
}';
$count = floor($neededRP/829);
$lastRP=$neededRP-$count*829;
//829 RP for each loop
$raceString = '{
"action": "CashEarned",
"timestamp": tz,
"isUploading": false,
"increase": 3250,
"boost": 163,
"reason": "RaceRewardWithBonus"
},
{
"action": "CashEarned",
"timestamp": tz,
"isUploading": false,
"increase": 35,
"reason": "RaceReward"
},
{
"action": "RacesInCrewEarned",
"timestamp": tz,
"isUploading": false,
"increase": 1,
"reason": "RacedWhileInACrew"
},
{
"action": "RPEarned",
"timestamp": tz,
"isUploading": false,
"increase": 637,
"reason": "RaceWin",
"boost": 192
}';
$lastRace = '{
"action": "CashEarned",
"timestamp": tz,
"isUploading": false,
"increase": 3250,
"boost": 163,
"reason": "RaceRewardWithBonus"
},
{
"action": "CashEarned",
"timestamp": tz,
"isUploading": false,
"increase": 35,
"reason": "RaceReward"
},
{
"action": "RacesInCrewEarned",
"timestamp": tz,
"isUploading": false,
"increase": 1,
"reason": "RacedWhileInACrew"
},
{
"action": "RPEarned",
"timestamp": tz,
"isUploading": false,
"increase": '.$lastRP.',
"reason": "RaceWin",
"boost": 0
}';
$abc = "";
for($i=0;$i<$count;$i++){
if($i> 0){
$abc = $abc.",".str_replace("tz",$startTime,$raceString);
} else {
$abc = str_replace("tz",$startTime,$raceString);
}
$startTime= $startTime + 25;
}
$abc = $abc.",".str_replace("tz",$startTime,$lastRace);

$fullString = str_replace("allRace",$abc,$fullString);
if($plusHours){
$file = 'trb'.$date->format('md').'_2.txt';
header("Content-Disposition: attachment; filename=$file");
// Write the contents back to the file
echo $fullString;
} else {
$file = 'trb'.$date->format('md').'.txt';
header("Content-Disposition: attachment; filename=$file");
// Write the contents back to the file
echo $fullString;
}
}

/*
How to use?
$date: MUST change to current date or future date, any date you want to create that
date of trb file

$plusHours: default 0, some day like Wednesday after Private Leaderboard reset you
may want to create file after that time in day then set this to 5 (or more) to make
it works. The day start new season, for example you got the last season Milestone
reward car at 12h AM GMT time, then you need to set $plusHours = 12 or more (later
than that time) to create trb file using for first date of new Season.

$neededRP: any amount of RP you need to create for this file. from 829 to 300000.

How to make file:


1. edit above variable
2. go to the website; http://phpfiddle.org/
3. Copy all this code, paste to right text area
4. click "run" or F9
Then the webpage will pop up your completed txt in the left box, click "download"
and rename as trb.txt
5. Open your CSRPacker folder, place downloaded file in the "decrypted" folder -
run CSR packer and press 1
6. Go to your "finished" folder and add the finished file to your player ID game
folder

Have fun!

*/

You might also like