|
3000元买的AppleM22012_0501全套无加密代码 Delphi2007编译带教程
function TMagicManager.MagBigExplosionAndMakePoisonEx(BaseObject: TBaseObject; UserMagic: pTUserMagic; nPower, nX, nY: Integer; nRage: Integer): Boolean;
var
i: Integer;
BaseObjectList: TList;
TargeTBaseObject: TBaseObject;
PlayObject: TPlayObject;
nPowerPoint: Integer;
nTime: Integer;
MakePoisonInfo: pTMakePoisonInfo;
begin
Result := False;
nPowerPoint := Round(g_Config.nSkill71PowerRate / 100 * nPower);
nTime := 3 * UserMagic.btLevel + Random(2 * UserMagic.btLevel);
if BaseObject.m_btRaceServer <> RC_PLAYOBJECT then Exit;
PlayObject := TPlayObject(BaseObject);
BaseObjectList := TList.Create;
BaseObject.GetMapBaseObjects(BaseObject.m_PEnvir, nX, nY, nRage, BaseObjectList);
for i := 0 to BaseObjectList.Count - 1 do begin
TargeTBaseObject := TBaseObject(BaseObjectList.Items );
if BaseObject.IsProperTarget(TargeTBaseObject) then begin
PlayObject.SendDelayMsg(PlayObject, RM_DELAYMAGIC, nPowerPoint, MakeLong(nX, nY), 3, Integer(TargeTBaseObject), '', 600);
TargeTBaseObject.MagicQuest(PlayObject, UserMagic.wMagIdx, mfs_TagEx);
if PlayObject.m_Abil.Level > TargeTBaseObject.m_Abil.Level then begin
if TargeTBaseObject.m_btRaceServer = RC_PLAYOBJECT then begin
if g_Config.boSkill71MbAttackHuman then begin
New(MakePoisonInfo);
MakePoisonInfo.BaseObject := PlayObject;
MakePoisonInfo.nX := nX;
MakePoisonInfo.nY := nY;
MakePoisonInfo.nRate := 3;
MakePoisonInfo.boFastParalysis := g_Config.boSkill71MbFastParalysis;
TargeTBaseObject.SendDelayMsg(PlayObject, RM_MAKEPOISON, POISON_STONE {中毒类型 - 麻痹}, nTime, Integer(MakePoisonInfo), 0, '', 600);
end;
end else begin
if (TargeTBaseObject.m_Master <> nil) and (TargeTBaseObject.m_Master.m_btRaceServer = RC_PLAYOBJECT) then begin
if g_Config.boSkill71MbAttackSlave then begin
New(MakePoisonInfo);
MakePoisonInfo.BaseObject := PlayObject;
MakePoisonInfo.nX := nX;
MakePoisonInfo.nY := nY;
MakePoisonInfo.nRate := 3;
MakePoisonInfo.boFastParalysis := g_Config.boSkill71MbFastParalysis;
TargeTBaseObject.SendDelayMsg(PlayObject, RM_MAKEPOISON, POISON_STONE {中毒类型 - 麻痹}, nTime, Integer(MakePoisonInfo), 0, '', 600);
end;
end else begin
if g_Config.boSkill71MbAttackMon then begin
New(MakePoisonInfo);
MakePoisonInfo.BaseObject := PlayObject;
MakePoisonInfo.nX := nX;
MakePoisonInfo.nY := nY;
MakePoisonInfo.nRate := 3;
MakePoisonInfo.boFastParalysis := g_Config.boSkill71MbFastParalysis;
TargeTBaseObject.SendDelayMsg(PlayObject, RM_MAKEPOISON, POISON_STONE {中毒类型 - 麻痹}, nTime, Integer(MakePoisonInfo), 0, '', 600);
end;
end;
end;
end;
Result := True;
end;
end;
BaseObjectList.Free;
end;
function TMagicManager.MagBigExplosionAndMakePoison(BaseObject: TBaseObject; UserMagic: pTUserMagic; nPower, nX, nY: Integer; nRage: Integer): Boolean;
var
i: Integer;
BaseObjectList: TList;
TargeTBaseObject: TBaseObject;
PlayObject: TPlayObject;
nPowerPoint: Integer;
nTime: Integer;
MakePoisonInfo: pTMakePoisonInfo;
begin
Result := False;
nPowerPoint := Round(g_Config.nSkill72PowerRate / 100 * nPower);
nTime := 3 * UserMagic.btLevel + Random(2 * UserMagic.btLevel);
if BaseObject.m_btRaceServer <> RC_PLAYOBJECT then Exit;
PlayObject := TPlayObject(BaseObject);
BaseObjectList := TList.Create;
BaseObject.GetMapBaseObjects(BaseObject.m_PEnvir, nX, nY, nRage, BaseObjectList);
for i := 0 to BaseObjectList.Count - 1 do begin
TargeTBaseObject := TBaseObject(BaseObjectList.Items);
if BaseObject.IsProperTarget(TargeTBaseObject) then begin
PlayObject.SendDelayMsg(PlayObject, RM_DELAYMAGIC, nPowerPoint, MakeLong(nX, nY), 3, Integer(TargeTBaseObject), '', 1200);
TargeTBaseObject.MagicQuest(PlayObject, UserMagic.wMagIdx, mfs_TagEx);
if g_Config.boSkill72Damagearmor then begin
nPowerPoint := GetPower13(30, UserMagic) + GetRPow(PlayObject.m_WAbil.SC) * 2;
New(MakePoisonInfo);
MakePoisonInfo.BaseObject := PlayObject;
MakePoisonInfo.nX := nX;
MakePoisonInfo.nY := nY;
MakePoisonInfo.nRate := 3;
TargeTBaseObject.SendDelayMsg(PlayObject, RM_MAKEPOISON, POISON_DAMAGEARMOR {中毒类型 - 红毒}, nPower, Integer(MakePoisonInfo),
ROUND(UserMagic.btLevel / 3 * (nPower / g_Config.nAmyOunsulPoint)) {UserMagic.btLevel}, '', 1200);
end;
if g_Config.boSkill72DecHealth then begin
nPowerPoint := GetPower13(40, UserMagic) + GetRPow(PlayObject.m_WAbil.SC) * 2;
New(MakePoisonInfo);
MakePoisonInfo.BaseObject := PlayObject;
MakePoisonInfo.nX := nX;
MakePoisonInfo.nY := nY;
MakePoisonInfo.nRate := 3;
TargeTBaseObject.SendDelayMsg(PlayObject, RM_MAKEPOISON, POISON_DECHEALTH {中毒类型 - 绿毒}, nPower, Integer(MakePoisonInfo),
ROUND(UserMagic.btLevel / 3 * (nPower / g_Config.nAmyOunsulPoint)) {UserMagic.btLevel}, '', 1200);
end;
if PlayObject.m_Abil.Level > TargeTBaseObject.m_Abil.Level then begin
if TargeTBaseObject.m_btRaceServer = RC_PLAYOBJECT then begin
if g_Config.boSkill72MbAttackHuman then begin
New(MakePoisonInfo);
MakePoisonInfo.BaseObject := PlayObject;
MakePoisonInfo.nX := nX;
MakePoisonInfo.nY := nY;
MakePoisonInfo.nRate := 3;
MakePoisonInfo.boFastParalysis := g_Config.boSkill72MbFastParalysis;
TargeTBaseObject.SendDelayMsg(PlayObject, RM_MAKEPOISON, POISON_STONE {中毒类型 - 麻痹}, nTime, Integer(MakePoisonInfo), 0, '', 1200);
end;
end else begin
if (TargeTBaseObject.m_Master <> nil) and (TargeTBaseObject.m_Master.m_btRaceServer = RC_PLAYOBJECT) then begin
if g_Config.boSkill72MbAttackSlave then begin
New(MakePoisonInfo);
MakePoisonInfo.BaseObject := PlayObject;
MakePoisonInfo.nX := nX;
MakePoisonInfo.nY := nY;
MakePoisonInfo.nRate := 3;
MakePoisonInfo.boFastParalysis := g_Config.boSkill72MbFastParalysis;
TargeTBaseObject.SendDelayMsg(PlayObject, RM_MAKEPOISON, POISON_STONE {中毒类型 - 麻痹}, nTime, Integer(MakePoisonInfo), 0, '', 1200);
end;
end else begin
if g_Config.boSkill72MbAttackMon then begin
New(MakePoisonInfo);
MakePoisonInfo.BaseObject := PlayObject;
MakePoisonInfo.nX := nX;
MakePoisonInfo.nY := nY;
MakePoisonInfo.nRate := 3;
MakePoisonInfo.boFastParalysis := g_Config.boSkill72MbFastParalysis;
TargeTBaseObject.SendDelayMsg(PlayObject, RM_MAKEPOISON, POISON_STONE {中毒类型 - 麻痹}, nTime, Integer(MakePoisonInfo), 0, '', 1200);
end;
end;
end;
end;
Result := True;
end;
end;
BaseObjectList.Free;
end;
function TMagicManager.MagBigExplosion(BaseObject: TBaseObject; nPower, nX,
nY: Integer; nRage, nMagID: Integer): Boolean; //00492F4C
var
i: Integer;
BaseObjectList: TList;
TargeTBaseObject: TBaseObject;
begin
Result := False;
BaseObjectList := TList.Create;
BaseObject.GetMapBaseObjects(BaseObject.m_PEnvir, nX, nY, nRage, BaseObjectList);
for i := 0 to BaseObjectList.Count - 1 do begin
TargeTBaseObject := TBaseObject(BaseObjectList.Items);
if BaseObject.IsProperTarget(TargeTBaseObject) then begin
BaseObject.SetTargetCreat(TargeTBaseObject);
TargeTBaseObject.SendMsg(BaseObject, RM_MAGSTRUCK, 0, nPower, 0, 0, '');
TargeTBaseObject.MagicQuest(BaseObject, nMagID, mfs_TagEx);
Result := True;
end;
end;
BaseObjectList.Free;
end;
|
|