Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- hp: Cardinal;
- (* *********************************************************************************************************************************** *)
- function skillCoolTime(ID: integer): integer;
- var
- skill: TL2Skill;
- begin
- if Skilllist.byID(id, skill) then
- Result := skill.Endtime
- else
- Result := -1;
- end;
- (* *********************************************************************************************************************************** *)
- function skillExist(ID: integer): boolean;
- var
- skill: TL2Skill;
- begin
- if Skilllist.byID(id, skill) then
- result := true
- else
- result := false;
- end;
- (* *********************************************************************************************************************************** *)
- procedure ProtectMa;
- var
- Action : TL2Action;
- j:integer;
- char1:tl2char;
- begin
- while (engine.status=lsonline) do begin
- for j := 0 to CharList.count -1 do begin
- char1 := CharList.Items(j);
- if ((char1.attackable) or (char1.clan='war1 name')or (char1.clan='war2 name')or (char1.clan='war3 name')) and not (char1.dead) and (char1.target.Name='iilillil') and ((char1.Cast.EndTime <> 0)) then
- begin
- engine.settarget(char1);
- if not(skillCoolTime(28)<>0) and (skillExist(28))then
- begin
- engine.useskill(28);
- end
- else begin
- if not(skillCoolTime(286)<>0) and (skillExist(286)) and (User.DistTo(char1)<=500)then
- begin
- engine.useskill(286);
- end;
- end;
- end;
- end;
- end;
- end;
- begin
- script.newthread(@ProtectMa);
- delay(-1)
- end.
Advertisement
Add Comment
Please, Sign In to add comment