Naum
2008-11-07 13:40:26
Ever wanted your script to output a value of what your hitting and what the monster is hitting?? Well now you can :)
Please note may not get characters quick enough only 26% of error remains. If someone can make it efficienter please post it.
Enjoy!
Please note x,y must be global vars :)
Procedure GetFightProg;
Var Beginin : Integer;
Color : String;
Begin
Begin
If FindColor(x, y, 65280, 724, 25, 741, 40) Then
Color := 'green';
If FindColor(x, y, ClRed, 724, 25, 741, 40) Then
Color := 'red'
Else
Color := 'yellow';
end;
Beginin := GetMMLevels('hp', Color);
Repeat
If Not FindColor(x, y, 65280, 182, 86, 299, 224) Then Exit
Else
If FindColor(x, y, 16777215, 182, 86, 299, 224) Then
Begin
If Beginin - StrToInt(Trim(GetTextAtEx(x - 1, y - 1, 10, StatChars,
False, False, 0, 100, ClWhite, 2, False, tr_Digits)))
= GetMMLevels('hp', Color) Then
WriteLn('He Hit : '+GetTextAtEx(x - 1, y - 1, 10, StatChars, False, False, 0, 100, ClWhite, 2, False, tr_Digits))
Else
WriteLn('You Hit : '+GetTextAtEx(x - 1, y - 1, 10, StatChars, False, False, 0, 100, ClWhite, 2, False, tr_Digits));
Wait(1700);
end;
Until(Not FindColor(x, y, 65280, 182, 86, 299, 224));
end;Please note may not get characters quick enough only 26% of error remains. If someone can make it efficienter please post it.
Enjoy!
Please note x,y must be global vars :)