• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[Fix] Fix the Vacation mode bug for RageOnline v11

Status
Not open for further replies.
Newbie Spellweaver
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
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");
Below them, add
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');
}
3. Then search these lines
Code:
 $query = doquery("SELECT * FROM {{table}} WHERE id_owner = '{$user['id']}'", 'planets');
          while($id = mysql_fetch_array($query)){
Below them, add
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');
}
 
Elite Diviner
Loyal Member
Joined
Nov 20, 2006
Messages
462
Reaction score
1
:clap_1:

Very nice indeed, didnt notice the vac mode was broken...
 
Experienced Elementalist
Joined
Apr 7, 2008
Messages
229
Reaction score
0
hero322 do you fix it now in your source?? and rerelease it?
 
Elite Diviner
Loyal Member
Joined
Nov 20, 2006
Messages
462
Reaction score
1
i never re-release anything, people fix things them selves :p or else no one will learn anything.
 
Master Summoner
Joined
Sep 7, 2006
Messages
523
Reaction score
0
Erreur
Erreur, merci de contacter l'admin. Erreur n�: 1

i get this error when i try togo in vaction mode.

butit went into vaction mode.....
 
Status
Not open for further replies.
Back
Top