SRL Archive - SRL Archives

Fighting.scar - GetFightProg


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 :)

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 :)

jakeyboy29

2008-11-07 13:55:40

i smell a win.

Naum

2008-11-07 15:29:07

Not really, I need help finding the right text. Because it grabs the wrong text sometimes. Also this doesn't use reflection, and colour can only do so much :(

n3ss3s

2008-11-07 16:06:05

Wizzup has an epic system in his minotaur killing script…

lordsaturn

2008-11-07 17:27:31

From: n3ss3s
Wizzup has an epic system in his minotaur killing script…


I assume that hasn't been released?

Naum

2008-11-08 06:18:11

From: n3ss3s
Wizzup has an epic system in his minotaur killing script…


Lovely I hope Wizzup could share it…

EvilChicken!

2008-11-08 09:49:14

From: lordsaturn
I assume that hasn't been released?


Hm, I'd really love to see it though .. D:
I'm making one atm, would love to ompare it against his to see my epic fail-ness.

Naum

2008-11-08 10:21:31

I talked to n3s apparently it gets how much you've been hit. Also I'm thinking of updating this to make it work better, I have a better idea to add to this :)