Jump to content
Tiger233

Wait until your player has stopped the current action before moving on

Recommended Posts

Hey guys,

 

recently started scripting for OsBot. I was wondering how I would make it so that my player, after attacking a cow, will wait until the cow is dead, to loot an item, then find the next cow.

 

Currently, what will happen is this:

 

My character finds a cow1,

My character kills the cow1,

My character moves onto another cow2, then the last cows1 items pop up, and he cancels his attacking on the new cow2 to grab old cows1 items.

 

I want:

Player fight and kills cow1.

Loots cow1

Fights cow2.

Loots cow2, etc.

 

 

Sorry if it is unclear, and thanks in advance. If you need SRC code let me know!

 

 

Link to comment
Share on other sites

What I do is get the animation of the cow. If the cows animation is death then  it goes into the looting switchblock and loots before moving on

You can also check if the cow's health is 0%, it's more reliable(if the animations ever change you have to change the code for it, now I know this doesn't happen often but there's no point using animation).

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...