SRL Archive - Suggestions

Using XP dropbar to detect actions?


smurg

2010-11-01 16:23:55

I had problems with detecting whether or not I was in a fight against the caged lesser demon in the wizard tower when multiple people can attack it.

I made a DTM of the XP badge when you have the XP stat showing and it's easy to tell if I'm in a fight atm. If I miss a few hits in a row, it just selects and attacks it again.

Why wouldn't scripts use this more often? Is this detectable, easier ways to do the same thing, etc?

edit: this is more of a scripting question, so if there's a more appropriate place for it, then can a mod move it? ty

Cstrike

2010-11-01 16:34:48

I think it's a good idea for detecting if you're in a fight. Of course if you don't hit for a while it may return false (if boolean).
I use reflection based commands so I know when a fight is over, and I even know whether I'm fighting with [monster of choice] or not.

For color avenues, it could be a great idea. I've never thought of using the XP :)

smurg

2010-11-01 16:58:34

From: cstrike
I think it's a good idea for detecting if you're in a fight. Of course if you don't hit for a while it may return false (if boolean).
I use reflection based commands so I know when a fight is over, and I even know whether I'm fighting with [monster of choice] or not.

For color avenues, it could be a great idea. I've never thought of using the XP :)


Oooh, yah I haven't looked through all the skill and misc includes for SRL or Reflection yet, just know of functions/procedures that people have used in scripts i've run :/.

Anyways, if you don't hit for a while, then it just reselects it and attacks it again, so no biggie.

With reflection, how exactly do those functions work? I guess I could go check myself. Do they involve hooks or what?

mormonman

2010-11-01 17:11:16

A better idea is using the Animation.scar functions


{*******************************************************************************
function Animating(B: TBox; Time, MinCount: Integer): Boolean;
By: marpis
Description: Finds constant animation in box B during time T. If PixelShift
in box B is smaller than MinCount, it's considered not animating.
Date: Nov. 29, 2009
*******************************************************************************}

smurg

2010-11-01 20:03:49

From: mormonman
A better idea is using the Animation.scar functions


{*******************************************************************************
function Animating(B: TBox; Time, MinCount: Integer): Boolean;
By: marpis
Description: Finds constant animation in box B during time T. If PixelShift
in box B is smaller than MinCount, it's considered not animating.
Date: Nov. 29, 2009
*******************************************************************************}


Ooh, looks good. Might have to test that out, thanks.