Menu

#238 Colonists Trading Bug

None
open
Cheat (35)
9
2019-12-25
2003-01-24
No

There is a bug in planet2.php that can be used as a
cheat!
You may do the following steps..
1) After the system updates, pick a planet with the
maximum colonists on it and transfer more!
2) Make a trade route from a special port to the planet,
moving colonists and repeat it 50 times.
You gain money, and more colonists on your ship than
you can carry!
3) You transfer the new colonists on the planet!
4) Repeat the procedure from 2 to 3 untill the next
update! You get a LOT of money!

You can fix this adding the following lines before line
echo "$l_planet2_compl<BR><a href=planet.php?
planet_id=$planet_id>$l_clickme</a>
$l_toplanetmenu<BR><BR>";

$result3 = $db->Execute("SELECT * FROM $dbtables
[planets] WHERE planet_id=$planet_id");
if($result3)
$planetinfo=$result3->fields;
if($planetinfo[colonists]>$colonist_limit)
$update2 = $db->Execute("UPDATE $dbtables[planets]
SET colonists=$colonist_limit WHERE
planet_id=$planet_id");

It reduces the colonists to the colonist limit, right after
the user puts them in the planet.. I know it is cruel,
because you just dump your colonists, but that's life! :-)

Discussion

  • Randall Medlin

    Randall Medlin - 2003-02-18

    Logged In: YES
    user_id=433513

    I couldn't get that fix to work properly for some reason. But
    did find tat this worked if you put it at the end of the last iff
    loop, before the following line:
    $update1 = $db->Execute("UPDATE $dbtables[ships] SET
    ship_ore=ship_ore+$transfer_ore,
    ship_organics=ship_organics+$transfer_organics,
    ship_goods=ship_goods+$transfer_goods,
    ship_energy=ship_energy+$transfer_energy,
    ship_colonists=ship_colonists+$transfer_colonists,
    torps=torps+$transfer_torps,
    ship_fighters=ship_fighters+$transfer_fighters,
    credits=credits+$transfer_credits, turns=turns-1,
    turns_used=turns_used+1 WHERE ship_id=$playerinfo
    [ship_id]");

    Here is the code I used:

    $tcrjm=$planetinfo[colonists]-$transfer_colonists;
    if ($tcrjm > $colonist_limit)
    {
    echo "Planet can not hold that many colonists";
    $transfer_colonists=0;
    }

     
  • David Henderson

    David Henderson - 2003-06-09

    Logged In: YES
    user_id=703269

    The money is made by selling the colonists back to the
    special.

     
  • TheMightyDude

    TheMightyDude - 2003-07-21

    Logged In: YES
    user_id=279303

    This is now fixed in both cvs codebases.
    This is however a temporary fix.

     
  • TheMightyDude

    TheMightyDude - 2019-12-25

    Ok, it seems that this bug has been over wrote back in 2006 when moving over to codebase 0.55.

     
  • TheMightyDude

    TheMightyDude - 2019-12-25
    • status: closed --> open
    • Group: -->
     

Log in to post a comment.

MongoDB Logo MongoDB