Category : BBS Programs+Doors
Archive   : DND27A.ZIP
Filename : DNDBBS.INC

 
Output of file : DNDBBS.INC contained in archive : DND27A.ZIP

' tm
' --------------- C O P Y W A R E ---------------
'
' Supported by the PC SIG Library
'
' +------------------------------------------------------------------+
' | Dungeon and Dragons Bulletin Board System Version 2.7a |
' | This program is distributed with the Copyware rights agreement. |
' | Valued contributions can be made to: |
' | Erik J. Oredson |
' | 1215 South 9th Street |
' | Minneapolis, Minnesota, 55404 |
' | |
' | You are allowed to distribute DnDBBS with the Copyware rights |
' | agreements set forth here: |
' | 1. This program is not modified before distribution. |
' | 2. The DnDBBS files are not resold for profit. |
' | 3. The copyware notices are not altered or removed. |
' +------------------------------------------------------------------+
' (C) Copyright 1988, 1989, 1990 Erik J. Oredson, All Rights Reserved.
'

Type RegType
AX As Integer
BX As Integer
CX As Integer
DX As Integer
BP As Integer
SI As Integer
DI As Integer
Flags As Integer
End Type

Type RoomType
LongDescription As String*316
ShortDescription As String*78
Level As Integer
Directions As String*22
Restrictions As Integer
MonsterClass As Integer
SpellTrigger As Integer
MonsterTrigger As Integer
HealthRate As Integer
EncounterRate As Integer
HitPoints As Integer
Inventory As Integer
MonsterTalk As Integer
Fumble As Integer
Teleport As Integer
Object As String*40
ObjectCharges As String*40
Ver As Integer
Flags As Integer
ObjectInvisible As String*20
End Type

Type UserType
Inventory As String*40
InventoryCharges As String*40
CodeName As String*30
PassWord As String*20
ClassName As String*20
ClassType As Integer
Stats As String*14
Weapons As String*8
Room As Integer
Level As Integer
Experience As Double
Gold As Double
NumCalls As Integer
Fatigue As Integer
FatigueMax As Integer
Vitality As Integer
VitalityMax As Integer
Magic As Integer
MagicMax As Integer
Poison As Integer
LastMessage As Integer
Invisible As Integer
Race As Integer
Proficiency As Integer
Bank As Double
PlayersKilled As Integer
MonstersKilled As Single
Brief As Integer
DateOn As String*10
Linefeed As Integer
Psionic As Integer
PsionicMax As Integer
Align1 As Integer
Align2 As Integer
Flags As Integer
End Type

Type SpellType
SpellName As String*30
Chant As String*80
Level As Integer
SpellType As Integer
Teleport As Integer
Psionic As Integer
PsionicMode As Integer
ClassType As Integer
Description As String*80
EmptyBuffer As String*54
End Type

Type MonclassType
Monsters As String*20
End Type

Type LogType
User As Integer
Message As String*80
End Type

Type ContainerType
Inventory As Integer
InventoryCharges As Integer
InventoryInvisible As Integer
TreasureName As String*30
End Type

Type DoorType1
EmptyBuffer As String*164
Baud As Integer
End Type

Type DoorType2
EmptyBuffer As String*10
Baud As String*4
End Type

Type DoorType3
EmptyBuffer As String*13
Baud1 As String*5
Baud2 As String*5
End Type

Type ExitType1
Inventory As Integer
InventoryCharges As Integer
End Type

Type ExitType2
Monster1 As String*10
Monster2 As String*44
MonsterName As String*30
End Type

Type ObjectType
ObjectName As String*30
ShortName As String*30
RoomLink As Integer
Invisible As Integer
JailTrap As Integer
DoorLock As Integer
Location As Integer
Permanent As Integer
Hidden As Integer
Closed As Integer
Keyed As Integer
Relocks As Integer
Vehicle As Integer
VehicleHits As Integer
LongDescription As String*128
ShortDescription As String*40
Trap As Integer
Teleport As Integer
End Type

Type MonsterType
MonsterName As String*30
PluralName As String*30
Treasure As String*10
Experience As Integer
NumberAppearing As Integer
Level As Integer
Hits As Integer
Poison As Integer
LevelDrain As Integer
Spell As Integer
Block As Integer
Prevent As Integer
Follow As Integer
Magic As Integer
Jail As Integer
Teleport As Integer
FollowPercent As Integer
BlockPercent As Integer
PreventPercent As Integer
SpellPercent As Integer
PoisonPercent As Integer
DrainPercent As Integer
Rate As Integer
RatePercent As Integer
Permanent As Integer
Talk As String*10
Psionic As Integer
PsionicPercent As Integer
End Type

Type MonsterTalkType
TalkMessage As String*80
End Type

Type TreasureType
TreasureName As String*30
ShortName As String*30
Weight As Integer
Gold As Integer
Spell As Integer
Plus As Integer
Coin As Integer
Keyed As Integer
Scroll As Integer
Charges As Integer
Container As Integer
ContainerFilename As String*8
ContainerMax As Integer
TreasureType As Integer
Potion As Integer
Locked As Integer
Closed As Integer
Loadable As Integer
Ammunition As Integer
AmmoLoads As Integer
Invisible As Integer
Proficiency As Integer
RingType As Integer
RingCharges As Integer
EmptyBuffer As String*18
End Type

Type MessageType
Message As String*81
End Type

Type TableType
MessageTime As String*21
MessageFrom As String*30
MessageTo As String*30
MessageSubject As String*20
MessageLength As Integer
MessageKilled As String*1
MessageStart As Integer
End Type

Type NodeType
LocalMode As Integer
UserIndex As Integer
ColorGraphics As Integer
Room As Integer
TimeOn As Single
TimeLeft As Single
Shelled As Integer
Remote as Integer
RoomMax As Integer
InventoryMax As Integer
MonstersMax As Integer
NumberMonsters As Integer
Inventory As Integer
Port As Integer
FossilActive As Integer
ModemPort As Integer
TimeLoggedIn As String*8
Weapon1 As Integer
Weapon2 As Integer
Weapon3 As Integer
Weapon4 As Integer
Weapon5 As Integer
Weapon6 As Integer
Weapon7 As Integer
Weapon8 As Integer
Weapon9 As Integer
Weapon10 As Integer
Auxiliary As Integer
LastCommand as Integer
ParsedCommand as String*20
End Type

Type MessType1
UserName As String*30
ClassName As String*20
UserIndex As Integer
TimeOn As String*8
LastCommand As String*20
Room As Integer
Level As Integer
EmptyBuffer As String*34
End Type

Type MessType2
Flags As Integer
MessageType As Integer
UserIndex As Integer
Room As Integer
UserName As String*30
Message As String*80
End Type

DefStr A-B
DefInt C-Z

Dim AlignmentName1$(3),_
AlignmentName2$(3),_
ClassName$(10),_
Config!(29),_
Config(67),_
Config$(54),_
Direction$(11),_
NodeWorkArray1$(9),_
NodeWorkArray2(9),_
Numeral$(10),_
Race$(8),_
RoomArray$(16),_
Stat$(7),_
TrainingRoom(10,4),_
WeaponTypeName$(4)

Common Shared AlignmentName1$(),_
AlignmentName2$(),_
All.Commands() As String*30,_
All.Commands2() As String*30,_
All.MonsterNames() As String*30,_
AllowBreak%,_
Alt.Mess$,_
Break%,_
CarriageReturn,_
Chat,_
Choice,_
ClassName$(),_
Clear.Screen,_
Color.Code,_
Color.Graphics,_
Config!(),_
Config$(),_
Config(),_
ContainerRecord As ContainerType,_
Data.Error,_
Data.Path$,_
Debug,_
Direction$(),_
Direction,_
Disk.Log.Filename$,_
Disk.Log.On,_
DnD.Path$,_
Door.Time!,_
Door1 As DoorType1,_
Door2 As DoorType2,_
Door3 As DoorType3,_
Dungeon.Master,_
Dungeon.Master.Assistant,_
Echo,_
Exit$,_
Exit1 As ExitType1,_
Exit2 As ExitType2,_
Exit.Function,_
Extension$,_
FileName$,_
Graphics.Off,_
Hidden.Player,_
Hide,_
Inregs As RegType,_
Last.Command$,_
Last.Command,_
Last.Command.Type,_
Last.Monster$,_
LineLength,_
Local.Mode,_
LogRecord As LogType,_
Magic.Spell,_
Mess$,_
MessWorkRecord1 As MessType1,_
MessWorkRecord2 As MessType2,_
Message1$,_
Message2$,_
MessageRecord As MessageType,_
Modem.Out$,_
Monclass.Max,_
MonclassRecord As MonclassType,_
Monster(2),_
Monster.Rate,_
Monster.Rate2,_
Monster.Temp,_
MonsterClass() As String*20,_
MonsterPercent(2),_
MonsterRate(2),_
MonsterRecord As MonsterType,_
MonsterTalkRecord As MonsterTalkType,_
MonsterTreasure(2),_
Multiplier,_
New.Room,_
Next.Room,_
No,_
NoEcho,_
NoInput,_
Node$,_
Node,_
Node2$,_
NodeRecord As NodeType,_
NodeWorkArray1$(),_
NodeWorkArray2(),_
Noden,_
Normal.User,_
Null.Errors,_
Number.Appearing,_
Number.Inventory,_
Number.Monsters,_
Number.MonstersMax,_
Numeral$(),_
ObjectRecord As ObjectType,_
Out$,_
Out2$,_
Out3$,_
Out4$,_
Outregs As RegType,_
Overflow,_
Parse.Temp,_
Parsed.Command$,_
Parsed.Command2$,_
Parser,_
PassDoor,_
Port,_
Prefix1$,_
Prefix2$,_
Previous.Command,_
Printer.On,_
Psi.Attack.Mode,_
Psi.Defense.Mode,_
Race$(),_
Room,_
Room.Health.Rate,_
Room.Monster.Rate,_
Room.Rate,_
Room.Treasure.Max,_
RoomArray$(),_
RoomInventory(1),_
RoomInventoryCharges(1),_
RoomRecord As RoomType,_
Security.Guard,_
SpellRecord As SpellType,_
Stat$(),_
Stored.Parsed.Command$,_
Stored.Parsed.Command2$,_
TableRecord As TableType,_
Temp,_
Temp1,_
Temp2,_
Temp3,_
Temp4,_
Temp5,_
Temp6,_
Temp7,_
Temp9,_
TempA,_
TempB,_
TempC,_
TempD,_
TempArray(1),_
TempArray2(1),_
Time.Left!,_
Time.On!,_
Time.On$,_
Token,_
Token.Index,_
TrainingRoom(),_
Treasure(1),_
Treasure.Max,_
TreasureCharges(1),_
TreasureRecord As TreasureType,_
TwoMinutesLeft,_
Type.Ahead$,_
UserArray1(1),_
UserArray2(1),_
UserArray3(1),_
UserIndex,_
UsersMax,_
UserRecord As UserType,_
Vehicle1,_
Vehicle2,_
Vehicle3,_
Weapon1,_
Weapon10,_
Weapon2,_
Weapon3,_
Weapon4,_
Weapon5,_
Weapon6,_
Weapon7,_
Weapon8,_
WeaponTypeName$(),_
WeaponsList(1),_
Weight,_
WordWrap,_
Yes

Def FNobject(Temp)=Cvi(Mid$(RoomRecord.Object,(Temp-1)*2+1,2))
Def FNobjectX(Temp)=Cvi(Mid$(RoomRecord.ObjectCharges,(Temp-1)*2+1,2))
Def FNobjectZ(Temp)=Cvi(Mid$(RoomRecord.ObjectInvisible,Temp,1)+Chr$(0))
Def FNdirection(Temp)=Cvi(Mid$(RoomRecord.Directions,(Temp-1)*2+1,2))
Def FNmonsterclass(Temp1,Temp2)=Cvi(Mid$(MonsterClass(Temp1),(Temp2-1)*2+1,2))
Def FNstat(Temp)=Cvi(Mid$(UserRecord.Stats,(Temp-1)*2+1,2))
Def FNweapon(Temp)=Cvi(Mid$(UserRecord.Weapons,(Temp-1)*2+1,2))
Def FNinventory(Temp)=Cvi(Mid$(UserRecord.Inventory,(Temp-1)*2+1,2))
Def FNinventoryX(Temp)=Cvi(Mid$(UserRecord.InventoryCharges,(Temp-1)*2+1,2))
Def FNdescription$(Temp)=Mid$(RoomRecord.LongDescription,(Temp-1)*79+1,79)
Def FNmonster(Temp)=Cvi(Mid$(MonsterRecord.Treasure,(Temp-1)*2+1,2))
Def FNmaketointeger$(Temp)=Mid$(Mki$(Temp),1,1)
Def FNinroom(Temp$)=Instr(Temp$,","+Mid$(Str$(Room),2)+",")

Def FNupper$(Temp$)
Temp2$=Temp$
Mid$(Temp2$,1,1)=Ucase$(Mid$(Temp2$,1,1))
FNupper$=Temp2$
End Def

Def FNdatetime$
Temp$=Right$(Date$,2)+" "
Temp$=Temp$+Mid$("JanFebMarAprMayJunJulAugSepOctNovDec",Val(Left$(Date$,2))*3-2,3)
Temp$=Temp$+" "+Mid$(Date$,4,2)+","
Temp=Val(Left$(Time$,2))
Temp2$=Mid$(" am pm",(1-(Temp>12))*3-2,3)
Temp=Temp+12*(Temp>12)-12*(Temp=0)
Temp2$=" "+Temp$+Str$(Temp)+Mid$(Time$,3,3)+Temp2$
FNdatetime$=Temp2$
End Def

Const False=0
Const True=-1
Const TruePlus=1