ShowBuyBuildigPage

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • ShowBuyBuildigPage

      Good morning everyone ,


      I would like to know if anyone knows the mathematical logic for the dark matter calculation of the immediate levels of the structures on the "ShowBuyBulding" page, where the initial cost and the total cost are indicated.

      Thanks
    • Hello, its here, but maybe this is not the answer, please let me know:

      $NeededDm = 10 + ((400*($PLANET['b_building']-TIMESTAMP))/3600);

      PHP Source Code

      1. private function FastBuildingFromQueue()
      2. {
      3. global $PLANET, $USER, $resource;
      4. $CurrentQueue = unserialize($PLANET['b_building_id']);
      5. if (empty($CurrentQueue)){
      6. $PLANET['b_building_id'] = '';
      7. $PLANET['b_building'] = 0;
      8. return;
      9. }
      10. $Element = $CurrentQueue[0][0];
      11. $BuildMode = $CurrentQueue[0][4];
      12. $fast = $resource[$Element];
      13. $NeededDm = 10 + ((400*($PLANET['b_building']-TIMESTAMP))/3600);
      14. if($NeededDm < 10)
      15. $NeededDm=10;
      Display All

      Regards.
    • Zuno wrote:

      Hello, its here, but maybe this is not the answer, please let me know:

      $NeededDm = 10 + ((400*($PLANET['b_building']-TIMESTAMP))/3600);

      PHP Source Code

      1. private function FastBuildingFromQueue()
      2. {
      3. global $PLANET, $USER, $resource;
      4. $CurrentQueue = unserialize($PLANET['b_building_id']);
      5. if (empty($CurrentQueue)){
      6. $PLANET['b_building_id'] = '';
      7. $PLANET['b_building'] = 0;
      8. return;
      9. }
      10. $Element = $CurrentQueue[0][0];
      11. $BuildMode = $CurrentQueue[0][4];
      12. $fast = $resource[$Element];
      13. $NeededDm = 10 + ((400*($PLANET['b_building']-TIMESTAMP))/3600);
      14. if($NeededDm < 10)
      15. $NeededDm=10;
      Display All
      Regards.
      No , this is for accelerate the building , i mean the page that permitted buy 1 ore more level immediatly , "Buy Building"
    • Zuno wrote:

      Source Code

      1. $cost = BuildFunctions::instantPurchasePrice($Element) * pow(($pricelist[$Element]['factor']), ($PLANET[$resource[$Element]] + $Count));


      yes, right, but I would like to understand how much each element is worth and where i can find for change it
    • includes\classes\class.BuildFunctions.php

      PHP Source Code

      1. public static function instantPurchasePrice($Element)
      2. {
      3. global $PLANET, $USER, $resource, $pricelist, $reslist;
      4. $cost = 0;
      5. foreach($reslist['resstype'][1] as $resP)
      6. {
      7. $cost += ceil($pricelist[$Element]['cost'][$resP] * 0.0005);
      8. }
      9. foreach($reslist['resstype'][2] as $resS)
      10. {
      11. $cost += ceil($pricelist[$Element]['cost'][$resS] * 1);
      12. }
      13. foreach($reslist['resstype'][3] as $resU)
      14. {
      15. $cost += ceil($pricelist[$Element]['cost'][$resU] * 1);
      16. }
      17. return($cost);
      18. }
      Display All
      Regards.
    • Zuno wrote:

      includes\classes\class.BuildFunctions.php

      PHP Source Code

      1. public static function instantPurchasePrice($Element)
      2. {
      3. global $PLANET, $USER, $resource, $pricelist, $reslist;
      4. $cost = 0;
      5. foreach($reslist['resstype'][1] as $resP)
      6. {
      7. $cost += ceil($pricelist[$Element]['cost'][$resP] * 0.0005);
      8. }
      9. foreach($reslist['resstype'][2] as $resS)
      10. {
      11. $cost += ceil($pricelist[$Element]['cost'][$resS] * 1);
      12. }
      13. foreach($reslist['resstype'][3] as $resU)
      14. {
      15. $cost += ceil($pricelist[$Element]['cost'][$resU] * 1);
      16. }
      17. return($cost);
      18. }
      Display All
      Regards.



      Thanks :)