DarkOrbit 7.5.3 / 9.0 / 10.0 - Open Source

09/28/2021 07:54 mano79#301
The problem is if I paste the capabilities into another function.php file then these errors are
What exactly should I copy to the function.php file?
I think I'm doing something wrong
09/30/2021 06:46 papepipo#302
Quote:
Originally Posted by -=Flavio=- View Post
These files are exclusively for version 10.0 of this source only.
I haven't tested it on another version, try this: make a backup of your functions and then replace them with this one, and let's see what happens.
Anything update me.


I did everything add in emulator without any error and
in web and in db but nothing I could do I send you a private message
09/30/2021 11:07 mano79#303
I added but the skills don’t work for me for some reason
09/30/2021 15:07 -=Flavio=-#304
The functions.php has 2 "parts"
This:
Code:
  public static function GetSkillDescription($skill, $level) {
    $array = [
      'Engineering' => 'Lets your repair bots repair '.($level <= 1 ? '5' : ($level == 2 ? '10' : ($level == 3 ? '15' : ($level == 4 ? '20' : ($level == 5 ? '30' : '0'))))).'% more HP<br> per second',
      'Shield Engineering' => 'Increases your shield strength by '.($level <= 1 ? '4' : ($level == 2 ? '8' : ($level == 3 ? '12' : ($level == 4 ? '18' : ($level == 5 ? '25' : '0'))))).'%',
      'Detonation I' => 'Makes your mines cause '.($level <= 1 ? '7' : ($level == 2 ? '14' : 0)).'% more damage',
      'Detonation II' => 'Makes your mines cause '.($level <= 1 ? '21' : ($level == 2 ? '28' : ($level == 3 ? '50' : 0))).'% more damage',
      'Heat-seeking Missiles' => 'Increases hit probability of your rockets by '.($level <= 1 ? '1' : ($level == 2 ? '2' : ($level == 3 ? '4' : ($level == 4 ? '6' : ($level == 5 ? '10' : '0'))))).'%',
      'Rocket Fusion' => 'Makes your rockets cause '.($level <= 1 ? '2' : ($level == 2 ? '2' : ($level == 3 ? '4' : ($level == 4 ? '6' : ($level == 5 ? '10' : '0'))))).'% more damage',
      'Cruelty I' => 'Gives you '.($level <= 1 ? '4' : ($level == 2 ? '8' : 0)).'% more honor points',
      'Cruelty II' => 'Gives you '.($level <= 1 ? '12' : ($level == 2 ? '18' : ($level == 3 ? '25' : 0))).'% more honor points',
      'Explosives' => 'Increases the radius of mine explosions by '.($level <= 1 ? '4' : ($level == 2 ? '8' : ($level == 3 ? '12' : ($level == 4 ? '18' : ($level == 5 ? '25' : '0'))))).'%',
      'Luck I' => 'Gives you '.($level <= 1 ? '2' : ($level == 2 ? '4' : 0)).'% more bonus-box Uridium',
      'Luck II' => 'Gives you '.($level <= 1 ? '6' : ($level == 2 ? '8' : ($level == 3 ? '12' : 0))).'% more bonus-box Uridium',
	  'Bounty Hunter I' => 'Gives you '.($level <= 1 ? '2' : ($level == 2 ? '4' : 0)).'% damage done in PvP battles',
	  'Bounty Hunter II' => 'Gives you '.($level <= 1 ? '6' : ($level == 2 ? '8' : ($level == 3 ? '12' : 0))).'% damage done in PvP battles',
	  'Shield Mechanics' => 'Lets your shields withstand '.($level <= 1 ? '2' : ($level == 2 ? '4' : ($level == 3 ? '6' : ($level == 4 ? '8' : ($level == 5 ? '12' : '0'))))).'% more damage',
      'Electro-optics' => 'Makes your lasers '.($level <= 1 ? '2' : ($level == 2 ? '4' : ($level == 3 ? '6' : ($level == 4 ? '8' : ($level == 5 ? '12' : '0'))))).'% more accurate',
	  'Ship Hull I' => 'Gives you '.($level <= 1 ? '5.000' : ($level == 2 ? '10.000' : 0)).' Extra max HP',
	  'Ship Hull II' => 'Gives you '.($level <= 1 ? '15.000' : ($level == 2 ? '25.000' : ($level == 3 ? '50.000' : 0))).' Extra max HP'
    ];

    return $array[$skill];
  }
And this one:

Code:
  public static function GetSkillTooltip($skillName, $currentLevel, $maxLevel) {
    return 'Name: <span style=\'color: #a4d3ef;\'>'.$skillName.'</span><br>Level: <span style=\'color: #a4d3ef;\'>'.$currentLevel.'/'.$maxLevel.'</span>'.($currentLevel != 0 ? '<br>Current Level: <span style=\'color: #a4d3ef;\'>'.Functions::GetSkillDescription($skillName, $currentLevel).'</span>' : '').''.($currentLevel != $maxLevel ? '<br>Next Level: <span style=\'color: #a4d3ef;\'>'.Functions::GetSkillDescription($skillName, $currentLevel + 1).'</span>' : '').'';
  }

  public static function GetSkills($skillPoints) {
    return [
      'engineering' => [
        'name' => 'Engineering',
        'currentLevel' => $skillPoints->engineering,
        'maxLevel' => 5
      ],
      'shieldEngineering' => [
        'name' => 'Shield Engineering',
        'currentLevel' => $skillPoints->shieldEngineering,
        'maxLevel' => 5
      ],
      'detonation1' => [
        'name' => 'Detonation I',
        'currentLevel' => $skillPoints->detonation1,
        'maxLevel' => 2,
        'nextSkill' => 'detonation2'
      ],
      'detonation2' => [
        'name' => 'Detonation II',
        'currentLevel' => $skillPoints->detonation2,
        'maxLevel' => 3,
        'baseSkill' => 'detonation1'
      ],
      'heatseekingMissiles' => [
        'name' => 'Heat-seeking Missiles',
        'currentLevel' => $skillPoints->heatseekingMissiles,
        'maxLevel' => 5
      ],
      'rocketFusion' => [
        'name' => 'Rocket Fusion',
        'currentLevel' => $skillPoints->rocketFusion,
        'maxLevel' => 5
      ],
      'cruelty1' => [
        'name' => 'Cruelty I',
        'currentLevel' => $skillPoints->cruelty1,
        'maxLevel' => 2,
        'nextSkill' => 'cruelty2'
      ],
      'cruelty2' => [
        'name' => 'Cruelty II',
        'currentLevel' => $skillPoints->cruelty2,
        'maxLevel' => 3,
        'baseSkill' => 'cruelty1'
      ],
      'explosives' => [
        'name' => 'Explosives',
        'currentLevel' => $skillPoints->explosives,
        'maxLevel' => 5
      ],
      'luck1' => [
        'name' => 'Luck I',
        'currentLevel' => $skillPoints->luck1,
        'maxLevel' => 2,
        'nextSkill' => 'luck2'
      ],
      'luck2' => [
        'name' => 'Luck II',
        'currentLevel' => $skillPoints->luck2,
        'maxLevel' => 3,
        'baseSkill' => 'luck1'
      ],
      'bountyhunter1' => [
        'name' => 'Bounty Hunter I',
        'currentLevel' => $skillPoints->bountyhunter1,
        'maxLevel' => 2,
        'nextSkill' => 'bountyhunter2'
      ],
      'bountyhunter2' => [
        'name' => 'Bounty Hunter II',
        'currentLevel' => $skillPoints->bountyhunter2,
        'maxLevel' => 3,
        'baseSkill' => 'bountyhunter1'
      ],
      'shieldMechanics' => [
        'name' => 'Shield Mechanics',
        'currentLevel' => $skillPoints->shieldMechanics,
        'maxLevel' => 5,
      ],
      'electroOptics' => [
        'name' => 'Electro-optics',
        'currentLevel' => $skillPoints->electroOptics,
        'maxLevel' => 5,
      ],
      'shiphull1' => [
        'name' => 'Ship Hull I',
        'currentLevel' => $skillPoints->shiphull1,
        'maxLevel' => 2,
        'nextSkill' => 'shiphull2'
      ],
      'shiphull2' => [
        'name' => 'Ship Hull II',
        'currentLevel' => $skillPoints->shiphull2,
        'maxLevel' => 3,
        'baseSkill' => 'shiphull1'
      ]
    ];
  }
Did you use both?
In addition, the skill_points table inside player_equipment must have the following code within its default values:

Code:
{"engineering":0,"shieldEngineering":0,"detonation1":0,"detonation2":0,"heatseekingMissiles":0,"rocketFusion":0,"cruelty1":0,"cruelty2":0,"explosives":0,"luck1":0,"luck2":0,"bountyhunter1":0,"bountyhunter2":0,"shieldMechanics":0,"electroOptics":0,"shiphull1":0,"shiphull2":0}
09/30/2021 16:14 mano79#305
thanks
succeeded
are there more abilities that can be added?
09/30/2021 16:18 -=Flavio=-#306
Quote:
Originally Posted by mano79 View Post
thanks
succeeded
are there more abilities that can be added?
I'll keep adding them from time to time, I'm currently fixing some other little issues, yesterday I did a new git update to fix a visual error with the ships in their basemaps (Leonov's effect was active on all ships).
[Only registered and activated users can see links. Click Here To Register...]

I just finished this ship, I will upload it soon
09/30/2021 17:47 papepipo#307
The truth I do not know what happens I have everything but still remains the same in emulator add everything I do not know that I can be missing the same as in functions the two lines and same as in database
09/30/2021 18:19 -=Flavio=-#308
Quote:
Originally Posted by papepipo View Post
The truth I do not know what happens I have everything but still remains the same in emulator add everything I do not know that I can be missing the same as in functions the two lines and same as in database
Post a print of the error please
09/30/2021 19:48 loveditoi#309
Quote:
Originally Posted by Beaper View Post
Hello guys.

I always wanted to do a Private server for fun and also to train my programming knowledge, but since flash is down i don't know if it possible to do it anymlore, if so could anyone help me on that case, thanks have a nice day
Use an older version of your browser (before 01/2021)
09/30/2021 21:40 papepipo#310
Quote:
Originally Posted by -=Flavio=- View Post
Post a print of the error please
[Only registered and activated users can see links. Click Here To Register...]

look that I have everything and in the same emulator without any error and functions, everything is also there but nothing I keep shooting thick
09/30/2021 21:44 -=Flavio=-#311
Leonov is now 100% functional, it took longer than I expected.


Quote:
Originally Posted by papepipo View Post
[Only registered and activated users can see links. Click Here To Register...]

look that I have everything and in the same emulator without any error and functions, everything is also there but nothing I keep shooting thick
Your CMS is definitely different from mine Could you check if the normal laser files are even there? And are you sure you are using the latest version uploaded on github?
I'm testing this at the moment and it's definitely working fine for me.
09/30/2021 21:58 papepipo#312
Quote:
Originally Posted by -=Flavio=- View Post
Leonov is now 100% functional, it took longer than I expected.




Your CMS is definitely different from mine Could you check if the normal laser files are even there? And are you sure you are using the latest version uploaded on github?
I'm testing this at the moment and it's definitely working fine for me.
if it is 10.0 but modified with many more things but if the lasers are fine and everything is in its place as I told you everything is in emu and cms
09/30/2021 22:05 -=Flavio=-#313
Quote:
Originally Posted by papepipo View Post
if it is 10.0 but modified with many more things but if the lasers are fine and everything is in its place as I told you everything is in emu and cms
So I don't know, maybe some client modification, try a clean htdocs and see if it works, if it works then there's something wrong in your main.swf

Even as you can see in one of Leonov's prints above, it's working as it should, the only visual effects that aren't working yet are the shield ones.
09/30/2021 22:09 papepipo#314
Quote:
Originally Posted by -=Flavio=- View Post
So I don't know, maybe some client modification, try a clean htdocs and see if it works, if it works then there's something wrong in your main.swf

Even as you can see in one of Leonov's prints above, it's working as it should, the only visual effects that aren't working yet are the shield ones.
It is that I look for is what Bounty Hunter leonovo no
09/30/2021 22:15 -=Flavio=-#315
Quote:
Originally Posted by papepipo View Post
It is that I look for is what Bounty Hunter leonovo no
leonov is literally firing the "skinny" lasers you talked about not working.

And guess what? She has no points in the bounty hunt 2

But if I give 5 points on Hunt 1 and 2, here it is:
[Only registered and activated users can see links. Click Here To Register...]