DarkOrbit 7.5.3 / 9.0 / 10.0 - Open Source

04/09/2023 06:14 tenor76#586
Quote:
Originally Posted by -=Flavio=- View Post
The latest version I have WON'T work, it's modified beyond usefulness, and I was just doing tests with the client, the rest of the files as I said are up to date, I just haven't worked on this project for over a year.

can you help me with 1 things?

Can you make it automatically transfer to the equipment section when the ship design is taken from the shop?
04/14/2023 01:25 #Heizer™#587
Quote:
Originally Posted by rafail1234 View Post
yo somebudy have files from back(2010) version above 3.0 or 2.0 which laserflash is active in source? im paying max 100 euro paypal or paysafe because its not worth more than effort tbh, thx all :kappa:
[Only registered and activated users can see links. Click Here To Register...]
:)
04/15/2023 12:49 Letosprit#588
Quote:
Originally Posted by -=Flavio=- View Post
You know you can use old servers files like ICON_8 files for example right?
But anyway, unless you have a good AS editor it won't be possible to reactivate in version 10.0
hello, my friend, he tells me what the friend named prototype did his design with and what files he edited misin.ve which program and what should I use to change in-game map backgrounds and animations.
04/28/2023 12:30 sadikglronline#589
eğer localhost boş sayfa açılıyorsa .
files/config.php bu kodla değiştirin

<?php
define('ROOT', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR);

ini_set('log_errors', 1);
ini_set('error_log', ROOT . 'error_logs' . DIRECTORY_SEPARATOR . 'php_error.log');
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);

$sessions_path = ROOT . 'sessions';
ini_set('session.save_path', $sessions_path);

if (!file_exists($sessions_path)) {
mkdir($sessions_path);
}

if (session_start()) {
$options = [
'expires' => 0,
'path' => '/',
'domain' => '',
'secure' => true,
'httponly' => true,
'samesite' => 'Strict',
];
setcookie(session_name(), session_id(), $options);
}

define('SERVER_NAME', 'DarkOrbit');
define('MAINTENANCE', FALSE);

define('MYSQL_HOST', 'localhost');
define('MYSQL_USER', 'root');
define('MYSQL_PASSWORD', '');
define('MYSQL_DATABASE', 'server');
define('MYSQL_PORT', '3306');

define('DOMAIN', ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') && (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) ? 'https' : 'http') . '://' . $_SERVER['SERVER_NAME'] . '/');

define('CLASSES', ROOT . 'classes' . DIRECTORY_SEPARATOR);
define('EXTERNALS', ROOT . 'external' . DIRECTORY_SEPARATOR);
define('INCLUDES', EXTERNALS . 'includes' . DIRECTORY_SEPARATOR);
define('CRONJOBS', EXTERNALS . 'cronjobs' . DIRECTORY_SEPARATOR);

require_once(CLASSES . 'SMTP.php');
require_once(CLASSES . 'Functions.php');
require_once(CLASSES . 'Database.php');
require_once(CLASSES . 'Socket.php');
?>
05/03/2023 20:10 darkmoonpvp#590
Quote:
Originally Posted by sadikglronline View Post
eğer localhost boş sayfa açılıyorsa .
files/config.php bu kodla değiştirin

<?php
define('ROOT', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR);

ini_set('log_errors', 1);
ini_set('error_log', ROOT . 'error_logs' . DIRECTORY_SEPARATOR . 'php_error.log');
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);

$sessions_path = ROOT . 'sessions';
ini_set('session.save_path', $sessions_path);

if (!file_exists($sessions_path)) {
mkdir($sessions_path);
}

if (session_start()) {
$options = [
'expires' => 0,
'path' => '/',
'domain' => '',
'secure' => true,
'httponly' => true,
'samesite' => 'Strict',
];
setcookie(session_name(), session_id(), $options);
}

define('SERVER_NAME', 'DarkOrbit');
define('MAINTENANCE', FALSE);

define('MYSQL_HOST', 'localhost');
define('MYSQL_USER', 'root');
define('MYSQL_PASSWORD', '');
define('MYSQL_DATABASE', 'server');
define('MYSQL_PORT', '3306');

define('DOMAIN', ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') && (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) ? 'https' : 'http') . '://' . $_SERVER['SERVER_NAME'] . '/');

define('CLASSES', ROOT . 'classes' . DIRECTORY_SEPARATOR);
define('EXTERNALS', ROOT . 'external' . DIRECTORY_SEPARATOR);
define('INCLUDES', EXTERNALS . 'includes' . DIRECTORY_SEPARATOR);
define('CRONJOBS', EXTERNALS . 'cronjobs' . DIRECTORY_SEPARATOR);

require_once(CLASSES . 'SMTP.php');
require_once(CLASSES . 'Functions.php');
require_once(CLASSES . 'Database.php');
require_once(CLASSES . 'Socket.php');
?>
Bro can you reach me on discord

discord: DARK MOON PVP#7368
05/07/2023 08:26 Silverstar21#591
Is here any Guy who can help me with to set up the server on public i have domain and all other things and set DNS for me its all right i dont know what i can do more ^^ want to play with friends

Pls contact me on Discord: Critical#2807

i will pay for help :)
05/23/2023 21:25 tenor76#592
Quote:
Originally Posted by Prototype2597 View Post
Sorry, but i'm not interested in selling my project. :o
hello brother, I really like the design you made, but I don't know how I can change them as I want, can you help me with this, even if you just guide me, I would be very happy.

discord: Tenor.#0001
I will be very happy if you write to me on discord bro
06/16/2023 08:07 flying069#593
Quote:
Originally Posted by LEJYONER(DS) View Post
Hello everyone, i was thinking to do this about 1 years but there is a lot of people selling open source emulator even for now so i didnt do this because of that.

But after my friend ItsTequila shared his works as a open source, i think nothing matter to do this for me too. So as ItsTequila said everything is in [Only registered and activated users can see links. Click Here To Register...] is also same as i think.

I just want to say thank you so much to ItsTequila for everything and thanks to SpaceBattles team for giving me inspiration for make these works. Already you can see some codes or files in my work so similar or same with ItsTequila's work that because of we worked together and he was like my teacher.

Here is works as a open source that made by me or edited my me:

DarkOrbit Emulators: [Only registered and activated users can see links. Click Here To Register...]
DarkOrbit CMS: [Only registered and activated users can see links. Click Here To Register...]
Emulator Helper: [Only registered and activated users can see links. Click Here To Register...]

The DarkOrbit CMS and 10.0 emulator in DarkOrbit Emulators currently working fine [Only registered and activated users can see links. Click Here To Register...], i recommend to use XAMPP for CMS, you can also use DarkOrbit CMS for 7.5.3 and 9.0 emulator too.

I dont care of my history, i just think you can "Improve yourself"...

NOTE: This is not a team work or something like that, so i share these works as by only me ([Only registered and activated users can see links. Click Here To Register...]) and i dont need to ask anybody for his permission to share these works.








Hi, thank you for the files!

Do you know how i can change the Spawn-Map for new registered user?
Or the spawnpoint if i die?

Sorry for my bad english, im from germany.<<

Have a nice Day! :) :handsdown:
06/16/2023 17:03 #Heizer™#594
Quote:
Originally Posted by flying069 View Post
Hi, thank you for the files!

Do you know how i can change the Spawn-Map for new registered user?
Or the spawnpoint if i die?

Sorry for my bad english, im from germany.<<

Have a nice Day! :) :handsdown:
Just check the previous posts here, there are already the same questions
06/16/2023 21:14 -=Flavio=-#595
Quote:
Originally Posted by flying069 View Post
Hi, thank you for the files!

Do you know how i can change the Spawn-Map for new registered user?
Or the spawnpoint if i die?

Sorry for my bad english, im from germany.<<

Have a nice Day! :) :handsdown:
[Only registered and activated users can see links. Click Here To Register...]
06/17/2023 10:03 Konradklar99#596
Quote:
Originally Posted by -=Flavio=- View Post
[Only registered and activated users can see links. Click Here To Register...]


Hello, :)

Thank you for your files! But I would like to understand what I am doing. I've saved the files and look through them very carefully. I'll let you know if I have any further questions. Thanks! :)

:handsdown::):)
06/23/2023 12:03 Konradklar99#597
Hi guys

i added on the 4-4 npcs. but they only move in the top left corner. but i want them to move around the whole map.

I went through the npc.cs, spacemap.cs and the NPCAI.cs and changed the spawn and moving parameters. still nothing changed. not even after multiple reboots.

I have now deleted everything and am now back at the beginning. I've been at it for several days and just can't find this error.

could you maybe help me?

:confused: :handsdown:

Sorry for my Bad English.


BöhseOnkelzPC#4520 Is my discord
06/23/2023 18:10 -=Flavio=-#598
Quote:
Originally Posted by Konradklar99 View Post
Hi guys

i added on the 4-4 npcs. but they only move in the top left corner. but i want them to move around the whole map.

I went through the npc.cs, spacemap.cs and the NPCAI.cs and changed the spawn and moving parameters. still nothing changed. not even after multiple reboots.

I have now deleted everything and am now back at the beginning. I've been at it for several days and just can't find this error.

could you maybe help me?

:confused: :handsdown:

Sorry for my Bad English.


BöhseOnkelzPC#4520 Is my discord
Code:
                        if (!Npc.Moving && Npc.Selected == null)
                        {
                            int nextPosX = Randoms.random.Next(Npc.Spacemap.Id == 29 ? 40000 : 20000);
                            int nextPosY = Randoms.random.Next(Npc.Spacemap.Id == 29 ? 25600 : 12800);

                            Movement.Move(Npc, new Position(nextPosX, nextPosY));
                        }
This is responsible for movement in 4-5, just change the ID to whatever map you prefer, NPC movement is controlled in NpcAI.cs
06/23/2023 18:41 Konradklar99#599
Quote:
Originally Posted by -=Flavio=- View Post
Code:
                        if (!Npc.Moving && Npc.Selected == null)
                        {
                            int nextPosX = Randoms.random.Next(Npc.Spacemap.Id == 29 ? 40000 : 20000);
                            int nextPosY = Randoms.random.Next(Npc.Spacemap.Id == 29 ? 25600 : 12800);

                            Movement.Move(Npc, new Position(nextPosX, nextPosY));
                        }
This is responsible for movement in 4-5, just change the ID to whatever map you prefer, NPC movement is controlled in NpcAI.cs




Hi Flavio,


I deleted and re-added the entire emulator folder. I copied and pasted the code.
Unfortunately the problem is not solved.

To be on the safe side, as a comparison:







[IMG]using Ow.Game.Movements;
using Ow.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ow.Game.Objects.AI
{
class NpcAI
{
public Npc Npc { get; set; }

public NpcAIOption AIOption = NpcAIOption.SEARCH_FOR_ENEMIES;
private static int ALIEN_DISTANCE_TO_USER = 300;

public NpcAI(Npc npc) { Npc = npc; }

public DateTime lastMovement = new DateTime();

public void TickAI()
{
if(lastMovement.AddSeconds(1) < DateTime.Now)
{
switch (AIOption)
{
case NpcAIOption.SEARCH_FOR_ENEMIES:
foreach (var players in Npc.InRangeCharacters.Values)
{
if (players is Player)
{
var player = players as Player;

if (player.Storage.IsInDemilitarizedZone || player.Invisible || Npc.Position.DistanceTo(player.Position) > Npc.RenderRange)
{
Npc.Attacking = false;
Npc.Selected = null;
AIOption = NpcAIOption.SEARCH_FOR_ENEMIES;
}
else
{
if (Npc.Ship.Aggressive)
Npc.Attacking = true;

Npc.Selected = player;
AIOption = NpcAIOption.FLY_TO_ENEMY;
}
}
}


if (!Npc.Moving && Npc.Selected == null)
{
int nextPosX = Randoms.random.Next(Npc.Spacemap.Id == 16 ? 40000 : 20000);
int nextPosY = Randoms.random.Next(Npc.Spacemap.Id == 16 ? 25600 : 12800);

Movement.Move(Npc, new Position(nextPosX, nextPosY));
}

break;
case NpcAIOption.FLY_TO_ENEMY:
if (Npc.Selected != null && Npc.Selected is Player && !(Npc.Selected as Player).Storage.IsInDemilitarizedZone && Npc.Position.DistanceTo((Npc.Selected as Player).Position) < Npc.RenderRange)
{
var player = Npc.Selected as Player;

Movement.Move(Npc, Position.GetPosOnCircle(player.Position, ALIEN_DISTANCE_TO_USER));
AIOption = NpcAIOption.WAIT_PLAYER_MOVE;
}
else
{
Npc.Attacking = false;
Npc.Selected = null;
AIOption = NpcAIOption.SEARCH_FOR_ENEMIES;
}
break;
case NpcAIOption.WAIT_PLAYER_MOVE:
if (Npc.Selected != null && Npc.Selected is Player && !(Npc.Selected as Player).Storage.IsInDemilitarizedZone)
{
var player = Npc.Selected as Player;

if (player.Moving)
AIOption = NpcAIOption.FLY_TO_ENEMY;
}
else
{
Npc.Attacking = false;
Npc.Selected = null;
AIOption = NpcAIOption.SEARCH_FOR_ENEMIES;
}
break;
}

lastMovement = DateTime.Now;
}
}

private double DegreeToRadian(double angle)
{
return Math.PI * angle / 180.0;
}
}
}[/IMG]





I hope you can help me. :( :confused: :handsdown:
Greets Konrad
06/23/2023 22:06 -=Flavio=-#600
Well, it works on my version of the emulator, unfortunately I don't remember if anything else is interfering with it, I fixed it years ago.

I also didn't see the problem in this version you sent, but could you mark it as "CODE" for better reading