公共变量模块.bas
资源名称:vbmcrisrc.rar [点击查看]
上传用户:pcw2004
上传日期:2022-02-02
资源大小:743k
文件大小:8k
源码类别:
DirextX编程
开发平台:
Visual Basic
- Attribute VB_Name = "公共变量模块"
- Option Explicit
- Public Declare Function GetTickCount Lib "kernel32" () As Long
- Public LTime As Long
- ' Download by http://www.codefans.net
- Public mStart As Boolean
- Public mExp As Integer '经验值倍数
- '//////// 定义动作属性
- Public Enum HeroActType
- Stand_站立 = 1
- walk_走 = 2
- AttAck_攻击 = 3
- Bruise_受伤 = 4
- Dead_死亡 = 5
- Run_跑 = 6
- Attack_等待 = 7
- Magic_魔法 = 8
- End Enum
- Public Enum MonActType
- Stone_怪石化 = 1
- Stand_怪站立 = 2
- Move_怪移动 = 3
- AttAck_怪攻击 = 4
- Bruise_怪受伤 = 5
- Dead_怪死亡 = 6
- End Enum
- '///// 定义方向属性
- Public Enum FaceInfo
- UpFace = 0
- RightUpFace = 1
- RightFace = 2
- RightDownFace = 3
- DownFace = 4
- LeftDownFace = 5
- LeftFace = 6
- LeftUpFace = 7
- End Enum
- '/////////// 定义物品种类属性
- Public Enum ResType
- 道具 = 1
- 药品 = 2
- 书籍 = 3
- 衣服 = 4
- 项链 = 5
- 头盔 = 6
- 武器 = 7
- 手镯 = 8
- 戒指 = 9
- End Enum
- ' 定义物品属性
- Public Type ItemType
- Idx As Integer
- Name As String
- StdMode As Integer
- Shape As Integer
- Weight As Integer
- Anicount As Integer
- Source As Integer
- Reserved As Integer
- Looks As Integer
- DuraMax As Long
- AC As Integer
- Ac2 As Integer
- MAC As Integer
- Mac2 As Integer
- DC As Integer
- Dc2 As Integer
- MC As Integer
- Mc2 As Integer
- SC As Integer
- Sc2 As Integer
- Need As Integer
- NeedLevel As Integer
- Price As Long
- End Type
- Public ItemDBCount As Integer
- Public ItemDB() As ItemType
- Public Type ItemState
- Id As Integer
- State As Boolean
- Item As ItemType
- End Type
- '角色属性
- Public Type PlayerInfo
- State As Integer
- Dead As Boolean
- Name_名字 As String
- X As Long
- Y As Long
- Exp_经验值 As Long
- XOFFECT As Single
- YOFFECT As Single
- CanAct As Boolean
- Act As HeroActType
- ActState As HeroActType
- Pic As Integer
- PicSpeed As Integer
- Face As FaceInfo '方向
- MagicLockType As Integer '魔法锁定类型 1玩家 2怪
- MagicLockNum As Integer '魔法锁定编号
- MagicX As Integer '施放魔法目标X
- MagicY As Integer '施放魔法目标Y
- Bag(39) As ItemState '定义包袱变量
- Magic盾 As Boolean '是否启用魔法盾
- Magic盾LTime As Long '魔法盾开始时间
- Magic盾PTime As Long '魔法盾持续时间
- Magic盾Pic As Long
- Magic盾StartPic As Long
- Magic盾PicSpeed As Integer
- Magic盾MaxPic As Integer
- AC_自身物防 As Long
- MAC_自身魔防 As Long
- DC_自身攻击 As Long
- MC_自身魔法 As Long
- SC_自身道术 As Long
- AC1 As Long
- Ac2 As Long
- MAC1 As Long
- Mac2 As Long
- DC1 As Long
- Dc2 As Long
- MC1 As Long
- Mc2 As Long
- SC1 As Long
- Sc2 As Long
- Clothing As ItemState
- Weapon As ItemState
- HeadPiece As ItemState
- Necklace As ItemState
- BraceletLeft As ItemState
- BraceletRight As ItemState
- FingerRingLeft As ItemState
- FingerRingRight As ItemState
- WalkSpeed_行走速度 As Integer
- WalkWait_行走等待 As Integer
- ActSpeed_攻击速度 As Integer
- HP As Long
- MaxHP As Long
- MP As Long
- MaxMP As Long
- PK值 As Integer
- Level As Long
- Fame_声望值 As Integer
- HeroMap As String
- HomeMap As String
- HomeX As Integer
- HomeY As Integer
- Gold_金币 As Long
- Sex_性别 As Integer
- Job_职业 As Integer
- Map_地图 As String
- LoginTime As String
- Connected As Boolean
- ConnectIP As String
- End Type
- Public playercount As Long
- Public Player() As PlayerInfo
- Public SaveHero As PlayerInfo
- '//////////// 注册玩家信息
- Public SavePlayerCount As Long
- Public SavePlayer() As PlayerInfo
- Public Type RegPlayerType
- PlayerName As String
- Level As Integer
- Job As Integer
- Sex As Integer
- End Type
- Public Type RegPlayerInfo
- Id As String
- SavePlayerCount As Integer
- mPlayer() As RegPlayerType
- SelNum As Integer
- mLogin As Boolean
- End Type
- Public RegPlayerCount As Long
- Public RegPlayer() As RegPlayerInfo
- '/////// 定义怪物数据
- Public Type MonDBInfo
- Name_名称 As String
- Race_种族 As Integer
- RaceImage_种族图像 As Integer
- Appr_形象代码 As Integer
- Level_等级 As Integer
- UnDead_不死系 As Integer
- CoolEye_视觉范围 As Integer
- Exp_经验值 As Long
- HP As Long
- MP As Long
- AC As Long
- MAC As Long
- DC_攻击力 As Long
- DCMax_最大攻击力 As Long
- MC_魔法力 As Long
- SC_道术力 As Long
- Speed_速度 As Integer
- Hit_命中率 As Integer
- WalkSpeed_行走速度 As Integer
- WalkStep_行走步伐 As Integer
- WalkWait_行走等待 As Integer
- AttactSpeed_攻击速度 As Integer
- End Type
- Public MonDBCount As Integer
- Public MonDB() As MonDBInfo
- '////// 定义怪物属性
- Public Type MonInfo
- Dead As Boolean
- DeadLTime As Long
- X As Long
- Y As Long
- Id As Long
- Face As FaceInfo
- XOFFECT As Single
- YOFFECT As Single
- CanAct As Boolean
- Act As MonActType
- ActState As Integer
- Pic As Integer
- PicSpeed As Integer
- DBInfo As MonDBInfo
- 追击 As Boolean
- 追击目标 As Integer
- Way(1000) As P_xy
- WayPath As Long
- HP As Long
- MaxHP As Long
- Map_地图 As String
- LassWalkTime As Long
- End Type
- Public MonCount As Long
- Public Mon() As MonInfo
- '////// 定义魔法数据属性
- Public Type MagicDBInfo
- MagID_序号 As Integer
- MagName_名称 As String
- EffectType_动作效果 As Integer
- Effect_魔法效果 As Integer
- Spell_魔法消耗 As Integer
- Power_基本威力 As Integer
- MaxPower_最大威力 As Integer
- DefSpell_升级魔法 As Integer
- DefPower_升级威力 As Integer
- DefMaxPower_升最大威力 As Integer
- Job_职业 As Integer
- NeedL1_1级等级 As Integer
- L1Train_1级经验 As Long
- NeedL2_2级等级 As Integer
- L2Train_2级经验 As Long
- NeedL3_3级等级 As Integer
- L3Train_3级经验 As Long
- Delay_技能延时 As Integer
- Descr_备注说明 As String
- End Type
- Public MagicDBCount As Integer
- Public MagicDB() As MagicDBInfo
- '////////// 各等级所需经验值
- Public LevelExp(255) As Long
- Public LevelHP(255) As Long
- Public HPayerCount As Integer
- Public HPlayerInfo() As PlayerInfo
- Public HMonCount As Integer
- Public HMonInfo() As MonInfo
- '//////// 定义地图属性
- Public Type MapType
- Width As Long
- Height As Long
- Map1() As Long '地板
- Map2() As Long '遮挡层
- Map3() As Long '人
- Map4() As Long '怪
- Map5() As Long 'NPC
- End Type
- Public Map As MapType
- '/////// 定义地图上物品属性
- Public Type MapItemType
- X As Long
- Y As Long
- Id As Long
- State As Boolean
- mItem As ItemType
- mTime As Long
- End Type
- Public MapItemCount As Long '定义地图上物品数量
- Public MapItem() As MapItemType '定义地图上物品
- '//////// 定义怪物物品变量
- Public Type MonItemsType
- BaoLi As Long
- ItemName As String
- mCount As Long
- End Type
- Public Type MonItemsFileType
- MonName As String
- mItemCount As Integer
- mItem() As MonItemsType
- End Type
- Public MonItemsFile As Long
- Public MonItems() As MonItemsFileType
- '///// 定义刷怪变量
- Public Type MonGenType
- MonName As String
- X As Integer
- Y As Integer
- mCount As Integer
- Pos As Integer
- mTime As Integer
- LTime As Integer
- End Type
- Public MonGenCount As Integer
- Public MonGen() As MonGenType