https://github.com/tak-pesar/fruitcraft
Complete management of your FruitCraft accounts
https://github.com/tak-pesar/fruitcraft
api craft fruit fruitcraft fruithack fruitscript game hack script
Last synced: 3 months ago
JSON representation
Complete management of your FruitCraft accounts
- Host: GitHub
- URL: https://github.com/tak-pesar/fruitcraft
- Owner: Tak-Pesar
- License: mit
- Created: 2025-05-25T08:54:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-10T17:44:55.000Z (about 1 year ago)
- Last Synced: 2025-08-04T03:35:16.889Z (11 months ago)
- Topics: api, craft, fruit, fruitcraft, fruithack, fruitscript, game, hack, script
- Language: PHP
- Homepage:
- Size: 396 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FruitCraft
Complete management of your FruitCraft accounts
## Installation
```bash
composer require takpesar/fruitcraft
```
Or you can use the [`Phar`](./fruitcraft.phar)
## Requirements
This package requires PHP 8.2 or later. Curl extensions require this package
## Usage
```php
player
if(file_exists($session_path)){
$client->player = unserialize(file_get_contents($session_path));
} else {
$player = $client->login($restore_key)->data;
echo 'Sign in as '.$player->name , PHP_EOL;
}
file_put_contents($session_path,serialize($client->player));
# You are now ready to use the implemented methods :)
# for example ...
$heroes = $client->getheroes();
$ids = array_column($heroes,'base_card_id');
foreach($ids as $id){
try {
var_dump($client->player_fillpotion(amount : 50));
var_dump($client->cards_potionize(hero_id : $id));
} catch(Errors $e){
if($e->getCode() === 400){
# ERROR_CODE_{$X} : 400 #
echo 'Error : ' , $client->geterrormessage($e->getValue()) , PHP_EOL;
} else {
echo 'Error : ' , strval($e) , PHP_EOL;
}
}
}
?>
```
> **Note**
> Please see [`examples`](./example) for more examples


## Issues
Should you encounter any issues, please do not hesitate to reach out to us via email at [`loser.man.2007@gmail.com`](mailto:loser.man.2007@gmail.com).
## License
The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information.