• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[7.7] RealOTS 7.7 (Cipsoft Files)

Status
Not open for further replies.
if anyone is able to make a .otbm version of this let me know
 
Haven't checked the uploaded files, but did you include the libs needed to run it in any of the rars? People looking for satanism trololo libs will have a bad time lmao.
 
If you leak something precious like this, I'll leak something more precious,


HAIL DURIN
 
Can someone help me how to start server with this files?
Do i need a distro to run it?
 
Haven't checked the uploaded files, but did you include the libs needed to run it in any of the rars? People looking for satanism trololo libs will have a bad time lmao.
Why you don't release the libs if you already got it working?

I think we need to change elf format settings to use normal linux libs:
https://nixos.org/patchelf.html
 
Why you don't release the libs if you already got it working?

I think we need to change elf format settings to use normal linux libs:
https://nixos.org/patchelf.html

No, CIP binary was compiled long ago (2007) using different libraries needed to run it.

It actually runs in Ubuntu 14.04 without the need of any libraries, but it will not allow you to login or shutdown the server as the threading library has to be a very old one.
 
Hello Everyone,

To every programmer out there who is interested in the cipsoft files. I'm here to release them. Good luck and have fun.

Game Server:
http://www.mediafire.com/download/skic2d78jee6dwd/game.rar

Login Server:
http://www.mediafire.com/download/35yg4n5ua1tw50e/loginserver.rar

Query Manager:
http://www.mediafire.com/download/1l8sn8gzy0z21y4/query.tgz

Database Scheme:
http://www.mediafire.com/download/d850pcm0f185qs8/otserv_schema_data.sql.gz

Sincerely,
TY MUCH... It only took how long .... xDDD
 
Can you believe CIP code "main brain" actually does all the job in a single thread?
Example:
  • Check day time using real local computer time to set the world ambient
  • Processes connections (1100 max) in a for loop
  • Receive commands / packets from active connections (players)
  • Send all packets
  • Check invalid connections
  • Creates online player list based on current round number
  • Creates statistics (kill statistics website)
  • Creates net load summary
  • Processes save time based on current round number
  • Cleanups dynamic strings
  • Process monster homes
  • Process raids
  • Process cylinder refreshes
  • Process creatures & players
And all of this happens in a single loop.
Besides this, it's coded in C.
 
Why you don't release the libs if you already got it working?

I think we need to change elf format settings to use normal linux libs:
https://nixos.org/patchelf.html

You don't have to change anything, these libraries are libgcc_s, libstdc++, libm, libc and libpthread. All you have to do is rename these 5 libraries to ilovesatan, payhunted, rofl, trololol, and lmao and put them in cwd. You can rename any of the library to any name as long as you end up with these 5 libraries in any order. The only catch here is that these libraries need to be built against older version of GLIBC, so if your system doesn't ship with that, you can just build an older version of GCC and get them from there. Also the satanism library is just a regular 32-bit Linux loader so you can grab it from any 32-bit or multilib 64-bit Linux system (the version here doesn't seem to matter).

Can you believe CIP code "main brain" actually does all the job in a single thread?
Example:

Check day time using real local computer time to set the world ambient
Processes connections (1100 max) in a for loop
Receive commands / packets from active connections (players)
Send all packets
Check invalid connections
Creates online player list based on current round number
Creates statistics (kill statistics website)
Creates net load summary
Processes save time based on current round number
Cleanups dynamic strings
Process monster homes
Process raids
Process cylinder refreshes
Process creatures & players

And all of this happens in a single loop.
Besides this, it's coded in C.

There's nothing wrong with that and besides you're wrong about it, the acceptor, protocol and game run in separate threads. Also it's written in C++, not C.
 
You don't have to change anything, these libraries are libgcc_s, libstdc++, libm, libc and libpthread. All you have to do is rename these 5 libraries to ilovesatan, payhunted, rofl, trololol, and lmao and put them in cwd. You can rename any of the library to any name as long as you end up with these 5 libraries in any order. The only catch here is that these libraries need to be built against older version of GLIBC, so if your system doesn't ship with that, you can just build an older version of GCC and get them from there. Also the satanism library is just a regular 32-bit Linux loader so you can grab it from any 32-bit or multilib 64-bit Linux system (the version here doesn't seem to matter).



There's nothing wrong with that and besides you're wrong about it, the acceptor, protocol and game run in separate threads. Also it's written in C++, not C.

Only connection accept runs in a separate thread.
"Protocol" thread is simply a thread which writes Logs to files instead of doing it directly.
Game doesn't run in a separate thread, it is run in main thread directly.

I don't know why would you say it is C++ when the entire code style is pure C and source names are .c as well.
 
Oh and there is nothing wrong with that, I'm a programmer simply stating the interesting facts of how their game server works, lmfao.
 
Only connection accept runs in a separate thread.
"Protocol" thread is simply a thread which writes Logs to files instead of doing it directly.
Game doesn't run in a separate thread, it is run in main thread directly.

I don't know why would you say it is C++ when the entire code style is pure C and source names are .c as well.

Right, because C has classes, inheritance and templates :^)
fOTKFOl.png
 
Right, because C has classes, inheritance and templates :^)
fOTKFOl.png

I knew you would bring that up, I saw that too, however you can still see every source file ends with '.c' and that's not all, the entire style code is C, there are no C++ functions whatsoever, everything is C besides the fact of inheritances and struct methods. :confused:
 
however you can still see every source file ends with '.c'

That doesn't mean anything. Want to get your mind blown? Write some simple C++ code, save it as a file with .c extension and feed it to g++.

and that's not all, the entire style code is C, there are no C++ functions whatsoever, everything is C besides the fact of inheritances and struct methods. :confused:

I think the confused smiley is very appropriate here because you seem to have no idea what you're talking about. There's no "code style" to speak of because there's no source code provided with the game server binaries. Aside from a few external POD structures (which are indeed C from various APIs), all of the structures are actual C++ classes that heavily utilize templating and also std::list and std::vector STL containers. There's also the fact that there are multiple imports from libstdc++ (streams, strings, and exceptions for instance) which are absolutely not C.
 
That doesn't mean anything. Want to get your mind blown? Write some simple C++ code, save it as a file with .c extension and feed it to g++.



I think the confused smiley is very appropriate here because you seem to have no idea what you're talking about. There's no "code style" to speak of because there's no source code provided with the game server binaries. Aside from a few external POD structures (which are indeed C from various APIs), all of the structures are actual C++ classes that heavily utilize templating and also std::list and std::vector STL containers. There's also the fact that there are multiple imports from libstdc++ (streams, strings, and exceptions for instance) which are absolutely not C.

Thanks for the clarification, I simply stood with the fact it was C given they use char arrays and char* instead of std::string, global variables everywhere, class-less methods, etc ... simply didn't feel like the C++ code style :oops:
 
RealOTS Main Game Brain:
Code:
void AdvanceGame(TReaderThreadReplyType a1, unsigned int a2, int Delay)
{ // addr = 0x0804B350  --  defined in 'main.c' at line 73
  int CreaturesTimeCounterRound;
  int CronTimeRound; 
  TConnection *i;
  unsigned int CurrentRound;
  int IntMinute;
  int IntHourly; 
  int Hour;
  int Minute;
  int Brightness;
  int Color;

  SkillTimeCounter += Delay;
  OtherTimeCounter += Delay;
  CreaturesTimeCounterRound = Delay + CreaturesTimeCounter;
  CronTimeRound = Delay + CronTimeCounter;
  CreaturesTimeCounter = CreaturesTimeCounterRound;
  CronTimeCounter += Delay;
  if ( CreaturesTimeCounterRound > 1749 )
  {
    CreaturesTimeCounter = CreaturesTimeCounterRound - 1000;
    ProcessCreatures();
    CronTimeRound = CronTimeCounter;
  }
  if ( CronTimeRound > 1499 )
  {
    CronTimeCounter = CronTimeRound - 1000;
    ProcessCronSystem();
  }
  if ( SkillTimeCounter > 1249 )
  {
    SkillTimeCounter -= 1000;
    ProcessSkills();
  }
  if ( OtherTimeCounter > 999 )
  {
    OtherTimeCounter -= 1000;
    SetRoundNr(++RoundNr);
    ProcessConnections();
    ProcessMonsterhomes();
    ProcessMonsterRaids(Delay);
    ProcessCommunicationControl();
    ProcessReaderThreadReplies((unsigned __int8 *)Delay, a1, a2, RefreshSector, SendMails);
    ProcessWriterThreadReplies((unsigned int *)Delay, (TWriterThreadReplyType)a2);
    ProcessCommand();
    GetAmbiente(&Brightness, &Color);
    if ( Brightness != OldAmbiente )
    {
      OldAmbiente = Brightness;
      for ( i = GetFirstConnection(); i; i = GetNextConnection() )
      {
        if ( (unsigned int)(i->State - 3) <= 3 )
          SendAmbiente(i);
      }
    }
    CurrentRound = RoundNr;
    a2 = 10 * (RoundNr / 10);
    if ( RoundNr == a2 )
    {
      NetLoadCheck();
      CurrentRound = RoundNr;
    }
    if ( CurrentRound >= AdvanceGame(int)::NextMinute )
    {
      GetRealTime(&Hour, &Minute);
      RefreshCylinders();
      IntMinute = Minute;
      if ( Minute == 5 * (Minute / 5) )
      {
        CreatePlayerList(1);
        IntMinute = Minute;
      }
      if ( IntMinute == 15 * (IntMinute / 15) )
      {
        SavePlayerDataOrder();
        IntMinute = Minute;
      }
      if ( !IntMinute )
      {
        NetLoadSummary();
        IntMinute = Minute;
      }
      if ( IntMinute == 55 )
      {
        WriteKillStatistics();
        IntMinute = Minute;
      }
      IntHourly = IntMinute + 60 * Hour;
      a2 = RebootTime;
      if ( (IntHourly + 5) % 1440 == RebootTime )
      {
        if ( Reboot )
          BroadcastMessage(18, "Server is saving game in 5 minutes.\nPlease come back in 10 minutes.");
        else
          BroadcastMessage(18, "Server is going down in 5 minutes.\nPlease log out.");
        CloseGame();
        a2 = RebootTime;
      }
      if ( (IntHourly + 3) % 1440 == a2 )
      {
        if ( Reboot )
          BroadcastMessage(18, "Server is saving game in 3 minutes.\nPlease come back in 10 minutes.");
        else
          BroadcastMessage(18, "Server is going down in 3 minutes.\nPlease log out.");
        a2 = RebootTime;
      }
      if ( (IntHourly + 1) % 1440 == a2 )
      {
        if ( Reboot )
          BroadcastMessage(18, "Server is saving game in one minute.\nPlease log out.");
        else
          BroadcastMessage(18, "Server is going down in one minute.\nPlease log out.");
        a2 = RebootTime;
      }
      if ( IntHourly == a2 )
      {
        CloseGame();
        LogoutAllPlayers();
        SendAll();
        if ( Reboot )
          RefreshMap();
        SaveMap();
        SaveMapOn = 0;
        EndGame();
      }
      NextMinute = GetRoundForNextMinute();
    }
    CleanupDynamicStrings();
  }
  if ( Delay > Beat )
    Log("lag", "Verz÷gerung %d msec.\n", Delay);
  if ( Delay <= 999 )
  {
    MoveCreatures(Delay, a2, Delay);
    Lag = 0;
  }
  else
  {
    if ( !Lag && RoundNr > 0xA )
      error("AdvanceGame: Keine Kreaturbewegung wegen Lag (Verz÷gerung: %d msec).\n", Delay);
    Lag = 1;
  }
  SendAll();
}
 
Status
Not open for further replies.
Back
Top