//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.
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?
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;
}
}
}
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;
}
}
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
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!
Private private server :P READ FOR MORE INFO 12/01/2010 - SRO Private Server - 12 Replies hey guys im wondering if there is anyway to make a real private server like ZSZC or SWSRO or MYSRO but to where i can only play and level a character and as if it was a real private server. but just for me, not like an emulator where im already lvl 90 or 120 or whatever. i mean one where i set the rates and i level. if not then ok u can close this. but i was just wondering.