Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 3,913
» Latest member: aaustinittz8045
» Forum threads: 5,153
» Forum posts: 41,375

Full Statistics

Online Users
There are currently 26 online users.
» 0 Member(s) | 25 Guest(s)
Bing

Latest Threads
Last Chaos Server Sale
Forum: The Black Market (Buy, Sell, Trade)
Last Post: XWrongX2
01-26-2026, 11:07 PM
» Replies: 3
» Views: 617
All in One Exporter
Forum: Tools
Last Post: Kain88
01-25-2026, 07:04 AM
» Replies: 4
» Views: 439
HELP! ReZasCashServer It ...
Forum: Ep4 Support
Last Post: Kain88
01-24-2026, 03:24 PM
» Replies: 2
» Views: 171
Hi, does anyone know the ...
Forum: Help
Last Post: Desarija
01-21-2026, 11:29 AM
» Replies: 1
» Views: 117
LastChaos Nemesis
Forum: Server Advertising
Last Post: Desarija
01-20-2026, 04:06 PM
» Replies: 3
» Views: 240
Looking for EP4 Guidance
Forum: General Discussion
Last Post: xHypnosiaa
01-19-2026, 08:33 AM
» Replies: 1
» Views: 172
We're in need of creative...
Forum: Project Recruitment
Last Post: RGT
01-16-2026, 12:48 AM
» Replies: 0
» Views: 121
Last Chaos build deployme...
Forum: Ep4 Guides
Last Post: xHypnosiaa
01-08-2026, 11:14 AM
» Replies: 0
» Views: 81
Last Chaos global server ...
Forum: Ep4 Guides
Last Post: xHypnosiaa
01-07-2026, 07:01 PM
» Replies: 0
» Views: 36
EP-2/EP-3 Mixed files
Forum: Archived General Server Releases
Last Post: TeKnodE
01-06-2026, 09:53 PM
» Replies: 1
» Views: 300

 
  Project: Fix EP2
Posted by: halohalo - 09-11-2012, 06:39 PM - Forum: General Discussion - Replies (58)


Well, im gonna start fixing bit by bit the ep2 emu, i have seen many bugs and thought well, it will takes time but at last, hope we can enjoy it together then

 

If you want to post your bugs that you found and if any solution for the ones that we got...please do it here

 

I will now put what i found so far:

 

-Inventory Bug (Everytime you pickup an item it replace an existing one, they don't move from the 1st slot, you need to do it manually or the item will be replaced by the new one).

 

-Pots/Titles Don't work (They drop or appear but they do anything)

 

-P2 Pets are invisible as shown in EP1

 

-Some Quests show but they don't let you make it or finish it.

 

-Active Skill dons't Make the effect (Only passives work).

 

-If you drop 1 billion or more gold with command, game crashes/stop's working...Max you can drop is 999kk

 

-Some armor stay after you change it for another or you unequip it.

 

-Some costumes dont go off after you unequip it (same as armor)

 

-Think some commands don't work

 

-In some classes, gold that you drop with command, don't let you use it to purchase the selected skill

 

 

And this is what i found after a bit, need to keep but, was late at night when i found them^^

 

 

Join Part of this Project and lets leave EP1 behind Like and be part of it!

 

Regards,

 

Halo

Print this item

  [C# - MySql] LC Warehouse!
Posted by: Nikolee - 09-09-2012, 08:32 PM - Forum: Coders Talk - Replies (7)


Hey i continue to working on a Tool for my Server , but i got a little Problem with MySql i created this Command

@"INSERT INTO `t_stash03`(`a_index`, `a_user_idx`, `a_item_idx`, `a_plus`, `a_wear_pos`, `a_flag`, `a_serial`, `a_count`, `a_used`, `a_item_option0`, `a_item_option1`, `a_item_option2`, `a_item_option3`, `a_item_option4`, `a_used_2`) VALUES (''," + user_id + ",'"+TitanHelm+"','25','-1','0','','1','-1','0','0','0','0','0','-1')";

 

I can insert the Command all works fine, i can find it in the DB , but only in the Warehouse the Item is missing.

 

I think its maybe the Serial but i havent no idea how to Calculate this Serial..^^

Print this item

  NPC EXP bug or wrong EXP table???
Posted by: robino1996 - 09-09-2012, 10:23 AM - Forum: General Discussion - Replies (3)


Hello guys

i noticed that in my database for example a normal lvl 1 fox 2147483647 exp gives ..

(means when my rates are on 1 i get lvl up 1 to 122 by killing a fox)

could someone upload his exp table or his npc database? would be great thanx for reading =)

Print this item

  [Guide]Add second kapelle
Posted by: tiago - 09-08-2012, 07:27 PM - Forum: Ep1 Guides - Replies (18)


delete zone 18.

enter code in your db:

INSERT INTO `t_zonedata` VALUES ('18', 'Chapel_01', '1024', '1024', '1', ' data/Chapel02.sat', ' data/Chapel02.[CeNsOrEd]', '100', '1', '10', ' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0', '38 237 298 127 456', '71 545 490 247 56', '38 237 298 127 456', '71 545 490 247 56', '', '1', '1', '0', null, null, null, null, null, null, null);

 

 

Add in your client file:2

in Data/World

In your gameserver/data files sat/[CeNsOrEd] : 2

ScreenShots

2

2

2

2

2

2

Print this item

  [C/C++]Basic Socket Programming - Part 2
Posted by: someone - 09-08-2012, 06:57 PM - Forum: Coders Talk - Replies (2)


This is a continuation of the previous Tutorial:

2

 

I in this tutorial I'll show how to make a server to handle many clients.

 

Threads

First thing you need to know is how to handle threads. There are many libraries that handle threads(windows threds, POSIX threds, Boost threds, std library from C++0x/11, unix fork, etc), but I'm gonna post about POSIX Threads, because they are not limited to the platform, they work the same as windows threads too.

 

Creating Threads:

#include <pthread.h>
#include <stdio.h>

// this function is he thred Entry point
// when creating a thread it will run this function in a separate thread
void* EntryPoint(void* arg){
// pocess data
int tid = (int) arg;
printf("Thread ID=%d", tid);

// close the thread
pthread_exit(NULL);
return NULL; //to remove somse compiler warnings
}

//main function
int main()
{
// create 10 threads handles
pthread_t threads[10];

for(int i = 0; i < 10; i++){
// creating a thread with the entrypoint on EntryPoint function
// and giving i as parameter
int rc = pthread_create(&thread, NULL, EntryPoint, (void *)i );

// check if thread was successfully ceated
if (rc){
printf("Cannot create thread");
exit(-1);
}
}
// terminate main thread, usually waits for other threads to finish
pthread_exit(NULL);
return 0;
}

 

For thread syncronization there are many methods in phtreads, so I'll post the mutex version.

#include <pthread.h>
#include <stdio.h>

//our mutex used for syncronization either make it a global variable or a staic one
pthread_mutex_t mutex;

// this function is he thred Entry point
// when creating a thread it will run this function in a separate thread
void* EntryPoint(void* arg){
// pocess data
int tid = (int) arg;
printf("Thread ID=%d\n", tid);

// lock for synchronization
pthread_mutex_lock (&mutex);
static int x = 0;
x +=tid;
printf("x=%d\n", x);
pthread_mutex_unlock (&mutex);

// close the thread
pthread_exit((void*)tid);
return NULL; //to remove somse compiler warnings
}

//main function
int main()
{
// create a thread handle, and attributes
pthread_t threads[10];

//this variable will hold the thread termination status
//(when the thread reaches pthread_exit(NULL)
void* status;
int error;

//initialize the mutex
pthread_mutex_init(&mutex, NULL);

for(int i = 0; i < 10; i++){
// creating a thread with the entrypoint on EntryPoint function
// and giving tid as parameter
error = pthread_create(&threads[i], NULL, EntryPoint, (void *)i );

// check if thread was successfully ceated
if (error){
printf("Cannot create thread");
exit(-1);
}
}

// wait for other threasd to finish, usually requires to initialize threads as joinable first
for(int i = 0; i < 10; i++)
error = pthread_join(threads[i], &status);

//destroy the mutex
pthread_mutex_destroy(&mutex);
// terminate main thread, usually waits for other threads to finish
pthread_exit(NULL);
return 0;
}

 

For more info about POSIX Threads read this:

2

 

 

Server that holds many clients:

When talking about networking there are 2 basic types of functions( blocking and nonblocking). Blocking function blocks the application untill the function terminates, a nonblocking function lets the program runing while the function completes.

 

For example the accept() function, when it is called will block the program untill it recieves a connection from a user(client). To fix this we need to make a thread that will accept connections form clients. The similar problem is with recv() function it blocks program functionality untill it receives data from the client from a socket(if we had a socket that will not receive data this will block all other program functionality).

 

To solve this problem the first thing we are going to do is to create a thread that will accept client connections, the second problem is to either using nonBlocin sockets, or using the select() to check sockets if they have data on them before calling the recv() function( this way we will not block with recv()).

 

The select function will create a list of sockets that has data to receive(we will have to create a socket set with the clent sockets and select from that set all the sockets with data on them.

 

The 2 function once it reads the FD_SET structure it will alter it(removes the unnecessary sockets from it). and returns the number of sockets.

Read more on FD_SET, FD_CLR, FD_ISSET, FD_ZERO

 

#include <pthread.h>
#include <stdio.h>

// declare globally master socket set
FD_SET masterSet;

// declare mutex for shared data
pthread_mutex_t mutex = NULL;

// thread entrypoint for accepting new clients
void* acceptClientThread(void* arg){
int serverSocket = (int)arg;

//starting a socket wheel to acept clients
bool bDone = true;
while(bDone){
// accept new clients
unsigned int clientSocket = accept(serverSocket, 0, 0);

// check for errors
if (clientSocket < 0) {
printf("Accept Failed!\n");

// exit the wheel
bDone = false;
}else{
// if a client connected
// lock for synchronization
pthread_mutex_lock (&mutex);

// add the socket to the master set
FD_SET(clientSocket, &masterSet);

// unloch when done
pthread_mutex_unlock (&mutex);
}
}
return NULL;
}

bool checkRecvData(int nBytes,unsigned int clientSocket){
switch(nBytes){
case -1:{
//error
#ifdef WIN32
//get the last error
int error = WSAGetLastError();
//means the lient shut down the application
//or it lost connection
if (error == WSAECONNRESET){}
else break;
#else
if(errno == 10054){}
else break;
#endif
}
case 0:{
//client disconnected,
//we need to remove the socket from the set
pthread_mutex_lock (&mutex);
FD_CLR(clientSocket, &masterSet);
pthread_mutex_unlock (&mutex);

//close socket
#ifdef WIN32
closesocket(clientSocket);
#else
close(clientSocket);
#endif
}
default:{
return false;
}
}
return true;
}

//main function
int main()
{
int Socket = startupServer("10.0.0.1", 12345);
if(Socket < 0){
// error, shuting down socket and close app
shutdownSocket(Socket);
return 1;
}

// handle for server connection accepting thread
pthread_t acceptThread;
int error;

//initialize the mutex
pthread_mutex_init(&mutex, NULL);

// create a thread for server connection accepting thread
error = pthread_create(&acceptThread, NULL, acceptClientThread, (void *)Socket );

// check if thread was successfully ceated
if (error){
printf("Cannot create thread");
exit(-1);
}

// wait for the thread to start, to not create other problems
Sleep(100);

//initialize the socket set with 0
FD_ZERO(&masterSet);
// wait for other threasd to finish

// the program main loop now
bool bQuit = true;
while(bQuit){
// now we need to look int the master set for client sockets
// who have data and then read their data.

// since we want to look into our master set which is accessed by
// acceptClientThread so we will need to lock this.
pthread_mutex_lock (&mutex);

//instead of locing the intire procedure and reading from master set
//we will just copy the master set
FD_SET selectedSet = masterSet;
pthread_mutex_unlock (&mutex);

//check if there are sockets into masterset
if(selectedSet.fd_count == 0){
//continue loop
continue;
}

// usually the select function has 5 parameters, the last parameter in the select
// function is ther wait time, if you don't want to wait for new connections
// just set the wait time to 0
timeval waitTime = {0};
int result = select(selectedSet.fd_count, &selectedSet, NULL, NULL, &waitTime);

// the return value that the select function has
// is the sockets that has data
//if the value is negative this means it has errors
if (result <= 0) {
// no sockets have data
continue;
}

//now that we have the sockets that have data
//we should check them
for(int i = 0; i < selectedSet.fd_count; i++){
//getting the socket from the socket list
int clientSocket = selectedSet.fd_array[i];

char header[12] = {0};
//receiving the data from the socket
int nBytes = recv(clientSocket, header, 12,0 );

//ceeck data
if(checkRecvData(nBytes, clientSocket)){
//something happened continue with the next socket
continue;
}

//get the size from the header,
//usually youn can convert the 4 last bytes from into int32
int size = header[11];

char* data = new char[size];
//receiving the data from the socket
nBytes = recv(clientSocket, data, size,0 );

//ceeck data
if(checkRecvData(nBytes, clientSocket)){
//something happened continue with the next socket
continue;
}
//process data
}
}
//destroy the mutex, tou can add this into shutdown server
pthread_mutex_destroy(&mutex);
// terminate main thread, usually waits for other threads to finish
pthread_exit(NULL);
return 0;
}

Print this item

  [Question] C++ Mysql
Posted by: Wizatek - 09-08-2012, 01:18 PM - Forum: Coders Talk - Replies (1)


In php the mysql_ functions are depricated and should no longer be used.

I found a 2 but i noticed the functions are nearly the same as the depricated mysql functions in php.

 

How should i see that for c++, should i use this, or is there something else?

Print this item

  [C#] Split TextBox Text
Posted by: Nikolee - 09-08-2012, 10:22 AM - Forum: Coders Talk - Replies (2)


Hey i am lookin for a Methode to Split a textBox Text Example the Code that HateMe gives for ListBox item to TextBox

shows me the Name and the a_user_index from the Chars, but i wanna that it Shows only the a_user_index.

 

 

 

Thats the Code from HateMe :

 

private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (listBox1.SelectedIndex != -1)
{

string name = listBox1.SelectedItem.ToString();
textBox1.Text = name;

}
}

 

Here a Screen how it looks:

2

Print this item

  Website script collection
Posted by: Sentence - 09-07-2012, 09:02 PM - Forum: Ep1 Websites - Replies (5)


Hey guys,

 

because I can't edit my old thread (2) I decided to make a new ^^

 

Actually I have 4 scripts for you: Online Users, Advertising system, Register and Ranking

 

Player online script : 2

Player advertising script : 2 (not sure if this really correctly works only tested a few times^^)

Register : 2

Ranking : 2

 

Write your wishes in this thread or send me a private message, I will make you an safe script without any costs!

 

have fun

Print this item

  Bann Tool
Posted by: Nikolee - 09-07-2012, 12:03 PM - Forum: Tools - Replies (9)


Hey i have made a tool some days ago and maybe you will need it for youre Server to ban Player

(It DeAcitvate the Character (set a_enable to 0)

Download: 2

Screen:

2

 

// I think you will get an Error then you try to select the Chars, if you get an Error please post it,

Print this item

  [Release] WASD-Movement and TAB-Key
Posted by: fabi202cool - 09-07-2012, 10:49 AM - Forum: Client Side - Replies (25)


Hello Com,

today i want to release my little Hook (It is the same as i've released a few weeks ago at epvp). It includes WASD-Movement and mob targeting over a key, also known as "TAB-Key". You can move with the right/left arrow key and move key which is defined in the settings File. The TAB-Key is also changeable in the settings file.

 

Note:

After every Login/Mapteleport/Mobtargeting click at any point of the map, else WASD doesnt work.

 

Edit by Fabi Sept 15th:

 

There are two ways to inject the DLL:

1. Replace the vorbisfile.dll with the dll (located in Bin folder). After that the dll is loading at every start of lc, but background music doesnt work anymore.

2. Inject the dll with an injector like Winject into Nksp.exe

 

Note: After every Login/Mapteleport/Mobtargeting click at any point of the map, else WASD doesnt work.

 

This hook is running at all EP1 Clients

 

Virustotal DLL: 2

Virustotal Injector: 2 (You can also use an other injector)

 

If you dont trust me, dont use it.

2

Print this item