Storage Facility
+2
theclarets1969
nipunb
6 posters
Page 1 of 1
Storage Facility
New building: Storage Facility, used to store other storage buildings.
Add new type "storagefacility" in cityfran, then it will be in b_others.....
Add new type "storagefacility" in cityfran, then it will be in b_others.....
nipunb- Posts : 362
Points : 374
Join date : 2011-10-08
Re: Storage Facility
added n got cheers m8nipunb wrote:New building: Storage Facility, used to store other storage buildings.
Add new type "storagefacility" in cityfran, then it will be in b_others.....
theclarets1969- Posts : 501
Points : 805
Join date : 2011-10-14
Location : planet earth
Re: Storage Facility
But if you add some storage buildings in the storage facility, the maximum total capacity of storage will not be counted...
because the ./codebase-php/LocalDataClass.php is not up-to-date.
~ line 500
You need to add :
- some new storage element
- the storage facility
I've added some storage buildings in the array... but it miss the storage facility
because the ./codebase-php/LocalDataClass.php is not up-to-date.
~ line 500
- Code:
// added to count total storge
if(isset($fobj['itemName']))
{
$cv_storage_type = array(
'storage_barn'=> 415,
'storage_silo'=> 100,
'storage_outskirtsfarm'=> 485,
'storage_shack'=> 1000,
'goods_pier'=> 420,
'storage_grain_elevator' => 700, // Z* update on March 2011 @Cybuster
'storage_grainsilo' => 150, // Z* update on March 2011 @Cybuster
'storage_grain_elevator2' => 1200, //new
'storage_shackblue' => 4000, //new
'storage_megasilo' => 5000 //new
);
foreach($cv_storage_type as $sname =>$sval){
if ( $fobj['itemName'] == $sname ) {
$totalStorageGoods = $totalStorageGoods + $sval;
}
}
}
You need to add :
- some new storage element
- the storage facility
I've added some storage buildings in the array... but it miss the storage facility
- Code:
// added to count total storge
if(isset($fobj['itemName']))
{
$cv_storage_type = array(
'storage_barn' => 415, // Grange
'storage_barn_2' => 1245, // Grange level 2
'storage_barn_3' => 2075, // Grange level 3
'storage_barn_4' => 4150, // Grange level 4
'storage_heritagebarn' => 1500, // Grange traditionnelle
'storage_holidaybarn' => 10000, // Grange des rennes
'storage_silo' => 100, // Silo
'storage_silo_2' => 300, // Silo level 2
'storage_silo_3' => 500, // Silo level 3
'storage_silo_4' => 1000, // Silo level 4
'storage_megasilo' => 5000, // Mega silo
'storage_metrosilo1' => 5000,
'storage_outskirtsfarm' => 485, // Grenier
'storage_outskirtsfarm_2' => 1455, // Grenier level 2
'storage_outskirtsfarm_3' => 2425, // Grenier level 3
'storage_outskirtsfarm_4' => 4850, // Grenier level 4
'storage_shack' => 1000, // Hangar
'storage_shackblue' => 4000, // Hangar Bleu
'storage_shackred' => 10000, // Hangar Rouge
'storage_halloween_shack' => 1000, // Hangar Halloween added feb 2012 @rlff38
'storage_cargo' => 5000, // added feb 2012 @rlff38
'storage_grain_elevator' => 700, // Z* update on March 2011 @Cybuster
'storage_grainsilo' => 150, // Z* update on March 2011 @Cybuster
'storage_grain_elevator2' => 1200, // new
'goods_pier' => 420,
'storage_newpier' => 850, // Boat
'storage_newpier_2' => 1500, // Boat
'storage_newpier_3' => 2500, // Boat
'storage_oilrig' => 15000, // Derrick
'storage_metro_distributioncenter' => 12000, // Centre de distribution
'storage_storagecellar' => 7000 // Cave de Stockage
);
foreach($cv_storage_type as $sname =>$sval){
if ( $fobj['itemName'] == $sname ) {
$totalStorageGoods = $totalStorageGoods + $sval;
}
}
}
Last edited by rlff38 on Wed Feb 15, 2012 8:11 am; edited 2 times in total
rlff38- Posts : 120
Points : 126
Join date : 2011-12-27
Location : France
Re: Storage Facility
Not counting....rlff38 wrote:But if you add some storage buildings in the storage facility, the maximum total capacity of storage will not be counted...
because the ./codebase-php/LocalDataClass.php is not up-to-date.
~ line 500
- Code:
// added to count total storge
if(isset($fobj['itemName']))
{
$cv_storage_type = array(
'storage_barn'=> 415,
'storage_silo'=> 100,
'storage_outskirtsfarm'=> 485,
'storage_shack'=> 1000,
'goods_pier'=> 420,
'storage_grain_elevator' => 700, // Z* update on March 2011 @Cybuster
'storage_grainsilo' => 150, // Z* update on March 2011 @Cybuster
'storage_grain_elevator2' => 1200, //new
'storage_shackblue' => 4000, //new
'storage_megasilo' => 5000 //new
);
foreach($cv_storage_type as $sname =>$sval){
if ( $fobj['itemName'] == $sname ) {
$totalStorageGoods = $totalStorageGoods + $sval;
}
}
}
You need to add :
- some new storage element
- the storage facility
I've added some storage buildings in the array... but it miss the storage facility
- Code:
// added to count total storge
if(isset($fobj['itemName']))
{
$cv_storage_type = array(
'storage_barn' => 415, // Grange
'storage_barn_2' => 1245, // Grange level 2
'storage_barn_3' => 2075, // Grange level 3
'storage_barn_4' => 4150, // Grange level 4
'storage_heritagebarn' => 1500, // Grange traditionnelle
'storage_holidaybarn' => 10000, // Grange des rennes
'storage_silo' => 100, // Silo
'storage_silo_2' => 300, // Silo level 2
'storage_silo_3' => 500, // Silo level 3
'storage_silo_4' => 1000, // Silo level 4
'storage_megasilo' => 5000, // Mega silo
// 'storage_metrosilo1' => 0, ??? Don't known how !!!
'storage_outskirtsfarm' => 485, // Grenier
'storage_outskirtsfarm_2' => 1455, // Grenier level 2
'storage_outskirtsfarm_3' => 2425, // Grenier level 3
'storage_outskirtsfarm_4' => 4850, // Grenier level 4
'storage_shack' => 1000, // Hangar
'storage_shackblue' => 4000, // Hangar Bleu
'storage_shackred' => 10000, // Hangar Rouge
'storage_halloween_shack' => 1000,
'storage_grain_elevator' => 700, // Z* update on March 2011 @Cybuster
'storage_grainsilo' => 150, // Z* update on March 2011 @Cybuster
'storage_grain_elevator2' => 1200, // new
'goods_pier' => 420,
'storage_newpier' => 850, // Boat
'storage_newpier_2' => 1500, // Boat
'storage_newpier_3' => 2500, // Boat
'storage_oilrig' => 15000, // Derrick
'storage_metro_distributioncenter' => 12000, // Centre de distribution
'storage_storagecellar' => 7000 // Cave de Stockage
);
foreach($cv_storage_type as $sname =>$sval){
if ( $fobj['itemName'] == $sname ) {
$totalStorageGoods = $totalStorageGoods + $sval;
}
}
}
florin- Posts : 65
Points : 79
Join date : 2011-09-25
Location : on the moon
Re: Storage Facility
you have to delete your profile
the dashboard plugin is Ok but not the bot when running
I don't know why ! Maybe it's localdata.php, not onlinedata.php (or runningdata.php) !
the dashboard plugin is Ok but not the bot when running
I don't know why ! Maybe it's localdata.php, not onlinedata.php (or runningdata.php) !
rlff38- Posts : 120
Points : 126
Join date : 2011-12-27
Location : France
Re: Storage Facility
still not counting !!rlff38 wrote:you have to delete your profile
the dashboard plugin is Ok but not the bot when running
I don't know why ! Maybe it's localdata.php, not onlinedata.php (or runningdata.php) !
florin- Posts : 65
Points : 79
Join date : 2011-09-25
Location : on the moon
Re: Storage Facility
rlff38 wrote:
I don't know why ! Maybe it's localdata.php, not onlinedata.php (or runningdata.php) !
you find the data for the storages in the BotClass.php
- Code:
$totalStorageGoods = 300;
$this->fobjects = array();
$this->fobjects1 = $bod->_value['data'][0]['data']['userInfo']['world']['objects'];
$this->fobjects2 = $bod->_value['data'][0]['data']['world']['objects'];
if(count($this->fobjects1) > 4)
$this->fobjects = $this->fobjects1;
if(count($this->fobjects2) > 4)
$this->fobjects = $this->fobjects2;
if(is_array($this->fobjects))
{
$storages = $this->ld->Storages();//get the storages from XML
foreach($this->fobjects as $fobj)
{
if(isset($fobj['itemName']))
{
if(in_array($fobj['itemName'], $storages))
{
$totalStorageGoods += intval($storages[$fobj['itemName']]);
}
and you forgot to add in the LocalDataClass.php these 2
- Code:
'goods_pier_2' => 1500,
'goods_pier_3' => 2500,
<BQ>- Posts : 221
Points : 226
Join date : 2011-09-21
Re: Storage Facility
Hi,
First of all thank you for this wonderfull bot I LOVE it
I have a little problem with the " Maxgoods"
I have modified the function SaveProfile2db(&$bot) in LocalDataClass.php
I have the right max goods in the database (it's the same in my city)!
One more thing
the right code
is
I added
I modified the the function ReloadConfig() in BotClass.php in order to put the Storage facility.
I don't have the same max goods.
I can't find out why !
What went wrong?
First of all thank you for this wonderfull bot I LOVE it
I have a little problem with the " Maxgoods"
I have modified the function SaveProfile2db(&$bot) in LocalDataClass.php
- Code:
foreach($cv_storage_type as $sname =>$sval){
if ( $fobj['itemName'] == $sname ) {
$totalStorageGoods = $totalStorageGoods + $sval;
}
[color=red] if ($fobj['className'] == "StorageFacility")
{
$this->fobjects3 = $fobj['mechanicData']['slots'];
if(is_array($this->fobjects3))
{
foreach($this->fobjects3 as $fobj2)
{
if (($fobj2['itemName']) == $sname )
{
$totalStorageGoods = $totalStorageGoods + $sval;
}
}
}[/color]
}
}
I have the right max goods in the database (it's the same in my city)!
One more thing
the right code
is
- Code:
'storage_heritage_barn' => 1500, // Grange traditionnelle
- Code:
'storage_heritagebarn' => 1500, // Grange traditionnelle
I added
- Code:
'storage_cargo' => 5000,
I modified the the function ReloadConfig() in BotClass.php in order to put the Storage facility.
- Code:
$this->fobjects = array();
[b] $this->fobjects3 = array();[/b]
$this->fobjects1 = $bod->_value['data'][0]['data']['userInfo']['world']['objects'];
$this->fobjects2 = $bod->_value['data'][0]['data']['world']['objects'];
if(count($this->fobjects1) > 4)
$this->fobjects = $this->fobjects1;
if(count($this->fobjects2) > 4)
$this->fobjects = $this->fobjects2;
if(is_array($this->fobjects))
{
$storages = $this->ld->Storages();//get the storages from XML
foreach($this->fobjects as $fobj)
{
if(isset($fobj['itemName']))
{
if(in_array($fobj['itemName'], $storages))
{
$totalStorageGoods += intval($storages[$fobj['itemName']]);
}
[color=red]if ($fobj['className'] == "StorageFacility")
{
$this->fobjects3 = $fobj['mechanicData']['slots'];
if(is_array($this->fobjects3))
{
foreach($this->fobjects3 as $fobj2)
{
if (in_array($fobj2['itemName'],$storages))
{
$totalStorageGoods += intval($storages[$fobj2['itemName']]);
}
}
}
}[/color]
else
//enjoy the loop and also finds for a lvl7 police station
if($fobj['itemName'] == "mun_policestation_7")
{
$this->policelvl7 = true;
}
else
if($fobj['itemName'] == "deco_golden_plow")
{
$this->EternalFountain = true;
}
}
}
}
$this->MaxGoods = $totalStorageGoods;
I don't have the same max goods.
I can't find out why !
What went wrong?
anhoc- Posts : 20
Points : 22
Join date : 2011-10-14
Age : 39
Location : France
Re: Storage Facility
Finally, I found out the problem !
The function Storages() (LocalDataClass.php) is incomplete for the item that can be level up. The item storage_barn_4, storage_barn_3, storage_barn_2 derives from storage_barn, so there is no type storage for them. It's the same problem for storage_outskirtsfarm , storage_silo ...
in order to have the complete list of storage and pier
The function Storages() must be
The function Storages() (LocalDataClass.php) is incomplete for the item that can be level up. The item storage_barn_4, storage_barn_3, storage_barn_2 derives from storage_barn, so there is no type storage for them. It's the same problem for storage_outskirtsfarm , storage_silo ...
in order to have the complete list of storage and pier
- Code:
storage_silo_4/ 1000
storage_silo_3/ 500
storage_silo_2/ 300
storage_silo/ 100
storage_shackblue/ 4000
storage_shack/ 1000
storage_outskirtsfarm_4/ 4850
storage_outskirtsfarm_3/ 2425
storage_outskirtsfarm_2/ 1455
storage_outskirtsfarm/ 485
storage_megasilo/ 5000
storage_holidaybarn/ 10000
storage_grainsilo/ 150
storage_grain_elevator2/ 1200
storage_grain_elevator/ 700
storage_facility_level3/
storage_facility_level2/
storage_barn_4/ 4150
storage_barn_3/ 2075
storage_barn_2/ 1245
storage_barn/ 415
storage_oilrig/ 15000
storage_shackred/ 10000
storage_storagecellar/ 7000
storage_metro_distributioncenter/ 12000
storage_halloween_shack/ 1000
storage_metrosilo1/ 5000
storage_newpier_3/ 2500
storage_newpier_2/ 1500
goods_pier_3/ 2500
goods_pier_2/ 1500
storage_newpier/ 850
goods_pier/ 420
storage_heritage_barn/ 1500
storage_cargo/ 5000
The function Storages() must be
- Code:
function Storages()
{
$fn = 'tmp_dir\gameSettings.xml';
$fl = fopen($fn, 'r');
$s = fread($fl, filesize($fn));
fclose($fl);
$xml = simplexml_load_string($s);
$items = $xml->items;
$s = array();
foreach($items->item as $item)
{
$type = $item['type'];
$name = strval($item['name']);
if (in_array($type,array('storage','pier')) || (substr((string)$item['derivesFrom'],0,8) == "storage_"))
{
$count = strval($item->commodity['capacity']);
$s[] = $name;
$s[$name] = $count;
}
}
unset($xml);
return $s;
}
anhoc- Posts : 20
Points : 22
Join date : 2011-10-14
Age : 39
Location : France
Re: Storage Facility
anhoc wrote:Finally, I found out the problem !
The function Storages() (LocalDataClass.php) is incomplete for the item that can be level up. The item storage_barn_4, storage_barn_3, storage_barn_2 derives from storage_barn, so there is no type storage for them. It's the same problem for storage_outskirtsfarm , storage_silo ...
right
<BQ>- Posts : 221
Points : 226
Join date : 2011-09-21
Re: Storage Facility
it works well for goods, thx
rlff38- Posts : 120
Points : 126
Join date : 2011-12-27
Location : France
Re: Storage Facility
You are welcome
anhoc- Posts : 20
Points : 22
Join date : 2011-10-14
Age : 39
Location : France
Re: Storage Facility
anhoc wrote:Finally, I found out the problem !
The function Storages() (LocalDataClass.php) is incomplete for the item that can be level up. The item storage_barn_4, storage_barn_3, storage_barn_2 derives from storage_barn, so there is no type storage for them. It's the same problem for storage_outskirtsfarm , storage_silo ...
The function Storages() must be
- Code:
function Storages()
{
$fn = 'tmp_dir\gameSettings.xml';
$fl = fopen($fn, 'r');
$s = fread($fl, filesize($fn));
fclose($fl);
$xml = simplexml_load_string($s);
$items = $xml->items;
$s = array();
foreach($items->item as $item)
{
$type = $item['type'];
$name = strval($item['name']);
if (in_array($type,array('storage','pier')) || (substr((string)$item['derivesFrom'],0,8) == "storage_"))
{
$count = strval($item->commodity['capacity']);
$s[] = $name;
$s[$name] = $count;
}
}
unset($xml);
return $s;
}
thanks for the new function Storages()
<BQ>- Posts : 221
Points : 226
Join date : 2011-09-21
Re: Storage Facility
<BQ> wrote:anhoc wrote:Finally, I found out the problem !
The function Storages() (LocalDataClass.php) is incomplete for the item that can be level up. The item storage_barn_4, storage_barn_3, storage_barn_2 derives from storage_barn, so there is no type storage for them. It's the same problem for storage_outskirtsfarm , storage_silo ...
The function Storages() must be
- Code:
function Storages()
{
$fn = 'tmp_dir\gameSettings.xml';
$fl = fopen($fn, 'r');
$s = fread($fl, filesize($fn));
fclose($fl);
$xml = simplexml_load_string($s);
$items = $xml->items;
$s = array();
foreach($items->item as $item)
{
$type = $item['type'];
$name = strval($item['name']);
if (in_array($type,array('storage','pier')) || (substr((string)$item['derivesFrom'],0,8) == "storage_"))
{
$count = strval($item->commodity['capacity']);
$s[] = $name;
$s[$name] = $count;
}
}
unset($xml);
return $s;
}
thanks for the new function Storages()
you're welcome
anhoc- Posts : 20
Points : 22
Join date : 2011-10-14
Age : 39
Location : France
Re: Storage Facility
Where I can find the images for the storage_center level2 & 3. Not present in db !
In game_setting.xml ?
How I can exploit Z* CDATA ?
In game_setting.xml ?
How I can exploit Z* CDATA ?
- Code:
d41d8cd98f00b204e9800998ecf8427e:assets/storage/storage_center/5x5.txt
514ca00e006da270af16ff9ade52f2ea:assets/feed_quests/storage_center01_90x90feed.png
47c24703b6bbbabae8c14c46d6131bec:assets/feed_quests/storage_center02_90x90feed.png
f2a066d660192e2f7f597a1dc1d2e668:assets/feed_quests/storage_center03_90x90feed.png
be937aa277ba0858c7ad11ab1fa5349b:assets/storage/storage_center/storage_center01_icon.png
9ddba443ec1586ec7570ebdc0121eab0:assets/storage/storage_center/storage_center02_icon.png
64b8173b0c60488c3616ea5e84ead58a:assets/storage/storage_center/storage_center03_icon.png
550f3e5023ff7991acfc48f393033d32:assets/storage/storage_center/storage_center01_104.png
d613b368790b4e78019a3d2200e714fa:assets/storage/storage_center/storage_center02_104.png
083e15d535925bd4f0b21dab02b4f1d6:assets/storage/storage_center/storage_center03_104.png
a42805c351d8dc8b27e2147254f3b0a0:assets/storage/storage_center/storage_center01_SE.png
14bd298cdfec394232171f17a19d3eb5:assets/storage/storage_center/storage_center02_SE.png
6b4b5434af526ca8d1223775373dfe18:assets/storage/storage_center/storage_center03_SE.png
52be663009e5e06ebd7d0b1706a161e0:assets/storage/storage_center/storage_center01_SW.png
fa6f2e0e7ded5a6bc675cff098f3df07:assets/storage/storage_center/storage_center02_SW.png
6937c247e8e0932fc1f7e5e45705c240:assets/storage/storage_center/storage_center03_SW.png
Last edited by rlff38 on Sun Feb 26, 2012 7:27 pm; edited 1 time in total (Reason for editing : add info)
rlff38- Posts : 120
Points : 126
Join date : 2011-12-27
Location : France
Re: Storage Facility
rlff38 wrote:Where I can find the images for the storage_center level2 & 3. Not present in db !
In game_setting.xml ?
How I can exploit Z* CDATA ?
- Code:
d41d8cd98f00b204e9800998ecf8427e:assets/storage/storage_center/5x5.txt
514ca00e006da270af16ff9ade52f2ea:assets/feed_quests/storage_center01_90x90feed.png
47c24703b6bbbabae8c14c46d6131bec:assets/feed_quests/storage_center02_90x90feed.png
f2a066d660192e2f7f597a1dc1d2e668:assets/feed_quests/storage_center03_90x90feed.png
be937aa277ba0858c7ad11ab1fa5349b:assets/storage/storage_center/storage_center01_icon.png
9ddba443ec1586ec7570ebdc0121eab0:assets/storage/storage_center/storage_center02_icon.png
64b8173b0c60488c3616ea5e84ead58a:assets/storage/storage_center/storage_center03_icon.png
550f3e5023ff7991acfc48f393033d32:assets/storage/storage_center/storage_center01_104.png
d613b368790b4e78019a3d2200e714fa:assets/storage/storage_center/storage_center02_104.png
083e15d535925bd4f0b21dab02b4f1d6:assets/storage/storage_center/storage_center03_104.png
a42805c351d8dc8b27e2147254f3b0a0:assets/storage/storage_center/storage_center01_SE.png
14bd298cdfec394232171f17a19d3eb5:assets/storage/storage_center/storage_center02_SE.png
6b4b5434af526ca8d1223775373dfe18:assets/storage/storage_center/storage_center03_SE.png
52be663009e5e06ebd7d0b1706a161e0:assets/storage/storage_center/storage_center01_SW.png
fa6f2e0e7ded5a6bc675cff098f3df07:assets/storage/storage_center/storage_center02_SW.png
6937c247e8e0932fc1f7e5e45705c240:assets/storage/storage_center/storage_center03_SW.png
Hi,
The gameSettings.xml gives you the CDATA of all item in the game. The first line
- Code:
<assetIndex hashedPrefix="hashed/"><![CDATA[a07d803c2e953047f61b585e42091b56:assets/missions/captain2_167_thumbup.png
"assets" in which url which is "http://assets.cityville.Z*.com"
So, to use it, you have to take to CDATA in the gameSettings.xml
for : 514ca00e006da270af16ff9ade52f2ea:assets/feed_quests/storage_center01_90x90feed.png
it's : [You must be registered and logged in to see this link.]
in order to have the image.
read the name of the CDATA to find the right on for storage_center level2 & 3.
anhoc- Posts : 20
Points : 22
Join date : 2011-10-14
Age : 39
Location : France
Re: Storage Facility
thanks a lot
rlff38- Posts : 120
Points : 126
Join date : 2011-12-27
Location : France
Re: Storage Facility
you are welcomerlff38 wrote:thanks a lot
anhoc- Posts : 20
Points : 22
Join date : 2011-10-14
Age : 39
Location : France
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Mon Apr 20, 2015 1:52 pm by ertyanna
» expansions cityville hack new 12/12/15
Sat Feb 14, 2015 9:52 pm by nico
» Biohazard Problem Expansion
Sat Nov 08, 2014 3:12 pm by CV FO LIFE
» CAN SOMEONE HELP ME?
Sat Nov 08, 2014 3:09 pm by CV FO LIFE
» hello friends i have new update of cv bot project devil 1.10 update (2.01)
Sat Nov 01, 2014 12:59 pm by Blue Angel
» [Resolved] codebase-php Error
Sun Oct 12, 2014 7:22 am by nico
» -_- Which bot is now working ????
Thu Oct 09, 2014 7:06 pm by lobobpf6
» bot 1.2 does nt work
Sun Aug 10, 2014 1:00 am by nathaliafariass
» COMO FUNCIONA
Sun Aug 10, 2014 12:38 am by nathaliafariass