What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Quick question about LokiPoe.RangedLineOfSight.CanSee

lau235623

New Member
Joined
Jun 3, 2014
Messages
27
Reaction score
0
I am currently replaced the original cr logic of Cyclone in exile.cs into:

Code:
ret =>
NumberOfMeNear(Me, 25, 1) && BestTarget.IsInLineOfSight && LokiPoe.RangedLineOfSight.CanSee(Me.Position, BestTarget.Position)

It works "nearly" perfect unless there are any monster get really close to the character, if the above happened, the bot did nothing: no log, no action, the character just don't move

This hanging will remain until new trigger fired (e.x: my bot will leap slam out if life is too low), the Cyclone is linked to Blood Magic and I am pretty sure it happened as well when on Full Life.

I am having 2 guesses that cause such problem:
1. The cyclone logic is crushed with other skills (My character contains only 2 attk skills, leap slam and cyclone), my leap slam logic is:
- BestTarget.Distance >= 25 or
- (Character have > 30 && < 75 Health percentage) && BestTarget is not a unique monster
the above two situation will also require BestTarget.IsInLineOfSight && LokiPoe.RangedLineOfSight.CanSee(Me.Position, BestTarget.Position)
It makes sense to say the above logic is crushed although I can't see how, but I still can't get rid of this reason

2. The BestTarget is matched the requirement perfectly (is in line of sight and can see), but the function "NumberOfMeNear" cannot count monster that really close to the character, so this part of cyclone cast logic returned false and the bot can't found a valid skill to cast.

Thanks for your time to read my post, hope I can solve the above problem :D
 
Update 2:
The problem is still here and ran out of idea to solve it (I don't want to make the CR so complicated, like store how many times the bot try to cast a spell, if exceed an amount try another skill), anyone have idea?

Update 1:

The reason may because of the game mechanism, I just faced the problem again, I then stopped the bot, move the cursor on the monster and cast Cyclone - nothing happened

I am now trying:
Code:
Register("Cyclone");
to see if it is better / solved
 
Last edited:
Your best bet is to simply have a fall back skill to use when the conditions for using Leap Slam / Cyclone are not met.

Otherwise, there's not much you can do if the conditions you want to execute a skill under are not true. You'd have to post the code of your "NumberOfMeNear" function, but if you use the logic from NumberOfMobsNear in Exile as a template, it should be working correctly.

You can debug your conditions as well, but that only helps if your NumberOfMeNear has a bug. If the bot is saying the character doesn't have LoS when you think it should, there's nothing we can change to fix that with how things are setup.

This issue is better handled in the new Beta, since the casting system is setup to try and detect if the character actually casts the skill or not. If it doesn't, it just tries to use the next skill. When it runs out of skills, it'll just temp blacklist the mob so it'll move on.

As for your update you just posted, yes, that is one of the main reasons why so much bot code has been rewritten in Beta to try and handle the client not doing things as expected. There's a ton of instances where this happens, and there's no way around it other than just trying to make sure the bot doesn't get stuck doing the same thing over and over, and ignores stuff and movies on.
 
Thanks pushedx! I may now give up to use cyclone by bot, I failed to solve the problem perfectly lol

For those who are facing the same problem and wanna use cyclone no matter what it takes, try set the logic to cast only the BestTarget.Distance < 9. You better prepare a sidekick skill to cast if the said logic fail (and distance of 9 is a really really small number of distance).
 
Back
Top