• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

密猟オンラインサーバープログラム


Commit MetaInfo

Revision17 (tree)
Time2016-12-27 00:36:50
Authormanjihq

Log Message

システムメッセージの書式を変更
(クライアント側で表示幅などを制御予定)

Change Summary

Incremental Difference

--- trunk/huntserv.c (revision 16)
+++ trunk/huntserv.c (revision 17)
@@ -741,6 +741,74 @@
741741 return 0;
742742 }
743743
744+/* adjsut string length */
745+/* (outbuffer no null-terminate) */
746+static void
747+adjust_string (char *poutbuffer, const char *pinbuffer, int nlimit,
748+ char fillchar)
749+{
750+ int i;
751+ for (i = 0; i < nlimit && *pinbuffer != '\0'; i++)
752+ {
753+ unsigned char c = (unsigned char) *pinbuffer++;
754+ if (c >= 0xc2 && c <= 0xfd)
755+ {
756+ int ncount = 1;
757+ unsigned char c2;
758+ i++;
759+ if (i == nlimit)
760+ {
761+ *poutbuffer++ = fillchar;
762+ break;
763+ }
764+ else
765+ {
766+ *poutbuffer++ = (char) c;
767+ }
768+ for (; (c2 = (unsigned char) *pinbuffer++) != '\0'; ncount++, i++)
769+ {
770+ if (c2 >= 0x80 && c2 <= 0xbf)
771+ {
772+ if (i == nlimit)
773+ {
774+ /* over size */
775+ for (; ncount > 0; ncount--)
776+ {
777+ /* clear last sequence */
778+ *poutbuffer-- = fillchar;
779+ }
780+ break;
781+ }
782+ else
783+ {
784+ *poutbuffer++ = (char) c2;
785+ }
786+ }
787+ else
788+ {
789+ /* found next character sequence */
790+ i--;
791+ pinbuffer--;
792+ break;
793+ }
794+ }
795+ if (c2 == '\0')
796+ {
797+ /* null terminate */
798+ break;
799+ }
800+ }
801+ else
802+ {
803+ *poutbuffer++ = (char) c;
804+ }
805+ }
806+ for (; i < nlimit; i++)
807+ {
808+ *poutbuffer++ = fillchar;
809+ }
810+}
811+
744812 /* cut tail space (this use fixed single buffer!) */
745813 static const char *
746814 cut_tail (const char *p, int n)
@@ -1483,7 +1551,7 @@
14831551 {
14841552 char namebuf[BUFFER_SIZE];
14851553 memcpy (namebuf, User[i].myshop[j].name, USERNAME_LEN + 1);
1486- fprintf (optr, "%d,%d,%d,%-.24s\n",
1554+ fprintf (optr, "%d,%d,%d,%s\n",
14871555 User[i].myshop[j].build,
14881556 User[i].myshop[j].pos.x, User[i].myshop[j].pos.y,
14891557 CUTTAIL (namebuf));
@@ -1495,7 +1563,7 @@
14951563 memcpy (namebuf,
14961564 Weapon[User[i].myshop[j].list[0][k]].name,
14971565 WEAPONNAME_LEN + 1);
1498- fprintf (optr, "%-.24s,%u,%u,%lu\n",
1566+ fprintf (optr, "%s,%u,%u,%lu\n",
14991567 CUTTAIL (namebuf),
15001568 User[i].myshop[j].leftuse[0][k],
15011569 User[i].myshop[j].count[0][k],
@@ -1506,7 +1574,7 @@
15061574 memcpy (namebuf,
15071575 Item[User[i].myshop[j].list[1][k]].name,
15081576 ITEMNAME_LEN + 1);
1509- fprintf (optr, "%-.24s,%u,%u,%lu\n",
1577+ fprintf (optr, "%s,%u,%u,%lu\n",
15101578 CUTTAIL (namebuf),
15111579 User[i].myshop[j].leftuse[1][k],
15121580 User[i].myshop[j].count[1][k],
@@ -1972,7 +2040,8 @@
19722040 p->left = left;
19732041 if (pstr != NULL)
19742042 {
1975- strncpy (p->message, pstr, sizeof (p->message));
2043+ //strncpy (p->message, pstr, sizeof (p->message));
2044+ adjust_string (p->message, pstr, sizeof (p->message), 0);
19762045 }
19772046 else
19782047 {
@@ -2129,7 +2198,7 @@
21292198 memset (User[userno].statusinfo, 0, PACKET_MAX);
21302199 memset (User[userno].mapdata, 0, PACKET_MAX);
21312200 memcpy (work, User[userno].name, USERNAME_LEN);
2132- printf ("user(%d)[%-.24s] logoff.\n", userno, CUTTAIL (work));
2201+ printf ("user(%d)[%s] logoff.\n", userno, CUTTAIL (work));
21332202 User[userno].idletimer = 0;
21342203 }
21352204 ClearUser (userno);
@@ -2493,7 +2562,8 @@
24932562 pmail->subject[0] = n;
24942563 if (n)
24952564 {
2496- strncpy (&pmail->subject[1], namebuf, n);
2565+ //strncpy (&pmail->subject[1], namebuf, n);
2566+ adjust_string (&pmail->subject[1], namebuf, n, 0);
24972567 }
24982568 for (j = 0; j < pmail->line; j++)
24992569 {
@@ -2512,7 +2582,9 @@
25122582 pmail->message[j][0] = n;
25132583 if (n)
25142584 {
2515- strncpy (&pmail->message[j][1], namebuf, n);
2585+ //strncpy (&pmail->message[j][1], namebuf, n);
2586+ adjust_string (&pmail->message[j][1], namebuf, n,
2587+ 0);
25162588 }
25172589 }
25182590 if (j < pmail->line)
@@ -2560,9 +2632,9 @@
25602632 }
25612633 strncpy (namebuf, User[pmail->fromuser].name, USERNAME_LEN);
25622634 namebuf[USERNAME_LEN] = '\0';
2563- fprintf (optr, "%d,%d,%lu\n%-.24s\n",
2635+ fprintf (optr, "%d,%d,%lu\n%s\n",
25642636 pmail->readflag, pmail->line, pmail->timestamp,
2565- CUTTAIL (namebuf));
2637+ cut_tail (namebuf, USERNAME_LEN));
25662638 n = (unsigned char) (pmail->subject[0]);
25672639 if (n)
25682640 {
@@ -2703,7 +2775,8 @@
27032775 pmail->subject[0] = n;
27042776 if (n)
27052777 {
2706- strncpy (&pmail->subject[1], namebuf, n);
2778+ //strncpy (&pmail->subject[1], namebuf, n);
2779+ adjust_string (&pmail->subject[1], namebuf, n, 0);
27072780 }
27082781 for (j = 0; j < pmail->line; j++)
27092782 {
@@ -2722,7 +2795,9 @@
27222795 pmail->message[j][0] = n;
27232796 if (n)
27242797 {
2725- strncpy (&pmail->message[j][1], namebuf, n);
2798+ //strncpy (&pmail->message[j][1], namebuf, n);
2799+ adjust_string (&pmail->message[j][1], namebuf, n,
2800+ 0);
27262801 }
27272802 }
27282803 if (j < pmail->line)
@@ -2770,9 +2845,9 @@
27702845 }
27712846 strncpy (namebuf, User[pmail->fromuser].name, USERNAME_LEN);
27722847 namebuf[USERNAME_LEN] = '\0';
2773- fprintf (optr, "%d,%d,%lu\n%-.24s\n",
2848+ fprintf (optr, "%d,%d,%lu\n%s\n",
27742849 pmail->readflag, pmail->line, pmail->timestamp,
2775- CUTTAIL (namebuf));
2850+ cut_tail (namebuf, USERNAME_LEN));
27762851 n = (unsigned char) (pmail->subject[0]);
27772852 if (n)
27782853 {
@@ -3322,7 +3397,8 @@
33223397 /* can't read data */
33233398 break;
33243399 }
3325- strncpy (p->name, namebuf, WEAPONNAME_LEN);
3400+ //strncpy (p->name, namebuf, WEAPONNAME_LEN);
3401+ adjust_string (p->name, namebuf, WEAPONNAME_LEN, 0);
33263402 p->b_type = (enum bullet_type) b_type;
33273403 n++;
33283404 }
@@ -3384,7 +3460,8 @@
33843460 /* can't read data */
33853461 break;
33863462 }
3387- strncpy (p->name, namebuf, ITEMNAME_LEN);
3463+ //strncpy (p->name, namebuf, ITEMNAME_LEN);
3464+ adjust_string (p->name, namebuf, ITEMNAME_LEN, 0);
33883465 p->id = ntype;
33893466 p->effect = neffect;
33903467 p->count = ncount;
@@ -4435,8 +4512,8 @@
44354512 if (User[nowner].myshop[nshop].count[n][i])
44364513 {
44374514 sprintf (work,
4438- n ? MESG ("<%2d:%-32.32s:%10luP %4ucount (stock:%4u)>") :
4439- MESG ("<%2d:%-32.32s:%10luP %4uround (stock:%4u)>"),
4515+ n ? MESG ("<%2d:%s:%10luP:%4ucount:(stock:%4u)>") :
4516+ MESG ("<%2d:%s:%10luP:%4uround:(stock:%4u)>"),
44404517 i,
44414518 (n ? Item[User[nowner].myshop[nshop].list[n][i]].name :
44424519 Weapon[User[nowner].myshop[nshop].list[n][i]].name),
@@ -4479,8 +4556,8 @@
44794556 {
44804557 WEAPONINFO *pw = Weapon + plist[i];
44814558 sprintf (work,
4482- MESG ("<%3d:%-32.32s:%10luP %4uround HP%4u/Moral%4u "
4483- "Range:%4ublock>"),
4559+ MESG ("<%3d:%s:%10luP:%4uround:HP%4u/Moral%4u:"
4560+ "Range %4ublock>"),
44844561 i, pw->name, pw->cost, pw->bullette,
44854562 pw->firepower, pw->moral, pw->range);
44864563 SendSystemMessagePacket (nuser, work);
@@ -4520,7 +4597,7 @@
45204597 {
45214598 ITEMINFO *pi = Item + plist[i];
45224599 sprintf (work,
4523- MESG ("<%3d:%-32.32s:%10luP %4ucount>"),
4600+ MESG ("<%3d:%s:%10luP:%4ucount>"),
45244601 i, pi->name, pi->cost, pi->count);
45254602 SendSystemMessagePacket (nuser, work);
45264603 }
@@ -4643,15 +4720,15 @@
46434720 switch (t)
46444721 {
46454722 case TargetUser:
4646- sprintf (work, MESG ("%-.24s damages you. lost %uHP."),
4723+ sprintf (work, MESG ("%s damages you. lost %uHP."),
46474724 CUTTAIL (User[fromuser].name), ndamage);
46484725 break;
46494726 case TargetNpc:
4650- sprintf (work, MESG ("%-.24s damages you. lost %uHP."),
4727+ sprintf (work, MESG ("%s damages you. lost %uHP."),
46514728 CUTTAIL (Npc[fromuser].name), ndamage);
46524729 break;
46534730 case TargetAnimal:
4654- sprintf (work, MESG ("Animal '%-.24s' damages you. lost %uHP"),
4731+ sprintf (work, MESG ("Animal '%s' damages you. lost %uHP"),
46554732 CUTTAIL (Animal[fromuser].name), ndamage);
46564733 break;
46574734 default:
@@ -4664,7 +4741,7 @@
46644741 }
46654742 if (t == TargetUser)
46664743 {
4667- sprintf (work, MESG ("You attack %-.24s"),
4744+ sprintf (work, MESG ("You attack %s"),
46684745 CUTTAIL (User[nuser].name));
46694746 SendSystemMessagePacket (fromuser, work);
46704747 }
@@ -4883,7 +4960,7 @@
48834960 char uname[USERNAME_LEN];
48844961 char work[PASSWORD_LEN];
48854962 memcpy (uname, User[nuser].name, USERNAME_LEN);
4886- printf ("User name:%-.24s\n", CUTTAIL (uname));
4963+ printf ("User name:%s\n", CUTTAIL (uname));
48874964 for (i = 0; i < PASSWORD_LEN; i++)
48884965 {
48894966 char c = (char) *(p + i);
@@ -4976,8 +5053,7 @@
49765053 }
49775054 else
49785055 {
4979- printf ("Blocked User:%-.24s\n",
4980- CUTTAIL (User[nuser].name));
5056+ printf ("Blocked User:%s\n", CUTTAIL (User[nuser].name));
49815057 }
49825058 SendResultPacket (psession->handle, -1);
49835059 }
@@ -5293,7 +5369,8 @@
52935369 }
52945370 if (nlen)
52955371 {
5296- strncpy (User[nuser].mesg_for_action, (char *) (p + 1), nlen);
5372+ //strncpy (User[nuser].mesg_for_action, (char *) (p + 1), nlen);
5373+ adjust_string (User[nuser].mesg_for_action, (char *) (p + 1), nlen, 0);
52975374 }
52985375 User[nuser].mesg_for_action[nlen] = '\0';
52995376 return;
@@ -5304,8 +5381,13 @@
53045381 doSay (int nuser, unsigned char *p)
53055382 {
53065383 User[nuser].action = DoSay;
5384+#if 0
53075385 memcpy (User[nuser].mesg_for_action, p,
53085386 sizeof (User[nuser].mesg_for_action));
5387+#else
5388+ adjust_string (User[nuser].mesg_for_action, (char *) p,
5389+ sizeof (User[nuser].mesg_for_action), 0);
5390+#endif
53095391 return;
53105392 }
53115393
@@ -5314,8 +5396,13 @@
53145396 doTell (int nuser, unsigned char *p)
53155397 {
53165398 User[nuser].action = DoTell;
5399+#if 0
53175400 memcpy (User[nuser].mesg_for_action, p,
53185401 sizeof (User[nuser].mesg_for_action));
5402+#else
5403+ adjust_string (User[nuser].mesg_for_action, (char *) p,
5404+ sizeof (User[nuser].mesg_for_action), 0);
5405+#endif
53195406 return;
53205407 }
53215408
@@ -5324,8 +5411,13 @@
53245411 doBroadcast (int nuser, unsigned char *p)
53255412 {
53265413 User[nuser].action = DoBroadcast;
5414+#if 0
53275415 memcpy (User[nuser].mesg_for_action, p,
53285416 sizeof (User[nuser].mesg_for_action));
5417+#else
5418+ adjust_string (User[nuser].mesg_for_action, (char *) p,
5419+ sizeof (User[nuser].mesg_for_action), 0);
5420+#endif
53295421 return;
53305422 }
53315423
@@ -5557,10 +5649,10 @@
55575649 }
55585650 dec_score (nuser, n + ntax);
55595651 add_score (ndist, n);
5560- sprintf (work, MESG ("[You transfer %upoint to %-.24s. Tax:%upoint]"),
5652+ sprintf (work, MESG ("[You transfer %upoint to %s. Tax:%upoint]"),
55615653 n, CUTTAIL (User[ndist].name), ntax);
55625654 SendSystemMessagePacket (nuser, work);
5563- sprintf (work, MESG ("[You receive %upoint from %-.24s]"),
5655+ sprintf (work, MESG ("[You receive %upoint from %s]"),
55645656 n, CUTTAIL (User[nuser].name));
55655657 SendSystemMessagePacket (ndist, work);
55665658 }
@@ -5602,11 +5694,10 @@
56025694 {
56035695 /* block user account */
56045696 puts ("block user account");
5605- printf ("User %d [%-.24s]\n", ntarget,
5606- CUTTAIL (User[ntarget].name));
5697+ printf ("User %d [%s]\n", ntarget, CUTTAIL (User[ntarget].name));
56075698 DisconnectUser (ntarget);
56085699 User[ntarget].account_status = AccountBlock;
5609- sprintf (work, MESG ("[user '%-.24s' is blocked]"),
5700+ sprintf (work, MESG ("[user '%s' is blocked]"),
56105701 CUTTAIL (User[ntarget].name));
56115702 SendSystemMessagePacket (0, work);
56125703 }
@@ -5614,10 +5705,9 @@
56145705 {
56155706 /* recover user account */
56165707 puts ("recover user account");
5617- printf ("User %d [%-.24s]\n", ntarget,
5618- CUTTAIL (User[ntarget].name));
5708+ printf ("User %d [%s]\n", ntarget, CUTTAIL (User[ntarget].name));
56195709 User[ntarget].account_status = AccountActive;
5620- sprintf (work, MESG ("[user '%-.24s' is recoverd]"),
5710+ sprintf (work, MESG ("[user '%s' is recoverd]"),
56215711 CUTTAIL (User[ntarget].name));
56225712 SendSystemMessagePacket (0, work);
56235713 }
@@ -5661,9 +5751,9 @@
56615751 {
56625752 wkpassword[i] = ' ';
56635753 }
5664- printf ("Change %-.24s password\n", CUTTAIL (User[nuser].name));
5754+ printf ("Change %s password\n", CUTTAIL (User[nuser].name));
56655755 memcpy (User[nuser].password, wkpassword, PASSWORD_LEN);
5666- sprintf (work, MESG ("[user '%-.24s' password is changed]"),
5756+ sprintf (work, MESG ("[user '%s' password is changed]"),
56675757 CUTTAIL (User[nuser].name));
56685758 SendSystemMessagePacket (0, work);
56695759 }
@@ -5877,7 +5967,7 @@
58775967 {
58785968 char uname[USERNAME_LEN];
58795969 memcpy (uname, User[ntarget].name, USERNAME_LEN);
5880- printf ("Delete User name:%-.24s\n", CUTTAIL (uname));
5970+ printf ("Delete User name:%s\n", CUTTAIL (uname));
58815971 DeleteUser (ntarget);
58825972 SendSystemMessagePacket (nuser, "[Delete complete]");
58835973 }
@@ -5889,7 +5979,7 @@
58895979 }
58905980 else
58915981 {
5892- printf ("User:%d [%-.24s] is cracking!\n", nuser,
5982+ printf ("User:%d [%s] is cracking!\n", nuser,
58935983 CUTTAIL (User[nuser].name));
58945984 SendSystemMessagePacket (nuser, "[uh?]");
58955985 }
@@ -5991,12 +6081,11 @@
59916081 switch (User[i].crime_level)
59926082 {
59936083 case 1:
5994- sprintf (work, MESG ("<WANTED '%-.24s'>"),
5995- CUTTAIL (User[i].name));
6084+ sprintf (work, MESG ("<WANTED '%s'>"), CUTTAIL (User[i].name));
59966085 SendSystemMessagePacket (nuser, work);
59976086 break;
59986087 case 2:
5999- sprintf (work, MESG ("<Dead or Alive '%-.24s'>"),
6088+ sprintf (work, MESG ("<Dead or Alive '%s'>"),
60006089 CUTTAIL (User[i].name));
60016090 SendSystemMessagePacket (nuser, work);
60026091 break;
@@ -6337,8 +6426,7 @@
63376426 name_len = sizeof (Weapon[n].name);
63386427 }
63396428 User[nuser].myshop[nshop].count[isitem][i]++;
6340- sprintf (work, MESG ("[%-.24s stocked]"),
6341- cut_tail (pname, name_len));
6429+ sprintf (work, MESG ("[%s stocked]"), cut_tail (pname, name_len));
63426430 SendSystemMessagePacket (nuser, work);
63436431 }
63446432 else
@@ -6605,7 +6693,7 @@
66056693 {
66066694 nlen = PACKET_DATA_MAX - USERNAME_LEN - 10;
66076695 }
6608- sprintf (work, "You tell %-.24s,", CUTTAIL (User[destuser].name));
6696+ sprintf (work, "You tell %s,", CUTTAIL (User[destuser].name));
66096697 if (nlen)
66106698 {
66116699 memcpy (work + USERNAME_LEN + 10, p + 1 + USERNAME_LEN, nlen);
@@ -6641,7 +6729,7 @@
66416729 else
66426730 {
66436731 char work[PACKET_DATA_MAX];
6644- sprintf (work, MESG ("[Weapon:%-32.32s NOT READY]"),
6732+ sprintf (work, MESG ("[Weapon:%s NOT READY]"),
66456733 Weapon[User[nuser].weapon[nweapon]].name);
66466734 SendSystemMessagePacket (nuser, work);
66476735 }
@@ -6693,7 +6781,7 @@
66936781 {
66946782 /* list up this */
66956783 int relpos = get_rel_position_in (dx1, dx2, dy1, dy2);
6696- sprintf (work, MESG ("<%-.24s %10s %5dBlock>"),
6784+ sprintf (work, MESG ("<%s:%s:%5dBlock>"),
66976785 CUTTAIL (Animal[i].name),
66986786 MESG (RelDirection[relpos]), n);
66996787 SendSystemMessagePacket (nuser, work);
@@ -6734,7 +6822,7 @@
67346822 if (User[i].c_type == Hunter)
67356823 {
67366824 sprintf (work,
6737- MESG ("<Hunter:%-.24s %10s %5dBlock crime:%lu>"),
6825+ MESG ("<Hunter:%s:%10s:%5dBlock:crime %lu>"),
67386826 CUTTAIL (User[i].name),
67396827 MESG (RelDirection[relpos]), n,
67406828 User[i].maybearrest);
@@ -6742,7 +6830,7 @@
67426830 else
67436831 {
67446832 sprintf (work,
6745- MESG ("<Guard :%-.24s %10s %5dBlock>"),
6833+ MESG ("<Guard :%s:%10s:%5dBlock>"),
67466834 CUTTAIL (User[i].name),
67476835 MESG (RelDirection[relpos]), n);
67486836 }
@@ -6777,13 +6865,13 @@
67776865 if (Npc[i].c_type == NpcHunter)
67786866 {
67796867 sprintf (work,
6780- MESG ("<Hunter:%-.24s %10s %5dBlock crime:NA>"),
6868+ MESG ("<Hunter:%s:%10s:%5dBlock:crime NA>"),
67816869 CUTTAIL (Npc[i].name),
67826870 MESG (RelDirection[relpos]), n);
67836871 }
67846872 else
67856873 {
6786- sprintf (work, MESG ("<Guard :%-.24s %10s %5dBlock>"),
6874+ sprintf (work, MESG ("<Guard :%s:%10s:%5dBlock>"),
67876875 CUTTAIL (Npc[i].name),
67886876 MESG (RelDirection[relpos]), n);
67896877 }
@@ -6861,10 +6949,10 @@
68616949 if (Npc[i].name[0] == '\0')
68626950 {
68636951 static const char *mesg[4] = {
6864- "%-.24s say,OK Boss. I will guard you.",
6865- "%-.24s say,Ready for deployment",
6866- "%-.24s say,It's show time!",
6867- "%-.24s say,Do you wanna use my design?"
6952+ "%s say,OK Boss. I will guard you.",
6953+ "%s say,Ready for deployment",
6954+ "%s say,It's show time!",
6955+ "%s say,Do you wanna use my design?"
68686956 };
68696957 static const int ck_x[8] = { 0, 1, 1, 1, 0, -1, -1, -1 };
68706958 static const int ck_y[8] = { -1, -1, 0, 1, 1, 1, 0, -1 };
@@ -7018,13 +7106,13 @@
70187106 }
70197107 break;
70207108 case Vehicle:
7021- sprintf (work, MESG ("You ride on %-.24s"), CUTTAIL (pitem->name));
7109+ sprintf (work, MESG ("You ride on %s"), CUTTAIL (pitem->name));
70227110 rideVehicle (nuser, pitem->effect % 100, pitem->effect / 100,
70237111 pitem->pattern);
70247112 break;
70257113 case Food:
70267114 cause_eat (nuser, pitem->effect);
7027- sprintf (work, MESG ("You eat %-.24s..."), CUTTAIL (pitem->name));
7115+ sprintf (work, MESG ("You eat %s..."), CUTTAIL (pitem->name));
70287116 if (pitem->effect > 100)
70297117 {
70307118 strcat (work, MESG ("Delicious!"));
@@ -7087,7 +7175,7 @@
70877175 }
70887176 User[nuser].item[i] = nitem;
70897177 User[nuser].itemcount[i] = Item[User[nuser].item[i]].count;
7090- sprintf (work, MESG ("[Get item%1d:%-.24s]"),
7178+ sprintf (work, MESG ("[Get item%1d:%s]"),
70917179 i + 1, CUTTAIL (Item[User[nuser].item[i]].name));
70927180 SendSystemMessagePacket (nuser, work);
70937181 return i;
@@ -7115,7 +7203,7 @@
71157203 User[nuser].weapon[i] = nweapon;
71167204 User[nuser].bullette[i] = Weapon[User[nuser].weapon[i]].bullette;
71177205 User[nuser].reload[i] = 0;
7118- sprintf (work, MESG ("[Get weapon%1d:%-.24s]"),
7206+ sprintf (work, MESG ("[Get weapon%1d:%s]"),
71197207 i + 1, CUTTAIL (Weapon[User[nuser].weapon[i]].name));
71207208 SendSystemMessagePacket (nuser, work);
71217209 return i;
@@ -7211,7 +7299,7 @@
72117299 {
72127300 /* can't get this. drop original position */
72137301 char work[MESG_BUFFER];
7214- sprintf (work, MESG ("[You have no space to get %-.24s!]"),
7302+ sprintf (work, MESG ("[You have no space to get %s!]"),
72157303 isitem ? CUTTAIL (Item[nitem].name) :
72167304 CUTTAIL (Weapon[nitem].name));
72177305 SendSystemMessagePacket (nuser, work);
@@ -7245,7 +7333,7 @@
72457333 }
72467334 add_score (nuser, n);
72477335 add_crime (nuser, n);
7248- sprintf (work, MESG ("[You catch %-.24s:%upoint]"),
7336+ sprintf (work, MESG ("[You catch %s:%upoint]"),
72497337 CUTTAIL (Animal[nanimal].name), n);
72507338 SendSystemMessagePacket (nuser, work);
72517339 DeleteAnimal (nanimal);
@@ -7266,7 +7354,7 @@
72667354 /* it is animal corpse */
72677355 char work[MESG_BUFFER];
72687356 sprintf (work,
7269- MESG ("[You collect %-.24s's corpse:10point]"),
7357+ MESG ("[You collect %s's corpse:10point]"),
72707358 CUTTAIL (Animal[nanimal].name));
72717359 SendSystemMessagePacket (nuser, work);
72727360 MAP (x, y)->id &= ~MAP_THERE_ANIMAL;
@@ -7288,7 +7376,7 @@
72887376 {
72897377 /* arrest! */
72907378 char work[MESG_BUFFER];
7291- sprintf (work, MESG ("[You arrest %-.24s. Get 500point.]"),
7379+ sprintf (work, MESG ("[You arrest %s. Get 500point.]"),
72927380 CUTTAIL (Npc[npc].name));
72937381 SendSystemMessagePacket (nuser, work);
72947382 add_score (nuser, 500);
@@ -7317,10 +7405,10 @@
73177405 break;
73187406 }
73197407 User[ntarget].crime_level = 0;
7320- sprintf (work, MESG ("[You arrest %-.24s. Get %lupoint.]"),
7408+ sprintf (work, MESG ("[You arrest %s. Get %lupoint.]"),
73217409 CUTTAIL (User[ntarget].name), npts);
73227410 SendSystemMessagePacket (nuser, work);
7323- sprintf (work, MESG ("[You were arrested by %-.24s]"),
7411+ sprintf (work, MESG ("[You were arrested by %s]"),
73247412 CUTTAIL (User[nuser].name));
73257413 SendSystemMessagePacket (ntarget, work);
73267414 SendSystemMessagePacket (ntarget, MESG ("[Go to Jail!]"));
@@ -7336,11 +7424,11 @@
73367424 }
73377425 else
73387426 {
7339- sprintf (work, MESG ("[You attempt to arrest %-.24s]"),
7427+ sprintf (work, MESG ("[You attempt to arrest %s]"),
73407428 CUTTAIL (User[ntarget].name));
73417429 SendSystemMessagePacket (nuser, work);
73427430 SendSystemMessagePacket (nuser, MESG ("[But he do not crime]"));
7343- sprintf (work, MESG ("[%-.24s attempt to arrest you]"),
7431+ sprintf (work, MESG ("[%s attempt to arrest you]"),
73447432 CUTTAIL (User[nuser].name));
73457433 SendSystemMessagePacket (ntarget, work);
73467434 SendSystemMessagePacket (ntarget,
@@ -7662,7 +7750,7 @@
76627750 {
76637751 char work[MESG_BUFFER];
76647752 sprintf (work,
7665- MESG ("<%d:%-.24s (%3d,%3d)>"), i + 1,
7753+ MESG ("<%d:%s:(%3d,%3d)>"), i + 1,
76667754 CUTTAIL (User[nuser].myshop[i].name),
76677755 User[nuser].myshop[i].pos.x, User[nuser].myshop[i].pos.y);
76687756 SendSystemMessagePacket (nuser, work);
@@ -7686,7 +7774,7 @@
76867774 if (p != NULL)
76877775 {
76887776 strncpy (namebuffer, CUTTAIL (p->name), sizeof (namebuffer));
7689- sprintf (work, MESG ("<%d:%-.24s(%-.24s)>"), i + 1, namebuffer,
7777+ sprintf (work, MESG ("<%d:%s(%s)>"), i + 1, namebuffer,
76907778 CUTTAIL (Item[p->forsell_item].name));
76917779 SendSystemMessagePacket (nuser, work);
76927780 }
@@ -7791,7 +7879,7 @@
77917879 {
77927880 if (animal[i])
77937881 {
7794- sprintf (work, MESG ("<'%-.24s' lives:%3d rate:%3u value:%5u>"),
7882+ sprintf (work, MESG ("<'%s':lives %3d:rate %3u:value %5u>"),
77957883 CUTTAIL (AnimalData[i].name), animal[i],
77967884 AnimalData[i].rate, AnimalData[i].value);
77977885 SendSystemMessagePacket (nuser, work);
@@ -7835,7 +7923,7 @@
78357923 {
78367924 strcpy (subjectbuffer, "NO SUBJECT");
78377925 }
7838- sprintf (work, "<%c%2d:%-.24s %-.32s>",
7926+ sprintf (work, "<%c%2d:%s %s>",
78397927 pmail->readflag ? ' ' : '*', i + 1,
78407928 CUTTAIL (User[pmail->fromuser].name), subjectbuffer);
78417929 SendSystemMessagePacket (nuser, work);
@@ -7929,7 +8017,7 @@
79298017 {
79308018 strcpy (subjectbuffer, "NO SUBJECT");
79318019 }
7932- sprintf (work, "<%2d:%-.24s %-.32s>",
8020+ sprintf (work, "<%2d:%s %s>",
79338021 i + 1, CUTTAIL (User[pmail->fromuser].name),
79348022 subjectbuffer);
79358023 SendSystemMessagePacket (nuser, work);
@@ -8211,11 +8299,11 @@
82118299 {
82128300 if (pb->t_type == TargetUser)
82138301 {
8214- sprintf (work, MESG ("You attack animal '%-.24s'"),
8302+ sprintf (work, MESG ("You attack animal '%s'"),
82158303 CUTTAIL (Animal[nanimal].name));
82168304 SendSystemMessagePacket (pb->nuser, work);
82178305 }
8218- sprintf (work, MESG ("[%-.24s shoot animal!]"),
8306+ sprintf (work, MESG ("[%s shoot animal!]"),
82198307 cut_tail (((pb->t_type == TargetUser) ?
82208308 User[pb->nuser].name :
82218309 Npc[pb->nuser].name),
@@ -8236,7 +8324,7 @@
82368324 if (pb->nuser != -1 && pb->t_type == TargetUser)
82378325 {
82388326 sprintf (work,
8239- MESG ("animal '%-.24s' died."),
8327+ MESG ("animal '%s' died."),
82408328 CUTTAIL (Animal[nanimal].name));
82418329 SendSystemMessagePacket (pb->nuser, work);
82428330 if (CountLiveAnimal (Animal[nanimal].pdata) == 0)
@@ -8244,7 +8332,7 @@
82448332 /* this is last animal! */
82458333 sprintf (work,
82468334 MESG
8247- ("[animal '%-.24s' is extermination!]"),
8335+ ("[animal '%s' is extermination!]"),
82488336 CUTTAIL (Animal[nanimal].name));
82498337 SendSystemMessagePacket (pb->nuser, work);
82508338 if (User[pb->nuser].c_type == Observer)
@@ -8281,7 +8369,7 @@
82818369 {
82828370 if (pb->nuser != -1 && pb->t_type == TargetUser)
82838371 {
8284- sprintf (work, MESG ("animal '%-.24s' stun."),
8372+ sprintf (work, MESG ("animal '%s' stun."),
82858373 CUTTAIL (Animal[nanimal].name));
82868374 SendSystemMessagePacket (pb->nuser, work);
82878375 }
@@ -8299,7 +8387,7 @@
82998387 {
83008388 sprintf (work,
83018389 MESG
8302- ("You charm animal '%-.24s'!"),
8390+ ("You charm animal '%s'!"),
83038391 CUTTAIL (Animal[nanimal].name));
83048392 SendSystemMessagePacket (pb->nuser, work);
83058393 Animal[nanimal].owner_user = pb->nuser;
@@ -8308,7 +8396,7 @@
83088396 {
83098397 sprintf (work,
83108398 MESG
8311- ("Animal '%-.24s' is free now!"),
8399+ ("Animal '%s' is free now!"),
83128400 CUTTAIL (Animal[nanimal].name));
83138401 SendMessageNearUserPosition (pb->pos, work);
83148402 Animal[nanimal].owner_user = -1;
@@ -8319,7 +8407,7 @@
83198407 /* fail */
83208408 sprintf (work,
83218409 MESG
8322- ("You fail to charm animal '%-.24s'."),
8410+ ("You fail to charm animal '%s'."),
83238411 CUTTAIL (Animal[nanimal].name));
83248412 SendSystemMessagePacket (pb->nuser, work);
83258413 }
@@ -8369,7 +8457,7 @@
83698457 char work[MESG_BUFFER];
83708458 if (pb->nuser != -1 && pb->t_type == TargetUser)
83718459 {
8372- sprintf (work, MESG ("You attack '%-.24s'"),
8460+ sprintf (work, MESG ("You attack '%s'"),
83738461 CUTTAIL (Npc[npc].name));
83748462 SendSystemMessagePacket (pb->nuser, work);
83758463 }
@@ -8378,7 +8466,7 @@
83788466 {
83798467 if (pb->nuser != -1 && pb->t_type == TargetUser)
83808468 {
8381- sprintf (work, MESG ("'%-.24s' died."),
8469+ sprintf (work, MESG ("'%s' died."),
83828470 CUTTAIL (Npc[npc].name));
83838471 SendSystemMessagePacket (pb->nuser, work);
83848472 if (User[pb->nuser].c_type == Hunter &&
@@ -8399,13 +8487,13 @@
83998487 strncpy (namebuffer, CUTTAIL (Npc[npc].name),
84008488 sizeof (namebuffer));
84018489 sprintf (work,
8402- MESG ("'%-.24s' killed by %-.24s!"),
8490+ MESG ("'%s' killed by %s!"),
84038491 namebuffer,
84048492 CUTTAIL (Npc[pb->nuser].name));
84058493 }
84068494 else
84078495 {
8408- sprintf (work, MESG ("'%-.24s' killed by any!"),
8496+ sprintf (work, MESG ("'%s' killed by any!"),
84098497 CUTTAIL (Npc[npc].name));
84108498 }
84118499 SendMessageNearUserPosition (Npc[npc].pos, work);
@@ -8423,11 +8511,11 @@
84238511 if (!(pb->t_type == TargetNpc && pb->nuser == npc))
84248512 {
84258513 static const char *mesg[5] = {
8426- "%-.24s say,Hey! Why do you attack me?",
8427- "%-.24s say,No! Don't shoot me!",
8428- "%-.24s say,What's think?!",
8429- "%-.24s say,Ohch! We are under fire!",
8430- "%-.24s say,Ok. I will kill you."
8514+ "%s say,Hey! Why do you attack me?",
8515+ "%s say,No! Don't shoot me!",
8516+ "%s say,What's think?!",
8517+ "%s say,Ohch! We are under fire!",
8518+ "%s say,Ok. I will kill you."
84318519 };
84328520 NPCsay (npc, mesg, 5);
84338521 Npc[npc].ntarget_user = pb->nuser;
@@ -8454,11 +8542,11 @@
84548542 if (willcounter)
84558543 {
84568544 static const char *mesg[5] = {
8457- "%-.24s say,Detect one boggy!",
8458- "%-.24s say,We are under attack!",
8459- "%-.24s say,Engage!",
8460- "%-.24s say,Caution! Enemy fire!",
8461- "%-.24s say,Emergency! Enemy attack us!"
8545+ "%s say,Detect one boggy!",
8546+ "%s say,We are under attack!",
8547+ "%s say,Engage!",
8548+ "%s say,Caution! Enemy fire!",
8549+ "%s say,Emergency! Enemy attack us!"
84628550 };
84638551 NPCsay (npc, mesg, 5);
84648552 Npc[npc].ntarget_user = pb->nuser;
@@ -8467,11 +8555,11 @@
84678555 else
84688556 {
84698557 static const char *mesg[5] = {
8470- "%-.24s say,Hey! No shoot me!",
8471- "%-.24s say,I'm friendly!",
8472- "%-.24s say,This is friendly! Don't shoot!",
8473- "%-.24s say,Don't shoot! Are you enemy's spy?",
8474- "%-.24s say,Take more care!"
8558+ "%s say,Hey! No shoot me!",
8559+ "%s say,I'm friendly!",
8560+ "%s say,This is friendly! Don't shoot!",
8561+ "%s say,Don't shoot! Are you enemy's spy?",
8562+ "%s say,Take more care!"
84758563 };
84768564 NPCsay (npc, mesg, 5);
84778565 }
@@ -8614,7 +8702,7 @@
86148702 int nuser = User[i].lastuser;
86158703 if (User[i].lastuser_type == TargetUser)
86168704 {
8617- sprintf (work, MESG ("[You kill %-.24s]"),
8705+ sprintf (work, MESG ("[You kill %s]"),
86188706 CUTTAIL (User[i].name));
86198707 SendSystemMessagePacket (nuser, work);
86208708 }
@@ -8640,7 +8728,7 @@
86408728 if (pname != NULL)
86418729 {
86428730 sprintf (work,
8643- MESG ("[You were killed by %-.24s]"),
8731+ MESG ("[You were killed by %s]"),
86448732 cut_tail (pname, name_len));
86458733 SendSystemMessagePacket (i, work);
86468734 }
@@ -8789,7 +8877,7 @@
87898877 User[i].hold_count = HoldCount;
87908878 SendSystemMessagePacket (i, MESG ("[You fall in hole!]"));
87918879 SendEffectFallInHolePacket (i);
8792- sprintf (work, MESG ("[You hear sound %-.24s fall in hole]"),
8880+ sprintf (work, MESG ("[You hear sound %s fall in hole]"),
87938881 CUTTAIL (User[i].name));
87948882 SendMessageNearUser (i, work);
87958883 }
@@ -8799,7 +8887,7 @@
87998887 /* perhaps,disconnect session. */
88008888 char work[USERNAME_LEN];
88018889 memcpy (work, User[i].name, USERNAME_LEN);
8802- printf ("user(%d)[%-.24s] no response\n", i, CUTTAIL (work));
8890+ printf ("user(%d)[%s] no response\n", i, CUTTAIL (work));
88038891 DisconnectUser (i);
88048892 }
88058893 }
@@ -8999,7 +9087,7 @@
89999087 char namebuffer[24 + 1];
90009088 strncpy (namebuffer, CUTTAIL (Animal[nanimal].name),
90019089 sizeof (namebuffer));
9002- sprintf (work, MESG ("animal '%-.24s' eat %-.24s"), namebuffer,
9090+ sprintf (work, MESG ("animal '%s' eat %s"), namebuffer,
90039091 CUTTAIL (Animal[targetanimal].name));
90049092 SendMessageNearUserPosition (Animal[nanimal].pos, work);
90059093 MAP (Animal[targetanimal].pos.x, Animal[targetanimal].pos.y)->id &=
@@ -9069,11 +9157,11 @@
90699157 if (Npc[npc].hp)
90709158 {
90719159 static const char *mesg[5] = {
9072- "%-.24s say,Nooo!",
9073- "%-.24s say,Animal bite me!",
9074- "%-.24s say,Danger! This animal is ferocity!",
9075- "%-.24s say,Help! Animal bite ...Arrrrgh!",
9076- "%-.24s say,Why is this animal angry?"
9160+ "%s say,Nooo!",
9161+ "%s say,Animal bite me!",
9162+ "%s say,Danger! This animal is ferocity!",
9163+ "%s say,Help! Animal bite ...Arrrrgh!",
9164+ "%s say,Why is this animal angry?"
90779165 };
90789166 NPCsay (npc, mesg, 5);
90799167 }
@@ -9080,7 +9168,7 @@
90809168 if (Npc[npc].hp == 0)
90819169 {
90829170 char work[MESG_BUFFER];
9083- sprintf (work, MESG ("'%-.24s' died."), CUTTAIL (Npc[npc].name));
9171+ sprintf (work, MESG ("'%s' died."), CUTTAIL (Npc[npc].name));
90849172 SendMessageNearUserPosition (Npc[npc].pos, work);
90859173 Npc[npc].name[0] = '\0';
90869174 MAP (Npc[npc].pos.x, Npc[npc].pos.y)->id &= ~MAP_THERE_NPC;
@@ -9606,7 +9694,7 @@
96069694 Animal[i].hold_count = HoldCount;
96079695 sprintf (work,
96089696 MESG
9609- ("[You hear sound '%-.24s' fall in hole]"),
9697+ ("[You hear sound '%s' fall in hole]"),
96109698 CUTTAIL (Animal[i].name));
96119699 SendMessageNearUserAnimal (i, work);
96129700 }
@@ -9999,11 +10087,11 @@
999910087 if (ret == 0)
1000010088 {
1000110089 static const char *mesg[5] = {
10002- "%-.24s say,FREEZE!",
10003- "%-.24s say,FIRE!",
10004- "%-.24s say,Hey! I know your position!",
10005- "%-.24s say,You can't escape from me!",
10006- "%-.24s say,Contact!"
10090+ "%s say,FREEZE!",
10091+ "%s say,FIRE!",
10092+ "%s say,Hey! I know your position!",
10093+ "%s say,You can't escape from me!",
10094+ "%s say,Contact!"
1000710095 };
1000810096 NPCsay (npc, mesg, 5);
1000910097 }
@@ -10016,11 +10104,11 @@
1001610104 if (User[ntarget_user].maybearrest)
1001710105 {
1001810106 static const char *mesg[5] = {
10019- "%-.24s say,Do not move!",
10020- "%-.24s say,You are criminal!",
10021- "%-.24s say,Hold up!",
10022- "%-.24s say,Do not escape! If you do so,I will shoot you!",
10023- "%-.24s say,You should surrender!"
10107+ "%s say,Do not move!",
10108+ "%s say,You are criminal!",
10109+ "%s say,Hold up!",
10110+ "%s say,Do not escape! If you do so,I will shoot you!",
10111+ "%s say,You should surrender!"
1002410112 };
1002510113 NPCsay (npc, mesg, 5);
1002610114 }
@@ -10028,11 +10116,11 @@
1002810116 User[ntarget_user].crime_level)
1002910117 {
1003010118 static const char *mesg2[5] = {
10031- "%-.24s say,Go out!",
10032- "%-.24s say,You can't escape!",
10033- "%-.24s say,You no have choise!",
10034- "%-.24s say,Do anyone call SWAT? We need!",
10035- "%-.24s say,We have surrounded you!"
10119+ "%s say,Go out!",
10120+ "%s say,You can't escape!",
10121+ "%s say,You no have choise!",
10122+ "%s say,Do anyone call SWAT? We need!",
10123+ "%s say,We have surrounded you!"
1003610124 };
1003710125 NPCsay (npc, mesg2, 5);
1003810126 }
@@ -10099,7 +10187,7 @@
1009910187 char work[MESG_BUFFER];
1010010188 MAP (x, y)->id &= ~MAP_THERE_HOLE;
1010110189 Npc[n].hold_count = HoldCount;
10102- sprintf (work, MESG ("[You hear sound %-.24s fall in hole!]"),
10190+ sprintf (work, MESG ("[You hear sound %s fall in hole!]"),
1010310191 CUTTAIL (Npc[n].name));
1010410192 SendMessageNearUserPosition (Npc[n].pos, work);
1010510193 }
@@ -10122,9 +10210,9 @@
1012210210 if (getrand (1, 100) < HUNTER_SPEAK_RATE)
1012310211 {
1012410212 static const char *mesg[3] = {
10125- "%-.24s say,Oh! I am innoucence!",
10126- "%-.24s say,Leave alone!",
10127- "%-.24s say,HELP ME! HELP! HELP!"
10213+ "%s say,Oh! I am innoucence!",
10214+ "%s say,Leave alone!",
10215+ "%s say,HELP ME! HELP! HELP!"
1012810216 };
1012910217 NPCsay (n, mesg, 3);
1013010218 }
@@ -10177,11 +10265,11 @@
1017710265 if (getrand (1, 100) < HUNTER_SPEAK_RATE)
1017810266 {
1017910267 static const char *mesg[5] = {
10180- "%-.24s say,Anyone see animal?",
10181- "%-.24s say,Oh sorry.",
10182- "%-.24s say,Nice meet you!",
10183- "%-.24s say,Hello. Is there anyone?",
10184- "%-.24s say,I want any food. Anyone have?"
10268+ "%s say,Anyone see animal?",
10269+ "%s say,Oh sorry.",
10270+ "%s say,Nice meet you!",
10271+ "%s say,Hello. Is there anyone?",
10272+ "%s say,I want any food. Anyone have?"
1018510273 };
1018610274 NPCsay (n, mesg, 5);
1018710275 }
@@ -10211,8 +10299,7 @@
1021110299 {
1021210300 /* get */
1021310301 char work[MESG_BUFFER];
10214- sprintf (work, MESG ("%-.24s say,Get!"),
10215- CUTTAIL (Npc[n].name));
10302+ sprintf (work, MESG ("%s say,Get!"), CUTTAIL (Npc[n].name));
1021610303 SendMessageNearUserPosition (Npc[n].pos, work);
1021710304 MAP (Animal[ntarget].pos.x, Animal[ntarget].pos.y)->id &=
1021810305 ~MAP_THERE_ANIMAL;
@@ -10227,14 +10314,14 @@
1022710314 if (getrand (1, 100) < HUNTER_SPEAK_RATE)
1022810315 {
1022910316 static const char *mesg_a[3] = {
10230- "%-.24s say,Fire! Fire!",
10231- "%-.24s say,Oh! This animal is strong!",
10232- "%-.24s say,Hey! Cover me!"
10317+ "%s say,Fire! Fire!",
10318+ "%s say,Oh! This animal is strong!",
10319+ "%s say,Hey! Cover me!"
1023310320 };
1023410321 static const char *mesg_n[3] = {
10235- "%-.24s say,Fire! Fire! Fire!",
10236- "%-.24s say,We are under attack!",
10237- "%-.24s say,Anyone! Help me!"
10322+ "%s say,Fire! Fire! Fire!",
10323+ "%s say,We are under attack!",
10324+ "%s say,Anyone! Help me!"
1023810325 };
1023910326 NPCsay (n,
1024010327 (t_type == TargetAnimal) ? mesg_a : mesg_n,
@@ -10257,14 +10344,14 @@
1025710344 {
1025810345 /* out of range */
1025910346 static const char *mesg_a[3] = {
10260- "%-.24s say,OH NO! I miss animal!",
10261- "%-.24s say,Hey! Don't you get my animal?",
10262- "%-.24s say,I think animal enter hyper-space."
10347+ "%s say,OH NO! I miss animal!",
10348+ "%s say,Hey! Don't you get my animal?",
10349+ "%s say,I think animal enter hyper-space."
1026310350 };
1026410351 static const char *mesg_n[3] = {
10265- "%-.24s say,hehe! bye bye!",
10266- "%-.24s say,Enemy escape from me.",
10267- "%-.24s say,Where?"
10352+ "%s say,hehe! bye bye!",
10353+ "%s say,Enemy escape from me.",
10354+ "%s say,Where?"
1026810355 };
1026910356 NPCsay (n, (t_type == TargetAnimal) ? mesg_a : mesg_n, 3);
1027010357 Npc[n].ntarget_user = -1;
@@ -10334,11 +10421,11 @@
1033410421 if (getrand (1, 100) < OBSERVER_SPEAK_RATE)
1033510422 {
1033610423 static const char *mesg[5] = {
10337- "%-.24s say,*anyone see bad hunter?*",
10338- "%-.24s say,*uhmm. where is he?*",
10339- "%-.24s say,*are you bad hunter?*",
10340- "%-.24s say,*I want to rest here...*",
10341- "%-.24s say,*Zzzzz*"
10424+ "%s say,*anyone see bad hunter?*",
10425+ "%s say,*uhmm. where is he?*",
10426+ "%s say,*are you bad hunter?*",
10427+ "%s say,*I want to rest here...*",
10428+ "%s say,*Zzzzz*"
1034210429 };
1034310430 NPCsay (n, mesg, 5);
1034410431 }
@@ -10400,9 +10487,9 @@
1040010487 if (ndistance == 1)
1040110488 {
1040210489 static const char *g_mesg[3] = {
10403- "%-.24s say,Hey! You do crime!",
10404- "%-.24s say,Arrest you!",
10405- "%-.24s say,Hold up!"
10490+ "%s say,Hey! You do crime!",
10491+ "%s say,Arrest you!",
10492+ "%s say,Hold up!"
1040610493 };
1040710494 if (t_type == TargetUser)
1040810495 {
@@ -10412,7 +10499,7 @@
1041210499 /* arrest */
1041310500 char work[MESG_BUFFER];
1041410501 NPCsay (n, g_mesg, 3);
10415- sprintf (work, MESG ("[You were arrested by %-.24s!]"),
10502+ sprintf (work, MESG ("[You were arrested by %s!]"),
1041610503 CUTTAIL (Npc[n].name));
1041710504 SendSystemMessagePacket (ntarget, work);
1041810505 ClearUser (ntarget);
@@ -10449,9 +10536,9 @@
1044910536 {
1045010537 /* arrest NPC */
1045110538 static const char *h_mesg[3] = {
10452- "%-.24s say,Oh NO! PLEASE HELP ME!",
10453- "%-.24s say,ARGGGH!",
10454- "%-.24s say,Yeah I understand your claim. But..."
10539+ "%s say,Oh NO! PLEASE HELP ME!",
10540+ "%s say,ARGGGH!",
10541+ "%s say,Yeah I understand your claim. But..."
1045510542 };
1045610543 NPCsay (n, g_mesg, 3);
1045710544 NPCsay (ntarget, h_mesg, 3);
@@ -10479,9 +10566,9 @@
1047910566 NPCfire (n, ndir) == 0)
1048010567 {
1048110568 static const char *mesg[3] = {
10482- "%-.24s say,Hey! Stop!",
10483- "%-.24s say,You are BAD HUNTER!",
10484- "%-.24s say,Shoot!"
10569+ "%s say,Hey! Stop!",
10570+ "%s say,You are BAD HUNTER!",
10571+ "%s say,Shoot!"
1048510572 };
1048610573 NPCsay (n, mesg, 3);
1048710574 return;
@@ -10492,9 +10579,9 @@
1049210579 {
1049310580 /* out of range */
1049410581 static const char *mesg[3] = {
10495- "%-.24s say,Shit!",
10496- "%-.24s say,I miss bad hunter.",
10497- "%-.24s say,Oh no! My radar device is malfunction!"
10582+ "%s say,Shit!",
10583+ "%s say,I miss bad hunter.",
10584+ "%s say,Oh no! My radar device is malfunction!"
1049810585 };
1049910586 NPCsay (n, mesg, 3);
1050010587 Npc[n].ntarget_user = -1;
@@ -10579,11 +10666,11 @@
1057910666 if (getrand (1, 100) < HIRENPC_SPEAK_RATE)
1058010667 {
1058110668 static const char *mesg[5] = {
10582- "%-.24s say,sorry.",
10583- "%-.24s say,I cover your back.",
10584- "%-.24s say,Anyone see enemy?",
10585- "%-.24s say,no boggy.",
10586- "%-.24s say,I no see enemy."
10669+ "%s say,sorry.",
10670+ "%s say,I cover your back.",
10671+ "%s say,Anyone see enemy?",
10672+ "%s say,no boggy.",
10673+ "%s say,I no see enemy."
1058710674 };
1058810675 NPCsay (n, mesg, 5);
1058910676 }
@@ -10596,11 +10683,11 @@
1059610683 if (getrand (1, 100) < HIRENPC_SPEAK_RATE)
1059710684 {
1059810685 static const char *mesg[5] = {
10599- "%-.24s say,on the way.",
10600- "%-.24s say,search trap now...",
10601- "%-.24s say,Don't go away from me!",
10602- "%-.24s say,no enemy in sight.",
10603- "%-.24s say,I no see any on my radar."
10686+ "%s say,on the way.",
10687+ "%s say,search trap now...",
10688+ "%s say,Don't go away from me!",
10689+ "%s say,no enemy in sight.",
10690+ "%s say,I no see any on my radar."
1060410691 };
1060510692 NPCsay (n, mesg, 5);
1060610693 }
@@ -10625,9 +10712,9 @@
1062510712 {
1062610713 /* boggy! */
1062710714 static const char *mesg[3] = {
10628- "%-.24s say,Engage enemy!",
10629- "%-.24s say,Hey! Do not enter!",
10630- "%-.24s say,Formation alpha! move to attack position!"
10715+ "%s say,Engage enemy!",
10716+ "%s say,Hey! Do not enter!",
10717+ "%s say,Formation alpha! move to attack position!"
1063110718 };
1063210719 NPCsay (n, mesg, 3);
1063310720 Npc[n].ntarget_user = ntarget;
@@ -10641,9 +10728,9 @@
1064110728 {
1064210729 /* owner is under attack! */
1064310730 static const char *mesg[3] = {
10644- "%-.24s say,Alert! HQ is under attack!",
10645- "%-.24s say,Condition RED! All guard HQ!",
10646- "%-.24s say,Formation sigma! move to support position!"
10731+ "%s say,Alert! HQ is under attack!",
10732+ "%s say,Condition RED! All guard HQ!",
10733+ "%s say,Formation sigma! move to support position!"
1064710734 };
1064810735 NPCsay (n, mesg, 3);
1064910736 Npc[n].ntarget_user = User[nuser].lastuser;
@@ -10655,9 +10742,9 @@
1065510742 {
1065610743 /* animal aproach */
1065710744 static const char *mesg[3] = {
10658- "%-.24s say,I find dangerous animal!",
10659- "%-.24s say,Animal aproach!",
10660- "%-.24s say,Formation delta! move to attack position!"
10745+ "%s say,I find dangerous animal!",
10746+ "%s say,Animal aproach!",
10747+ "%s say,Formation delta! move to attack position!"
1066110748 };
1066210749 NPCsay (n, mesg, 3);
1066310750 Npc[n].ntarget_user = ntarget;
@@ -10718,9 +10805,9 @@
1071810805 if (ndistance == 1 && Npc[n].weapon)
1071910806 {
1072010807 static const char *mesg[3] = {
10721- "%-.24s say,I wanna need your support!",
10722- "%-.24s say,Shit! This enemy is too near!",
10723- "%-.24s say,HAHAHA!"
10808+ "%s say,I wanna need your support!",
10809+ "%s say,Shit! This enemy is too near!",
10810+ "%s say,HAHAHA!"
1072410811 };
1072510812 NPCsay (n, mesg, 3);
1072610813 }
@@ -10729,9 +10816,9 @@
1072910816 if (ndistance < VIEW_LIMIT && Npc[n].reload == 0)
1073010817 {
1073110818 static const char *mesg[3] = {
10732- "%-.24s say,I attack this enemy.",
10733- "%-.24s say,We are under fire!",
10734- "%-.24s say,Cover me!"
10819+ "%s say,I attack this enemy.",
10820+ "%s say,We are under fire!",
10821+ "%s say,Cover me!"
1073510822 };
1073610823 NPCsay (n, mesg, 3);
1073710824 }
@@ -10740,9 +10827,9 @@
1074010827 {
1074110828 /* out of range */
1074210829 static const char *mesg[3] = {
10743- "%-.24s say,I lost target-lock.",
10744- "%-.24s say,no see anyone.",
10745- "%-.24s say,ok. clear."
10830+ "%s say,I lost target-lock.",
10831+ "%s say,no see anyone.",
10832+ "%s say,ok. clear."
1074610833 };
1074710834 NPCsay (n, mesg, 3);
1074810835 Npc[n].ntarget_user = -1;