This commit is contained in:
mallocnull 2017-12-26 10:09:36 -06:00
parent 8f394ab34b
commit 046cd298aa
5 changed files with 83 additions and 82 deletions

View file

@ -48,7 +48,7 @@ void client() {
return; return;
} }
setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
initscr(); initscr();
start_color(); start_color();
@ -164,10 +164,10 @@ void create_account() {
packet_free(pck); packet_free(pck);
char input[9]; char input[9];
int a = //scr_prompt_string(TRUE, 20, "this prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test", input, 8); int a = //scr_prompt_string(TRUE, 20, "this prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test of a prompt box is a test", input, 8);
scr_prompt_voptions(TRUE, 30, "I'm glad you know which way to go, but that ain't gunna stop me, here we go!\n \nCheck and turn the signals to the left.\n \nNow turn to the left.", 3, scr_prompt_voptions(TRUE, 30, "I'm glad you know which way to go, but that ain't gunna stop me, here we go!\n \nCheck and turn the signals to the left.\n \nNow turn to the left.", 3,
"Now turn to the left!", "Now turn to the right!", "Uh oh"); "Now turn to the left!", "Now turn to the right!", "Uh oh");
for(;;); for(;;);

View file

@ -1,5 +1,55 @@
#include "common.h" #include "common.h"
const char* _SKILL_NAMES[] = {
"Melee",
"Ranged",
"White Magic",
"Black Magic",
"Woodcutting",
"Firemaking",
"Mining",
"Smithing",
"Fishing",
"Cooking"
};
const char* _SKILL_NAMES_SHORT[] = {
"MELE",
"RANG",
"WMAG",
"BMAG",
"WCUT",
"FIRE",
"MINE",
"SMTH",
"FISH",
"COOK"
};
const char* _STAT_NAMES[] = {
"Strength",
"Health",
"Defense",
"Agility",
"Intellect",
"Wisdom",
"Charisma",
"Perception",
"Luck"
};
const char* _STAT_NAMES_SHORT[] = {
"STR",
"HP",
"DEF",
"AGIL",
"INT",
"WIS",
"CHAR",
"PCPT",
"LUCK"
};
/* HOST TO NETWORK CONVERSIONS */ /* HOST TO NETWORK CONVERSIONS */
static BOOL in_order = 0xFF; static BOOL in_order = 0xFF;

View file

@ -8,6 +8,7 @@
#define WORK #define WORK
#define MAHOU_PORT "6770" #define MAHOU_PORT "6770"
#define MAX_CONNS 100
#define FALSE 0 #define FALSE 0
#define TRUE 1 #define TRUE 1
@ -21,7 +22,35 @@
#define KEY_TAB 9 #define KEY_TAB 9
#define KEY_LF 10 #define KEY_LF 10
#define MAX_CONNS 100 /** SKILL SECTION START **/
#define SKILLS_COUNT 10
#define SKILL_MELEE 0
#define SKILL_RANGED 1
#define SKILL_WHMAGIC 2
#define SKILL_BLMAGIC 3
#define SKILL_WOODCUT 4
#define SKILL_FIREMAKE 5
#define SKILL_MINING 6
#define SKILL_SMITHING 7
#define SKILL_FISHING 8
#define SKILL_COOKING 9
#define STATS_COUNT 9
#define STAT_STRENGTH 0
#define STAT_HEALTH 1
#define STAT_DEFENSE 2
#define STAT_AGILITY 3
#define STAT_INTELLECT 4
#define STAT_WISDOM 5
#define STAT_CHARISMA 6
#define STAT_PERCEPT 7
#define STAT_LUCK 8
extern const char* _SKILL_NAMES[];
extern const char* _SKILL_NAMES_SHORT[];
extern const char* _STAT_NAMES[];
extern const char* _STAT_NAMES_SHORT[];
/** SKILL SECTION END **/
uint64_t htonll(uint64_t); uint64_t htonll(uint64_t);
uint64_t ntohll(uint64_t); uint64_t ntohll(uint64_t);

View file

@ -1,55 +1,5 @@
#include "user.h" #include "user.h"
const char* _SKILL_NAMES[] = {
"Melee",
"Ranged",
"White Magic",
"Black Magic",
"Woodcutting",
"Firemaking",
"Mining",
"Smithing",
"Fishing",
"Cooking"
};
const char* _SKILL_NAMES_SHORT[] = {
"MELE",
"RANG",
"WMAG",
"BMAG",
"WCUT",
"FIRE",
"MINE",
"SMTH",
"FISH",
"COOK"
};
const char* _STAT_NAMES[] = {
"Strength",
"Health",
"Defense",
"Agility",
"Intellect",
"Wisdom",
"Charisma",
"Perception",
"Luck"
};
const char* _STAT_NAMES_SHORT[] = {
"STR",
"HP",
"DEF",
"AGIL",
"INT",
"WIS",
"CHAR",
"PCPT",
"LUCK"
};
struct { struct {
pthread_mutex_t mx_ctx; pthread_mutex_t mx_ctx;
list_t *active_users; list_t *active_users;

View file

@ -15,34 +15,6 @@
#define USER_GENDER_FEMALE 1 #define USER_GENDER_FEMALE 1
#define USER_FLAG_POISONED 2 #define USER_FLAG_POISONED 2
#define SKILLS_COUNT 10
#define SKILL_MELEE 0
#define SKILL_RANGED 1
#define SKILL_WHMAGIC 2
#define SKILL_BLMAGIC 3
#define SKILL_WOODCUT 4
#define SKILL_FIREMAKE 5
#define SKILL_MINING 6
#define SKILL_SMITHING 7
#define SKILL_FISHING 8
#define SKILL_COOKING 9
#define STATS_COUNT 9
#define STAT_STRENGTH 0
#define STAT_HEALTH 1
#define STAT_DEFENSE 2
#define STAT_AGILITY 3
#define STAT_INTELLECT 4
#define STAT_WISDOM 5
#define STAT_CHARISMA 6
#define STAT_PERCEPT 7
#define STAT_LUCK 8
extern const char* _SKILL_NAMES[];
extern const char* _SKILL_NAMES_SHORT[];
extern const char* _STAT_NAMES[];
extern const char* _STAT_NAMES_SHORT[];
typedef struct user_t user_t; typedef struct user_t user_t;
struct user_t { struct user_t {
pthread_mutex_t mx_user; pthread_mutex_t mx_user;