- Joined
- Nov 19, 2004
- Messages
- 57
- Reaction score
- 4
I'm just a newbie, hope I can learn more things from the greate repack teams here.:drinks_no
what's the bug?
when you enable the vacation mode, the resource incoming speed will become to initial basic speed, but after you disable the vacation mode, you still cant restore the speed.
How to fix?
here we go:
1.Create a new table first
2. Open the option.php, search these lines
Below them, add
3. Then search these lines
Below them, add
what's the bug?
when you enable the vacation mode, the resource incoming speed will become to initial basic speed, but after you disable the vacation mode, you still cant restore the speed.
How to fix?
here we go:
1.Create a new table first
Code:
CREATE TABLE `game_vacation` (
`id_owner` int(11) default NULL,
`id` bigint(11) NOT NULL default '0',
`metal_perhour` int(11) NOT NULL default '0',
`crystal_perhour` int(11) NOT NULL default '0',
`deuterium_perhour` int(11) NOT NULL default '0',
`energy_used` int(11) NOT NULL default '0',
`energy_max` int(11) NOT NULL default '0',
`metal_mine_porcent` int(11) NOT NULL default '10',
`crystal_mine_porcent` int(11) NOT NULL default '10',
`deuterium_sintetizer_porcent` int(11) NOT NULL default '10',
`solar_plant_porcent` int(11) NOT NULL default '10',
`fusion_plant_porcent` int(11) NOT NULL default '10',
`solar_satelit_porcent` int(11) NOT NULL default '10',
`planet_type` int(11) NOT NULL default '1',
PRIMARY KEY (`id`)
);
2. Open the option.php, search these lines
Code:
doquery("UPDATE {{table}} SET
`urlaubs_modus` = '0',
`urlaubs_until` = '0'
WHERE `id` = '".$user['id']."' LIMIT 1", "users");
Code:
$query = doquery("SELECT * FROM {{table}} WHERE id_owner = '{$user['id']}'", 'vacation');
while($id = mysql_fetch_array($query)){
doquery("update {{table}} set metal_perhour= '{$id['metal_perhour']}',
crystal_perhour ='{$id['crystal_perhour']}',
deuterium_perhour = '{$id['deuterium_perhour']}',
energy_used = '{$id['energy_used']}',
energy_max = '{$id['energy_max']}',
metal_mine_porcent = '{$id['metal_mine_porcent']}',
crystal_mine_porcent = '{$id['crystal_mine_porcent']}',
deuterium_sintetizer_porcent = '{$id['deuterium_sintetizer_porcent']}',
solar_plant_porcent ='{$id['solar_plant_porcent']}',
fusion_plant_porcent= '{$id['fusion_plant_porcent']}',
solar_satelit_porcent = '{$id['solar_satelit_porcent']}',
planet_type= '{$id['planet_type']}'
where id= '{$id['id']}' and id_owner= '{$user['id']}' ", 'planets');
}
Code:
$query = doquery("SELECT * FROM {{table}} WHERE id_owner = '{$user['id']}'", 'planets');
while($id = mysql_fetch_array($query)){
Code:
$checkcc = doquery("SELECT count(*) as cc FROM {{table}} WHERE id = '{$id['id']}' ", 'vacation');
$checkrel=mysql_fetch_array($checkcc);
$cc=$checkrel['cc'];
if ($cc==0) {
doquery("insert into {{table}} values (
'{$user['id']}',
'{$id['id']}',
'{$id['metal_perhour']}',
'{$id['crystal_perhour']}',
'{$id['deuterium_perhour']}',
'{$id['energy_used']}','{$id['energy_max']}',
'{$id['metal_mine_porcent']}',
'{$id['crystal_mine_porcent']}',
'{$id['deuterium_sintetizer_porcent']}',
'{$id['solar_plant_porcent']}',
'{$id['fusion_plant_porcent']}',
'{$id['solar_satelit_porcent']}',
'{$id['planet_type']}' ) ", 'vacation');
}
else {
doquery("update {{table}} set
id_owner= '{$user['id']}',
metal_perhour= '{$id['metal_perhour']}',
crystal_perhour ='{$id['crystal_perhour']}',
deuterium_perhour = '{$id['deuterium_perhour']}',
energy_used = '{$id['energy_used']}',
energy_max = '{$id['energy_max']}',
metal_mine_porcent = '{$id['metal_mine_porcent']}',
crystal_mine_porcent = '{$id['crystal_mine_porcent']}',
deuterium_sintetizer_porcent = '{$id['deuterium_sintetizer_porcent']}',
solar_plant_porcent ='{$id['solar_plant_porcent']}',
fusion_plant_porcent= '{$id['fusion_plant_porcent']}',
solar_satelit_porcent = '{$id['solar_satelit_porcent']}',
planet_type= '{$id['planet_type']}'
where id= '{$id['id']}' ", 'vacation');
}