SRL Archive - Help and Support

Would it be possible...


rostaryms

2008-03-11 13:55:58

Would it be possible to make some kind of procedure that would detect if you had killed the monster you were fighting by knowing the monster's HP and adding up the damage hits. When the (damage hits = monster HP) then out of fight.

I am making an experiment fighter so I don't have to worry about damage on my character, and I can make the search area small enough to only count my monster's damage.

If you think this is possible please reply here.

Thanks in advance, rosta

[S]paz

2008-03-11 14:06:05

have a database with the values of hp in so
 chicken:= 3;
duck:= 2;

then using colors and uptext get the monster fighting,
then using findmiddleex TPA thingy, and possibly trim? find the number of hp damage it did?? just an idea

~Spaz

rostaryms

2008-03-11 14:20:15

I just need to know if I would have to make a bitmap of every damage thing or if there is a way to figure out how much damage a char hit without a bitmap

thanks spaz

drizzt

2008-03-11 16:47:05

umm..i would just make 9 bitmaps..well idk that would make it hard going into the double-digits..but i know you would probably need a bitmap for 1-9..and some way so that if it finds both to put them together to make double-digits.

also something you would need to think about is what if that monster regained its 1 hp that it recharges every once in a while before you kill it..measurements would be off. but good luck making it, would be very nice

[S]paz

2008-03-11 16:48:17

u forgot 0 :P

~Spaz

rostaryms

2008-03-11 18:17:20

I already use a method of where it sometimes detects the fight is over early at times. So that would be okay. I have a dtm of the 0 HP red bar. But sometimes they have like 1 or 2 hp left and it thinks the fite is done b/c the bar is solid red. So a adding damage calculator would be the most accurate. The experiments usually dont regain hp. So thanks.

FrÕzÑ_§ÕµL

2008-03-11 21:26:00

Can't you just use it to find a red bar? Because if you lag then counting numbers could easily screw up.

R0b0t1

2008-03-11 21:52:41

Use the middle co-ords of the screen and look left and right of your own health bar (possibly up or down also) for the monsters bar.

Or use a timer, but a generous timer. 3 seconds for a chicken, then search again because you have most likely killed the first one.

rostaryms

2008-03-11 23:41:00

I already have a good method of detecting the fight over. I just want a better one! If the counting of damage messes up I will revert to my old method. I think I am just going to make bitmaps for 1 - 30 damge hits :)

@FroozenSoul, The method I use is finding the red bar.

Dan Cardin

2008-03-12 14:15:33

maybe im making it too complicated for what its worth(or if it would work :p), but the problem would be finding out which hits are yours. so if you find the closest 2 healthbars to the center of the screen(and calcualte how much of it is gone(in percent), then find keep trying to find a hit until one comes up, then subtract that hit from your health points and turn that into a percentage, which will then tell you how much percent of your health was taken away and subtract that from the previous calculation of the health bar and recalculate the percentage of the same one and if they are the same to a certain degree then that one is yours. At which point you can throw that one away and use the other one as your monster. Then you can either try and find its hits by doing the same thing except the center point would be the enemy health bar(unreliable), or you could just keep attacking it until you find the no health mark of health, and then just wait until you havent seen a hit marker for the amount of time it takes you to hit around twice :)

simple

Sir R. M8gic1an

2008-03-12 15:31:31

GetTextAtEx should work for getting the damage numbers ;)

~RM

Ultra

2008-03-12 22:44:17

I think you would need to use BMPs or some IsUpText - Kind Like function.

Like RM said, try to use GetTextAtEx, use the right co-ordinates where the damage number appears.

rostaryms

2008-03-13 05:27:50

Okay guys. Thanks alot. As soon as I have time I will try to implement these changes!!