密猟オンラインサーバープログラム
utf-8に変更した結果、名称バッファが足りなくなっていたのでそれを修正
| @@ -367,7 +367,7 @@ | ||
| 367 | 367 | typedef struct animal_info |
| 368 | 368 | { |
| 369 | 369 | ANIMALDATA *pdata; |
| 370 | - char name[USERNAME_LEN]; | |
| 370 | + char name[ANIMALNAME_LEN]; | |
| 371 | 371 | unsigned long hp; |
| 372 | 372 | unsigned moral; |
| 373 | 373 | unsigned w_power; |
| @@ -1524,7 +1524,7 @@ | ||
| 1524 | 1524 | #ifdef MAKEWIN32 |
| 1525 | 1525 | convertH2C (namebuf, USERNAME_LEN); |
| 1526 | 1526 | #endif |
| 1527 | - fprintf (optr, "%d,%d,%d,%-.16s\n", | |
| 1527 | + fprintf (optr, "%d,%d,%d,%-.24s\n", | |
| 1528 | 1528 | User[i].myshop[j].build, |
| 1529 | 1529 | User[i].myshop[j].pos.x, User[i].myshop[j].pos.y, |
| 1530 | 1530 | namebuf); |
| @@ -1539,7 +1539,7 @@ | ||
| 1539 | 1539 | #ifdef MAKEWIN32 |
| 1540 | 1540 | convertH2C (namebuf, WEAPONNAME_LEN); |
| 1541 | 1541 | #endif |
| 1542 | - fprintf (optr, "%-.32s,%u,%u,%lu\n", | |
| 1542 | + fprintf (optr, "%-.24s,%u,%u,%lu\n", | |
| 1543 | 1543 | namebuf, |
| 1544 | 1544 | User[i].myshop[j].leftuse[0][k], |
| 1545 | 1545 | User[i].myshop[j].count[0][k], |
| @@ -1553,7 +1553,7 @@ | ||
| 1553 | 1553 | #ifdef MAKEWIN32 |
| 1554 | 1554 | convertH2C (namebuf, ITEMNAME_LEN); |
| 1555 | 1555 | #endif |
| 1556 | - fprintf (optr, "%-.32s,%u,%u,%lu\n", | |
| 1556 | + fprintf (optr, "%-.24s,%u,%u,%lu\n", | |
| 1557 | 1557 | namebuf, |
| 1558 | 1558 | User[i].myshop[j].leftuse[1][k], |
| 1559 | 1559 | User[i].myshop[j].count[1][k], |
| @@ -2188,7 +2188,7 @@ | ||
| 2188 | 2188 | #ifdef MAKEWIN32 |
| 2189 | 2189 | convertH2C (work, USERNAME_LEN); |
| 2190 | 2190 | #endif |
| 2191 | - printf ("user(%d)[%-16.16s] logoff.\n", userno, work); | |
| 2191 | + printf ("user(%d)[%-.24s] logoff.\n", userno, work); | |
| 2192 | 2192 | User[userno].idletimer = 0; |
| 2193 | 2193 | } |
| 2194 | 2194 | ClearUser (userno); |
| @@ -2623,7 +2623,7 @@ | ||
| 2623 | 2623 | #ifdef MAKEWIN32 |
| 2624 | 2624 | convertH2C (namebuf, USERNAME_LEN); |
| 2625 | 2625 | #endif |
| 2626 | - fprintf (optr, "%d,%d,%lu\n%-.16s\n", | |
| 2626 | + fprintf (optr, "%d,%d,%lu\n%-.24s\n", | |
| 2627 | 2627 | pmail->readflag, pmail->line, pmail->timestamp, namebuf); |
| 2628 | 2628 | n = (unsigned char) (pmail->subject[0]); |
| 2629 | 2629 | if (n) |
| @@ -2850,7 +2850,7 @@ | ||
| 2850 | 2850 | #ifdef MAKEWIN32 |
| 2851 | 2851 | convertH2C (namebuf, USERNAME_LEN); |
| 2852 | 2852 | #endif |
| 2853 | - fprintf (optr, "%d,%d,%lu\n%-.16s\n", | |
| 2853 | + fprintf (optr, "%d,%d,%lu\n%-.24s\n", | |
| 2854 | 2854 | pmail->readflag, pmail->line, pmail->timestamp, namebuf); |
| 2855 | 2855 | n = (unsigned char) (pmail->subject[0]); |
| 2856 | 2856 | if (n) |
| @@ -2961,7 +2961,7 @@ | ||
| 2961 | 2961 | { |
| 2962 | 2962 | User[i].password[j] = work[j]; |
| 2963 | 2963 | } |
| 2964 | - for (; j < USERNAME_LEN; j++) | |
| 2964 | + for (; j < PASSWORD_LEN; j++) | |
| 2965 | 2965 | { |
| 2966 | 2966 | User[i].password[j] = ' '; |
| 2967 | 2967 | } |
| @@ -3251,7 +3251,7 @@ | ||
| 3251 | 3251 | int x; |
| 3252 | 3252 | int y; |
| 3253 | 3253 | Animal[i].pdata = pdata; |
| 3254 | - memcpy (Animal[i].name, pdata->name, USERNAME_LEN); | |
| 3254 | + memcpy (Animal[i].name, pdata->name, ANIMALNAME_LEN); | |
| 3255 | 3255 | Animal[i].hp = pdata->hp; |
| 3256 | 3256 | Animal[i].moral = pdata->moral; |
| 3257 | 3257 | Animal[i].speed = pdata->speed; |
| @@ -3792,7 +3792,7 @@ | ||
| 3792 | 3792 | int nanimal = MAP (x, y)->animal; |
| 3793 | 3793 | if (nplayer && User[nplayer - 1].cloak_count == 0) |
| 3794 | 3794 | { |
| 3795 | - memcpy (p, User[nplayer - 1].name, 16); | |
| 3795 | + memcpy (p, User[nplayer - 1].name, USERNAME_LEN); | |
| 3796 | 3796 | if (User[nplayer - 1].maybearrest > 0) |
| 3797 | 3797 | { |
| 3798 | 3798 | if (User[nplayer - 1].maybearrest <= ArrestPass) |
| @@ -3826,7 +3826,7 @@ | ||
| 3826 | 3826 | { |
| 3827 | 3827 | if (id & MAP_THERE_ANIMAL) |
| 3828 | 3828 | { |
| 3829 | - memcpy (p, Animal[nanimal].name, 16); | |
| 3829 | + memcpy (p, Animal[nanimal].name, USERNAME_LEN); | |
| 3830 | 3830 | if (Animal[nanimal].owner_user == userno) |
| 3831 | 3831 | { |
| 3832 | 3832 | /* your animal */ |
| @@ -3852,7 +3852,7 @@ | ||
| 3852 | 3852 | } |
| 3853 | 3853 | else if (id & MAP_THERE_NPC) |
| 3854 | 3854 | { |
| 3855 | - memcpy (p, Npc[nanimal].name, 16); | |
| 3855 | + memcpy (p, Npc[nanimal].name, USERNAME_LEN); | |
| 3856 | 3856 | if (Npc[nanimal].c_type == NpcHunter) |
| 3857 | 3857 | { |
| 3858 | 3858 | ret = 3; |
| @@ -3871,17 +3871,17 @@ | ||
| 3871 | 3871 | int nshop = searchUserShopFromPos (nowner - 1, x, y); |
| 3872 | 3872 | if (nshop != -1) |
| 3873 | 3873 | { |
| 3874 | - memcpy (p, User[nowner - 1].myshop[nshop].name, 16); | |
| 3874 | + memcpy (p, User[nowner - 1].myshop[nshop].name, USERNAME_LEN); | |
| 3875 | 3875 | } |
| 3876 | 3876 | else |
| 3877 | 3877 | { |
| 3878 | 3878 | /* error??? */ |
| 3879 | - memset (p, ' ', 16); | |
| 3879 | + memset (p, ' ', USERNAME_LEN); | |
| 3880 | 3880 | } |
| 3881 | 3881 | } |
| 3882 | 3882 | else |
| 3883 | 3883 | { |
| 3884 | - memset (p, ' ', 16); | |
| 3884 | + memset (p, ' ', USERNAME_LEN); | |
| 3885 | 3885 | } |
| 3886 | 3886 | } |
| 3887 | 3887 | return ret; |
| @@ -3890,7 +3890,8 @@ | ||
| 3890 | 3890 | /* make map detail data for send */ |
| 3891 | 3891 | static void |
| 3892 | 3892 | make_send_mapdetaildata (int userno, |
| 3893 | - unsigned char d[VIEW_LIMIT * VIEW_WIDTH * 16], | |
| 3893 | + unsigned char d[VIEW_LIMIT * VIEW_WIDTH * | |
| 3894 | + USERNAME_LEN], | |
| 3894 | 3895 | unsigned char crime[VIEW_LIMIT * VIEW_WIDTH]) |
| 3895 | 3896 | { |
| 3896 | 3897 | int x; |
| @@ -3909,24 +3910,24 @@ | ||
| 3909 | 3910 | ny = y - RGVectorY[direction] * 2; |
| 3910 | 3911 | adjust_pos (&nx, &ny); |
| 3911 | 3912 | *pcrime++ = copy_mapdetaildata (userno, p, nx, ny); |
| 3912 | - p += 16; | |
| 3913 | + p += USERNAME_LEN; | |
| 3913 | 3914 | nx += RGVectorX[direction]; |
| 3914 | 3915 | ny += RGVectorY[direction]; |
| 3915 | 3916 | adjust_pos (&nx, &ny); |
| 3916 | 3917 | *pcrime++ = copy_mapdetaildata (userno, p, nx, ny); |
| 3917 | - p += 16; | |
| 3918 | + p += USERNAME_LEN; | |
| 3918 | 3919 | *pcrime++ = copy_mapdetaildata (userno, p, x, y); |
| 3919 | - p += 16; | |
| 3920 | + p += USERNAME_LEN; | |
| 3920 | 3921 | nx = x + RGVectorX[direction]; |
| 3921 | 3922 | ny = y + RGVectorY[direction]; |
| 3922 | 3923 | adjust_pos (&nx, &ny); |
| 3923 | 3924 | *pcrime++ = copy_mapdetaildata (userno, p, nx, ny); |
| 3924 | - p += 16; | |
| 3925 | + p += USERNAME_LEN; | |
| 3925 | 3926 | nx += RGVectorX[direction]; |
| 3926 | 3927 | ny += RGVectorY[direction]; |
| 3927 | 3928 | adjust_pos (&nx, &ny); |
| 3928 | 3929 | *pcrime++ = copy_mapdetaildata (userno, p, nx, ny); |
| 3929 | - p += 16; | |
| 3930 | + p += USERNAME_LEN; | |
| 3930 | 3931 | x += FWVectorX[direction]; |
| 3931 | 3932 | y += FWVectorY[direction]; |
| 3932 | 3933 | adjust_pos (&x, &y); |
| @@ -4028,8 +4029,9 @@ | ||
| 4028 | 4029 | make_send_playeronmapdata (userno, packet + n); |
| 4029 | 4030 | n += VIEW_LIMIT * VIEW_WIDTH; |
| 4030 | 4031 | make_send_mapdetaildata (userno, packet + n, |
| 4031 | - packet + n + VIEW_LIMIT * VIEW_WIDTH * 16); | |
| 4032 | - n += VIEW_LIMIT * VIEW_WIDTH * 16; | |
| 4032 | + packet + n + | |
| 4033 | + VIEW_LIMIT * VIEW_WIDTH * USERNAME_LEN); | |
| 4034 | + n += VIEW_LIMIT * VIEW_WIDTH * USERNAME_LEN; | |
| 4033 | 4035 | n += VIEW_LIMIT * VIEW_WIDTH; |
| 4034 | 4036 | if (!memcmp (User[userno].mapdata + 2, packet + 2, n - 2)) |
| 4035 | 4037 | { |
| @@ -4103,14 +4105,14 @@ | ||
| 4103 | 4105 | unsigned char packet[PACKET_MAX]; |
| 4104 | 4106 | int nlen = strlen (p); |
| 4105 | 4107 | packet[0] = HSERV_MESG; |
| 4106 | - memcpy (packet + 2, User[srcuser].name, 16); | |
| 4107 | - if (nlen > PACKET_DATA_MAX - 17) | |
| 4108 | + memcpy (packet + 2, User[srcuser].name, USERNAME_LEN); | |
| 4109 | + if (nlen > PACKET_DATA_MAX - 1 - USERNAME_LEN) | |
| 4108 | 4110 | { |
| 4109 | - nlen = PACKET_DATA_MAX - 17; | |
| 4111 | + nlen = PACKET_DATA_MAX - 1 - USERNAME_LEN; | |
| 4110 | 4112 | } |
| 4111 | - packet[18] = nlen; | |
| 4112 | - memcpy (packet + 19, p, nlen); | |
| 4113 | - ret = SENDPACKET (userno, packet, nlen + 17); | |
| 4113 | + packet[2 + USERNAME_LEN] = nlen; | |
| 4114 | + memcpy (packet + 3 + USERNAME_LEN, p, nlen); | |
| 4115 | + ret = SENDPACKET (userno, packet, nlen + 1 + USERNAME_LEN); | |
| 4114 | 4116 | } |
| 4115 | 4117 | return ret; |
| 4116 | 4118 | } |
| @@ -4291,8 +4293,8 @@ | ||
| 4291 | 4293 | { |
| 4292 | 4294 | int n = 2; |
| 4293 | 4295 | packet[0] = HSERV_WHO; |
| 4294 | - memcpy (packet + n, User[i].name, 16); | |
| 4295 | - n += 16; | |
| 4296 | + memcpy (packet + n, User[i].name, USERNAME_LEN); | |
| 4297 | + n += USERNAME_LEN; | |
| 4296 | 4298 | *(unsigned long *) (packet + n) = htonl (User[i].score); |
| 4297 | 4299 | n += 4; |
| 4298 | 4300 | packet[n++] = |
| @@ -4373,8 +4375,8 @@ | ||
| 4373 | 4375 | unsigned char packet[PACKET_MAX]; |
| 4374 | 4376 | int n = 2; |
| 4375 | 4377 | packet[0] = HSERV_SENDMAIL; |
| 4376 | - memcpy (packet + n, User[p->fromuser].name, 16); | |
| 4377 | - n += 16; | |
| 4378 | + memcpy (packet + n, User[p->fromuser].name, USERNAME_LEN); | |
| 4379 | + n += USERNAME_LEN; | |
| 4378 | 4380 | *(unsigned long *) (packet + n) = htonl (p->timestamp); |
| 4379 | 4381 | n += 4; |
| 4380 | 4382 | packet[n++] = p->subject[0]; |
| @@ -4430,8 +4432,8 @@ | ||
| 4430 | 4432 | unsigned char packet[PACKET_MAX]; |
| 4431 | 4433 | int n = 2; |
| 4432 | 4434 | packet[0] = HSERV_BBS_HEADER; |
| 4433 | - memcpy (packet + n, User[p->fromuser].name, 16); | |
| 4434 | - n += 16; | |
| 4435 | + memcpy (packet + n, User[p->fromuser].name, USERNAME_LEN); | |
| 4436 | + n += USERNAME_LEN; | |
| 4435 | 4437 | *(unsigned long *) (packet + n) = htonl (p->timestamp); |
| 4436 | 4438 | n += 4; |
| 4437 | 4439 | packet[n++] = p->subject[0]; |
| @@ -4499,8 +4501,8 @@ | ||
| 4499 | 4501 | if (User[nowner].myshop[nshop].count[n][i]) |
| 4500 | 4502 | { |
| 4501 | 4503 | sprintf (work, |
| 4502 | - n ? MESG ("<%2d:%-32.32s:%10luP %4ucount (stock:%4u)>") : | |
| 4503 | - MESG ("<%2d:%-32.32s:%10luP %4uround (stock:%4u)>"), | |
| 4504 | + n ? MESG ("<%2d:%-32.24s:%10luP %4ucount (stock:%4u)>") : | |
| 4505 | + MESG ("<%2d:%-32.24s:%10luP %4uround (stock:%4u)>"), | |
| 4504 | 4506 | i, |
| 4505 | 4507 | (n ? Item[User[nowner].myshop[nshop].list[n][i]].name : |
| 4506 | 4508 | Weapon[User[nowner].myshop[nshop].list[n][i]].name), |
| @@ -4543,7 +4545,7 @@ | ||
| 4543 | 4545 | { |
| 4544 | 4546 | WEAPONINFO *pw = Weapon + plist[i]; |
| 4545 | 4547 | sprintf (work, |
| 4546 | - MESG ("<%3d:%-32.32s:%10luP %4uround HP%4u/Moral%4u " | |
| 4548 | + MESG ("<%3d:%-32.24s:%10luP %4uround HP%4u/Moral%4u " | |
| 4547 | 4549 | "Range:%4ublock>"), |
| 4548 | 4550 | i, pw->name, pw->cost, pw->bullette, |
| 4549 | 4551 | pw->firepower, pw->moral, pw->range); |
| @@ -4584,7 +4586,7 @@ | ||
| 4584 | 4586 | { |
| 4585 | 4587 | ITEMINFO *pi = Item + plist[i]; |
| 4586 | 4588 | sprintf (work, |
| 4587 | - MESG ("<%3d:%-32.32s:%10luP %4ucount>"), | |
| 4589 | + MESG ("<%3d:%-32.24s:%10luP %4ucount>"), | |
| 4588 | 4590 | i, pi->name, pi->cost, pi->count); |
| 4589 | 4591 | SendSystemMessagePacket (nuser, work); |
| 4590 | 4592 | } |
| @@ -4707,15 +4709,15 @@ | ||
| 4707 | 4709 | switch (t) |
| 4708 | 4710 | { |
| 4709 | 4711 | case TargetUser: |
| 4710 | - sprintf (work, MESG ("%-.16s damages you. lost %uHP."), | |
| 4712 | + sprintf (work, MESG ("%-.24s damages you. lost %uHP."), | |
| 4711 | 4713 | CUTTAIL (User[fromuser].name), ndamage); |
| 4712 | 4714 | break; |
| 4713 | 4715 | case TargetNpc: |
| 4714 | - sprintf (work, MESG ("%-.16s damages you. lost %uHP."), | |
| 4716 | + sprintf (work, MESG ("%-.24s damages you. lost %uHP."), | |
| 4715 | 4717 | CUTTAIL (Npc[fromuser].name), ndamage); |
| 4716 | 4718 | break; |
| 4717 | 4719 | case TargetAnimal: |
| 4718 | - sprintf (work, MESG ("Animal '%-.16s' damages you. lost %uHP"), | |
| 4720 | + sprintf (work, MESG ("Animal '%-.24s' damages you. lost %uHP"), | |
| 4719 | 4721 | CUTTAIL (Animal[fromuser].name), ndamage); |
| 4720 | 4722 | break; |
| 4721 | 4723 | default: |
| @@ -4728,7 +4730,7 @@ | ||
| 4728 | 4730 | } |
| 4729 | 4731 | if (t == TargetUser) |
| 4730 | 4732 | { |
| 4731 | - sprintf (work, MESG ("You attack %-.16s"), | |
| 4733 | + sprintf (work, MESG ("You attack %-.24s"), | |
| 4732 | 4734 | CUTTAIL (User[nuser].name)); |
| 4733 | 4735 | SendSystemMessagePacket (fromuser, work); |
| 4734 | 4736 | } |
| @@ -4932,8 +4934,9 @@ | ||
| 4932 | 4934 | /* login */ |
| 4933 | 4935 | int nuser = SearchUser ((char *) (packet + 2)); |
| 4934 | 4936 | puts ("attempt to login."); |
| 4935 | - if (packet[1] != 16 + 16 + 2 || | |
| 4936 | - packet[2 + 16 + 16 + 1] != HPROTOCOL_VERSION) | |
| 4937 | + if (packet[1] != USERNAME_LEN + PASSWORD_LEN + 2 || | |
| 4938 | + packet[2 + USERNAME_LEN + PASSWORD_LEN + 1] != | |
| 4939 | + HPROTOCOL_VERSION) | |
| 4937 | 4940 | { |
| 4938 | 4941 | /* illegal protocol */ |
| 4939 | 4942 | puts ("protocol mismatch."); |
| @@ -4942,7 +4945,7 @@ | ||
| 4942 | 4945 | else if (nuser != -1) |
| 4943 | 4946 | { |
| 4944 | 4947 | int i; |
| 4945 | - const unsigned char *p = packet + 2 + 16; | |
| 4948 | + const unsigned char *p = packet + 2 + USERNAME_LEN; | |
| 4946 | 4949 | char uname[USERNAME_LEN]; |
| 4947 | 4950 | char work[PASSWORD_LEN]; |
| 4948 | 4951 | memcpy (uname, User[nuser].name, USERNAME_LEN); |
| @@ -4949,7 +4952,7 @@ | ||
| 4949 | 4952 | #ifdef MAKEWIN32 |
| 4950 | 4953 | convertH2C (uname, USERNAME_LEN); |
| 4951 | 4954 | #endif |
| 4952 | - printf ("User name:%-16.16s\n", uname); | |
| 4955 | + printf ("User name:%-16.24s\n", uname); | |
| 4953 | 4956 | for (i = 0; i < PASSWORD_LEN; i++) |
| 4954 | 4957 | { |
| 4955 | 4958 | if (*(p + i) == '\0') |
| @@ -5038,19 +5041,20 @@ | ||
| 5038 | 5041 | if (packet[1] == USERNAME_LEN + PASSWORD_LEN + 16 + PASSWORD_LEN) |
| 5039 | 5042 | { |
| 5040 | 5043 | /* ok */ |
| 5041 | - if (packet[2 + 16 + 16 + 1] != HPROTOCOL_VERSION) | |
| 5044 | + if (packet[2 + USERNAME_LEN + PASSWORD_LEN + 1] != | |
| 5045 | + HPROTOCOL_VERSION) | |
| 5042 | 5046 | { |
| 5043 | 5047 | /* illegal protocol */ |
| 5044 | 5048 | puts ("protocol mismatch"); |
| 5045 | 5049 | SendResultPacket (psession->handle, -1); |
| 5046 | 5050 | } |
| 5047 | - else if (memcmp (packet + 2 + 16 + 16 + 16, makeUserKey, | |
| 5048 | - PASSWORD_LEN)) | |
| 5051 | + else if (memcmp (packet + 2 + USERNAME_LEN + PASSWORD_LEN + 16, | |
| 5052 | + makeUserKey, PASSWORD_LEN)) | |
| 5049 | 5053 | { |
| 5050 | 5054 | /* illegal system password */ |
| 5051 | 5055 | puts ("system password mismatch"); |
| 5052 | - printf ("Client key[%-16.16s]\n", | |
| 5053 | - packet + 2 + 16 + 16 + 16); | |
| 5056 | + printf ("Client key[%-16.24s]\n", | |
| 5057 | + packet + 2 + USERNAME_LEN + PASSWORD_LEN + 16); | |
| 5054 | 5058 | SendResultPacket (psession->handle, -1); |
| 5055 | 5059 | } |
| 5056 | 5060 | else |
| @@ -5075,7 +5079,7 @@ | ||
| 5075 | 5079 | char *ps; |
| 5076 | 5080 | char *pd; |
| 5077 | 5081 | puts ("ok. new user!"); |
| 5078 | - ps = (char *) (packet + 2 + 16); | |
| 5082 | + ps = (char *) (packet + 2 + USERNAME_LEN); | |
| 5079 | 5083 | pd = User[nuser].password; |
| 5080 | 5084 | for (i = 0; i < PASSWORD_LEN; i++) |
| 5081 | 5085 | { |
| @@ -5090,7 +5094,8 @@ | ||
| 5090 | 5094 | *pd++ = ' '; |
| 5091 | 5095 | } |
| 5092 | 5096 | User[nuser].c_type = |
| 5093 | - packet[2 + 16 + 16] ? Observer : Hunter; | |
| 5097 | + packet[2 + USERNAME_LEN + PASSWORD_LEN] ? | |
| 5098 | + Observer : Hunter; | |
| 5094 | 5099 | if (SendResultPacket (psession->handle, 0) == -1) |
| 5095 | 5100 | { |
| 5096 | 5101 | /* ?? error */ |
| @@ -5133,7 +5138,7 @@ | ||
| 5133 | 5138 | if (nuser != -1) |
| 5134 | 5139 | { |
| 5135 | 5140 | int i; |
| 5136 | - const unsigned char *p = packet + 2 + 16; | |
| 5141 | + const unsigned char *p = packet + 2 + USERNAME_LEN; | |
| 5137 | 5142 | char uname[USERNAME_LEN]; |
| 5138 | 5143 | char work[PASSWORD_LEN]; |
| 5139 | 5144 | memcpy (uname, User[nuser].name, USERNAME_LEN); |
| @@ -5140,7 +5145,7 @@ | ||
| 5140 | 5145 | #ifdef MAKEWIN32 |
| 5141 | 5146 | convertH2C (uname, USERNAME_LEN); |
| 5142 | 5147 | #endif |
| 5143 | - printf ("User name:%-16.16s\n", uname); | |
| 5148 | + printf ("User name:%-16.24s\n", uname); | |
| 5144 | 5149 | for (i = 0; i < PASSWORD_LEN; i++) |
| 5145 | 5150 | { |
| 5146 | 5151 | if (*(p + i) == '\0') |
| @@ -5428,8 +5433,8 @@ | ||
| 5428 | 5433 | doChangeShopName (int nuser, const char *p) |
| 5429 | 5434 | { |
| 5430 | 5435 | User[nuser].action = DoChangeShopName; |
| 5431 | - strncpy (User[nuser].mesg_for_action, p, 16); | |
| 5432 | - User[nuser].mesg_for_action[16] = '\0'; | |
| 5436 | + strncpy (User[nuser].mesg_for_action, p, USERNAME_LEN); | |
| 5437 | + User[nuser].mesg_for_action[USERNAME_LEN] = '\0'; | |
| 5433 | 5438 | return; |
| 5434 | 5439 | } |
| 5435 | 5440 |
| @@ -5460,9 +5465,9 @@ | ||
| 5460 | 5465 | User[nuser].t_target = ntarget; |
| 5461 | 5466 | if (User[nuser].t_mail != NULL) |
| 5462 | 5467 | { |
| 5463 | - int n = *(p + 16); | |
| 5468 | + int n = *(p + USERNAME_LEN); | |
| 5464 | 5469 | User[nuser].t_mail->fromuser = nuser; |
| 5465 | - memcpy (User[nuser].t_mail->subject, p + 16, n + 1); | |
| 5470 | + memcpy (User[nuser].t_mail->subject, p + USERNAME_LEN, n + 1); | |
| 5466 | 5471 | } |
| 5467 | 5472 | } |
| 5468 | 5473 | else |
| @@ -5631,7 +5636,7 @@ | ||
| 5631 | 5636 | if (ndist != -1) |
| 5632 | 5637 | { |
| 5633 | 5638 | char work[MESG_BUFFER]; |
| 5634 | - unsigned n = ntohl (*(unsigned long *) (p + 16)); | |
| 5639 | + unsigned n = ntohl (*(unsigned long *) (p + USERNAME_LEN)); | |
| 5635 | 5640 | unsigned ntax = n / 100; |
| 5636 | 5641 | if (User[nuser].score < n + ntax) |
| 5637 | 5642 | { |
| @@ -5641,10 +5646,10 @@ | ||
| 5641 | 5646 | } |
| 5642 | 5647 | dec_score (nuser, n + ntax); |
| 5643 | 5648 | add_score (ndist, n); |
| 5644 | - sprintf (work, MESG ("[You transfer %upoint to %-.16s. Tax:%upoint]"), | |
| 5649 | + sprintf (work, MESG ("[You transfer %upoint to %-.24s. Tax:%upoint]"), | |
| 5645 | 5650 | n, CUTTAIL (User[ndist].name), ntax); |
| 5646 | 5651 | SendSystemMessagePacket (nuser, work); |
| 5647 | - sprintf (work, MESG ("[You receive %upoint from %-.16s]"), | |
| 5652 | + sprintf (work, MESG ("[You receive %upoint from %-.24s]"), | |
| 5648 | 5653 | n, CUTTAIL (User[nuser].name)); |
| 5649 | 5654 | SendSystemMessagePacket (ndist, work); |
| 5650 | 5655 | } |
| @@ -5660,8 +5665,8 @@ | ||
| 5660 | 5665 | doChangeUserAnimalName (int nuser, unsigned char *p) |
| 5661 | 5666 | { |
| 5662 | 5667 | User[nuser].action = DoChangeAnimalName; |
| 5663 | - strncpy (User[nuser].mesg_for_action, (char *) p, 16); | |
| 5664 | - User[nuser].mesg_for_action[16] = '\0'; | |
| 5668 | + strncpy (User[nuser].mesg_for_action, (char *) p, ANIMALNAME_LEN); | |
| 5669 | + User[nuser].mesg_for_action[ANIMALNAME_LEN] = '\0'; | |
| 5665 | 5670 | return; |
| 5666 | 5671 | } |
| 5667 | 5672 |
| @@ -5907,12 +5912,12 @@ | ||
| 5907 | 5912 | switch (User[i].crime_level) |
| 5908 | 5913 | { |
| 5909 | 5914 | case 1: |
| 5910 | - sprintf (work, MESG ("<WANTED '%-.16s'>"), | |
| 5915 | + sprintf (work, MESG ("<WANTED '%-.24s'>"), | |
| 5911 | 5916 | CUTTAIL (User[i].name)); |
| 5912 | 5917 | SendSystemMessagePacket (nuser, work); |
| 5913 | 5918 | break; |
| 5914 | 5919 | case 2: |
| 5915 | - sprintf (work, MESG ("<Dead or Alive '%-.16s'>"), | |
| 5920 | + sprintf (work, MESG ("<Dead or Alive '%-.24s'>"), | |
| 5916 | 5921 | CUTTAIL (User[i].name)); |
| 5917 | 5922 | SendSystemMessagePacket (nuser, work); |
| 5918 | 5923 | break; |
| @@ -6247,7 +6252,7 @@ | ||
| 6247 | 6252 | User[nuser].bullette[nslot] = 0; |
| 6248 | 6253 | } |
| 6249 | 6254 | User[nuser].myshop[nshop].count[isitem][i]++; |
| 6250 | - sprintf (work, MESG ("[%-.32s stocked]"), | |
| 6255 | + sprintf (work, MESG ("[%-.24s stocked]"), | |
| 6251 | 6256 | isitem ? Item[n].name : Weapon[n].name); |
| 6252 | 6257 | SendSystemMessagePacket (nuser, work); |
| 6253 | 6258 | } |
| @@ -6501,8 +6506,8 @@ | ||
| 6501 | 6506 | if (destuser != -1) |
| 6502 | 6507 | { |
| 6503 | 6508 | char work[PACKET_DATA_MAX]; |
| 6504 | - int nlen = *(p + 16); | |
| 6505 | - memcpy (work, p + 17, nlen); | |
| 6509 | + int nlen = *(p + USERNAME_LEN); | |
| 6510 | + memcpy (work, p + 1 + USERNAME_LEN, nlen); | |
| 6506 | 6511 | work[nlen] = '\0'; |
| 6507 | 6512 | SendMessagePacket (destuser, nuser, work); |
| 6508 | 6513 | if (nlen > PACKET_DATA_MAX - USERNAME_LEN - 10) |
| @@ -6509,11 +6514,10 @@ | ||
| 6509 | 6514 | { |
| 6510 | 6515 | nlen = PACKET_DATA_MAX - USERNAME_LEN - 10; |
| 6511 | 6516 | } |
| 6512 | - sprintf (work, MESG ("You tell %-.16s,"), | |
| 6513 | - CUTTAIL (User[destuser].name)); | |
| 6517 | + sprintf (work, "You tell %-.24s,", CUTTAIL (User[destuser].name)); | |
| 6514 | 6518 | if (nlen) |
| 6515 | 6519 | { |
| 6516 | - memcpy (work + USERNAME_LEN + 10, p + 17, nlen); | |
| 6520 | + memcpy (work + USERNAME_LEN + 10, p + 1 + USERNAME_LEN, nlen); | |
| 6517 | 6521 | } |
| 6518 | 6522 | work[USERNAME_LEN + 10 + nlen] = '\0'; |
| 6519 | 6523 | SendSystemMessagePacket (nuser, work); |
| @@ -6546,7 +6550,7 @@ | ||
| 6546 | 6550 | else |
| 6547 | 6551 | { |
| 6548 | 6552 | char work[PACKET_DATA_MAX]; |
| 6549 | - sprintf (work, MESG ("[Weapon:%-32.32s NOT READY]"), | |
| 6553 | + sprintf (work, MESG ("[Weapon:%-32.24s NOT READY]"), | |
| 6550 | 6554 | Weapon[User[nuser].weapon[nweapon]].name); |
| 6551 | 6555 | SendSystemMessagePacket (nuser, work); |
| 6552 | 6556 | } |
| @@ -6598,7 +6602,7 @@ | ||
| 6598 | 6602 | { |
| 6599 | 6603 | /* list up this */ |
| 6600 | 6604 | int relpos = get_rel_position_in (dx1, dx2, dy1, dy2); |
| 6601 | - sprintf (work, MESG ("<%-16.16s %10s %5dBlock>"), | |
| 6605 | + sprintf (work, MESG ("<%-16.24s %10s %5dBlock>"), | |
| 6602 | 6606 | Animal[i].name, MESG (RelDirection[relpos]), n); |
| 6603 | 6607 | SendSystemMessagePacket (nuser, work); |
| 6604 | 6608 | } |
| @@ -6638,7 +6642,7 @@ | ||
| 6638 | 6642 | if (User[i].c_type == Hunter) |
| 6639 | 6643 | { |
| 6640 | 6644 | sprintf (work, |
| 6641 | - MESG ("<Hunter:%-16.16s %10s %5dBlock crime:%lu>"), | |
| 6645 | + MESG ("<Hunter:%-16.24s %10s %5dBlock crime:%lu>"), | |
| 6642 | 6646 | User[i].name, MESG (RelDirection[relpos]), n, |
| 6643 | 6647 | User[i].maybearrest); |
| 6644 | 6648 | } |
| @@ -6645,7 +6649,7 @@ | ||
| 6645 | 6649 | else |
| 6646 | 6650 | { |
| 6647 | 6651 | sprintf (work, |
| 6648 | - MESG ("<Guard :%-16.16s %10s %5dBlock>"), | |
| 6652 | + MESG ("<Guard :%-16.24s %10s %5dBlock>"), | |
| 6649 | 6653 | User[i].name, MESG (RelDirection[relpos]), n); |
| 6650 | 6654 | } |
| 6651 | 6655 | SendSystemMessagePacket (nuser, work); |
| @@ -6679,12 +6683,12 @@ | ||
| 6679 | 6683 | if (Npc[i].c_type == NpcHunter) |
| 6680 | 6684 | { |
| 6681 | 6685 | sprintf (work, |
| 6682 | - MESG ("<Hunter:%-16.16s %10s %5dBlock crime:NA>"), | |
| 6686 | + MESG ("<Hunter:%-16.24s %10s %5dBlock crime:NA>"), | |
| 6683 | 6687 | Npc[i].name, MESG (RelDirection[relpos]), n); |
| 6684 | 6688 | } |
| 6685 | 6689 | else |
| 6686 | 6690 | { |
| 6687 | - sprintf (work, MESG ("<Guard :%-16.16s %10s %5dBlock>"), | |
| 6691 | + sprintf (work, MESG ("<Guard :%-16.24s %10s %5dBlock>"), | |
| 6688 | 6692 | Npc[i].name, MESG (RelDirection[relpos]), n); |
| 6689 | 6693 | } |
| 6690 | 6694 | SendSystemMessagePacket (nuser, work); |
| @@ -6761,10 +6765,10 @@ | ||
| 6761 | 6765 | if (Npc[i].name[0] == '\0') |
| 6762 | 6766 | { |
| 6763 | 6767 | static const char *mesg[4] = { |
| 6764 | - "%-.16s say,OK Boss. I will guard you.", | |
| 6765 | - "%-.16s say,Ready for deployment", | |
| 6766 | - "%-.16s say,It's show time!", | |
| 6767 | - "%-.16s say,Do you wanna use my design?" | |
| 6768 | + "%-.24s say,OK Boss. I will guard you.", | |
| 6769 | + "%-.24s say,Ready for deployment", | |
| 6770 | + "%-.24s say,It's show time!", | |
| 6771 | + "%-.24s say,Do you wanna use my design?" | |
| 6768 | 6772 | }; |
| 6769 | 6773 | static const int ck_x[8] = { 0, 1, 1, 1, 0, -1, -1, -1 }; |
| 6770 | 6774 | static const int ck_y[8] = { -1, -1, 0, 1, 1, 1, 0, -1 }; |
| @@ -6918,13 +6922,13 @@ | ||
| 6918 | 6922 | } |
| 6919 | 6923 | break; |
| 6920 | 6924 | case Vehicle: |
| 6921 | - sprintf (work, MESG ("You ride on %-.32s"), pitem->name); | |
| 6925 | + sprintf (work, MESG ("You ride on %-.24s"), pitem->name); | |
| 6922 | 6926 | rideVehicle (nuser, pitem->effect % 100, pitem->effect / 100, |
| 6923 | 6927 | pitem->pattern); |
| 6924 | 6928 | break; |
| 6925 | 6929 | case Food: |
| 6926 | 6930 | cause_eat (nuser, pitem->effect); |
| 6927 | - sprintf (work, MESG ("You eat %-.32s..."), pitem->name); | |
| 6931 | + sprintf (work, MESG ("You eat %-.24s..."), pitem->name); | |
| 6928 | 6932 | if (pitem->effect > 100) |
| 6929 | 6933 | { |
| 6930 | 6934 | strcat (work, MESG ("Delicious!")); |
| @@ -6987,7 +6991,7 @@ | ||
| 6987 | 6991 | } |
| 6988 | 6992 | User[nuser].item[i] = nitem; |
| 6989 | 6993 | User[nuser].itemcount[i] = Item[User[nuser].item[i]].count; |
| 6990 | - sprintf (work, MESG ("[Get item%1d:%-.32s]"), | |
| 6994 | + sprintf (work, MESG ("[Get item%1d:%-.24s]"), | |
| 6991 | 6995 | i + 1, Item[User[nuser].item[i]].name); |
| 6992 | 6996 | SendSystemMessagePacket (nuser, work); |
| 6993 | 6997 | return i; |
| @@ -7015,7 +7019,7 @@ | ||
| 7015 | 7019 | User[nuser].weapon[i] = nweapon; |
| 7016 | 7020 | User[nuser].bullette[i] = Weapon[User[nuser].weapon[i]].bullette; |
| 7017 | 7021 | User[nuser].reload[i] = 0; |
| 7018 | - sprintf (work, MESG ("[Get weapon%1d:%-.32s]"), | |
| 7022 | + sprintf (work, MESG ("[Get weapon%1d:%-.24s]"), | |
| 7019 | 7023 | i + 1, Weapon[User[nuser].weapon[i]].name); |
| 7020 | 7024 | SendSystemMessagePacket (nuser, work); |
| 7021 | 7025 | return i; |
| @@ -7111,7 +7115,7 @@ | ||
| 7111 | 7115 | { |
| 7112 | 7116 | /* can't get this. drop original position */ |
| 7113 | 7117 | char work[MESG_BUFFER]; |
| 7114 | - sprintf (work, MESG ("[You have no space to get %-.32s!]"), | |
| 7118 | + sprintf (work, MESG ("[You have no space to get %-.24s!]"), | |
| 7115 | 7119 | isitem ? Item[nitem].name : Weapon[nitem].name); |
| 7116 | 7120 | SendSystemMessagePacket (nuser, work); |
| 7117 | 7121 | addUserItemBox (x, y, isitem, nitem, nleft, NULL); |
| @@ -7144,7 +7148,7 @@ | ||
| 7144 | 7148 | } |
| 7145 | 7149 | add_score (nuser, n); |
| 7146 | 7150 | add_crime (nuser, n); |
| 7147 | - sprintf (work, MESG ("[You catch %-.16s:%upoint]"), | |
| 7151 | + sprintf (work, MESG ("[You catch %-.24s:%upoint]"), | |
| 7148 | 7152 | CUTTAIL (Animal[nanimal].name), n); |
| 7149 | 7153 | SendSystemMessagePacket (nuser, work); |
| 7150 | 7154 | DeleteAnimal (nanimal); |
| @@ -7165,7 +7169,7 @@ | ||
| 7165 | 7169 | /* it is animal corpse */ |
| 7166 | 7170 | char work[MESG_BUFFER]; |
| 7167 | 7171 | sprintf (work, |
| 7168 | - MESG ("[You collect %-.16s's corpse:10point]"), | |
| 7172 | + MESG ("[You collect %-.24s's corpse:10point]"), | |
| 7169 | 7173 | CUTTAIL (Animal[nanimal].name)); |
| 7170 | 7174 | SendSystemMessagePacket (nuser, work); |
| 7171 | 7175 | MAP (x, y)->id &= ~MAP_THERE_ANIMAL; |
| @@ -7187,7 +7191,7 @@ | ||
| 7187 | 7191 | { |
| 7188 | 7192 | /* arrest! */ |
| 7189 | 7193 | char work[MESG_BUFFER]; |
| 7190 | - sprintf (work, MESG ("[You arrest %-.16s. Get 500point.]"), | |
| 7194 | + sprintf (work, MESG ("[You arrest %-.24s. Get 500point.]"), | |
| 7191 | 7195 | CUTTAIL (Npc[npc].name)); |
| 7192 | 7196 | SendSystemMessagePacket (nuser, work); |
| 7193 | 7197 | add_score (nuser, 500); |
| @@ -7216,10 +7220,10 @@ | ||
| 7216 | 7220 | break; |
| 7217 | 7221 | } |
| 7218 | 7222 | User[ntarget].crime_level = 0; |
| 7219 | - sprintf (work, MESG ("[You arrest %-.16s. Get %lupoint.]"), | |
| 7223 | + sprintf (work, MESG ("[You arrest %-.24s. Get %lupoint.]"), | |
| 7220 | 7224 | CUTTAIL (User[ntarget].name), npts); |
| 7221 | 7225 | SendSystemMessagePacket (nuser, work); |
| 7222 | - sprintf (work, MESG ("[You were arrested by %-.16s]"), | |
| 7226 | + sprintf (work, MESG ("[You were arrested by %-.24s]"), | |
| 7223 | 7227 | CUTTAIL (User[nuser].name)); |
| 7224 | 7228 | SendSystemMessagePacket (ntarget, work); |
| 7225 | 7229 | SendSystemMessagePacket (ntarget, MESG ("[Go to Jail!]")); |
| @@ -7235,11 +7239,11 @@ | ||
| 7235 | 7239 | } |
| 7236 | 7240 | else |
| 7237 | 7241 | { |
| 7238 | - sprintf (work, MESG ("[You attempt to arrest %-.16s]"), | |
| 7242 | + sprintf (work, MESG ("[You attempt to arrest %-.24s]"), | |
| 7239 | 7243 | CUTTAIL (User[ntarget].name)); |
| 7240 | 7244 | SendSystemMessagePacket (nuser, work); |
| 7241 | 7245 | SendSystemMessagePacket (nuser, MESG ("[But he do not crime]")); |
| 7242 | - sprintf (work, MESG ("[%-.16s attempt to arrest you]"), | |
| 7246 | + sprintf (work, MESG ("[%-.24s attempt to arrest you]"), | |
| 7243 | 7247 | CUTTAIL (User[nuser].name)); |
| 7244 | 7248 | SendSystemMessagePacket (ntarget, work); |
| 7245 | 7249 | SendSystemMessagePacket (ntarget, |
| @@ -7561,7 +7565,7 @@ | ||
| 7561 | 7565 | { |
| 7562 | 7566 | char work[MESG_BUFFER]; |
| 7563 | 7567 | sprintf (work, |
| 7564 | - MESG ("<%d:%-16.16s (%3d,%3d)>"), i + 1, | |
| 7568 | + MESG ("<%d:%-16.24s (%3d,%3d)>"), i + 1, | |
| 7565 | 7569 | User[nuser].myshop[i].name, |
| 7566 | 7570 | User[nuser].myshop[i].pos.x, User[nuser].myshop[i].pos.y); |
| 7567 | 7571 | SendSystemMessagePacket (nuser, work); |
| @@ -7583,7 +7587,7 @@ | ||
| 7583 | 7587 | ANIMALDATA *p = User[nuser].lastPickupAnimal[i]; |
| 7584 | 7588 | if (p != NULL) |
| 7585 | 7589 | { |
| 7586 | - sprintf (work, MESG ("<%d:%-16.16s(%-.32s)>"), i + 1, p->name, | |
| 7590 | + sprintf (work, MESG ("<%d:%-16.24s(%-.24s)>"), i + 1, p->name, | |
| 7587 | 7591 | Item[p->forsell_item].name); |
| 7588 | 7592 | SendSystemMessagePacket (nuser, work); |
| 7589 | 7593 | } |
| @@ -7688,7 +7692,7 @@ | ||
| 7688 | 7692 | { |
| 7689 | 7693 | if (animal[i]) |
| 7690 | 7694 | { |
| 7691 | - sprintf (work, MESG ("<'%-16.16s' lives:%3d rate:%3u value:%5u>"), | |
| 7695 | + sprintf (work, MESG ("<'%-16.24s' lives:%3d rate:%3u value:%5u>"), | |
| 7692 | 7696 | AnimalData[i].name, animal[i], |
| 7693 | 7697 | AnimalData[i].rate, AnimalData[i].value); |
| 7694 | 7698 | SendSystemMessagePacket (nuser, work); |
| @@ -7732,7 +7736,7 @@ | ||
| 7732 | 7736 | { |
| 7733 | 7737 | strcpy (subjectbuffer, "NO SUBJECT"); |
| 7734 | 7738 | } |
| 7735 | - sprintf (work, "<%c%2d:%-16.16s %-.32s>", | |
| 7739 | + sprintf (work, "<%c%2d:%-16.24s %-.24s>", | |
| 7736 | 7740 | pmail->readflag ? ' ' : '*', i + 1, |
| 7737 | 7741 | User[pmail->fromuser].name, subjectbuffer); |
| 7738 | 7742 | SendSystemMessagePacket (nuser, work); |
| @@ -7826,7 +7830,7 @@ | ||
| 7826 | 7830 | { |
| 7827 | 7831 | strcpy (subjectbuffer, "NO SUBJECT"); |
| 7828 | 7832 | } |
| 7829 | - sprintf (work, "<%2d:%-16.16s %-.32s>", | |
| 7833 | + sprintf (work, "<%2d:%-16.24s %-.24s>", | |
| 7830 | 7834 | i + 1, User[pmail->fromuser].name, subjectbuffer); |
| 7831 | 7835 | SendSystemMessagePacket (nuser, work); |
| 7832 | 7836 | f = 1; |
| @@ -8107,11 +8111,11 @@ | ||
| 8107 | 8111 | { |
| 8108 | 8112 | if (pb->t_type == TargetUser) |
| 8109 | 8113 | { |
| 8110 | - sprintf (work, MESG ("You attack animal '%-.16s'"), | |
| 8114 | + sprintf (work, MESG ("You attack animal '%-.24s'"), | |
| 8111 | 8115 | CUTTAIL (Animal[nanimal].name)); |
| 8112 | 8116 | SendSystemMessagePacket (pb->nuser, work); |
| 8113 | 8117 | } |
| 8114 | - sprintf (work, MESG ("[%-.16s shoot animal!]"), | |
| 8118 | + sprintf (work, MESG ("[%-.24s shoot animal!]"), | |
| 8115 | 8119 | CUTTAIL ((pb->t_type == TargetUser) ? |
| 8116 | 8120 | User[pb->nuser].name : |
| 8117 | 8121 | Npc[pb->nuser].name)); |
| @@ -8131,7 +8135,7 @@ | ||
| 8131 | 8135 | if (pb->nuser != -1 && pb->t_type == TargetUser) |
| 8132 | 8136 | { |
| 8133 | 8137 | sprintf (work, |
| 8134 | - MESG ("animal '%-.16s' died."), | |
| 8138 | + MESG ("animal '%-.24s' died."), | |
| 8135 | 8139 | CUTTAIL (Animal[nanimal].name)); |
| 8136 | 8140 | SendSystemMessagePacket (pb->nuser, work); |
| 8137 | 8141 | if (CountLiveAnimal (Animal[nanimal].pdata) == 0) |
| @@ -8139,7 +8143,7 @@ | ||
| 8139 | 8143 | /* this is last animal! */ |
| 8140 | 8144 | sprintf (work, |
| 8141 | 8145 | MESG |
| 8142 | - ("[animal '%-.16s' is extermination!]"), | |
| 8146 | + ("[animal '%-.24s' is extermination!]"), | |
| 8143 | 8147 | CUTTAIL (Animal[nanimal].name)); |
| 8144 | 8148 | SendSystemMessagePacket (pb->nuser, work); |
| 8145 | 8149 | if (User[pb->nuser].c_type == Observer) |
| @@ -8176,7 +8180,7 @@ | ||
| 8176 | 8180 | { |
| 8177 | 8181 | if (pb->nuser != -1 && pb->t_type == TargetUser) |
| 8178 | 8182 | { |
| 8179 | - sprintf (work, MESG ("animal '%-.16s' stun."), | |
| 8183 | + sprintf (work, MESG ("animal '%-.24s' stun."), | |
| 8180 | 8184 | CUTTAIL (Animal[nanimal].name)); |
| 8181 | 8185 | SendSystemMessagePacket (pb->nuser, work); |
| 8182 | 8186 | } |
| @@ -8194,7 +8198,7 @@ | ||
| 8194 | 8198 | { |
| 8195 | 8199 | sprintf (work, |
| 8196 | 8200 | MESG |
| 8197 | - ("You charm animal '%-.16s'!"), | |
| 8201 | + ("You charm animal '%-.24s'!"), | |
| 8198 | 8202 | CUTTAIL (Animal[nanimal].name)); |
| 8199 | 8203 | SendSystemMessagePacket (pb->nuser, work); |
| 8200 | 8204 | Animal[nanimal].owner_user = pb->nuser; |
| @@ -8203,7 +8207,7 @@ | ||
| 8203 | 8207 | { |
| 8204 | 8208 | sprintf (work, |
| 8205 | 8209 | MESG |
| 8206 | - ("Animal '%-.16s' is free now!"), | |
| 8210 | + ("Animal '%-.24s' is free now!"), | |
| 8207 | 8211 | CUTTAIL (Animal[nanimal].name)); |
| 8208 | 8212 | SendMessageNearUserPosition (pb->pos, work); |
| 8209 | 8213 | Animal[nanimal].owner_user = -1; |
| @@ -8214,7 +8218,7 @@ | ||
| 8214 | 8218 | /* fail */ |
| 8215 | 8219 | sprintf (work, |
| 8216 | 8220 | MESG |
| 8217 | - ("You fail to charm animal '%-.16s'."), | |
| 8221 | + ("You fail to charm animal '%-.24s'."), | |
| 8218 | 8222 | CUTTAIL (Animal[nanimal].name)); |
| 8219 | 8223 | SendSystemMessagePacket (pb->nuser, work); |
| 8220 | 8224 | } |
| @@ -8264,7 +8268,7 @@ | ||
| 8264 | 8268 | char work[MESG_BUFFER]; |
| 8265 | 8269 | if (pb->nuser != -1 && pb->t_type == TargetUser) |
| 8266 | 8270 | { |
| 8267 | - sprintf (work, MESG ("You attack '%-.16s'"), | |
| 8271 | + sprintf (work, MESG ("You attack '%-.24s'"), | |
| 8268 | 8272 | CUTTAIL (Npc[npc].name)); |
| 8269 | 8273 | SendSystemMessagePacket (pb->nuser, work); |
| 8270 | 8274 | } |
| @@ -8273,7 +8277,7 @@ | ||
| 8273 | 8277 | { |
| 8274 | 8278 | if (pb->nuser != -1 && pb->t_type == TargetUser) |
| 8275 | 8279 | { |
| 8276 | - sprintf (work, MESG ("'%-.16s' died."), | |
| 8280 | + sprintf (work, MESG ("'%-.24s' died."), | |
| 8277 | 8281 | CUTTAIL (Npc[npc].name)); |
| 8278 | 8282 | SendSystemMessagePacket (pb->nuser, work); |
| 8279 | 8283 | if (User[pb->nuser].c_type == Hunter && |
| @@ -8291,13 +8295,13 @@ | ||
| 8291 | 8295 | if (pb->nuser != -1 && pb->t_type == TargetNpc) |
| 8292 | 8296 | { |
| 8293 | 8297 | sprintf (work, |
| 8294 | - MESG ("'%-.16s' killed by %-.16s!"), | |
| 8298 | + MESG ("'%-.24s' killed by %-.24s!"), | |
| 8295 | 8299 | CUTTAIL (Npc[npc].name), |
| 8296 | 8300 | CUTTAIL (Npc[pb->nuser].name)); |
| 8297 | 8301 | } |
| 8298 | 8302 | else |
| 8299 | 8303 | { |
| 8300 | - sprintf (work, MESG ("'%-.16s' killed by any!"), | |
| 8304 | + sprintf (work, MESG ("'%-.24s' killed by any!"), | |
| 8301 | 8305 | CUTTAIL (Npc[npc].name)); |
| 8302 | 8306 | } |
| 8303 | 8307 | SendMessageNearUserPosition (Npc[npc].pos, work); |
| @@ -8315,11 +8319,11 @@ | ||
| 8315 | 8319 | if (!(pb->t_type == TargetNpc && pb->nuser == npc)) |
| 8316 | 8320 | { |
| 8317 | 8321 | static const char *mesg[5] = { |
| 8318 | - "%-.16s say,Hey! Why do you attack me?", | |
| 8319 | - "%-.16s say,No! Don't shoot me!", | |
| 8320 | - "%-.16s say,What's think?!", | |
| 8321 | - "%-.16s say,Ohch! We are under fire!", | |
| 8322 | - "%-.16s say,Ok. I will kill you." | |
| 8322 | + "%-.24s say,Hey! Why do you attack me?", | |
| 8323 | + "%-.24s say,No! Don't shoot me!", | |
| 8324 | + "%-.24s say,What's think?!", | |
| 8325 | + "%-.24s say,Ohch! We are under fire!", | |
| 8326 | + "%-.24s say,Ok. I will kill you." | |
| 8323 | 8327 | }; |
| 8324 | 8328 | NPCsay (npc, mesg, 5); |
| 8325 | 8329 | Npc[npc].ntarget_user = pb->nuser; |
| @@ -8346,11 +8350,11 @@ | ||
| 8346 | 8350 | if (willcounter) |
| 8347 | 8351 | { |
| 8348 | 8352 | static const char *mesg[5] = { |
| 8349 | - "%-.16s say,Detect one boggy!", | |
| 8350 | - "%-.16s say,We are under attack!", | |
| 8351 | - "%-.16s say,Engage!", | |
| 8352 | - "%-.16s say,Caution! Enemy fire!", | |
| 8353 | - "%-.16s say,Emergency! Enemy attack us!" | |
| 8353 | + "%-.24s say,Detect one boggy!", | |
| 8354 | + "%-.24s say,We are under attack!", | |
| 8355 | + "%-.24s say,Engage!", | |
| 8356 | + "%-.24s say,Caution! Enemy fire!", | |
| 8357 | + "%-.24s say,Emergency! Enemy attack us!" | |
| 8354 | 8358 | }; |
| 8355 | 8359 | NPCsay (npc, mesg, 5); |
| 8356 | 8360 | Npc[npc].ntarget_user = pb->nuser; |
| @@ -8359,11 +8363,11 @@ | ||
| 8359 | 8363 | else |
| 8360 | 8364 | { |
| 8361 | 8365 | static const char *mesg[5] = { |
| 8362 | - "%-.16s say,Hey! No shoot me!", | |
| 8363 | - "%-.16s say,I'm friendly!", | |
| 8364 | - "%-.16s say,This is friendly! Don't shoot!", | |
| 8365 | - "%-.16s say,Don't shoot! Are you enemy's spy?", | |
| 8366 | - "%-.16s say,Take more care!" | |
| 8366 | + "%-.24s say,Hey! No shoot me!", | |
| 8367 | + "%-.24s say,I'm friendly!", | |
| 8368 | + "%-.24s say,This is friendly! Don't shoot!", | |
| 8369 | + "%-.24s say,Don't shoot! Are you enemy's spy?", | |
| 8370 | + "%-.24s say,Take more care!" | |
| 8367 | 8371 | }; |
| 8368 | 8372 | NPCsay (npc, mesg, 5); |
| 8369 | 8373 | } |
| @@ -8505,7 +8509,7 @@ | ||
| 8505 | 8509 | int nuser = User[i].lastuser; |
| 8506 | 8510 | if (User[i].lastuser_type == TargetUser) |
| 8507 | 8511 | { |
| 8508 | - sprintf (work, MESG ("[You kill %-.16s]"), | |
| 8512 | + sprintf (work, MESG ("[You kill %-.24s]"), | |
| 8509 | 8513 | CUTTAIL (User[i].name)); |
| 8510 | 8514 | SendSystemMessagePacket (nuser, work); |
| 8511 | 8515 | } |
| @@ -8527,7 +8531,7 @@ | ||
| 8527 | 8531 | if (pname != NULL) |
| 8528 | 8532 | { |
| 8529 | 8533 | sprintf (work, |
| 8530 | - MESG ("[You were killed by %-.16s]"), | |
| 8534 | + MESG ("[You were killed by %-.24s]"), | |
| 8531 | 8535 | CUTTAIL (pname)); |
| 8532 | 8536 | SendSystemMessagePacket (i, work); |
| 8533 | 8537 | } |
| @@ -8676,7 +8680,7 @@ | ||
| 8676 | 8680 | User[i].hold_count = HoldCount; |
| 8677 | 8681 | SendSystemMessagePacket (i, MESG ("[You fall in hole!]")); |
| 8678 | 8682 | SendEffectFallInHolePacket (i); |
| 8679 | - sprintf (work, MESG ("[You hear sound %-.16s fall in hole]"), | |
| 8683 | + sprintf (work, MESG ("[You hear sound %-.24s fall in hole]"), | |
| 8680 | 8684 | CUTTAIL (User[i].name)); |
| 8681 | 8685 | SendMessageNearUser (i, work); |
| 8682 | 8686 | } |
| @@ -8689,7 +8693,7 @@ | ||
| 8689 | 8693 | #ifdef MAKEWIN32 |
| 8690 | 8694 | convertH2C (work, USERNAME_LEN); |
| 8691 | 8695 | #endif |
| 8692 | - printf ("user(%d)[%-16.16s] no response\n", i, work); | |
| 8696 | + printf ("user(%d)[%-16.24s] no response\n", i, work); | |
| 8693 | 8697 | DisconnectUser (i); |
| 8694 | 8698 | } |
| 8695 | 8699 | } |
| @@ -8886,7 +8890,7 @@ | ||
| 8886 | 8890 | { |
| 8887 | 8891 | /* eat meat */ |
| 8888 | 8892 | char work[MESG_BUFFER]; |
| 8889 | - sprintf (work, MESG ("animal '%-.16s' eat %-.16s"), | |
| 8893 | + sprintf (work, MESG ("animal '%-.24s' eat %-.24s"), | |
| 8890 | 8894 | CUTTAIL (Animal[nanimal].name), |
| 8891 | 8895 | CUTTAIL (Animal[targetanimal].name)); |
| 8892 | 8896 | SendMessageNearUserPosition (Animal[nanimal].pos, work); |
| @@ -8957,11 +8961,11 @@ | ||
| 8957 | 8961 | if (Npc[npc].hp) |
| 8958 | 8962 | { |
| 8959 | 8963 | static const char *mesg[5] = { |
| 8960 | - "%-.16s say,Nooo!", | |
| 8961 | - "%-.16s say,Animal bite me!", | |
| 8962 | - "%-.16s say,Danger! This animal is ferocity!", | |
| 8963 | - "%-.16s say,Help! Animal bite ...Arrrrgh!", | |
| 8964 | - "%-.16s say,Why is this animal angry?" | |
| 8964 | + "%-.24s say,Nooo!", | |
| 8965 | + "%-.24s say,Animal bite me!", | |
| 8966 | + "%-.24s say,Danger! This animal is ferocity!", | |
| 8967 | + "%-.24s say,Help! Animal bite ...Arrrrgh!", | |
| 8968 | + "%-.24s say,Why is this animal angry?" | |
| 8965 | 8969 | }; |
| 8966 | 8970 | NPCsay (npc, mesg, 5); |
| 8967 | 8971 | } |
| @@ -8968,7 +8972,7 @@ | ||
| 8968 | 8972 | if (Npc[npc].hp == 0) |
| 8969 | 8973 | { |
| 8970 | 8974 | char work[MESG_BUFFER]; |
| 8971 | - sprintf (work, MESG ("'%-.16s' died."), CUTTAIL (Npc[npc].name)); | |
| 8975 | + sprintf (work, MESG ("'%-.24s' died."), CUTTAIL (Npc[npc].name)); | |
| 8972 | 8976 | SendMessageNearUserPosition (Npc[npc].pos, work); |
| 8973 | 8977 | Npc[npc].name[0] = '\0'; |
| 8974 | 8978 | MAP (Npc[npc].pos.x, Npc[npc].pos.y)->id &= ~MAP_THERE_NPC; |
| @@ -9494,7 +9498,7 @@ | ||
| 9494 | 9498 | Animal[i].hold_count = HoldCount; |
| 9495 | 9499 | sprintf (work, |
| 9496 | 9500 | MESG |
| 9497 | - ("[You hear sound '%-.16s' fall in hole]"), | |
| 9501 | + ("[You hear sound '%-.24s' fall in hole]"), | |
| 9498 | 9502 | CUTTAIL (Animal[i].name)); |
| 9499 | 9503 | SendMessageNearUserAnimal (i, work); |
| 9500 | 9504 | } |
| @@ -9887,11 +9891,11 @@ | ||
| 9887 | 9891 | if (ret == 0) |
| 9888 | 9892 | { |
| 9889 | 9893 | static const char *mesg[5] = { |
| 9890 | - "%-.16s say,FREEZE!", | |
| 9891 | - "%-.16s say,FIRE!", | |
| 9892 | - "%-.16s say,Hey! I know your position!", | |
| 9893 | - "%-.16s say,You can't escape from me!", | |
| 9894 | - "%-.16s say,Contact!" | |
| 9894 | + "%-.24s say,FREEZE!", | |
| 9895 | + "%-.24s say,FIRE!", | |
| 9896 | + "%-.24s say,Hey! I know your position!", | |
| 9897 | + "%-.24s say,You can't escape from me!", | |
| 9898 | + "%-.24s say,Contact!" | |
| 9895 | 9899 | }; |
| 9896 | 9900 | NPCsay (npc, mesg, 5); |
| 9897 | 9901 | } |
| @@ -9904,11 +9908,11 @@ | ||
| 9904 | 9908 | if (User[ntarget_user].maybearrest) |
| 9905 | 9909 | { |
| 9906 | 9910 | static const char *mesg[5] = { |
| 9907 | - "%-.16s say,Do not move!", | |
| 9908 | - "%-.16s say,You are criminal!", | |
| 9909 | - "%-.16s say,Hold up!", | |
| 9910 | - "%-.16s say,Do not escape! If you do so,I will shoot you!", | |
| 9911 | - "%-.16s say,You should surrender!" | |
| 9911 | + "%-.24s say,Do not move!", | |
| 9912 | + "%-.24s say,You are criminal!", | |
| 9913 | + "%-.24s say,Hold up!", | |
| 9914 | + "%-.24s say,Do not escape! If you do so,I will shoot you!", | |
| 9915 | + "%-.24s say,You should surrender!" | |
| 9912 | 9916 | }; |
| 9913 | 9917 | NPCsay (npc, mesg, 5); |
| 9914 | 9918 | } |
| @@ -9916,11 +9920,11 @@ | ||
| 9916 | 9920 | User[ntarget_user].crime_level) |
| 9917 | 9921 | { |
| 9918 | 9922 | static const char *mesg2[5] = { |
| 9919 | - "%-.16s say,Go out!", | |
| 9920 | - "%-.16s say,You can't escape!", | |
| 9921 | - "%-.16s say,You no have choise!", | |
| 9922 | - "%-.16s say,Do anyone call SWAT? We need!", | |
| 9923 | - "%-.16s say,We have surrounded you!" | |
| 9923 | + "%-.24s say,Go out!", | |
| 9924 | + "%-.24s say,You can't escape!", | |
| 9925 | + "%-.24s say,You no have choise!", | |
| 9926 | + "%-.24s say,Do anyone call SWAT? We need!", | |
| 9927 | + "%-.24s say,We have surrounded you!" | |
| 9924 | 9928 | }; |
| 9925 | 9929 | NPCsay (npc, mesg2, 5); |
| 9926 | 9930 | } |
| @@ -9987,7 +9991,7 @@ | ||
| 9987 | 9991 | char work[MESG_BUFFER]; |
| 9988 | 9992 | MAP (x, y)->id &= ~MAP_THERE_HOLE; |
| 9989 | 9993 | Npc[n].hold_count = HoldCount; |
| 9990 | - sprintf (work, MESG ("[You hear sound %-.16s fall in hole!]"), | |
| 9994 | + sprintf (work, MESG ("[You hear sound %-.24s fall in hole!]"), | |
| 9991 | 9995 | Npc[n].name); |
| 9992 | 9996 | SendMessageNearUserPosition (Npc[n].pos, work); |
| 9993 | 9997 | } |
| @@ -10010,9 +10014,9 @@ | ||
| 10010 | 10014 | if (getrand (1, 100) < HUNTER_SPEAK_RATE) |
| 10011 | 10015 | { |
| 10012 | 10016 | static const char *mesg[3] = { |
| 10013 | - "%-.16s say,Oh! I am innoucence!", | |
| 10014 | - "%-.16s say,Leave alone!", | |
| 10015 | - "%-.16s say,HELP ME! HELP! HELP!" | |
| 10017 | + "%-.24s say,Oh! I am innoucence!", | |
| 10018 | + "%-.24s say,Leave alone!", | |
| 10019 | + "%-.24s say,HELP ME! HELP! HELP!" | |
| 10016 | 10020 | }; |
| 10017 | 10021 | NPCsay (n, mesg, 3); |
| 10018 | 10022 | } |
| @@ -10065,11 +10069,11 @@ | ||
| 10065 | 10069 | if (getrand (1, 100) < HUNTER_SPEAK_RATE) |
| 10066 | 10070 | { |
| 10067 | 10071 | static const char *mesg[5] = { |
| 10068 | - "%-.16s say,Anyone see animal?", | |
| 10069 | - "%-.16s say,Oh sorry.", | |
| 10070 | - "%-.16s say,Nice meet you!", | |
| 10071 | - "%-.16s say,Hello. Is there anyone?", | |
| 10072 | - "%-.16s say,I want any food. Anyone have?" | |
| 10072 | + "%-.24s say,Anyone see animal?", | |
| 10073 | + "%-.24s say,Oh sorry.", | |
| 10074 | + "%-.24s say,Nice meet you!", | |
| 10075 | + "%-.24s say,Hello. Is there anyone?", | |
| 10076 | + "%-.24s say,I want any food. Anyone have?" | |
| 10073 | 10077 | }; |
| 10074 | 10078 | NPCsay (n, mesg, 5); |
| 10075 | 10079 | } |
| @@ -10099,7 +10103,7 @@ | ||
| 10099 | 10103 | { |
| 10100 | 10104 | /* get */ |
| 10101 | 10105 | char work[MESG_BUFFER]; |
| 10102 | - sprintf (work, MESG ("%-.16s say,Get!"), | |
| 10106 | + sprintf (work, MESG ("%-.24s say,Get!"), | |
| 10103 | 10107 | CUTTAIL (Npc[n].name)); |
| 10104 | 10108 | SendMessageNearUserPosition (Npc[n].pos, work); |
| 10105 | 10109 | MAP (Animal[ntarget].pos.x, Animal[ntarget].pos.y)->id &= |
| @@ -10115,14 +10119,14 @@ | ||
| 10115 | 10119 | if (getrand (1, 100) < HUNTER_SPEAK_RATE) |
| 10116 | 10120 | { |
| 10117 | 10121 | static const char *mesg_a[3] = { |
| 10118 | - "%-.16s say,Fire! Fire!", | |
| 10119 | - "%-.16s say,Oh! This animal is strong!", | |
| 10120 | - "%-.16s say,Hey! Cover me!" | |
| 10122 | + "%-.24s say,Fire! Fire!", | |
| 10123 | + "%-.24s say,Oh! This animal is strong!", | |
| 10124 | + "%-.24s say,Hey! Cover me!" | |
| 10121 | 10125 | }; |
| 10122 | 10126 | static const char *mesg_n[3] = { |
| 10123 | - "%-.16s say,Fire! Fire! Fire!", | |
| 10124 | - "%-.16s say,We are under attack!", | |
| 10125 | - "%-.16s say,Anyone! Help me!" | |
| 10127 | + "%-.24s say,Fire! Fire! Fire!", | |
| 10128 | + "%-.24s say,We are under attack!", | |
| 10129 | + "%-.24s say,Anyone! Help me!" | |
| 10126 | 10130 | }; |
| 10127 | 10131 | NPCsay (n, |
| 10128 | 10132 | (t_type == TargetAnimal) ? mesg_a : mesg_n, |
| @@ -10145,14 +10149,14 @@ | ||
| 10145 | 10149 | { |
| 10146 | 10150 | /* out of range */ |
| 10147 | 10151 | static const char *mesg_a[3] = { |
| 10148 | - "%-.16s say,OH NO! I miss animal!", | |
| 10149 | - "%-.16s say,Hey! Don't you get my animal?", | |
| 10150 | - "%-.16s say,I think animal enter hyper-space." | |
| 10152 | + "%-.24s say,OH NO! I miss animal!", | |
| 10153 | + "%-.24s say,Hey! Don't you get my animal?", | |
| 10154 | + "%-.24s say,I think animal enter hyper-space." | |
| 10151 | 10155 | }; |
| 10152 | 10156 | static const char *mesg_n[3] = { |
| 10153 | - "%-.16s say,hehe! bye bye!", | |
| 10154 | - "%-.16s say,Enemy escape from me.", | |
| 10155 | - "%-.16s say,Where?" | |
| 10157 | + "%-.24s say,hehe! bye bye!", | |
| 10158 | + "%-.24s say,Enemy escape from me.", | |
| 10159 | + "%-.24s say,Where?" | |
| 10156 | 10160 | }; |
| 10157 | 10161 | NPCsay (n, (t_type == TargetAnimal) ? mesg_a : mesg_n, 3); |
| 10158 | 10162 | Npc[n].ntarget_user = -1; |
| @@ -10222,11 +10226,11 @@ | ||
| 10222 | 10226 | if (getrand (1, 100) < OBSERVER_SPEAK_RATE) |
| 10223 | 10227 | { |
| 10224 | 10228 | static const char *mesg[5] = { |
| 10225 | - "%-.16s say,*anyone see bad hunter?*", | |
| 10226 | - "%-.16s say,*uhmm. where is he?*", | |
| 10227 | - "%-.16s say,*are you bad hunter?*", | |
| 10228 | - "%-.16s say,*I want to rest here...*", | |
| 10229 | - "%-.16s say,*Zzzzz*" | |
| 10229 | + "%-.24s say,*anyone see bad hunter?*", | |
| 10230 | + "%-.24s say,*uhmm. where is he?*", | |
| 10231 | + "%-.24s say,*are you bad hunter?*", | |
| 10232 | + "%-.24s say,*I want to rest here...*", | |
| 10233 | + "%-.24s say,*Zzzzz*" | |
| 10230 | 10234 | }; |
| 10231 | 10235 | NPCsay (n, mesg, 5); |
| 10232 | 10236 | } |
| @@ -10288,9 +10292,9 @@ | ||
| 10288 | 10292 | if (ndistance == 1) |
| 10289 | 10293 | { |
| 10290 | 10294 | static const char *g_mesg[3] = { |
| 10291 | - "%-.16s say,Hey! You do crime!", | |
| 10292 | - "%-.16s say,Arrest you!", | |
| 10293 | - "%-.16s say,Hold up!" | |
| 10295 | + "%-.24s say,Hey! You do crime!", | |
| 10296 | + "%-.24s say,Arrest you!", | |
| 10297 | + "%-.24s say,Hold up!" | |
| 10294 | 10298 | }; |
| 10295 | 10299 | if (t_type == TargetUser) |
| 10296 | 10300 | { |
| @@ -10300,7 +10304,7 @@ | ||
| 10300 | 10304 | /* arrest */ |
| 10301 | 10305 | char work[MESG_BUFFER]; |
| 10302 | 10306 | NPCsay (n, g_mesg, 3); |
| 10303 | - sprintf (work, MESG ("[You were arrested by %-.16s!]"), | |
| 10307 | + sprintf (work, MESG ("[You were arrested by %-.24s!]"), | |
| 10304 | 10308 | CUTTAIL (Npc[n].name)); |
| 10305 | 10309 | SendSystemMessagePacket (ntarget, work); |
| 10306 | 10310 | ClearUser (ntarget); |
| @@ -10337,9 +10341,9 @@ | ||
| 10337 | 10341 | { |
| 10338 | 10342 | /* arrest NPC */ |
| 10339 | 10343 | static const char *h_mesg[3] = { |
| 10340 | - "%-.16s say,Oh NO! PLEASE HELP ME!", | |
| 10341 | - "%-.16s say,ARGGGH!", | |
| 10342 | - "%-.16s say,Yeah I understand your claim. But..." | |
| 10344 | + "%-.24s say,Oh NO! PLEASE HELP ME!", | |
| 10345 | + "%-.24s say,ARGGGH!", | |
| 10346 | + "%-.24s say,Yeah I understand your claim. But..." | |
| 10343 | 10347 | }; |
| 10344 | 10348 | NPCsay (n, g_mesg, 3); |
| 10345 | 10349 | NPCsay (ntarget, h_mesg, 3); |
| @@ -10367,9 +10371,9 @@ | ||
| 10367 | 10371 | NPCfire (n, ndir) == 0) |
| 10368 | 10372 | { |
| 10369 | 10373 | static const char *mesg[3] = { |
| 10370 | - "%-.16s say,Hey! Stop!", | |
| 10371 | - "%-.16s say,You are BAD HUNTER!", | |
| 10372 | - "%-.16s say,Shoot!" | |
| 10374 | + "%-.24s say,Hey! Stop!", | |
| 10375 | + "%-.24s say,You are BAD HUNTER!", | |
| 10376 | + "%-.24s say,Shoot!" | |
| 10373 | 10377 | }; |
| 10374 | 10378 | NPCsay (n, mesg, 3); |
| 10375 | 10379 | return; |
| @@ -10380,9 +10384,9 @@ | ||
| 10380 | 10384 | { |
| 10381 | 10385 | /* out of range */ |
| 10382 | 10386 | static const char *mesg[3] = { |
| 10383 | - "%-.16s say,Shit!", | |
| 10384 | - "%-.16s say,I miss bad hunter.", | |
| 10385 | - "%-.16s say,Oh no! My radar device is malfunction!" | |
| 10387 | + "%-.24s say,Shit!", | |
| 10388 | + "%-.24s say,I miss bad hunter.", | |
| 10389 | + "%-.24s say,Oh no! My radar device is malfunction!" | |
| 10386 | 10390 | }; |
| 10387 | 10391 | NPCsay (n, mesg, 3); |
| 10388 | 10392 | Npc[n].ntarget_user = -1; |
| @@ -10467,11 +10471,11 @@ | ||
| 10467 | 10471 | if (getrand (1, 100) < HIRENPC_SPEAK_RATE) |
| 10468 | 10472 | { |
| 10469 | 10473 | static const char *mesg[5] = { |
| 10470 | - "%-.16s say,sorry.", | |
| 10471 | - "%-.16s say,I cover your back.", | |
| 10472 | - "%-.16s say,Anyone see enemy?", | |
| 10473 | - "%-.16s say,no boggy.", | |
| 10474 | - "%-.16s say,I no see enemy." | |
| 10474 | + "%-.24s say,sorry.", | |
| 10475 | + "%-.24s say,I cover your back.", | |
| 10476 | + "%-.24s say,Anyone see enemy?", | |
| 10477 | + "%-.24s say,no boggy.", | |
| 10478 | + "%-.24s say,I no see enemy." | |
| 10475 | 10479 | }; |
| 10476 | 10480 | NPCsay (n, mesg, 5); |
| 10477 | 10481 | } |
| @@ -10484,11 +10488,11 @@ | ||
| 10484 | 10488 | if (getrand (1, 100) < HIRENPC_SPEAK_RATE) |
| 10485 | 10489 | { |
| 10486 | 10490 | static const char *mesg[5] = { |
| 10487 | - "%-.16s say,on the way.", | |
| 10488 | - "%-.16s say,search trap now...", | |
| 10489 | - "%-.16s say,Don't go away from me!", | |
| 10490 | - "%-.16s say,no enemy in sight.", | |
| 10491 | - "%-.16s say,I no see any on my radar." | |
| 10491 | + "%-.24s say,on the way.", | |
| 10492 | + "%-.24s say,search trap now...", | |
| 10493 | + "%-.24s say,Don't go away from me!", | |
| 10494 | + "%-.24s say,no enemy in sight.", | |
| 10495 | + "%-.24s say,I no see any on my radar." | |
| 10492 | 10496 | }; |
| 10493 | 10497 | NPCsay (n, mesg, 5); |
| 10494 | 10498 | } |
| @@ -10513,9 +10517,9 @@ | ||
| 10513 | 10517 | { |
| 10514 | 10518 | /* boggy! */ |
| 10515 | 10519 | static const char *mesg[3] = { |
| 10516 | - "%-.16s say,Engage enemy!", | |
| 10517 | - "%-.16s say,Hey! Do not enter!", | |
| 10518 | - "%-.16s say,Formation alpha! move to attack position!" | |
| 10520 | + "%-.24s say,Engage enemy!", | |
| 10521 | + "%-.24s say,Hey! Do not enter!", | |
| 10522 | + "%-.24s say,Formation alpha! move to attack position!" | |
| 10519 | 10523 | }; |
| 10520 | 10524 | NPCsay (n, mesg, 3); |
| 10521 | 10525 | Npc[n].ntarget_user = ntarget; |
| @@ -10529,9 +10533,9 @@ | ||
| 10529 | 10533 | { |
| 10530 | 10534 | /* owner is under attack! */ |
| 10531 | 10535 | static const char *mesg[3] = { |
| 10532 | - "%-.16s say,Alert! HQ is under attack!", | |
| 10533 | - "%-.16s say,Condition RED! All guard HQ!", | |
| 10534 | - "%-.16s say,Formation sigma! move to support position!" | |
| 10536 | + "%-.24s say,Alert! HQ is under attack!", | |
| 10537 | + "%-.24s say,Condition RED! All guard HQ!", | |
| 10538 | + "%-.24s say,Formation sigma! move to support position!" | |
| 10535 | 10539 | }; |
| 10536 | 10540 | NPCsay (n, mesg, 3); |
| 10537 | 10541 | Npc[n].ntarget_user = User[nuser].lastuser; |
| @@ -10543,9 +10547,9 @@ | ||
| 10543 | 10547 | { |
| 10544 | 10548 | /* animal aproach */ |
| 10545 | 10549 | static const char *mesg[3] = { |
| 10546 | - "%-.16s say,I find dangerous animal!", | |
| 10547 | - "%-.16s say,Animal aproach!", | |
| 10548 | - "%-.16s say,Formation delta! move to attack position!" | |
| 10550 | + "%-.24s say,I find dangerous animal!", | |
| 10551 | + "%-.24s say,Animal aproach!", | |
| 10552 | + "%-.24s say,Formation delta! move to attack position!" | |
| 10549 | 10553 | }; |
| 10550 | 10554 | NPCsay (n, mesg, 3); |
| 10551 | 10555 | Npc[n].ntarget_user = ntarget; |
| @@ -10606,9 +10610,9 @@ | ||
| 10606 | 10610 | if (ndistance == 1 && Npc[n].weapon) |
| 10607 | 10611 | { |
| 10608 | 10612 | static const char *mesg[3] = { |
| 10609 | - "%-.16s say,I wanna need your support!", | |
| 10610 | - "%-.16s say,Shit! This enemy is too near!", | |
| 10611 | - "%-.16s say,HAHAHA!" | |
| 10613 | + "%-.24s say,I wanna need your support!", | |
| 10614 | + "%-.24s say,Shit! This enemy is too near!", | |
| 10615 | + "%-.24s say,HAHAHA!" | |
| 10612 | 10616 | }; |
| 10613 | 10617 | NPCsay (n, mesg, 3); |
| 10614 | 10618 | } |
| @@ -10617,9 +10621,9 @@ | ||
| 10617 | 10621 | if (ndistance < VIEW_LIMIT && Npc[n].reload == 0) |
| 10618 | 10622 | { |
| 10619 | 10623 | static const char *mesg[3] = { |
| 10620 | - "%-.16s say,I attack this enemy.", | |
| 10621 | - "%-.16s say,We are under fire!", | |
| 10622 | - "%-.16s say,Cover me!" | |
| 10624 | + "%-.24s say,I attack this enemy.", | |
| 10625 | + "%-.24s say,We are under fire!", | |
| 10626 | + "%-.24s say,Cover me!" | |
| 10623 | 10627 | }; |
| 10624 | 10628 | NPCsay (n, mesg, 3); |
| 10625 | 10629 | } |
| @@ -10628,9 +10632,9 @@ | ||
| 10628 | 10632 | { |
| 10629 | 10633 | /* out of range */ |
| 10630 | 10634 | static const char *mesg[3] = { |
| 10631 | - "%-.16s say,I lost target-lock.", | |
| 10632 | - "%-.16s say,no see anyone.", | |
| 10633 | - "%-.16s say,ok. clear." | |
| 10635 | + "%-.24s say,I lost target-lock.", | |
| 10636 | + "%-.24s say,no see anyone.", | |
| 10637 | + "%-.24s say,ok. clear." | |
| 10634 | 10638 | }; |
| 10635 | 10639 | NPCsay (n, mesg, 3); |
| 10636 | 10640 | Npc[n].ntarget_user = -1; |
| @@ -8,10 +8,10 @@ | ||
| 8 | 8 | |
| 9 | 9 | #define DEFAULT_PORT 10001 |
| 10 | 10 | |
| 11 | -#define USERNAME_LEN 16 | |
| 11 | +#define USERNAME_LEN 24 | |
| 12 | 12 | #define PASSWORD_LEN 16 |
| 13 | 13 | #define SCORE_LIMIT 999999999L |
| 14 | -#define ANIMALNAME_LEN 16 | |
| 14 | +#define ANIMALNAME_LEN USERNAME_LEN | |
| 15 | 15 | #define WEAPON_MAX 2 |
| 16 | 16 | #define WEAPONNAME_LEN 32 |
| 17 | 17 | #define ITEM_MAX 4 |