masterBB
2011-03-22 18:58:09
At this moment I'm writing an pretty complicated reflection script. It's containing walking within caves, walking outside, teleporting, using fairy rings, and fighting.
I've done some research and started developing a fast fight routine. But I've a few questions regarding fight detection.
Approaches I could use:
The cons of using the inFight var is that it's updated pretty slowly, after the fight you will have to wait till the complete animation of the enemy has ended. The pros of using the inFight var is that it's pretty stable.
I could us my combat xp to count how much I've hitted, but that wouldn't work if the NPC has healed between the fight. And how long would you've to wait before you realize you probably mis clicked the NPC?
For the other options I've to use the function "AreWeInteracting" or something similar. But the problem is that sometimes If you're fast this will return the previous NPC. So I've to check that the NPC hasn't got the same index as the previous one.
Currently I use:
Click an NPC and records it index.
Waits till an NPC is interacting with me, if its different than update the index.
Waits till the NPC is playing its dying animation(HPRatio doesn't work :O).
Record the index as the old index, repeat this, but make sure the new indexes are not equal to the old index.
Is there an other reflection based way of detecting fighting I might be missing? Could I improve something?
And my second, smaller question, is: Is there an SRL/reflection function to handle fairy rings or do I've to write my own?
I've done some research and started developing a fast fight routine. But I've a few questions regarding fight detection.
Approaches I could use:
- Using the inFight var of getMe
- Tracking the enemy and use his inFight var
- using the enemies there interact var
- Tracking the enemy and using there animation
- Tracking the enemy and using the HPRatio
- Using XP to see if I hitted
The cons of using the inFight var is that it's updated pretty slowly, after the fight you will have to wait till the complete animation of the enemy has ended. The pros of using the inFight var is that it's pretty stable.
I could us my combat xp to count how much I've hitted, but that wouldn't work if the NPC has healed between the fight. And how long would you've to wait before you realize you probably mis clicked the NPC?
For the other options I've to use the function "AreWeInteracting" or something similar. But the problem is that sometimes If you're fast this will return the previous NPC. So I've to check that the NPC hasn't got the same index as the previous one.
Currently I use:
Click an NPC and records it index.
Waits till an NPC is interacting with me, if its different than update the index.
Waits till the NPC is playing its dying animation(HPRatio doesn't work :O).
Record the index as the old index, repeat this, but make sure the new indexes are not equal to the old index.
Is there an other reflection based way of detecting fighting I might be missing? Could I improve something?
And my second, smaller question, is: Is there an SRL/reflection function to handle fairy rings or do I've to write my own?