home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
EVENTS
/
LONEW11.ZIP
/
INITLW.C
next >
Wrap
Text File
|
1989-10-09
|
22KB
|
884 lines
#include <stdio.h>
#include <string.h>
#include "color.h"
#include <dir.h>
struct PLAYER
{
char name[81];
int number,
combat_skill,
endurance,
origendur,
skill[6],
weoponskill,
weopons[3],
money,
food,
moves,
day,
location,
special[101];
long score;
}player,player1;
struct COUNTER
{
int count;
}counter;
struct ROOMCH
{
int roomnum;
int roomtype;
int choice[5];
int dis[5];
int randhi[5];
int randlow[5];
int combat[5];
int endurance[5];
int comadder; /*added to you combat*/
int endadder; /*added to your endurance for this fight*/
int weaponin;
int specialin;
int specialuse;
int specialuse_adder;
int moneyin;
int moneyuse;
int foodin;
int fooduse;
}roomch[361];
struct SCORE
{
char name[81];
long score;
}scores[10];
main()
{
char ch;
printf(CLEAR);
printf("This will initialize the player file and wipe out all games in progress\n");
printf("Should I go on???");
ch=getche();
if(ch=='y' || ch=='Y') init();
}
init()
{
FILE *fptr;
int x,y;
char *one,ch,current[81],path[81],current1[81],path1[81];
getcwd(current,80);
strcpy(path,current);
strcat(path,"\\lonewolf");
if((fptr=fopen("path.lw","w"))==NULL)
{
printf("There is a problem");
exit(0);
}
fputs(path,fptr);
fclose(fptr);
mkdir(path);
printf("\nThe Current directory is %s\n",current);
strcpy(current1,current);
strcat(current1,"\\instruct.sw");
strcpy(path1,path);
strcat(path1,"\\instruct.sw");
rename(current1,path1);
strcpy(current1,current);
strcat(current1,"\\text1.sw");
strcpy(path1,path);
strcat(path1,"\\text1.sw");
rename(current1,path1);
strcpy(current1,current);
strcat(current1,"\\text2.sw");
strcpy(path1,path);
strcat(path1,"\\text2.sw");
rename(current1,path1);
strcpy(current1,current);
strcat(current1,"\\text3.sw");
strcpy(path1,path);
strcat(path1,"\\text3.sw");
rename(current1,path1);
strcpy(current1,current);
strcat(current1,"\\text4.sw");
strcpy(path1,path);
strcat(path1,"\\text4.sw");
rename(current1,path1);
strcpy(current1,current);
strcat(current1,"\\text5.sw");
strcpy(path1,path);
strcat(path1,"\\text5.sw");
rename(current1,path1);
strcpy(current1,current);
strcat(current1,"\\text6.sw");
strcpy(path1,path);
strcat(path1,"\\text6.sw");
rename(current1,path1);
strcpy(current1,current);
strcat(current1,"\\text7.sw");
strcpy(path1,path);
strcat(path1,"\\text7.sw");
rename(current1,path1);
chdir(path);
one="Not Used";
strcpy(player.name,one);
player.number=0;
counter.count=1;
player.combat_skill=0;
player.endurance=0;
player.origendur=0;
for(y=0;y<=5;y++)
{
player.skill[y]=0;
}
player.weoponskill=11;
player.weopons[0]=0;
player.weopons[1]=0;
player.weopons[2]=11;
player.score=0;
player.money=0;
player.food=0;
for(y=0;y<=100;y++)
{
player.special[y]=0;
}
if((fptr=fopen("players.sw","wb")) == NULL)
{
printf("Something is wrong!!!");
exit();
}
else
{
fwrite(&player,sizeof(player),1,fptr);
}
fclose(fptr);
if((fptr=fopen("counters.sw","wb")) == NULL)
{
printf("Something is wrong!!!");
exit();
}
else
{
fwrite(&counter,sizeof(counter),1,fptr);
}
fclose(fptr);
/* this will initialize the rooms for now */
for(x=1;x<=361;x++)
{
roomch[x].roomnum=x;
roomch[x].roomtype=0;
roomch[x].choice[1]=0;
roomch[x].choice[2]=0;
roomch[x].choice[3]=0;
roomch[x].choice[4]=0;
roomch[x].choice[5]=0;
roomch[x].combat[1]=0;
roomch[x].endurance[1]=0;
roomch[x].specialin=0;
roomch[x].specialuse=0;
roomch[x].specialuse_adder=0;
roomch[x].weaponin=12;
}
add_room(1,1,85,275,141,0);
roomch[1].dis[3]=3;
add_room(85,1,229,99,0,0);
add_room(275,2,345,74,0,0);
roomch[275].randlow[1]=0;
roomch[275].randlow[2]=5;
roomch[275].randhi[1]=4;
roomch[275].randhi[2]=9;
add_room(99,1,222,0,0,0);
add_room(222,1,140,252,67,0);
roomch[222].dis[3]=4;
add_room(229,3,267,125,0,0);
roomch[229].combat[1]=16;
roomch[229].endurance[1]=25;
roomch[229].comadder=-1;
add_room(141,1,56,333);
add_room(56,1,222,0,0,0);
add_room(333,1,131,0,0,0);
add_room(140,1,14,252,215,36);
add_room(14,1,43,106,0,0);
add_room(345,1,272,19,0,0);
add_room(131,1,241,55,302,101);
add_room(67,1,140,0,0,0);
add_room(106,1,263,334,0,0);
add_room(252,1,155,70,0,0);
add_room(215,1,346,14,0,0);
add_room(43,3,195,106,0,0);
roomch[43].combat[1]=16;
roomch[43].endurance[1]=10;
add_room(155,1,70,0,0,0);
add_room(70,1,28,157,8,0);
roomch[70].dis[3]=3;
add_room(74,1,138,281,0,0);
add_room(19,1,272,119,69,0);
roomch[19].dis[3]=4;
add_room(272,1,134,305,0,0);
roomch[272].dis[1]=4;
add_room(195,1,59,106,0,0);
add_room(346,4,14,0,0,0);
roomch[346].weaponin=1;
add_room(59,1,124,106,211,0);
add_room(28,1,130,147,0,0);
add_room(334,1,162,73,48,0);
roomch[334].dis[2]=2;
roomch[334].dis[3]=3;
add_room(211,1,173,244,106,0);
roomch[211].dis[2]=3;
add_room(8,1,70,0,0,0);
add_room(30,1,194,261,0,0);
add_room(157,1,30,167);
add_room(167,1,88,264,178,0);
roomch[167].dis[3]=3;
add_room(194,1,208,148,0,0);
add_room(261,1,208,264,0,0);
add_room(264,1,97,6,0,0);
add_room(178,1,88,264,0,0);
add_room(216,1,264,0,0,0);
add_room(88,1,216,31);
roomch[88].dis[1]=5;
add_room(33,33,248,0,0,0);
roomch[33].moneyin=3;
add_room(2,2,343,276,0,0);
roomch[2].randlow[1]=0;
roomch[2].randlow[2]=5;
roomch[2].randhi[1]=4;
roomch[2].randhi[2]=9;
add_room(3,1,196,144,0,0);
add_room(4,1,75,175,218,0);
roomch[4].dis[3]=3;
add_room(5,1,111,0,0,0);
add_room(6,1,183,200,0,0);
add_room(7,2,108,25,0,0);
roomch[7].randlow[1]=0;
roomch[7].randlow[2]=3;
roomch[7].randhi[1]=2;
roomch[7].randhi[2]=9;
add_room(9,9,236,292,0,0);
roomch[9].specialuse=3;
add_room(10,1,115,83,0,0);
add_room(11,1,139,0,0,0);
add_room(12,12,262,247);
roomch[12].moneyuse=10;
add_room(13,1,307,213,0,0);
add_room(15,4,207,201,35,0);
roomch[15].weaponin=5;
add_room(16,1,192,0,0,0);
add_room(17,3,53,274,331,0);
roomch[17].randlow[1]=0;
roomch[17].randlow[2]=1;
roomch[17].randhi[1]=0;
roomch[17].randhi[2]=2;
roomch[17].randlow[3]=3;
roomch[17].randhi[3]=9;
roomch[17].combat[1]=16;
roomch[17].endurance[1]=24;
add_room(18,1,239,114,29,0);
roomch[18].dis[2]=114;
add_room(20,20,272,0,0,0);
roomch[20].weaponin=0;
roomch[20].foodin=2;
add_room(21,2,189,312,0,0);
roomch[21].randlow[1]=0;
roomch[21].randlow[2]=7;
roomch[21].randhi[1]=6;
roomch[21].randhi[2]=9;
add_room(22,2,181,145,0,0);
roomch[22].randlow[1]=0;
roomch[22].randlow[2]=5;
roomch[22].randhi[1]=4;
roomch[22].randhi[2]=9;
add_room(23,9,326,337,151,0);
roomch[23].dis[3]=10;
roomch[23].specialuse=5;
add_room(24,1,234,184);
add_room(25,1,139,0,0,0);
add_room(26,1,249,100,0,0);
add_room(27,1,250,52);
add_room(29,29,270,0,0,0);
roomch[29].combat[1]=17;
roomch[29].endurance[1]=25;
roomch[29].comadder=-2;
add_room(31,1,264,0,0,0);
add_room(32,1,176,340,0,0);
add_room(34,29,328,0,0,0);
roomch[34].combat[1]=17;
roomch[34].endurance[1]=25;
roomch[34].comadder=-2;
add_room(35,1,207,0,0,0);
add_room(36,2,140,323,0,0);
roomch[36].randlow[1]=0;
roomch[36].randlow[2]=5;
roomch[36].randhi[1]=4;
roomch[36].randhi[2]=9;
add_room(37,5,289,282,0,0);
roomch[37].dis[2]=1;
add_room(38,1,128,347,0,0);
add_room(39,1,228,0,0,0);
add_room(40,1,105,0,0,0);
add_room(41,1,174,116,0,0);
add_room(42,1,86,238,157,147);
add_room(44,2,277,338,0,0);
roomch[44].randlow[1]=0;
roomch[44].randlow[2]=5;
roomch[44].randhi[1]=4;
roomch[44].randhi[2]=9;
add_room(45,1,180,0,0,0);
add_room(46,12,246,90,296,0);
roomch[46].moneyuse=2;
roomch[46].dis[3]=3;
add_room(47,1,136,322,0,0);
add_room(48,1,243,0,0,0);
add_room(49,2,339,60,0,0);
roomch[49].randlow[1]=0;
roomch[49].randlow[2]=5;
roomch[49].randhi[1]=4;
roomch[49].randhi[2]=9;
add_room(50,1,97,243,0,0);
add_room(51,1,288,221,0,0);
add_room(52,1,225,250,0,0);
roomch[52].dis[1]=9;
add_room(53,99,0,0,0,0);
add_room(54,99,0,0,0,0);
add_room(55,3,325,0,0,0);
roomch[55].combat[1]=9;
roomch[55].endurance[1]=9;
roomch[55].comadder=4;
add_room(57,1,164,109,308,0);
add_room(58,1,286,160,0,0);
add_room(60,99,0,0,0,0);
add_room(61,1,268,0,0,0);
add_room(62,6,288,0,0,0);
roomch[62].moneyin=28;
roomch[62].foodin=3;
add_room(63,3,269,0,0,0);
roomch[63].combat[1]=11;
roomch[63].endurance[1]=10;
add_room(64,1,188,16,0,0);
add_room(65,1,104,0,0,0);
add_room(66,1,350,0,0,0);
add_room(68,1,130,15,0,0);
add_room(69,1,272,0,0,0);
add_room(71,1,242,104,65,0);
roomch[71].dis[3]=3;
add_room(72,3,265,0,0,0);
roomch[72].combat[1]=15;
roomch[72].endurance[1]=24;
add_room(73,1,243,0,0,0);
add_room(75,1,260,163,0,0);
add_room(76,7,118,0,0,0);
roomch[76].specialin=3;
add_room(77,1,19,0,0,0);
add_room(78,1,132,12,220);
add_room(79,1,204,0,0,0);
add_room(80,1,7,0,0,0);
add_room(81,1,183,200,0,0);
add_room(82,1,235,0,0,0);
add_room(83,1,205,180,232,45);
roomch[83].dis[4]=3;
add_room(84,1,188,0,0,0);
add_room(86,1,6,35,167,42);
add_room(87,1,61,0,0,0);
add_room(89,2,53,274,316,0);
roomch[89].randlow[1]=0;
roomch[89].randlow[2]=2;
roomch[89].randhi[1]=1;
roomch[89].randhi[2]=4;
roomch[89].randlow[3]=5;
roomch[89].randhi[3]=9;
add_room(90,1,18,0,0,0);
add_room(91,1,152,7,198,0);
roomch[91].dis[3]=3;
add_room(92,1,13,0,0,0);
add_room(93,1,106,0,0,0);
add_room(94,33,7,0,0,0);
roomch[94].moneyin=16;
add_room(95,1,240,5,0,0);
add_room(96,1,33,248,0,0);
add_room(97,1,255,306,0,0);
add_room(98,1,139,0,0,0);
add_room(100,1,161,133,257,0);
add_room(101,1,281,0,0,0);
add_room(102,1,284,0,0,0);
add_room(103,1,13,287,0,0);
add_room(104,1,26,100,0,0);
add_room(105,1,298,335,0,0);
roomch[105].dis[1]=9;
add_room(107,1,23,0,0,0);
add_room(108,99,0,0,0,0);
add_room(109,164,308,0,0);
add_room(110,1,55,0,0,0);
add_room(111,1,57,308,0,0);
add_room(112,3,33,248,0,0);
roomch[112].combat[1]=13;
roomch[112].endurance[1]=10;
roomch[112].combat[2]=12;
roomch[112].endurance[2]=10;
add_room(113,6,347,295,0,0);
roomch[113].moneyin=0;
roomch[113].foodin=3;
add_room(114,1,239,0,0,0);
add_room(115,1,150,177,83,0);
add_room(116,1,321,0,0,0);
add_room(117,1,330,0,0,0);
add_room(118,1,224,0,0,0);
add_room(119,8,226,38,0,0);
roomch[119].endadder=-2;
add_room(120,1,84,171,54,0);
add_room(121,1,342,309,283,0);
add_room(122,1,206,0,0,0);
add_room(123,1,304,2,0,0);
add_room(124,7,211,106,0,0);
roomch[124].specialin=6;
roomch[124].moneyin=15;
add_room(125,1,27,214,301,0);
roomch[125].dis[3]=4;
add_room(126,1,46,143,0,0);
add_room(127,99,0,0,0,0);
add_room(128,1,297,336,0,0);
roomch[128].dis[1]=2;
add_room(129,1,3,144,0,0);
add_room(130,5,28,201,0,0);
add_room(132,1,64,0,0,0);
add_room(133,3,266,0,0,0);
roomch[133].combat[1]=16;
roomch[133].endurance[1]=18;
add_room(134,1,305,40,0,0);
add_room(135,1,223,4,0,0);
add_room(136,3,313,0,0,0);
roomch[136].combat[1]=13;
roomch[136].endurance[1]=10;
roomch[136].combat[1]=12;
roomch[136].endurance[1]=10;
roomch[136].comadder=1;
add_room(137,7,23,0,0,0);
roomch[137].specialin=7;
add_room(138,3,291,0,0,0);
roomch[138].combat[1]=13;
roomch[138].endurance[1]=10;
roomch[138].combat[2]=12;
roomch[138].endurance[2]=10;
add_room(139,1,66,0,0,0);
add_room(142,1,58,135,102,0);
add_room(143,1,149,0,0,0);
add_room(144,144,63,217,0,0);
roomch[144].endadder=-2;
roomch[144].fooduse=1;
add_room(145,1,165,0,0,0);
add_room(146,8,154,0,0,0);
roomch[146].endadder=-3;
add_room(147,5,42,28,0,0);
add_room(148,4,81,320,199,0);
roomch[148].weaponin=4;
add_room(149,1,256,0,0,0);
add_room(150,1,83,0,0,0);
add_room(151,1,87,0,0,0);
roomch[151].dis[1]=10;
add_room(152,1,49,231,0,0);
add_room(153,1,202,135,329,0);
add_room(154,99,0,0,0,0);
add_room(156,1,294,245,0,0);
add_room(158,8,106,0,0,0);
roomch[158].endadder=-8;
add_room(159,1,191,234,0,0);
add_room(160,2,286,10,0,0);
roomch[160].randlow[1]=0;
roomch[160].randlow[2]=5;
roomch[160].randhi[1]=4;
roomch[160].randhi[2]=9;
add_room(161,7,209,0,0,0);
roomch[161].specialin=5;
add_room(162,162,258,127,0,0);
roomch[162].dis[1]=10;
add_room(163,1,321,0,0,0);
add_room(164,7,308,0,0,0);
add_room(165,1,212,0,0,0);
add_room(166,8,104,0,0,0);
add_room(168,5,64,0,0,0);
add_room(169,3,23,137,0,0);
roomch[169].combat[1]=16;
roomch[169].endurance[1]=16;
add_room(170,170,319,0,0,0);
roomch[170].combat[1]=17;
roomch[170].endurance[1]=7;
add_room(171,1,303,0,0,0);
add_room(172,1,239,114,29);
roomch[172].dis[2]=1;
add_room(173,9,158,259,0,0);
roomch[173].specialuse=6;
add_room(174,162,190,0,0,0);
add_room(175,1,41,116,182,0);
roomch[175].dis[3]=1;
add_room(176,1,253,126,0,0);
add_room(177,1,83,0,0,0);
add_room(179,1,318,51,0,0);
add_room(180,1,351,22,0,0);
add_room(351,3,62,0,0,0); /*additional room to 180, split it up*/
roomch[351].combat[1]=15;
roomch[351].endurance[1]=20;
roomch[351].combat[2]=13;
roomch[351].endurance[2]=20;
roomch[351].combat[3]=12;
roomch[351].endurance[3]=20;
add_room(181,162,288,0,0,0);
add_room(182,1,174,0,0,0);
add_room(183,1,97,200,0,0);
add_room(184,184,64,0,0,0);
roomch[184].foodin=3;
roomch[184].moneyin=40;
roomch[184].weaponin=5;
add_room(185,99,0,0,0,0);
add_room(186,1,106,0,0,0);
add_room(187,1,186,228,0,0);
add_room(188,2,352,353,0,0);
roomch[188].randlow[1]=0;
roomch[188].randlow[2]=7;
roomch[188].randhi[1]=6;
roomch[188].randhi[2]=9;
add_room(352,162,303,0,0,0); /* additional rooms for 188*/
add_room(353,8,303,0,0,0);
roomch[353].endadder=-3;
add_room(189,1,118,0,0,0);
add_room(190,1,20,273,0,0);
add_room(191,3,24,234,0,0);
roomch[191].combat[1]=11;
roomch[191].endurance[1]=21;
add_room(192,1,171,120,0,0);
add_room(193,1,253,126,0,0);
roomch[193].specialin=10;
add_room(196,1,332,144,0,0);
add_room(197,4,172,0,0,0);
roomch[197].weaponin=3;
add_room(198,1,7,152,0,0);
add_room(199,6,81,0,0,0);
add_room(200,1,78,168,0,0);
roomch[200].dis[2]=1;
add_room(201,1,238,215,130,0);
add_room(202,1,58,0,0,0);
add_room(203,8,344,80,0,0);
roomch[203].endadder=-10;
add_room(204,1,111,0,0,0);
add_room(205,2,181,145,0,0);
roomch[205].randlow[1]=0;
roomch[205].randlow[2]=4;
roomch[205].randhi[1]=5;
roomch[205].randhi[2]=9;
add_room(207,1,30,0,0,0);
add_room(208,3,148,320,0,0);
roomch[208].combat[1]=15;
roomch[208].endurance[1]=13;
add_room(209,1,23,0,0,0);
add_room(210,1,332,37,0,0);
add_room(212,8,350,0,0,0);
roomch[212].endadder=5;
add_room(213,1,331,0,0,0);
add_room(214,1,125,0,0,0);
add_room(217,1,91,7,0,0);
add_room(218,1,75,0,0,0);
add_room(219,99,0,0,0,0);
add_room(220,3,24,234,0,0);
roomch[220].combat[1]=11;
roomch[220].endurance[1]=20;
add_room(221,1,318,0,0,0);
add_room(223,1,75,175,0,0);
add_room(225,1,187,39,0,0);
add_room(226,2,277,338,0,0);
roomch[226].randlow[1]=0;
roomch[226].randlow[2]=4;
roomch[226].randhi[1]=5;
roomch[226].randhi[2]=9;
add_room(227,3,354,0,0,0);
roomch[227].combat[1]=16;
roomch[227].endurance[1]=6;
add_room(354,2,271,348,0,0);
roomch[354].randlow[1]=0;
roomch[354].randlow[2]=4;
roomch[354].randhi[1]=5;
roomch[354].randhi[2]=9;
add_room(228,1,140,215,0,0);
add_room(230,1,179,0,0,0);
add_room(231,3,355,0,0,0);
roomch[231].combat[1]=13;
roomch[231].endurance[1]=20;
add_room(355,2,94,203,7,0);
roomch[355].randlow[1]=0;
roomch[355].randlow[2]=2;
roomch[355].randlow[3]=6;
roomch[355].randhi[1]=1;
roomch[355].randhi[2]=5;
roomch[355].randhi[3]=9;
add_room(232,1,180,22,0,0);
add_room(234,99,0,0,0,0);
add_room(235,5,32,146,254,0);
roomch[235].dis[3]=4;
add_room(236,8,104,0,0,0);
roomch[236].endadder=-8;
add_room(237,2,265,72,0,0);
roomch[237].randlow[1]=0;
roomch[237].randlow[2]=4;
roomch[237].randhi[1]=5;
roomch[237].randhi[2]=9;
add_room(238,1,42,68,0,0);
add_room(239,1,34,118,0,0);
add_room(240,1,79,0,0,0);
add_room(241,1,349,0,0,0);
add_room(242,1,166,9,0,0);
roomch[242].dis[1]=7;
add_room(243,4,97,0,0,0);
roomch[243].weaponin=2;
add_room(244,1,93,0,0,0);
add_room(245,1,190,0,0,0);
add_room(246,3,197,0,0,0);
roomch[246].combat[1]=15;
roomch[246].endurance[1]=23;
add_room(247,1,159,220,0,0);
add_room(248,1,44,300,0,0);
add_room(249,1,169,107,0,0);
add_room(250,1,186,228,0,0);
add_room(251,1,10,0,0,0);
add_room(253,3,278,0,0,0);
roomch[253].combat[1]=13;
roomch[253].endurance[1]=24;
roomch[253].combat[2]=14;
roomch[253].endurance[2]=23;
roomch[253].combat[3]=14;
roomch[253].endurance[3]=22;
roomch[253].combat[4]=15;
roomch[253].endurance[4]=21;
add_room(254,1,32,146,0,0);
add_room(255,3,82,0,0,0);
roomch[255].combat[1]=20;
roomch[255].endurance[1]=30;
add_room(256,1,224,0,0,0);
add_room(257,1,133,161,0,0);
add_room(258,162,50,0,0,0);
add_room(259,99,0,0,0,0);
add_room(260,3,156,0,0,0);
roomch[260].comadder=-4;
roomch[260].combat[1]=11;
roomch[260].endurance[1]=18;
roomch[260].combat[2]=12;
roomch[260].endurance[2]=17;
add_room(262,1,191,234,0,0);
add_room(263,33,70,157,0,0);
roomch[263].moneyin=3;
add_room(265,1,142,0,0,0);
add_room(266,1,209,0,0,0);
add_room(267,7,125,0,0,0);
roomch[267].specialin=11;
add_room(268,1,288,0,0,0);
add_room(269,33,314,7,0,0);
roomch[269].moneyin=10;
add_room(270,1,21,0,0,0);
add_room(271,99,0,0,0,0);
add_room(273,1,179,51,0,0);
add_room(274,274,331,0,0,0);
add_room(276,8,213,0,0,0);
add_room(277,274,113,0,0,0);
add_room(278,1,149,0,0,0);
add_room(279,2,112,96,0,0);
roomch[279].randlow[1]=0;
roomch[279].randlow[2]=7;
roomch[279].randhi[1]=6;
roomch[279].randhi[2]=9;
add_room(280,1,327,170,0,0);
add_room(281,1,311,77,0,0);
add_room(282,1,11,0,0,0);
add_room(283,29,123,0,0,0);
roomch[283].combat[1]=17;
roomch[283].endurance[1]=25;
add_room(284,1,71,0,0,0);
add_room(285,1,325,0,0,0);
add_room(286,99,0,0,0);
add_room(287,1,13,330,0,0);
add_room(288,1,129,0,0,0);
add_room(289,1,139,0,0,0);
add_room(290,4,140,0,0,0);
roomch[290].weaponin=8;
add_room(291,4,272,0,0,0);
roomch[291].weaponin=0;
add_room(292,99,0,0,0,0);
add_room(293,1,281,0,0,0);
add_room(294,294,230,190,321,0);
roomch[294].randlow[1]=0;
roomch[294].randlow[2]=3;
roomch[294].randlow[3]=7;
roomch[294].randhi[1]=2;
roomch[294].randhi[2]=6;
roomch[294].randhi[3]=9;
add_room(295,1,185,92,0,0);
add_room(296,1,90,0,0,0);
add_room(297,1,117,0,0,0);
add_room(298,1,121,38,0,0);
add_room(299,1,227,95,0,0);
add_room(300,5,13,0,0,0);
add_room(301,1,27,0,0,0);
add_room(302,2,110,285,0,0);
roomch[302].randlow[1]=0;
roomch[302].randlow[2]=3;
roomch[302].randhi[1]=2;
roomch[302].randhi[2]=9;
add_room(303,1,237,72,0,0);
roomch[303].dis[1]=1;
add_room(304,304,2,0,0,0);
roomch[304].endadder=-2;
roomch[304].specialin=3;
add_room(305,4,105,0,0,0);
roomch[305].weaponin=1;
add_room(306,99,0,0,0,0);
add_room(307,6,213,0,0,0);
roomch[307].foodin=1;
add_room(309,99,0,0,0,0);
add_room(310,1,37,0,0,0);
add_room(311,1,279,47,324,0);
roomch[311].dis[3]=1;
add_room(312,1,299,0,0,0,0);
add_room(313,8,248,0,0,0);
roomch[313].endadder=-1;
add_room(314,2,341,98,0,0);
roomch[314].randlow[1]=0;
roomch[314].randlow[2]=7;
roomch[314].randhi[1]=6;
roomch[314].randhi[2]=9;
add_room(315,10,213,0,0,0);
roomch[315].moneyin=6;
roomch[315].specialin=12;
add_room(316,1,331,0,0,0);
add_room(317,1,61,0,0,0);
add_room(318,1,129,0,0,0);
add_room(319,10,157,0,0,0);
roomch[319].moneyin=20;
add_room(320,8,264,0,0,0);
roomch[320].endadder=-2;
add_room(321,1,273,0,0,0);
add_room(322,1,17,89,0,0);
add_room(323,1,290,140,0,0);
add_room(324,1,33,248,0,0);
add_room(325,1,349,0,0,0);
add_room(326,1,61,0,0,0);
add_room(327,99,0,0,0,0);
add_room(328,1,76,118,0,0);
add_room(329,1,284,0,0,0);
add_room(330,1,315,213,0,0);
add_room(331,1,170,280,0,0);
add_room(332,1,350,0,0,0);
add_room(335,1,121,0,0,0);
add_room(336,3,117,0,0,0);
roomch[336].combat[1]=14;
roomch[336].endurance[1]=11;
roomch[336].combat[2]=13;
roomch[336].endurance[2]=11;
add_room(337,2,219,317,0,0);
roomch[337].randlow[1]=0;
roomch[337].randlow[2]=7;
roomch[337].randhi[1]=6;
roomch[337].randhi[2]=9;
add_room(338,1,113,0,0,0);
add_room(339,3,356,0,0,0);
roomch[339].combat[1]=13;
roomch[339].endurance[1]=20;
add_room(356,2,94,203,7,0);
roomch[356].randlow[1]=0;
roomch[356].randlow[2]=2;
roomch[356].randhi[1]=1;
roomch[356].randhi[2]=5;
roomch[356].randlow[3]=6;
roomch[356].randlow[3]=9;
add_room(340,3,193,0,0,0);
roomch[340].combat[1]=14;
roomch[340].endurance[1]=24;
add_room(341,1,210,37,310,0);
roomch[341].dis[3]=4;
add_room(342,29,123,0,0,0);
roomch[342].comadder=-2;
roomch[342].combat[1]=18;
roomch[342].endurance[1]=26;
add_room(343,8,213,0,0,0);
roomch[343].endadder=-2;
add_room(344,1,60,0,0,0);
add_room(347,7,103,0,0,0);
roomch[347].specialin=9;
add_room(348,1,95,0,0,0);
add_room(349,7,293,0,0,0);
roomch[349].specialin=13;
add_room(350,350,0,0,0,0);
if((fptr=fopen("rooms.sw","wb")) == NULL)
{
printf("Something is wrong!!!");
exit();
}
else
{
for(x=0;x<=360;x++)
{
fwrite(&roomch[x],sizeof(roomch[x]),1,fptr);
}
}
fclose(fptr);
if((fptr=fopen("scores.sw","wb")) == NULL)
{
printf("Something is wrong!!!");
exit();
}
for(x=0;x<=9;x++)
{
strcpy(scores[x].name,"Noone");
scores[x].score=0;
fwrite(&scores[x],sizeof(scores[x]),1,fptr);
}
fclose(fptr);
chdir(current);
}
add_room(num,type,c1,c2,c3,c4)
int num,type,c1,c2,c3,c4;
{
roomch[num].roomtype=type;
roomch[num].choice[1]=c1;
roomch[num].choice[2]=c2;
roomch[num].choice[3]=c3;
roomch[num].choice[4]=c4;
}