Private Server Info and Support Thread

03/09/2017 13:32 olitis1#2761
Quote:
Originally Posted by steppdroid View Post
Hi guys, what's the package that pushes the level of enemies in minimap on Maps basics? (the yellow bars in the minimap)
It should be:
Code:
"0|n|w|" + lvl_of_warning; //(from 0 to 5)
03/09/2017 14:34 steppdroid#2762
Mmmm how improve this shi*?
Code:
            //test warning level
            if(Id == 1 || Id == 5 || Id == 9){
                if (Users[userId].GetMap().FactionId != Users[userId].Ship.FactionId)
                {
                    level_warning++;
                }
                if (Users[userId].GetMap().FactionId == Users[userId].Ship.FactionId)
                {
                    Users[userId].Send("0|n|w|" + level_warning);
                }
            }
03/09/2017 14:47 olitis1#2763
Quote:
Originally Posted by steppdroid View Post
Mmmm how improve this shi*?
Code:
            //test warning level
            if(Id == 1 || Id == 5 || Id == 9){
                if (Users[userId].GetMap().FactionId != Users[userId].Ship.FactionId)
                {
                    level_warning++;
                }
                if (Users[userId].GetMap().FactionId == Users[userId].Ship.FactionId)
                {
                    Users[userId].Send("0|n|w|" + level_warning);
                }
            }
You should calculate level_warning before sending the packet.
In your code, if there's an enemy at the last of the iteration, lvl_warning won't be 1 to the others.
03/09/2017 15:23 steppdroid#2764
Quote:
Originally Posted by olitis1 View Post
You should calculate level_warning before sending the packet.
In your code, if there's an enemy at the last of the iteration, lvl_warning won't be 1 to the others.
Can you put a example? :confused: :handsdown:
Is a little hard for me..

My bugged code for calculate enemy

Code:
         if (Id == 1 || Id == 5 || Id == 9)
            {
                var map = Users[userId].MapId;
               
                    if (Users[userId].GetMap().FactionId != Users[userId].Ship.FactionId)
                    {

                        var x = Program.GameManager.Maps[map].Users.Count;

                        if (x == 1)
                        {
                            level_warning = 1;
                        }
                        else if (x == 2)
                        {
                            level_warning = 2;
                        }
                        else if (x == 3)
                        {
                            level_warning = 3;
                        }
                        else if (x == 4)
                        {
                            level_warning = 4;
                        }
                        else if (x >= 5)
                        {
                            level_warning = 5;
                        }
                    }
                
            }
03/09/2017 15:38 Moonsteroid#2765
Quote:
Originally Posted by steppdroid View Post
Can you put a example? :confused: :handsdown:
Is a little hard for me..

My bugged code for calculate enemy

Code:
         if (Id == 1 || Id == 5 || Id == 9)
            {
                var map = Users[userId].MapId;
               
                    if (Users[userId].GetMap().FactionId != Users[userId].Ship.FactionId)
                    {

                        var x = Program.GameManager.Maps[map].Users.Count;

                        if (x == 1)
                        {
                            level_warning = 1;
                        }
                        else if (x == 2)
                        {
                            level_warning = 2;
                        }
                        else if (x == 3)
                        {
                            level_warning = 3;
                        }
                        else if (x == 4)
                        {
                            level_warning = 4;
                        }
                        else if (x >= 5)
                        {
                            level_warning = 5;
                        }
                    }
                
            }
Just truncated the checking part xD
Code:
         if (Id == 1 || Id == 5 || Id == 9)
            {
                var map = Users[userId].MapId;
               
                    if (Users[userId].GetMap().FactionId != Users[userId].Ship.FactionId)
                    {

                        level_warning  = Program.GameManager.Maps[map].Users.Count;
                    }
                
            }
03/09/2017 15:50 steppdroid#2766
Quote:
Originally Posted by lı. IGnoXX .ıl View Post
Just truncated the checking part xD
Code:
         if (Id == 1 || Id == 5 || Id == 9)
            {
                var map = Users[userId].MapId;
               
                    if (Users[userId].GetMap().FactionId != Users[userId].Ship.FactionId)
                    {

                        level_warning  = Program.GameManager.Maps[map].Users.Count;
                    }
                
            }
the main problem is that I have to count only users with different factionid from the map
03/09/2017 15:59 NoCheatImPGM#2767
Quote:
Originally Posted by steppdroid View Post
the main problem is that I have to count only users with different factionid from the map
Something like
Code:
var user = Users[userId];
var map = Users[userId].GetMap();

var ennemiesCount = map.Users.Count(u=>u.Ship.FactionId != map.FactionId);
user.Send("0|n|w|" + (ennemiesCount > 5) ? 5 : ennemiesCount);
03/09/2017 19:59 steppdroid#2768
Why, when I use this method, I send the message as many times as there are users in chat?? :confused:

Code:
 public void MsginChat(string MSG, string Name)
        {
            foreach (var pair in Program.chatUsers)
            {
                if (pair.Value.ChatsJoined.Contains(Convert.ToInt32(250)))
                {
                    pair.Value.Send("j%250@" + Name + "@" + MSG + "#");
                }
            }
        }
I'm new to programming , sorry
03/09/2017 20:53 manulaiko3.0#2769
Quote:
Originally Posted by steppdroid View Post
Because when I use this method, I send the message as many times as there are users in chat?? :confused:

Code:
 public void MsginChat(string MSG, string Name)
        {
            foreach (var pair in Program.chatUsers)
            {
                if (pair.Value.ChatsJoined.Contains(Convert.ToInt32(250)))
                {
                    pair.Value.Send("j%250@" + Name + "@" + MSG + "#");
                }
            }
        }
I'm new to programming , sorry
Instead of checking it every time, why not updating it when the enemy enters the map?

Code:
if(!user.isInEnemyMap() && !map.isStarter()) {
    return;
}

enemies.add(user);

StarterMapEnemyCount packet = new StarterMapEnemyCount(enemies.count());

map.broadcastPacket(packet);
03/09/2017 20:58 steppdroid#2770
Quote:
Originally Posted by manulaiko3.0 View Post
Instead of checking it every time, why not updating it when the enemy enters the map?

Code:
if(!user.isInEnemyMap() && !map.isStarter()) {
    return;
}

enemies.add(user);

StarterMapEnemyCount packet = new StarterMapEnemyCount(enemies.count());

map.broadcastPacket(packet);
Hi manulaiko3.0 i sloved with:
Code:
//in patchfinder
                        if (_user.GetMap().IsStarterMap)
                        {
                            _user.GetMap().CalculWarningmap(_userId);

                            if (_user.GetMap().FactionId == _user.Ship.FactionId)
                            {
                                if (_user.GetMap().FactionId == 1) _user.Send("0|n|w|" + Map.level_warningmmo);
                                else if(_user.GetMap().FactionId == 2)_user.Send("0|n|w|" + Map.level_warningeic);
                                else if (_user.GetMap().FactionId == 3) _user.Send("0|n|w|" + Map.level_warningvru);
                            }
                        }
                        else
                        {
                            _user.Send("0|n|w|0");
                        }


public void CalculWarningmap(uint userId)
        {
            var user = Program.GameManager.Users[userId];
            var map = Users[userId].GetMap();

            if (map.IsStarterMap)
            {
                if (user.Ship.FactionId == 1) { level_warningmmo = map.Users.Count(u => u.Value.Ship.FactionId != map.FactionId); }
                else if (user.Ship.FactionId == 2) { level_warningeic = map.Users.Count(u => u.Value.Ship.FactionId != map.FactionId); }
                else { level_warningvru = map.Users.Count(u => u.Value.Ship.FactionId != map.FactionId); }   
            }
        }
This MsginChat is another problem.. "when I use this method, I send the message as many times as there are users in chat"

Code:
 public void MsginChat(string MSG, string Name)
        {
            foreach (var pair in Program.chatUsers)
            {
                if (pair.Value.ChatsJoined.Contains(Convert.ToInt32(250)))
                {
                    pair.Value.Send("j%250@" + Name + "@" + MSG + "#");
                }
            }
        }
03/12/2017 23:07 Arie$#2771
Can someone help me ?

Warning: require(/KERNEL-DOCMS/Init.php): failed to open stream: No such file or directory in C:\xampp\htdocs\index.php on line 2

Fatal error: require(): Failed opening required '/KERNEL-DOCMS/Init.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\index.php on line 2

Im using 1.0 files
03/12/2017 23:28 -Real-#2772
Quote:
Originally Posted by Arie$ View Post
Can someone help me ?

Warning: require(/KERNEL-DOCMS/Init.php): failed to open stream: No such file or directory in C:\xampp\htdocs\index.php on line 2

Fatal error: require(): Failed opening required '/KERNEL-DOCMS/Init.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\index.php on line 2

Im using 1.0 files
The problem is the file Doesn't exists or your File Directory is incorrect.
03/13/2017 01:49 darkorbit26410#2773
Hello all I try make old client! I use pack server final I am the my final step! I add in hangar configuration 2 because in hangar have 1 but in spacemap have 1-2 configuration.
Something help me Add configuration I pay!! Or I give my new client files free!! I have all ready my new client style have full npc bosst lf5 and more!
03/13/2017 20:37 Arie$#2774
Can someone tell me how to move bases.
skype - yuliniki1
03/18/2017 16:16 45the45#2775
-