-
CNKTHoward
- Posts: 32
- Joined: Thu Jul 12, 2012 8:31 am
#1
Post
by CNKTHoward » Wed Jul 18, 2012 6:21 am
Hi
As the topic subject says, there is a problem with a character not attacking a mob (that is f.e. spawning next to us and attacking us).
If the mob spawns, we get immediate aggro, the mob runs to us and is attacking us. The following code (in the player.lua) PREVENTS us from killing the mob before it is hitting us.
Code: Select all
-- check if aggro before attacking
if( self.Battling == true and -- we have aggro
target.HP/target.MaxHP*100 > 90 and -- target is alive and no attacking us
-- Fix: there is a special dog mob 'Tatus', he switch from red to green at about 90%
-- there seems to be a bug, so that sometimes Tatus don't have us into the target but still attacking us
-- to prevent from skipping him while he is still attacking us, we do that special fix
target.Name ~= "Tatus" and
target.TargetPtr ~= self.Address and
target.TargetPtr ~= self.Pet.Address and
CPawn(target.TargetPtr).InParty ~= true ) then -- but not from that mob
cprintf(cli.green, language[36], target.Name);
self:clearTarget();
break_fight = true;
break;
end;
Is there a workaround for that problem? I want my character to actually fight back when it gets attacked...
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#2
Post
by lisa » Thu Jul 19, 2012 9:44 pm
CNKTHoward wrote:
target.TargetPtr ~= self.Address and
target.TargetPtr ~= self.Pet.Address and
CPawn(target.TargetPtr).InParty ~= true
This part checks if the mob is attacking something other than you, party member or pet, so if this is the part of the code stopping the bot from attacking it means the target is attacking something else.
CNKTHoward wrote:the mob runs to us and is attacking us.
You said the mob is attacking you though so that can't be the part of code stopping bot attacking mob.
So I don't know what to say, might need more info on what is happening.
-
wilifox
- Posts: 86
- Joined: Tue Jul 26, 2011 6:00 pm
#3
Post
by wilifox » Mon Jul 23, 2012 1:07 am
As I can kill a mob that already has the aggro other mobs? Thank you very much, I think it has to do what you are writing but do not quite understand. Thank you.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest