📄 mshare.pas
字号:
unit MShare;
interface
uses
Windows, Classes, SysUtils, cliutil, Forms, DXDraws, DWinCtl,
WIL, Actor, Grobal2, SDK, DXSounds, IniFiles, Share, GShare;
type
TTimerCommand = (tcSoftClose, tcReSelConnect, tcFastQueryChr, tcQueryItemPrice);
TChrAction = (caWalk, caRun, caHorseRun, caHit, caSpell, caSitdown);
TConnectionStep = (cnsLogin, cnsSelChr, cnsReSelChr, cnsPlay);
TMovingItem = record
Index: integer;
Item: TClientItem;
end;
TPowerBlock = array[0..100-1] of Word;
pTMovingItem = ^TMovingItem;
TItemType = (i_HPDurg,i_MPDurg,i_HPMPDurg,i_OtherDurg,i_Weapon,i_Dress,i_Helmet,i_Necklace,i_Armring,i_Ring,i_Belt,i_Boots,i_Charm,i_Book,i_PosionDurg,i_UseItem,i_Scroll,i_Stone,i_Gold,i_Other);
// [药品] [武器][衣服][头盔][项链][手镯][戒指][腰带][鞋子][宝石][技能书][毒药][消耗品][其它]
{
i_HPDurg :Result:='金创药';
i_MPDurg :Result:='魔法药';
i_HPMPDurg :Result:='高级药';
i_OtherDurg :Result:='其它药品';
}
TShowItem = record
sItemName :String;
ItemType :TItemType;
boAutoPickup :Boolean;
boShowName :Boolean;
nFColor :Integer;
nBColor :Integer;
end;
pTShowItem = ^TShowItem;
TControlInfo = record
Image :Integer;
Left :Integer;
Top :Integer;
Width :Integer;
Height :Integer;
Obj :TDControl;
end;
pTControlInfo = ^TControlInfo;
TConfig = record
DMsgDlg :TControlInfo;
DMsgDlgOk :TControlInfo;
DMsgDlgYes :TControlInfo;
DMsgDlgCancel :TControlInfo;
DMsgDlgNo :TControlInfo;
DLogIn :TControlInfo;
DLoginNew :TControlInfo;
DLoginOk :TControlInfo;
DLoginChgPw :TControlInfo;
DLoginClose :TControlInfo;
DSelServerDlg :TControlInfo;
DSSrvClose :TControlInfo;
DSServer1 :TControlInfo;
DSServer2 :TControlInfo;
DSServer3 :TControlInfo;
DSServer4 :TControlInfo;
DSServer5 :TControlInfo;
DSServer6 :TControlInfo;
DNewAccount :TControlInfo;
DNewAccountOk :TControlInfo;
DNewAccountCancel :TControlInfo;
DNewAccountClose :TControlInfo;
DChgPw :TControlInfo;
DChgpwOk :TControlInfo;
DChgpwCancel :TControlInfo;
DSelectChr :TControlInfo;
DBottom :TControlInfo;
DMyState :TControlInfo;
DMyBag :TControlInfo;
DMyMagic :TControlInfo;
DOption :TControlInfo;
DBotMiniMap :TControlInfo;
DBotTrade :TControlInfo;
DBotGuild :TControlInfo;
DBotGroup :TControlInfo;
DBotPlusAbil :TControlInfo;
DBotFriend :TControlInfo;
DBotMemo :TControlInfo;
DBotExit :TControlInfo;
DBotLogout :TControlInfo;
DBelt1 :TControlInfo;
DBelt2 :TControlInfo;
DBelt3 :TControlInfo;
DBelt4 :TControlInfo;
DBelt5 :TControlInfo;
DBelt6 :TControlInfo;
DGold :TControlInfo;
DRepairItem :TControlInfo;
DClosebag :TControlInfo;
DMerchantDlg :TControlInfo;
DMerchantDlgClose :TControlInfo;
DConfigDlg :TControlInfo;
DConfigDlgOk :TControlInfo;
DConfigDlgClose :TControlInfo;
DMenuDlg :TControlInfo;
DMenuPrev :TControlInfo;
DMenuNext :TControlInfo;
DMenuBuy :TControlInfo;
DMenuClose :TControlInfo;
DSellDlg :TControlInfo;
DSellDlgOk :TControlInfo;
DSellDlgClose :TControlInfo;
DSellDlgSpot :TControlInfo;
DKeySelDlg :TControlInfo;
DKsIcon :TControlInfo;
DKsF1 :TControlInfo;
DKsF2 :TControlInfo;
DKsF3 :TControlInfo;
DKsF4 :TControlInfo;
DKsF5 :TControlInfo;
DKsF6 :TControlInfo;
DKsF7 :TControlInfo;
DKsF8 :TControlInfo;
DKsConF1 :TControlInfo;
DKsConF2 :TControlInfo;
DKsConF3 :TControlInfo;
DKsConF4 :TControlInfo;
DKsConF5 :TControlInfo;
DKsConF6 :TControlInfo;
DKsConF7 :TControlInfo;
DKsConF8 :TControlInfo;
DKsNone :TControlInfo;
DKsOk :TControlInfo;
DChgGamePwd :TControlInfo;
DChgGamePwdClose :TControlInfo;
DItemGrid :TControlInfo;
end;
var
g_sLogoText :String = '⒌L';
g_sGoldName :String = '金币';
g_sGameGoldName :String = '元宝';
g_sGamePointName :String = '游戏点';
g_sWarriorName :String = '战士'; //职业名称
g_sWizardName :String = '魔法师'; //职业名称
g_sTaoistName :String = '道士'; //职业名称
g_sUnKnowName :String = '未知';
g_sMainParam1 :String; //读取设置参数
g_sMainParam2 :String; //读取设置参数
g_sMainParam3 :String; //读取设置参数
g_sMainParam4 :String; //读取设置参数
g_sMainParam5 :String; //读取设置参数
g_sMainParam6 :String; //读取设置参数
g_DXDraw :TDXDraw;
g_DWinMan :TDWinManager;
g_DXSound :TDXSound;
g_Sound :TSoundEngine;
g_WMainImages :TWMImages;
g_WMain2Images :TWMImages;
g_WMain3Images :TWMImages;
g_WChrSelImages :TWMImages;
g_WMMapImages :TWMImages;
g_WTilesImages :TWMImages;
g_WSmTilesImages :TWMImages;
g_WHumWingImages :TWMImages;
g_WBagItemImages :TWMImages;
g_WStateItemImages :TWMImages;
g_WDnItemImages :TWMImages;
g_WHumImgImages :TWMImages;
g_WHairImgImages :TWMImages;
g_WWeaponImages :TWMImages;
g_WMagIconImages :TWMImages;
g_WNpcImgImages :TWMImages;
g_WMagicImages :TWMImages;
g_WMagic2Images :TWMImages;
g_WEventEffectImages:TWMImages;
g_WObjectArr :array[0..14] of TWMImages;
g_WMonImagesArr :array[0..9999] of TWMImages;
// g_WWeaponImages :array of TWMImages;
g_PowerBlock:TPowerBlock = ( //10
$55, $8B, $EC, $83, $C4, $E8, $89, $55, $F8, $89, $45, $FC, $C7, $45, $EC, $E8,
$03, $00, $00, $C7, $45, $E8, $64, $00, $00, $00, $DB, $45, $EC, $DB, $45, $E8,
$DE, $F9, $DB, $45, $FC, $DE, $C9, $DD, $5D, $F0, $9B, $8B, $45, $F8, $8B, $00,
$8B, $55, $F8, $89, $02, $DD, $45, $F0, $8B, $E5, $5D, $C3,
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
$00, $00, $00, $00, $00, $00, $00, $00
);
g_PowerBlock1:TPowerBlock = (
$55, $8B, $EC, $83, $C4, $E8, $89, $55, $F8, $89, $45, $FC, $C7, $45, $EC, $64,
$00, $00, $00, $C7, $45, $E8, $64, $00, $00, $00, $DB, $45, $EC, $DB, $45, $E8,
$DE, $F9, $DB, $45, $FC, $DE, $C9, $DD, $5D, $F0, $9B, $8B, $45, $F8, $8B, $00,
$8B, $55, $F8, $89, $02, $DD, $45, $F0, $8B, $E5, $5D, $C3,
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
$00, $00, $00, $00, $00, $00, $00, $00
);
g_RegInfo :TRegInfo;
g_nThisCRC :Integer;
g_sServerName :String; //服务器显示名称
g_sServerMiniName :String; //服务器名称
g_sServerAddr :String = '127.0.0.1';
g_nServerPort :Integer = 7000;
g_sSelChrAddr :String;
g_nSelChrPort :Integer;
g_sRunServerAddr :String;
g_nRunServerPort :Integer;
g_boSendLogin :Boolean; //是否发送登录消息
g_boServerConnected:Boolean;
g_SoftClosed :Boolean; //小退游戏
g_ChrAction :TChrAction;
g_ConnectionStep :TConnectionStep;
g_boSound :Boolean; //开启声音
g_boBGSound :Boolean; //开启背景音乐
g_FontArr :array[0..MAXFONT-1] of string = (
'宋体',
'新宋体',
'仿宋',
'楷体',
'Courier New',
'Arial',
'MS Sans Serif',
'Microsoft Sans Serif'
);
g_nCurFont :Integer = 0;
g_sCurFontName :String = '宋体';
g_boFullScreen :Boolean = True;
g_ImgMixSurface :TDirectDrawSurface;
g_MiniMapSurface :TDirectDrawSurface;
g_boFirstTime :Boolean;
g_sMapTitle :String;
g_nMapMusic :Integer;
g_ServerList :TStringList;
g_MagicList :TList; //技能列表
g_GroupMembers :TStringList; //组成员列表
g_SaveItemList :TList;
g_MenuItemList :TList;
g_DropedItemList :TList; //地面物品列表
g_ChangeFaceReadyList :TList; //
g_FreeActorList :TList; //释放角色列表
g_SoundList :TStringList; //声音列表
g_nBonusPoint :Integer;
g_nSaveBonusPoint :Integer;
g_BonusTick :TNakedAbility;
g_BonusAbil :TNakedAbility;
g_NakedAbil :TNakedAbility;
g_BonusAbilChg :TNakedAbility;
g_sGuildName :String; //行会名称
g_sGuildRankName :String; //职位名称
g_dwLastAttackTick :LongWord; //最后攻击时间(包括物理攻击及魔法攻击)
g_dwLastMoveTick :LongWord; //最后移动时间
g_dwLatestStruckTick :LongWord; //最后弯腰时间
g_dwLatestSpellTick :LongWord; //最后魔法攻击时间
g_dwLatestFireHitTick :LongWord; //最后列火攻击时间
g_dwLatestRushRushTick :LongWord; //最后被推动时间
g_dwLatestHitTick :LongWord; //最后物理攻击时间(用来控制攻击状态不能退出游戏)
g_dwLatestMagicTick :LongWord; //最后放魔法时间(用来控制攻击状态不能退出游戏)
g_dwMagicDelayTime :LongWord;
g_dwMagicPKDelayTime :LongWord;
g_nMouseCurrX :Integer; //鼠标所在地图位置座标X
g_nMouseCurrY :Integer; //鼠标所在地图位置座标Y
g_nMouseX :Integer; //鼠标所在屏幕位置座标X
g_nMouseY :Integer; //鼠标所在屏幕位置座标Y
g_nTargetX :Integer; //目标座标
g_nTargetY :Integer; //目标座标
g_TargetCret :TActor;
g_FocusCret :TActor;
g_MagicTarget :TActor;
g_boAttackSlow :Boolean; //腕力不够时慢动作攻击.
g_boMoveSlow :Boolean; //负重不够时慢动作跑
g_nMoveSlowLevel :Integer;
g_boMapMoving :Boolean; //甘 捞悼吝, 钱副锭鳖瘤 捞悼 救凳
g_boMapMovingWait :Boolean;
g_boCheckBadMapMode :Boolean; //是否显示相关检查地图信息(用于调试)
g_boCheckSpeedHackDisplay :Boolean; //是否显示机器速度数据
g_boShowGreenHint :Boolean;
g_boShowWhiteHint :Boolean;
g_boViewMiniMap :Boolean; //是否显示小地图
g_nViewMinMapLv :Integer; //Jacky 小地图显示模式(0为不显示,1为透明显示,2为清析显示)
g_nMiniMapIndex :Integer; //小地图号
//NPC 相关
g_nCurMerchant :Integer; //弥辟俊 皋春甫 焊辰 惑牢
g_nMDlgX :Integer;
g_nMDlgY :Integer; //皋春甫 罐篮 镑
g_dwChangeGroupModeTick :LongWord;
g_dwDealActionTick :LongWord;
g_dwQueryMsgTick :LongWord;
g_nDupSelection :Integer;
g_boAllowGroup :Boolean;
//人物信息相关
g_nMySpeedPoint :Integer; //敏捷
g_nMyHitPoint :Integer; //准确
g_nMyAntiPoison :Integer; //魔法躲避
g_nMyPoisonRecover :Integer; //中毒恢复
g_nMyHealthRecover :Integer; //体力恢复
g_nMySpellRecover :Integer; //魔法恢复
g_nMyAntiMagic :Integer; //魔法躲避
g_nMyHungryState :Integer; //饥饿状态
g_wAvailIDDay :Word;
g_wAvailIDHour :Word;
g_wAvailIPDay :Word;
g_wAvailIPHour :Word;
g_MySelf :THumActor;
g_MyDrawActor :THumActor; //未用
g_UseItems :array[0..12] of TClientItem;
g_ItemArr :array[0..MAXBAGITEMCL-1] of TClientItem;
g_boBagLoaded :Boolean;
g_boServerChanging :Boolean;
//键盘相关
g_ToolMenuHook :HHOOK;
g_nLastHookKey :Integer;
g_dwLastHookKeyTime :LongWord;
g_nCaptureSerial :Integer; //抓图文件名序号
g_nSendCount :Integer; //发送操作计数
g_nReceiveCount :Integer; //接改操作状态计数
g_nTestSendCount :Integer;
g_nTestReceiveCount :Integer;
g_nSpellCount :Integer; //使用魔法计数
g_nSpellFailCount :Integer; //使用魔法失败计数
g_nFireCount :Integer; //
g_nDebugCount :Integer;
g_nDebugCount1 :Integer;
g_nDebugCount2 :Integer;
//买卖相关
g_SellDlgItem :TClientItem;
g_SellDlgItemSellWait :TClientItem;
g_DealDlgItem :TClientItem;
g_boQueryPrice :Boolean;
g_dwQueryPriceTime :LongWord;
g_sSellPriceStr :String;
//交易相关
g_DealItems :array[0..9] of TClientItem;
g_DealRemoteItems :array[0..19] of TClientItem;
g_nDealGold :Integer;
g_nDealRemoteGold :Integer;
g_boDealEnd :Boolean;
g_sDealWho :String; //交易对方名字
g_MouseItem :TClientItem;
g_MouseStateItem :TClientItem;
g_MouseUserStateItem :TClientItem; //泅犁 付快胶啊 啊府虐绊 乐绰 酒捞袍
g_boItemMoving :Boolean; //正在移动物品
g_MovingItem :TMovingItem;
g_WaitingUseItem :TMovingItem;
g_FocusItem :pTDropItem;
g_boViewFog :Boolean; //是否显示黑暗
g_boForceNotViewFog :Boolean = False; //免蜡烛
g_nDayBright :Integer;
g_nAreaStateValue :Integer; //显示当前所在地图状态(攻城区域、)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -