derian4real

Untitled

Nov 16th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. var fearCastEndTime: Cardinal;
  2. hp: Cardinal;
  3.  
  4. (* *********************************************************************************************************************************** *)
  5. function skillCoolTime(ID: integer): integer;
  6. var
  7. skill: TL2Skill;
  8. begin
  9. if Skilllist.byID(id, skill) then
  10. Result := skill.Endtime
  11. else
  12. Result := -1;
  13. end;
  14. (* *********************************************************************************************************************************** *)
  15. function skillExist(ID: integer): boolean;
  16. var
  17. skill: TL2Skill;
  18. begin
  19. if Skilllist.byID(id, skill) then
  20. result := true
  21. else
  22. result := false;
  23. end;
  24.  
  25. (* *********************************************************************************************************************************** *)
  26. procedure ProtectMa;
  27. var
  28. Action : TL2Action;
  29. j:integer;
  30. char1:tl2char;
  31. begin
  32.  
  33. while (engine.status=lsonline) do begin
  34.  
  35. for j := 0 to CharList.count -1 do begin
  36. char1 := CharList.Items(j);
  37.  
  38.  
  39. 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
  40. begin
  41. engine.settarget(char1);
  42. if not(skillCoolTime(28)<>0) and (skillExist(28))then
  43. begin
  44. engine.useskill(28);
  45. end
  46. else begin
  47. if not(skillCoolTime(286)<>0) and (skillExist(286)) and (User.DistTo(char1)<=500)then
  48. begin
  49. engine.useskill(286);
  50. end;
  51. end;
  52.  
  53. end;
  54. end;
  55. end;
  56. end;
  57.  
  58.  
  59.  
  60. begin
  61.  
  62. script.newthread(@ProtectMa);
  63. delay(-1)
  64. end.
Advertisement
Add Comment
Please, Sign In to add comment