SRL Archive - OSR Help

hp function? --- help


iraqownz

2013-03-23 14:13:43

ok guys. i dont know what i am doing wrong :P

i want to make an hp function, so i can finish the eating procedure. but i dont know what's wrong with this:S

Function getHp:double;
Var
green,red:TpointArray;
x,y:Integer;

Begin
FindColorsTolerance(green,65280,240,70,275,170,0);
FindColorsTolerance(red,255,240,70,275,170,0);
result := (length(red))>(length(green))
//writeln(result);
End;



can anyone help me out? :)

Hoodz

2013-03-23 14:18:11

if i get a hp function as well i can finish my script…

rj

2013-03-23 14:26:10

Are you trying to get the amount of red and green?

The Killer

2013-03-23 14:27:19

https://github.com/SRL/SRL-OSR/blob/.../gametab.simba <– there's one premade in there :)

litoris

2013-03-23 14:36:44

HPPercent in SRL-OSR returns your HP percentage by checking it from the stats screen.

iraqownz

2013-03-23 20:42:34

yep, that's what i am trying to :P

the problem is, that i want it like this

"if red>green then
result := true"

ikillthechickens

2013-03-23 22:39:27

When i call HPPercent i get this error in gametab.simba

Duplicate identifier 'GETCURRENTTAB' at line 42

Help pls

iraqownz

2013-03-24 10:10:36

that's because you have had called the name twice :)

the other one might be in the function :)