|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T f
Length: 2454 (0x996)
Types: TextFile
Names: »frob.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/General/Abermud/frob.c«
#include "kernel.h"
#ifdef RCSID
static char RCS[] =
"$Header: frob.c,v 1.1 89/03/13 09:36:20 rsalz Exp $";
#endif /* RCSID */
frobnicate()
{
int x;
char ary[128], bf1[8], bf2[8], bf3[8];
if (plev(mynum) < 10000) {
bprintf("No way buster.\n");
return;
}
if (brkword() == -1) {
bprintf("Who though ?\n");
return;
}
if ((x = fpbn(wordbuf)) == -1) {
frobinfile();
return;
}
if (x > 15) {
bprintf("Can't frob mobiles old bean.\n");
return;
}
if ((plev(x) > 9999) && (!op(pname(mynum)))) {
bprintf("You can't frobnicate %s!\n", pname(x));
return;
}
bprintf("Level is : %d\n", plev(x));
sig_alon();
key_input("New Level: ", 6);
strcpy(bf1, key_buff);
sig_aloff();
if (atoi(bf1) > 9999 && !op(pname(mynum))) {
bprintf("You can't do that.\n");
return;
}
bprintf("Score is : %d\n", pscore(x));
sig_alon();
key_input("New Score: ", 6);
sig_aloff();
strcpy(bf2, key_buff);
bprintf("Strength is : %d\n", pstr(x));
sig_alon();
key_input("New Strength: ", 8);
sig_aloff();
strcpy(bf3, key_buff);
sprintf(ary, "%s.%s.%s.", bf1, bf2, bf3);
sendsys(pname(x), pname(x), -599, 0, ary);
closeworld();
mudlog("FROB: %s by %s", pname(x), pname(mynum));
mudlog("FROB: %s %s", ary, "");
bprintf("Ok....\n");
}
frobinfile()
{
PERSONA x;
char ary[128];
char bf1[8], bf2[8], bf3[8];
if (findpers(wordbuf, &x) == 0) {
bprintf("No such persona in system....\n");
return;
}
if (x.p_level > 9999 && !op(pname(mynum))) {
bprintf("You can't frobnicate %s!\n", wordbuf);
return;
}
bprintf("Level is : %d\n", x.p_level);
sig_alon();
key_input("New Level: ", 6);
strcpy(bf1, key_buff);
sig_aloff();
if (atoi(bf1) > 9999 && !op(pname(mynum))) {
bprintf("You can't do that.\n");
return;
}
bprintf("Score is : %d\n", x.p_score);
sig_alon();
key_input("New Score: ", 6);
sig_aloff();
strcpy(bf2, key_buff);
bprintf("Strength is : %d\n", x.p_strength);
sig_alon();
key_input("New Strength: ", 8);
sig_aloff();
strcpy(bf3, key_buff);
sprintf(ary, "%s.%s.%s.", bf1, bf2, bf3);
mudlog("FROB: %s by %s", wordbuf, pname(mynum));
mudlog("FROB: %s %s", ary, "");
sscanf(bf1, "%d", &(x.p_level));
sscanf(bf2, "%d", &(x.p_score));
sscanf(bf3, "%d", &(x.p_strength));
putpers(wordbuf, &x);
bprintf("Ok....\n");
}