📄 m2share.pas
字号:
sGETBACKUPGING = '~@getbackupgnow_ing';
sEXIT = '@exit';
sBACK = '@back';
sMAIN = '@main';
sFAILMAIN = '~@main';
sGETMASTER = '@@getmaster';
sGETMARRY = '@@getmarry';
sUSEITEMNAME = '@@useitemname';
sBUILDGUILDNOW = '@@buildguildnow';
sSCL_GUILDWAR = '@@guildwar';
sDONATE = '@@donate';
sREQUESTCASTLEWAR= '@requestcastlewarnow';
sCASTLENAME = '@@castlename';
sWITHDRAWAL = '@@withdrawal';
sRECEIPTS = '@@receipts';
sOPENMAINDOOR = '@openmaindoor';
sCLOSEMAINDOOR = '@closemaindoor';
sREPAIRDOORNOW = '@repairdoornow';
sREPAIRWALLNOW1 = '@repairwallnow1';
sREPAIRWALLNOW2 = '@repairwallnow2';
sREPAIRWALLNOW3 = '@repairwallnow3';
sHIREARCHERNOW = '@hirearchernow';
sHIREGUARDNOW = '@hireguardnow';
sHIREGUARDOK = '@hireguardok';
sMarket_Def = 'Market_Def\';
sNpc_def = 'Npc_def\';
type
TItemBind = record
nMakeIdex:Integer;
nItemIdx :Integer;
sBindName:String[20];
end;
pTItemBind = ^TItemBind;
TConsoleData = packed record
nCrcExtInt :Integer;
nCrcDllInt :Integer;
end;
pTConsoleData = ^TConsoleData;
{$IF OEMVER = OEM775}
TLevelInfo = record
wHP :Word;
wMP :Word;
dwExp :LongWord;
wAC :Word;
wMaxAC :Word;
wACLimit :Word;
wMAC :Word;
wMaxMAC :Word;
wMACLimit :Word;
wDC :Word;
wMaxDC :Word;
wDCLimit :Word;
dwDCExp :LongWord;
wMC :Word;
wMaxMC :Word;
wMCLimit :Word;
dwMCExp :LongWord;
wSC :Word;
wMaxSC :Word;
wSCLimit :Word;
dwSCExp :LongWord;
end;
{$IFEND}
{
TScriptACTMsg = record
nCode :Integer; //0x00
sParam1 :String; //0x04
nParam1 :Integer; //0x08
sParam2 :String; //0x0C
nParam2 :Integer; //0x10
sParam3 :String; //0x14
nParam3 :Integer; //0x18
end;
}
//function InitM2DLL(AppHandle:HWnd;MsgProc:TMsgProc):PChar;stdcall;external 'M2Server.dll' name 'Init';
//procedure UnInitM2DLL(MsgProc:TMsgProc);stdcall;external 'M2Server.dll' name 'Init';
procedure SetProcessName(sName:String);
procedure CopyStdItemToOStdItem(StdItem:pTStdItem;OStdItem:pTOStdItem);
procedure InitPlugArrayTable();
function AddToProcTable(ProcAddr:Pointer;sProcName:String):Boolean;
function AddToPulgProcTable(sProcName:String):Integer;
function AddToObjTable(Obj:TObject;sObjName: String): Boolean;
function GetExVersionNO(nVersionDate:Integer; var nOldVerstionDate:Integer):Integer;
function GetNextDirection (sx, sy, dx, dy: Integer): byte;
function LoadLineNotice(FileName:String):Boolean;
function GetMultiServerAddrPort(btServerIndex:Byte;var sIPaddr:String;var nPort:Integer):Boolean;
procedure MainOutMessage(Msg:String);
function AddDateTimeOfDay(DateTime:TDateTime;nDay:Integer):TDateTime;
function GetGoldShape(nGold:Integer):Word;//金币在地上显示的外形ID
function GetRandomLook(nBaseLook,nRage:Integer):Integer;
function FilterShowName(sName:String):String;
function CheckGuildName(sGuildName:String):Boolean;
function CheckUserItems(nIdx:integer;StdItem:pTStdItem):Boolean;
function GetItemNumber():Integer;
function GetItemNumberEx():Integer;
function sub_4B2F80(nDir,nRage:Integer):Byte;
function GetValNameNo(sText:String):Integer;
function IsUseItem(nIndex:Integer):Boolean;
function GetMakeItemInfo(sItemName:String):TStringList;
procedure AddLogonCostLog(sMsg:String);
procedure AddGameDataLog(sMsg:String);
procedure TrimStringList(sList:TStringList);
function CanMakeItem(sItemName:String):Boolean;
function CanMoveMap(sMapName:String):Boolean;
function LoadMonSayMsg():Boolean;
function LoadItemBindIPaddr():Boolean;
function SaveItemBindIPaddr():Boolean;
function LoadItemBindAccount():Boolean;
function SaveItemBindAccount():Boolean;
function LoadItemBindCharName():Boolean;
function SaveItemBindCharName():Boolean;
function LoadDisableMakeItem():Boolean;
function SaveDisableMakeItem():Boolean;
function SaveAdminList():Boolean;
function LoadUnMasterList():Boolean;
function SaveUnMasterList():Boolean;
function LoadUnForceMasterList():Boolean;
function SaveUnForceMasterList():Boolean;
function LoadEnableMakeItem():Boolean;
function SaveEnableMakeItem():Boolean;
function LoadDisableMoveMap():Boolean;
function SaveDisableMoveMap():Boolean;
function GetUseItemName(nIndex:Integer):String;
function GetUseItemIdx(sName:String):Integer;
function LoadMonDropLimitList():Boolean;
function SaveMonDropLimitList():Boolean;
function LoadDisableTakeOffList():Boolean;
function SaveDisableTakeOffList():Boolean;
function InDisableTakeOffList(nItemIdx:Integer):Boolean;
function LoadDisableSendMsgList():Boolean;
function SaveDisableSendMsgList():Boolean;
function GetDisableSendMsgList(sHumanName:String):Boolean;
function LoadGameLogItemNameList():Boolean;
function GetGameLogItemNameList(sItemName:String):Byte;
function SaveGameLogItemNameList():Boolean;
function LoadDenyIPAddrList():Boolean;
function GetDenyIPAddrList(sIPaddr:String):Boolean;
function SaveDenyIPAddrList():Boolean;
function LoadDenyAccountList():Boolean;
function GetDenyAccountList(sAccount:String):Boolean;
function SaveDenyAccountList():Boolean;
function LoadDenyChrNameList():Boolean;
function GetDenyChrNameList(sChrName:String):Boolean;
function SaveDenyChrNameList():Boolean;
function LoadNoClearMonList():Boolean;
function GetNoClearMonList(sMonName:String):Boolean;
function SaveNoClearMonList():Boolean;
procedure LoadExp();
procedure LoadGameCommand();
procedure LoadString();
procedure LoadConfig();
function GetRGB(c256:Byte):TColor;stdcall;
procedure SendGameCenterMsg(wIdent:Word;sSendMsg:String);
function GetIPLocal(sIPaddr:String):String;
function IsCheapStuff(tByte:Byte):Boolean;
function CompareIPaddr(sIPaddr,dIPaddr:String):Boolean;
var
RemoteXORKey:Integer = -1;
LocalXORKey:Integer = -2;
M2ServerVersion:Single = 2;
g_nGetLicenseInfo:Integer = -1;
g_nM2Crc:integer;
g_dwGameCenterHandle:THandle;
IsDebuggerPresent:function():Boolean;stdcall;
CheckVersion :TCheckVersion = nil;
nCheckVersion :Integer = -1;
//CertCheck :TList; //用于检查角色创建释放
//EventCheck :TList; //用于检查事件创建释放
{$IF OEMVER = OEM775}
Level775 :TIniFile;
{$IFEND}
Config :TIniFile;
CommandConf :TIniFile;
StringConf :TIniFile;
Memo :TMemo;
ProcArray :TProcArray;
ObjectArray :TObjectArray;
PlugProcArray :TProcArray;
PlugInEngine :TPlugInManage;
nServerIndex :Integer = 0; //0x004EBC04
RunSocket :TRunSocket; //0x004EBB84
MainLogMsgList :TStringList; //0x004EBC60
LogStringList :TStringList; //0x004EBC64
LogonCostLogList :TStringList; //0x004EBC68
g_MapManager :TMapManager; //0x004EBB90
ItemUnit :TItemUnit; //0x004EBB94
MagicManager :TMagicManager; //0x004EBB98
NoticeManager :TNoticeManager; //0x004EBB9C
g_GuildManager :TGuildManager; //0x004EBBA0
g_EventManager :TEventManager; //0x004EBBA4
g_CastleManager :TCastleManager;
// g_UserCastle :TUserCastle; //0x004EBBA8
FrontEngine :TFrontEngine; //0x004EBB88
UserEngine :TUserEngine; //0x004EBB8C
RobotManage :TRobotManage;
g_MakeItemList :TStringList; //0x004EBBAC
g_StartPointList :TGStringList; //0x004EBBB0
ServerTableList :TList; //0x004EBBB4
g_DenySayMsgList :TQuickList; //0x004EBBB8
MiniMapList :TStringList; //0x004EBBBC
g_UnbindList :TStringList; //0x004EBBC0
LineNoticeList :TStringList; //0x004EBBC4
QuestDiaryList :TList; //0x004EBBC8
ItemEventList :TStringList; //0x004EBBCC
AbuseTextList :TStringList; //0x004EBBD0
g_MonSayMsgList :TStringList; //怪物说明信息列表
g_DisableMakeItemList :TGStringList; //禁止制造物品列表
g_EnableMakeItemList :TGStringList; //禁止制造物品列表
g_DisableMoveMapList :TGStringList; //禁止移动地图列表
g_ItemNameList :TGList; //物品别名列表
g_DisableSendMsgList :TGStringList; //禁止发信息名称列表
g_MonDropLimitLIst :TGStringList; //怪物爆物品限制
g_DisableTakeOffList :TGStringList; //禁止取下物品列表
g_ItemBindIPaddr :TGList;
g_ItemBindAccount :TGList;
g_ItemBindCharName :TGList;
g_UnMasterList :TGStringList; //出师记录表
g_UnForceMasterList :TGStringList; //强行出师记录表
g_GameLogItemNameList :TGStringList; //游戏日志物品名
g_boGameLogGold :Boolean;
g_boGameLogGameGold :Boolean;
g_boGameLogGamePoint :Boolean;
g_boGameLogHumanDie :Boolean;
g_DenyIPAddrList :TGStringList; //IP过滤列表
g_DenyChrNameList :TGStringList; //角色过滤列表
g_DenyAccountList :TGStringList; //登录帐号过滤列表
g_NoClearMonLIst :TGStringList; //不清除怪物列表
n4EBBD0 :Integer;
g_CheckCode :TCheckCode;
g_nIdent :Integer;
g_ProcessMsg :TProcessMessage;
LogMsgCriticalSection :TRTLCriticalSection; //0x4EBC40
ProcessMsgCriticalSection :TRTLCriticalSection; //0x4EBC44
UserDBSection :TRTLCriticalSection;
ProcessHumanCriticalSection :TRTLCriticalSection;
CS_6 :TCriticalSection; //0x4EBC58
MD5 :TMD5;
// sDBSocStr :String; //0x4EBC84
// boGetHumDataBusy :Boolean; //0x4EBC88
g_nTotalHumCount :integer; //0x004EB3C3
// g_nLoadHumanDBErrorCount :Integer; //0x4EBC8C :Integer;
// g_nLoadHumanDBCount :Integer; //0x4EBC90
// g_nSaveHumanDBCount :Integer;//0x4EBC94 :Integer;
// g_nHumanDBQueryID :SmallInt;//0x4EBC7C :SmallInt;
g_boMission :Boolean;
g_sMissionMap :String;
g_nMissionX :Integer;
g_nMissionY :Integer;
boStartReady :Boolean; //0x4EBC78
g_boExitServer :Boolean; //004EBC79
boFilterWord :Boolean;
sLogFileName :String; //004EBBFC
nRunTimeMin :Integer;
nRunTimeMax :Integer;
{
dwSockCountMin :LongWord;
dwSockCountMax :LongWord;
dwUsrTimeMin :LongWord;
dwUsrTimeMax :LongWord;
dwHumCountMin :LongWord;
dwHumCountMax :LongWord;
dwMonTimeMin :LongWord;
dwMonTimeMax :LongWord;
dwUsrRotCountMin :LongWord;
dwUsrRotCountMax :LongWord;
}
g_nBaseObjTimeMin :Integer;
g_nBaseObjTimeMax :Integer;
g_nSockCountMin :Integer;
g_nSockCountMax :Integer;
g_nUsrTimeMin :Integer;
g_nUsrTimeMax :Integer;
g_nHumCountMin :Integer;
g_nHumCountMax :Integer;
g_nMonTimeMin :Integer;
g_nMonTimeMax :Integer;
g_nMonGenTime :Integer;
g_nMonGenTimeMin :Integer;
g_nMonGenTimeMax :Integer;
g_nMonProcTime :Integer;
g_nMonProcTimeMin :Integer;
g_nMonProcTimeMax :Integer;
dwUsrRotCountMin :Integer;
dwUsrRotCountMax :Integer;
g_dwUsrRotCountTick :LongWord; //0x4EBD48 :LongWord;
g_nProcessHumanLoopTime :Integer; //0x004EBD54 //处理人物列表循环次数
g_dwHumLimit :LongWord = 30; //0x4EBD98
g_dwMonLimit :LongWord = 30; //0x4EBD9C
g_dwZenLimit :LongWord = 5; //0x4EBDA0
g_dwNpcLimit :LongWord = 5; //0x4EBDA4
g_dwSocLimit :LongWord = 10; //0x4EBDA8
g_dwSocCheckTimeOut :LongWord = 50;//2 * 1000;
nDecLimit :Integer = 20; //0x4EBDAC
// g_sServerName :String = '翎风世界';
// g_sServerIP :String = '127.0.0.1';
// g_sWebSite :String = 'http://www.gameofmir.com';
// g_sBbsSite :String = 'http://bbs.gameofmir.com';
// g_sClientDownload :String = 'http://www.gameofmir.com';
// g_sQQ :String = '88888888';
// g_sPhone :String = '123456789';
// g_sBankAccount0 :String = '银行信息';
// g_sBankAccount1 :String = '银行信息';
// g_sBankAccount2 :String = '银行信息';
// g_sBankAccount3 :String = '银行信息';
// g_sBankAccount4 :String = '银行信息';
// g_sBankAccount5 :String = '银行信息';
// g_sBankAccount6 :String = '银行信息';
// g_sBankAccount7 :String = '银行信息';
// g_sBankAccount8 :String = '银行信息';
// g_sBankAccount9 :String = '银行信息';
// g_nServerNumber :Integer = 0;
// g_boVentureServer :Boolean = False;
// g_boTestServer :Boolean = True;
// g_nTestLevel :Integer = 1;
// g_nTestGold :Integer = 0;
// g_nTestUserLimit :Integer = 1000;
// boServiceMode :Boolean = False;
// boNonPKServer :Boolean = False;
// g_boViewHackMessage :Boolean = False;
// g_boViewAdmissionFailure :Boolean = False;
// g_nSendBlock :Integer = 1024; //0x4E9F34
// g_nCheckBlock :Integer = 4096; //0x4E9F38
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -