SRL Archive - OSR Help

Combat Help Please


bambe

2012-07-11 07:10:15

Hi ive made a script for a RSPS for combat that is working really well for me but i cant seem to figure something out.

At the moment it attacks and uses pixelshift to detect infight then moves onto next NPC when not infight and clicks a dot on minimap to walk to next NPC if colour not found. That all works fine.

What i cant do is stop it attacking an NPC already in combat.

Is there a way i can make a box at x y to check for pixelshift or hp bar and if NPC infight then skip that NPC?

Some of the SRL codes wont work like othersinfight or isfightat because of the graphics being different.

I just need a code that checks if the NPC if infight and if it is skip to next NPC.

Can someone help me out with this? And can it be done?

Thanks

YoHoJo

2012-07-11 07:13:02

Moved to scripting help.
Tutorial section is for tutorials that tech people things.

Abu

2012-07-11 10:59:45

If I'm correct this should form a box (technically rectangle) around x and y which you could then use for something like pixelshift.

IntToBox(x - 30, y - 60, x + 30, y + 60);

grats

2012-07-11 14:46:15

We have an others in fight, also in the YA (yak attack) script it checks for other yaks that are in combat and doesn't click them, you're welcome to learn from and try anything in the script

bambe

2012-07-11 16:49:13

I will have a look at it and see if I can make something from it
Thanks

Noob King

2012-07-12 02:40:36

I haven't done much combat oriented things, but I would try checking for the hp bar above the monster.

P1ng

2012-07-12 05:55:45

Try having a look at the SRL include for isfightat etc and then perhaps edit those to suit your RSPS? Not on the computer so unfortunately I cannot check and see of this would be easy to do, but it can't be too hard