Closed HyperSin closed 8 years ago
I already gave you a fix for the Gold issue
autocubifix.php ` <?php $DBHost = "localhost"; $DBUser = "root"; $DBPassword = "password"; $DBName = "pw";
$Link = MySQL_Connect($DBHost, $DBUser, $DBPassword) or die ("Can't connect to MySQL"); MySQL_Select_Db($DBName, $Link) or die ("Database ".$DBName." does not exist.");
mysql_query("UPDATE usecashnow SET creatime='0000-00-00 00:00:00' WHERE creatime <> 1"); ?> `
Then put a cron job to run every 5 minutes or so
*/5 * * * * php /var/www/html/public/autocubifix.php >> /dev/null 2>&1
Not sure about Lvl up function, it seems kind of hard to fix, though I'll give you a hint
It's in
/var/www/html/public/panel/app/Http/Controllers/Front/ServicesController.php
Search for
public function level_up
$role_data['status']['level'] = $role_data['status']['level'] + $request->quantity; $role_data['status']['pp'] = $role_data['status']['pp'] + ( $request->quantity * 5 );
You can add these after
$role_data['status']['hp'] = $role_data['status']['hp'] + 3000;
$role_data['status']['mp'] = $role_data['status']['mp'] + 2300
Just an example though
wouldn't it work with $role_data['status']['hp'] = $role_data['status']['hp'] + ( $request->quantity * 3000 );
your php file dint work, i dont think my cronjob works all that well
Not it wouldn't work, because for example if you put quantity 149 which will level you up from 1 to 150 you're basically giving 75 + (149 * 3000) HP
Ok
i mean your php to fix cubi dint work
Make sure the patch is right for the file in cron
*/5 * * * * php /var/www/html/public/autocubifix.php >> /dev/null 2>&1
Go to your database then vote and check if the value is changed in "creatime" field located in usercashnow table
You can also try to manually check if it work by directly executing the file by going to http://URL/public/autocubifix.php
$role_data['status']['hp'] = $role_data['status']['hp'] + ( $request->quantity * 3000 );
It would have to be something like that, cause otherwise if you buy more than 1 level it will only give you 3k more hp.
My path is /var/www/pw-web/public/autocubifix.php >> /dev/null 2>&1 and i fugired it would have to be like that hulu or every level you did you got 3000 hp
$role_data['status']['hp'] = $role_data['status']['hp'] + ( $request->quantity * 3000 );
Still, it's not valid.. Let's say You're lv1 with 75 HP and you bought 149Lvls to get to 150 so it would be 75 + (149 * 3000) that's 447075 HP, it's messed up. I'm not good with math but I'll try to come up with an equation that's reasonable enough
Best I could come up with it $role_data['status']['hp'] = $role_data['status']['hp'] + ( $request->quantity * 30 );
Lv 150 = 4545 HP
How much HP & SP do you get per level?
I just checked, each lvl should give you exactly +30 HP and + 18 MP
I think it verys on the class dont it
Then do this:
$role_data['status']['hp'] = $role_data['status']['hp'] + ( $request->quantity * 30 );
$role_data['status']['mp'] = $role_data['status']['mp'] + ( $request->quantity * 18 );`
I think it verys on the class dont it indeed
for Magic classes it adds +20 HP and +28 MP You can add a control statement like
if ( !in_array( $role_data['base']['cls'], [ 9, 1, 2, 3, 7 ] ) ) { $role_data['status']['hp'] = $role_data['status']['hp'] + ( $request->quantity * 20 ); $role_data['status']['mp'] = $role_data['status']['mp'] + ( $request->quantity * 28 ); } elseif ( !in_array( $role_data['base']['cls'], [ 6, 5 ] ) ) { $role_data['status']['hp'] = $role_data['status']['hp'] + ( $request->quantity * 26 ); $role_data['status']['mp'] = $role_data['status']['mp'] + ( $request->quantity * 22 ); } else { $role_data['status']['hp'] = $role_data['status']['hp'] + ( $request->quantity * 30 ); $role_data['status']['mp'] = $role_data['status']['mp'] + ( $request->quantity * 18 ); }
This should give Heavy class 30HP and 18MP Magic class 20HP and 28Mp LA (Assassin and Archer) class 26HP and 22MP
Cool, wish we dint have to add that every time we update the panel
I'll add it in soon, but it won't be an update. It will just be a commit.
Done, you can download the source.