Code: Select all
program Magery;
{$Include 'all.inc'}
var
spell : string;
OldSkill : Double;
Bless : string;
Greater: string;
Paralyze: string;
Invisibility: string;
Earth: string;
Begin
   OldSkill := GetSkillValue('Magery');
   While (not Dead) AND (GetSkillValue('Magery') < 100.0) do
   begin
      if GetSkillValue('Magery') > 20.0 then spell := Bless;
      if GetSkillValue('Magery') > 40.0 then spell := Greater; 
      if GetSkillValue('Magery') > 50.0 then spell := Paralyze; 
      if GetSkillValue('Magery') > 60.0 then spell := Invisibility; 
      if GetSkillValue('Magery') > 90.0 then spell := Earth; 
      while not connected do wait(100); 
      cast(spell); 
      wait(3500); 
      waitconnection(3000); 
      CheckSave; 
      if GetSkillValue('Magery') > OldSkill then 
      begin 
         AddToSystemJournal('Скилл Magery вырос. Теперь он равен ' + FloatToStr(GetSkillValue('Magery'))); 
         OldSkill := GetSkillValue('Magery'); 
      end; 
      waitconnection(3000); 
   end; 
End. 


