mimikri Administrator
- Member since Sep 12th 2016
- Last Activity
This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.
-
icons97 -
I'm playing here on play.2moons.de as a regular player, my nickname is icons97. I thought you were the administrator of this server and could solve the problem.
-
icons97 -
Hello. I have two spy probe stuck, it does not return and takes up two slots.
-
mimikri -
select ally_deposit from %%PLANETS%% `id_owner` = :userID AND planet_type = 1;
update %%PLANETS%% set ally_deposit = 0 where `id_owner` = :userID AND planet_type = 1;-
sromantr -
4 planets have 1 planets Ally Deposit level 2 other 3 planets ally deposit 0 i try with select ally_deposit from %%PLANETS%% `id_owner` = :userID AND planet_type = 1 but showing 0 ally deposit
-
Danter14 -
$sql = "SELECT `ally_deposit` FROM %%PLANETS%% WHERE id_owner = :userID AND planet_type = :planetType";
$result = Database::get()->select($sql, [
":userID" => $USER["id"],
":planetType" => 1
]);
// return array -
sromantr -
I found the right query
$sql = "SELECT sum(ally_deposit) as count FROM %%PLANETS%% WHERE `id_owner` = :planetId AND `destruyed` = :destruyed ";
$PLANETS = $db->selectSingle($sql, array(
':planetId' => $USER['id'],
':destruyed' => 0
));
-
-
sromantr -
hello I want to show alliance deposits on all planets
$sql = "SELECT count(ally_deposit) AS Allydeposit FROM %%PLANETS%% WHERE `id_owner` = :userID AND planet_type = 1;";
$allydeposit = Database::get()->selectSingle($sql, array(
':userID' => $USER['id'],
));
$Allydeposit = $allydeposit['Allydeposit'];
but it shows the number of all the planets
Where am I making mistakes?-
Danter14 -
you want me in list or just display on the planet where the player is located because you first a single so only the first information send from the player's planets.
-
sromantr -
How should correct questioning be?
because I need to subtract all ally deposits from the player's planets -
Danter14 -
If you want to set everything to 0, just do an update.
Database::get()->update("UPDATE %%PLANETS%% SET `ally_deposit` = 0 WHERE `planete_type` = 1");
-
-
kynoz -
Heyyyyy,can you answer a question that I sent to your private message?
-
yamilrh -
Tal vez tengas conocimiento sobre esto y pudieras ayudarme 2moons.de/index.php?thread/147…l/&postID=11166#post11166
-
Russoll -
Hey I wanted to expand on the race mod by editing the page layout how do I do that since it's only one file.. when I try the page breaks
-
Abyss -
Mimikri dude, the rip squadron is destroying the moon and the assault squadron I sent from behind is locked up, can you help?
Where is the mistake?
<?php
/**
* 2Moons
* by Jan-Otto Kröpke 2009-2016
*
* For the full copyright and license information, please view the LICENSE
*
* @package 2Moons
* @author Jan-Otto Kröpke <slaver7@gmail.com>
* @copyright 2009 Lucky
* @copyright 2016 Jan-Otto Kröpke <slaver7@gmail.com>
* @licence MIT
* @version 1.8.0
* @link github.com/jkroepke/2Moons
*/
class MissionCaseDestruction extends MissionFunctions implements Mission
{
function __construct($Fleet)
{
$this->_fleet = $Fleet;
}
function TargetEvent()
{
global $resource, $reslist;
$db = Database::get();
$fleetAttack = array();
$fleetDefend = array();
$userAttack = array();
$userDefend = array();
$incomingFleets = array();
$stealResource = array(
901 => 0,
902 => 0,
903 => 0,
);
$debris = array();
$planetDebris = array();
$debrisResource = array(901, 902);
$messageHTML = <<<HTML
<div class="raportMessage">
<table>
<tr>
<td colspan="2"><a href="game.php?page=raport&raport=%s" target="_blank"><span class="%s">%s %s (%s)</span></a></td>
</tr>
<tr>
<td>%s</td><td><span class="%s">%s: %s</span> <span class="%s">%s: %s</span></td>
</tr>
<tr>
<td>%s</td><td><span>%s: <span class="reportSteal element901">%s</span> </span><span>%s: <span class="reportSteal element902">%s</span> </span><span>%s: <span class="reportSteal element903">%s</span></span></td>
</tr>
<tr>
<td>%s</td><td><span>%s: <span class="reportDebris element901">%s</span> </span><span>%s: <span class="reportDebris element902">%s</span></span></td>
</tr>
</table>
</div>
HTML;
//Minize HTML
$messageHTML = str_replace(array("\n", "\t", "\r"), "", $messageHTML);
$sql = "SELECT * FROM %%PLANETS%% WHERE id = :planetId;";
$targetPlanet = $db->selectSingle($sql, array(
':planetId' => $this->_fleet['fleet_end_id']
));
$sql = "SELECT * FROM %%USERS%% WHERE id = :userId;";
$targetUser = $db->selectSingle($sql, array(
':userId' => $targetPlanet['id_owner']
));
$targetUser['factor'] = getFactors($targetUser, 'basic', $this->_fleet['fleet_start_time']);
$planetUpdater = new ResourceUpdate();
list($targetUser, $targetPlanet) = $planetUpdater->CalcResource($targetUser, $targetPlanet, true, $this->_fleet['fleet_start_time']);
if($this->_fleet['fleet_group'] != 0)
{
$sql = "DELETE FROM %%AKS%% WHERE id = :acsId;";
$db->delete($sql, array(
':acsId' => $this->_fleet['fleet_group'],
));
$sql = "SELECT * FROM %%FLEETS%% WHERE fleet_group = :acsId;";
$incomingFleetsResult = $db->select($sql, array(
':acsId' => $this->_fleet['fleet_group'],
));
foreach($incomingFleetsResult as $incomingFleetRow)
{
$incomingFleets[$incomingFleetRow['fleet_id']] = $incomingFleetRow;
}
unset($incomingFleetsResult);
}
else
{
$incomingFleets = array($this->_fleet['fleet_id'] => $this->_fleet);
}
foreach($incomingFleets as $fleetID => $fleetDetail)
{
$sql = "SELECT * FROM %%USERS%% WHERE id = :userId;";
$fleetAttack[$fleetID]['player'] = $db->selectSingle($sql, array(
':userId' => $fleetDetail['fleet_owner']
));
$fleetAttack[$fleetID]['player']['factor'] = getFactors($fleetAttack[$fleetID]['player'], 'attack', $this->_fleet['fleet_start_time']);
$fleetAttack[$fleetID]['fleetDetail'] = $fleetDetail;
$fleetAttack[$fleetID]['unit'] = FleetFunctions::unserialize($fleetDetail['fleet_array']);
$userAttack[$fleetAttack[$fleetID]['player']['id']] = $fleetAttack[$fleetID]['player']['username'];
}
$sql = "SELECT * FROM %%FLEETS%%
WHERE fleet_mission = :mission
AND fleet_end_id = :fleetEndId
AND fleet_start_time <= :timeStamp
AND fleet_end_stay >= :timeStamp;";
$targetFleetsResult = $db->select($sql, array(
':mission' => 5,
':fleetEndId' => $this->_fleet['fleet_end_id'],
':timeStamp' => TIMESTAMP
));
foreach($targetFleetsResult as $fleetDetail)
{
$fleetID = $fleetDetail['fleet_id'];
$sql = "SELECT * FROM %%USERS%% WHERE id = :userId;";
$fleetDefend[$fleetID]['player'] = $db->selectSingle($sql, array(
':userId' => $fleetDetail['fleet_owner']
));
$fleetDefend[$fleetID]['player']['factor'] = getFactors($fleetDefend[$fleetID]['player'], 'attack', $this->_fleet['fleet_start_time']);
$fleetDefend[$fleetID]['fleetDetail'] = $fleetDetail;
$fleetDefend[$fleetID]['unit'] = FleetFunctions::unserialize($fleetDetail['fleet_array']);
$userDefend[$fleetDefend[$fleetID]['player']['id']] = $fleetDefend[$fleetID]['player']['username'];
}
unset($targetFleetsResult);
$fleetDefend[0]['player'] = $targetUser;
$fleetDefend[0]['player']['factor'] = getFactors($fleetDefend[0]['player'], 'attack', $this->_fleet['fleet_start_time']);
$fleetDefend[0]['fleetDetail'] = array(
'fleet_start_galaxy' => $targetPlanet['galaxy'],
'fleet_start_system' => $targetPlanet['system'],
'fleet_start_planet' => $targetPlanet['planet'],
'fleet_start_type' => $targetPlanet['planet_type'],
);
$fleetDefend[0]['unit'] = array();
foreach(array_merge($reslist['fleet'], $reslist['defense']) as $elementID)
{
if (empty($targetPlanet[$resource[$elementID]])) continue;
$fleetDefend[0]['unit'][$elementID] = $targetPlanet[$resource[$elementID]];
}
$userDefend[$fleetDefend[0]['player']['id']] = $fleetDefend[0]['player']['username'];
require_once 'includes/classes/missions/functions/calculateAttack.php';
$fleetIntoDebris = Config::get($this->_fleet['fleet_universe'])->Fleet_Cdr;
$defIntoDebris = Config::get($this->_fleet['fleet_universe'])->Defs_Cdr;
$combatResult = calculateAttack($fleetAttack, $fleetDefend, $fleetIntoDebris, $defIntoDebris);
foreach ($fleetAttack as $fleetID => $fleetDetail)
{
$fleetArray = '';
$totalCount = 0;
$fleetDetail['unit'] = array_filter($fleetDetail['unit']);
foreach ($fleetDetail['unit'] as $elementID => $amount)
{
$fleetArray .= $elementID.','.floatToString($amount).';';
$totalCount += $amount;
}
if($totalCount == 0)
{
if($this->_fleet['fleet_id'] == $fleetID)
{
$this->KillFleet();
}
else
{
$sql = 'DELETE %%FLEETS%%, %%FLEETS_EVENT%%
FROM %%FLEETS%%
INNER JOIN %%FLEETS_EVENT%% ON fleetID = fleet_id
WHERE fleet_id = :fleetId;';
$db->delete($sql, array(
':fleetId' => $fleetID
));
}
$sql = 'UPDATE %%LOG_FLEETS%% SET fleet_state = :fleetState WHERE fleet_id = :fleetId;';
$db->update($sql, array(
':fleetId' => $fleetID,
':fleetState' => FLEET_HOLD,
));
unset($fleetAttack[$fleetID]);
}
elseif($totalCount > 0)
{
$sql = "UPDATE %%FLEETS%% fleet, %%LOG_FLEETS%% log SET
fleet.fleet_array = :fleetData,
fleet.fleet_amount = :fleetCount,
log.fleet_array = :fleetData,
log.fleet_amount = :fleetCount
WHERE fleet.fleet_id = :fleetId AND log.fleet_id = :fleetId;";
$db->update($sql, array(
':fleetData' => substr($fleetArray, 0, -1),
':fleetCount' => $totalCount,
':fleetId' => $fleetID
));
}
else
{
throw new OutOfRangeException("Negative Fleet amount ....");
}
}
foreach ($fleetDefend as $fleetID => $fleetDetail)
{
if($fleetID != 0)
{
// Stay fleet
$fleetArray = '';
$totalCount = 0;
$fleetDetail['unit'] = array_filter($fleetDetail['unit']);
foreach ($fleetDetail['unit'] as $elementID => $amount)
{
$fleetArray .= $elementID.','.floatToString($amount).';';
$totalCount += $amount;
}
if($totalCount == 0)
{
$sql = 'DELETE %%FLEETS%%, %%FLEETS_EVENT%%
FROM %%FLEETS%%
INNER JOIN %%FLEETS_EVENT%% ON fleetID = fleet_id
WHERE fleet_id = :fleetId;';
$db->delete($sql, array(
':fleetId' => $fleetID
));
$sql = 'UPDATE %%LOG_FLEETS%% SET fleet_state = :fleetState WHERE fleet_id = :fleetId;';
$db->update($sql, array(
':fleetId' => $fleetID,
':fleetState' => FLEET_HOLD,
));
unset($fleetAttack[$fleetID]);
}
elseif($totalCount > 0)
{
$sql = "UPDATE %%FLEETS%% fleet, %%LOG_FLEETS%% log SET
fleet.fleet_array = :fleetData,
fleet.fleet_amount = :fleetCount,
log.fleet_array = :fleetData,
log.fleet_amount = :fleetCount
WHERE fleet.fleet_id = :fleetId AND log.fleet_id = :fleetId;";
$db->update($sql, array(
':fleetData' => substr($fleetArray, 0, -1),
':fleetCount' => $totalCount,
':fleetId' => $fleetID
));
}
else
{
throw new OutOfRangeException("Negative Fleet amount ....");
}
}
else
{
$params = array(':planetId' => $this->_fleet['fleet_end_id']);
// Planet fleet
$fleetArray = array();
foreach ($fleetDetail['unit'] as $elementID => $amount)
{
$fleetArray[] = '`'.$resource[$elementID].'` = :'.$resource[$elementID];
$params[':'.$resource[$elementID]] = $amount;
}
if(!empty($fleetArray))
{
$sql = 'UPDATE %%PLANETS%% SET '.implode(', ', $fleetArray).' WHERE id = :planetId;';
$db->update($sql, $params);
}
}
}
if ($combatResult['won'] == "a")
{
require_once 'includes/classes/missions/functions/calculateSteal.php';
$stealResource = calculateSteal($fleetAttack, $targetPlanet);
}
if($this->_fleet['fleet_end_type'] == 3)
{
// Use planet debris, if attack on moons
$sql = "SELECT der_metal, der_crystal FROM %%PLANETS%% WHERE id_luna = :moonId;";
$targetDebris = $db->selectSingle($sql, array(
':moonId' => $this->_fleet['fleet_end_id']
));
$targetPlanet['der_metal'] = $targetDebris['der_metal'];
$targetPlanet['der_crystal'] = $targetDebris['der_crystal'];
}
foreach($debrisResource as $elementID)
{
$debris[$elementID] = $combatResult['debris']['attacker'][$elementID] + $combatResult['debris']['defender'][$elementID];
$planetDebris[$elementID] = $targetPlanet['der_'.$resource[$elementID]] + $debris[$elementID];
}
$reportInfo = array(
'thisFleet' => $this->_fleet,
'debris' => $debris,
'stealResource' => $stealResource,
'moonChance' => NULL,
'moonDestroy' => true,
'moonName' => NULL,
'moonDestroyChance' => NULL,
'moonDestroySuccess' => NULL,
'fleetDestroyChance' => NULL,
'fleetDestroySuccess' => false,
);
$moonDestroyStatus = false;
switch($combatResult['won'])
{
// Win
case "a":
$moonDestroyChance = round((100 - sqrt($targetPlanet['diameter'])) * sqrt($fleetAttack[$this->_fleet['fleet_id']]['unit'][214]), 1);
// Max 100% | Min 0%
$moonDestroyChance = min($moonDestroyChance, 100);
$moonDestroyChance = max($moonDestroyChance, 0);
$randChance = mt_rand(1, 100);
if ($randChance <= $moonDestroyChance)
{
$sql = 'SELECT id FROM %%PLANETS%% WHERE id_luna = :moonId;';
$planetID = $db->selectSingle($sql, array(
':moonId' => $targetPlanet['id']
), 'id');
$sql = 'UPDATE %%FLEETS%% SET
fleet_start_type = 1,
fleet_start_id = :planetId
WHERE fleet_start_id = :moonId;';
$db->update($sql, array(
':planetId' => $planetID,
':moonId' => $targetPlanet['id']
));
$sql = 'UPDATE %%FLEETS%% SET
fleet_end_type = 1,
fleet_end_id = :planetId
WHERE fleet_end_id = :moonId
AND fleet_id != :fleetId;';
$db->update($sql, array(
':planetId' => $planetID,
':moonId' => $targetPlanet['id'],
':fleetId' => $this->_fleet['fleet_id']
));
$sql = "UPDATE %%AKS%% SET target = :planetId WHERE target = :moonId;";
$db->update($sql, array(
':planetId' => $planetID,
':moonId' => $targetPlanet['id']
));
PlayerUtil::deletePlanet($targetPlanet['id']);
$moonDestroyStatus = $planetID;
$reportInfo['moonDestroySuccess'] = 1;
} else {
$reportInfo['moonDestroySuccess'] = 0;
}
$fleetDestroyChance = round(sqrt($targetPlanet['diameter']) / 2);
$randChance = mt_rand(1, 100);
if ($randChance <= $fleetDestroyChance)
{
$this->KillFleet();
$reportInfo['fleetDestroySuccess'] = true;
}
else
{
$reportInfo['fleetDestroySuccess'] = false;
}
$reportInfo['moonDestroyChance'] = $moonDestroyChance;
$reportInfo['fleetDestroyChance'] = $fleetDestroyChance;
$attackStatus = 'wons';
$defendStatus = 'loos';
$class = array('raportWin', 'raportLose');
break;
case "r":
// Lose
$attackStatus = 'loos';
$defendStatus = 'wons';
$class = array('raportLose', 'raportWin');
$reportInfo['moonDestroySuccess'] = -1;
break;
default:
// Draw
$attackStatus = 'draws';
$defendStatus = 'draws';
$class = array('raportDraw', 'raportDraw');
$reportInfo['moonDestroySuccess'] = -1;
break;
}
require_once 'includes/classes/missions/functions/GenerateReport.php';
$reportData = GenerateReport($combatResult, $reportInfo);
$reportID = md5(uniqid('', true).TIMESTAMP);
$sql = 'INSERT INTO %%RW%% SET
rid = :reportId,
raport = :reportData,
time = :time,
attacker = :attackers,
defender = :defenders;';
$db->insert($sql, array(
':reportId' => $reportID,
':reportData' => serialize($reportData),
':time' => $this->_fleet['fleet_start_time'],
':attackers' => implode(',', array_keys($userAttack)),
':defenders' => implode(',', array_keys($userDefend))
));
$i = 0;
foreach(array($userAttack, $userDefend) as $data)
{
foreach($data as $userID => $userName)
{
$LNG = $this->getLanguage(NULL, $userID);
$message = sprintf($messageHTML,
$reportID,
$class[$i],
$LNG['sys_mess_attack_report'],
sprintf(
$LNG['sys_adress_planet'],
$this->_fleet['fleet_end_galaxy'],
$this->_fleet['fleet_end_system'],
$this->_fleet['fleet_end_planet']
),
$LNG['type_planet_short_'.$this->_fleet['fleet_end_type']],
$LNG['sys_lost'],
$class[0],
$LNG['sys_attack_attacker_pos'],
pretty_number($combatResult['unitLost']['attacker']),
$class[1],
$LNG['sys_attack_defender_pos'],
pretty_number($combatResult['unitLost']['defender']),
$LNG['sys_gain'],
$LNG['tech'][901],
pretty_number($stealResource[901]),
$LNG['tech'][902],
pretty_number($stealResource[902]),
$LNG['tech'][903],
pretty_number($stealResource[903]),
$LNG['sys_debris'],
$LNG['tech'][901],
pretty_number($debris[901]),
$LNG['tech'][902],
pretty_number($debris[902])
);
PlayerUtil::sendMessage($userID, 0, $LNG['sys_mess_tower'], 3, $LNG['sys_mess_attack_report'],
$message, $this->_fleet['fleet_start_time'], NULL, 1, $this->_fleet['fleet_universe']);
$sql = "INSERT INTO %%TOPKB_USERS%% SET
rid = :reportId,
role = :userRole,
username = :username,
uid = :userId;";
$db->insert($sql, array(
':reportId' => $reportID,
':userRole' => $i + 1,
':username' => $userName,
':userId' => $userID
));
}
$i++;
}
if($this->_fleet['fleet_end_type'] == 3)
{
$debrisType = 'id_luna';
}
else
{
$debrisType = 'id';
}
if ($moonDestroyStatus)
{
$sql = 'UPDATE %%PLANETS%% SET
der_metal = :metal,
der_crystal = :crystal
WHERE id = :planetId;';
$db->update($sql, array(
':metal' => $planetDebris[901],
':crystal' => $planetDebris[902],
':planetId' => $moonDestroyStatus
));
}
else
{
$sql = 'UPDATE %%PLANETS%% SET
der_metal = :metal,
der_crystal = :crystal
WHERE '.$debrisType.' = :planetId;';
$db->update($sql, array(
':metal' => $planetDebris[901],
':crystal' => $planetDebris[902],
':planetId' => $this->_fleet['fleet_end_id']
));
}
$sql = 'UPDATE %%PLANETS%% SET
metal = metal - :metal,
crystal = crystal - :crystal,
deuterium = deuterium - :deuterium
WHERE id = :planetId;';
$db->update($sql, array(
':metal' => $stealResource[901],
':crystal' => $stealResource[902],
':deuterium' => $stealResource[903],
':planetId' => $this->_fleet['fleet_end_id']
));
$sql = 'INSERT INTO %%TOPKB%% SET
units = :units,
rid = :reportId,
time = :time,
universe = :universe,
result = :result;';
$db->insert($sql, array(
':units' => $combatResult['unitLost']['attacker'] + $combatResult['unitLost']['defender'],
':reportId' => $reportID,
':time' => $this->_fleet['fleet_start_time'],
':universe' => $this->_fleet['fleet_universe'],
':result' => $combatResult['won']
));
$sql = 'UPDATE %%USERS%% SET
`'.$attackStatus.'` = `'.$attackStatus.'` + 1,
kbmetal = kbmetal + :debrisMetal,
kbcrystal = kbcrystal + :debrisCrystal,
lostunits = lostunits + :lostUnits,
desunits = desunits + :destroyedUnits
WHERE id IN ('.implode(',', array_keys($userAttack)).');';
$db->update($sql, array(
':debrisMetal' => $debris[901],
':debrisCrystal' => $debris[902],
':lostUnits' => $combatResult['unitLost']['attacker'],
':destroyedUnits' => $combatResult['unitLost']['defender']
));
$sql = 'UPDATE %%USERS%% SET
`'.$defendStatus.'` = `'.$defendStatus.'` + 1,
kbmetal = kbmetal + :debrisMetal,
kbcrystal = kbcrystal + :debrisCrystal,
lostunits = lostunits + :lostUnits,
desunits = desunits + :destroyedUnits
WHERE id IN ('.implode(',', array_keys($userDefend)).');';
$db->update($sql, array(
':debrisMetal' => $debris[901],
':debrisCrystal' => $debris[902],
':lostUnits' => $combatResult['unitLost']['defender'],
':destroyedUnits' => $combatResult['unitLost']['attacker']
));
$this->setState(FLEET_RETURN);
$this->SaveFleet();
}
function EndStayEvent()
{
return;
}
function ReturnEvent()
{
$LNG = $this->getLanguage(NULL, $this->_fleet['fleet_owner']);
$sql = 'SELECT name FROM %%PLANETS%% WHERE id = :planetId;';
$planetName = Database::get()->selectSingle($sql, array(
':planetId' => $this->_fleet['fleet_start_id'],
), 'name');
$Message = sprintf(
$LNG['sys_fleet_won'],
$planetName,
GetTargetAddressLink($this->_fleet, ''),
pretty_number($this->_fleet['fleet_resource_metal']), $LNG['tech'][901],
pretty_number($this->_fleet['fleet_resource_crystal']), $LNG['tech'][902],
pretty_number($this->_fleet['fleet_resource_deuterium']), $LNG['tech'][903]
);
PlayerUtil::sendMessage($this->_fleet['fleet_owner'], 0, $LNG['sys_mess_tower'], 4, $LNG['sys_mess_fleetback'],
$Message, $this->_fleet['fleet_end_time'], NULL, 1, $this->_fleet['fleet_universe']);
$this->RestoreFleet();
}
} -
Russoll -
hey question, i implemented it and it looks good , but it only uploads image for admin, not the rest of the players im using 2.0 thanks
2moons.de/index.php?thread/668-avatar/&postID=5033#wcf64 -
mimikri -
2moons.de/wcf/images/styleLogo…0a28c7eeca966518eb0c0.png ??
don't have a PSD version of it.-
yamilrh -
Sip, de esa foto, se sabe que estilo de letras se uso para crearlas?
-
mimikri -
i took it from the old 2moonsforum
web.archive.org/web/2015031423…ges/orangebar/logo_bw.png
don't know more about it. -
yamilrh -
thanks
-
-
yamilrh -
sera que tendrás por ahí guardado el PSD del logo del foro o conoces el tipo de fuente que se utilizo para el
-
hi can you fix my topic, i am developing steemnova 1.8 further. Github version of steemnova 1.8 is not working, and so many people asking questions about install and small things like changing theme, so i decided to fix these small issues that beginners can start developing their games without problems at the beginning
-
al mandar una expedicion me sale este error me podrías ayudar
WARNING
Message: Division by zero
File: /includes/classes/class.FleetFunctions.php
Line: 190
URL: xnova.nat.cu/game.php?page=fleetStep2
PHP-Version: 7.3.33-1+ubuntu20.04.1+deb.sury.org+1
PHP-API: fpm-fcgi
2Moons Version: 2.4.git
Debug Backtrace:
#0 /includes/classes/class.FleetFunctions.php(190): errorHandler(2, 'Division by zer...', 'FILEPATH ...', 190, Array)
#1 /includes/pages/game/ShowFleetStep2Page.class.php(74): FleetFunctions::GetFleetMissions(Array, Array, false)
#2 /game.php(58): ShowFleetStep2Page->show()
#3 {main} -
SAAS -
ok. naprawiłem sobie. z rozpędu wpisałem kod do ekspedycji. dziękuję.jak co to jestem na discord new star
-
SAAS -
witaj. proszę cie o drobną pomoc. robię sobie galaxy2d w new star . mam ich aż 3 .
1 normalna, tradycyjna
2 trochę rozbudowana z obrazem
3 to właśnie galaxy2d i mam coś takiego jak wchodzę do 7 systemu.
mam taki błąd
Message: Uninitialized string offset: 16
File: /cache/templates/pl_nsc^ca70a2213c655d28ef977e9008195d6f97f3c74e.page.galaxy3.default.tpl.php
Line: 952
PHP-Version: 7.3.33
PHP-API: litespeed
Version: 2.2.2
Debug Backtrace:
#0 /cache/templates/pl_nsc^ca70a2213c655d28ef977e9008195d6f97f3c74e.page.galaxy3.default.tpl.php(952): errorHandler(8, 'Uninitialized s...', 'FILEPATH ...', 952, Array)
#1 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(123): content_623738bf0961c3_37555296(Object(Smarty_Internal_Template))
#2 /includes/libs/Smarty/sysplugins/smarty_template_cached.php(137): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#3 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(211): Smarty_Template_Cached->render(Object(Smarty_Internal_Template), false)
#4 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 1)
#5 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
#6 /includes/classes/class.template.php(148): Smarty_Internal_TemplateBase->display('extends:layout....')
#7 /includes/pages/game/AbstractGamePage.class.php(505): template->display('extends:layout....')
#8 /includes/pages/game/ShowGalaxy3Page.class.php(134): AbstractGamePage->display('page.galaxy3.de...')
#9 /game.php(59): ShowGalaxy3Page->show()
#10 {main}
i nie bardzo rozumiem o co chodzi.
w panelu mogę wybrać tylko 6 systemów. więcej już nie
bo wychodzi ten błąd. pomożesz?
z góry dziękuję. -
Abyss -
Master in vote mode, can you help her cast dark matter after voting rather than clicking vote?
-
Danter14 -
to do this it would be necessary to return from the voting site
-
Abyss -
They have made some servers but I could not do it, vote on them, after voting on the voting site it gives dark matter but we have dark matter as soon as you click
-
Danter14 -
yes it is normal, to have material after a vote you need a json return of the site or the vote is carried out to condition that the vote is well done
-
-
Abyss -
Master, a dishonest player is constantly making a bug with spies, there is no spy attack in our game, do you know such a bug?
-
XenQen -
You can disable Spy Probes for attacks in this function, so the Attack Option does not get displayed if he selects Spy Probes: github.com/jkroepke/2Moons/blo…s.FleetFunctions.php#L408
-
-
Estevez -
tengo la duda si se puede tener mas de 9 colonias o planetas hasta cuanto se puede tener
-
WARNING
Message: session_start(): Unable to clear session lock record
File: /includes/classes/Session.class.php
Line: 139
URL: xnova.nat.cu/game.php?page=overview
PHP-Version: 7.3.11
PHP-API: fpm-fcgi
2Moons Version: 2.4b.git
Debug Backtrace:
#0 [internal function]: errorHandler(2, 'session_start()...', 'FILEPATH ...', 139, Array)
#1 /includes/classes/Session.class.php(139): session_start()
#2 /includes/common.php(120): Session::load()
#3 /game.php(25): require_once('FILEPATH ...')
#4 {main} -
Russoll -
ok.. understood ty
-
Russoll -
hey quick question... i am trying to put the races mod but i can insert into vars i keep getting error via phpmyadmin
Column count doesn't match value count at row 1-
XenQen -
This means that there are more or less entries per row than columns. You have to add/delete some entries.
Your issue can be caused by
INSERT INTO TABLE (column1, column2) VALUES (value1, value2, value3) for example. So it could be that there are too much or too less columns for all your values. Hope you understand this.
-
-
yamilrh -
sabes alguna formula que se pueda hacer para reducir el costo de produccion de todas las estructuras
-
[26-Dec-2019 13:10:59] USER ERROR: "SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xF0\x9F\x91\x8C' for column 'message_text' at row 1
Query-Code:INSERT INTO uni1_messages SET
message_owner = 1,
message_sender = 167,
message_time = 1577383859,
message_type = 1,
message_from = Murder_you [1:164:10],
message_subject = Sin asunto,
message_text = Dime puedes e manao porfa ando escarchado ,
message_unread = 1,
message_universe = 1;" -
mimikri -
pls send me the line from your error.log file before
Query-Code:INSERT INTO uni1_messages SET
message_owner = 1,
message_sender = 167,
message_time = 1577383859,
message_type = 1,
message_from = Murder_you [1:164:10],
message_subject = Sin asunto,...
arkady65 -
Wojny Galaktyk – OGame-inspired Strategy Game with a Dedicated Desktop Client
# Wojny Galaktyk – A New Space Strategy Game with a Desktop Client
Hello everyone!
I'd like to introduce **Wojny Galaktyk (Galaxy Wars)**, a space strategy game inspired by classic browser-based games such as OGame.
The project originally started in 2015. After a long break, I decided to bring it back to life with a modern architecture, a redesigned interface, and a dedicated desktop application.
The goal is to combine classic space strategy gameplay with modern technologies while maintaining the atmosphere of the original browser-based strategy games.
### Technical Architecture
The project is being developed using:
- **Backend:** PHP with Symfony
- **Database:** MariaDB
- **Web version:** Browser-based game interface
- **Desktop application:** Tauri 2, Rust, React and TypeScript
- **Frontend tooling:** Vite
- **3D graphics:** Three.js
The game runs on a central server, which handles game logic, player accounts, resources, construction, research, and other gameplay operations.
The desktop application connects to the same game server through an API.
This means that the desktop client is not a separate game or an offline version. It provides an alternative interface to the same online universe.
### Gameplay Features
The project includes or is being developed to support:
- Planet management and colonization
- Building construction and resource production
- Technology research
- Shipyard and fleet production
- Defensive structures
- Fleet missions and space combat
- Alliances and cooperative gameplay
- Multiple independent universes
The game is still under active development. Some systems are already functional, while others are being implemented and tested.
### Dedicated Desktop Application
One of the most interesting parts of the project is the dedicated desktop client for Windows and Linux.
Instead of simply wrapping the browser version, the application uses its own React-based interface and communicates with the game server through an API.
The desktop interface includes:
- Planet and resource management
- Building construction panels
- Technology research
- Shipyard and fleet management
- Visual progress indicators
- A modern space-themed interface
I have also prepared a short demonstration video showing the desktop application in action.
### Current Development Status
The project is currently in the testing and development phase.
My priority is to build a stable game engine, complete the core gameplay systems, and gradually expand the desktop experience.
### Website
wojnygalaktyk.eu/
I'd be interested in hearing feedback from the 2Moons community, especially from developers who have experience building and maintaining browser-based space strategy games.
Suggestions regarding architecture, gameplay mechanics, performance, and desktop integration are welcome.
Thanks for reading!