I'm trying to modify the source to enable a little announcement to the whole server each time a new party is added to the party booking system. However, I've found an issue I don't know how to solve.
First, this is my modification, in party.c, at the end of void party_booking_register()
char message[128];
sprintf(message,"%s is looking for %hu at level %hu-%hu to go to %s.", pb_ad->charname, job[0], level,level+10,map_mapid2mapname(mapid));
intif_broadcast(message,strlen(message)+1,0);
There is a problem with this: The party booking system uses its own ID numeration to define jobs and maps. These ID values are read from the lua files, they are not server-side. So, if I try to convert these IDs to text (job name or map name) in the source code, the resulting value doesn't exist or it doesn't correspond to the map or job in the booking system.
Can anyone help me with an idea to solve this? I know I could just create two arrays in the source that contain the job names and map names in the same order as in the party booking system... but I'd prefer to avoid doing that if there is a better solution.
Question
Leeg
Hello.
I'm trying to modify the source to enable a little announcement to the whole server each time a new party is added to the party booking system. However, I've found an issue I don't know how to solve.
First, this is my modification, in party.c, at the end of void party_booking_register()
There is a problem with this: The party booking system uses its own ID numeration to define jobs and maps. These ID values are read from the lua files, they are not server-side. So, if I try to convert these IDs to text (job name or map name) in the source code, the resulting value doesn't exist or it doesn't correspond to the map or job in the booking system.
Can anyone help me with an idea to solve this? I know I could just create two arrays in the source that contain the job names and map names in the same order as in the party booking system... but I'd prefer to avoid doing that if there is a better solution.
Thank you very much
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.