Page 2 of 3
Re: Bloody Battlefield trouble
Posted: Mon Jan 21, 2013 11:08 pm
by Junk
The quest NPCs are Ise Shekkat and Captain Gessart. The mobs that attack them are Kulech Vanguards on Ise, and Kulech Blooddrinker and Elementals of a random type (E.I. earth, fire.. etc.) on the captain.
Re: Bloody Battlefield trouble
Posted: Mon Jan 21, 2013 11:18 pm
by lisa
took a char there today, just using path:wander
Rev 744, only attacked mobs not in combat, didn't attack the ones in combat with the NPC's.
RC2, attacked mobs in combat with the NPC and not in combat. As it should.
--=== Added ===--
started to not attack consistantly, debug was posting this for a mob right next to me.
Code: Select all
[DEBUG] 98555648 target height difference is too great
might be an issue with mem read of target.Y ?
Re: Bloody Battlefield trouble
Posted: Tue Jan 22, 2013 12:56 am
by rock5
Lisa, why are you still using RC2?
Junk wrote:The quest NPCs are Ise Shekkat and Captain Gessart. The mobs that attack them are Kulech Vanguards on Ise, and Kulech Blooddrinker and Elementals of a random type (E.I. earth, fire.. etc.) on the captain.
You have Kulech Vanguards, Kulech Blooddrinkers and Fire Elementals in your mobs list but you didn't have Earth and Water Elementals. Are they the ones it's not attacking?
Re: Bloody Battlefield trouble
Posted: Tue Jan 22, 2013 1:35 am
by lisa
rock5 wrote:Lisa, why are you still using RC2?
I have 5 micromacro folders, in the scripts folder of each of them has 8-10 folders of various things and versions of rombot.
So yeah I might be a bit slow on updating them lol
Re: Bloody Battlefield trouble
Posted: Tue Jan 22, 2013 7:29 am
by lisa
ok rev 745 and playing with these mobs.
Code: Select all
table: 019DB518
Address: 864784640
Name: Captain Gessart
Type: 2
Attackable: true
Id: 106679
X: -5045
Z: -17852
Y: 650.33026123047
table: 019DBEC8
Address: 694826752
Name: Garon Supporter
Type: 2
Attackable: true
Id: 106866
X: -5044.7280273438
Z: -17864.728515625
Y: 650.77587890625
interesting that the "NPC" are actually type mob and "attackable" but you can't attack them, they are green named.
With anti_ks as false it killed all mobs without issue, with it true it ignored the mobs attacking the "NPC"
Re: Bloody Battlefield trouble
Posted: Tue Jan 22, 2013 7:48 am
by rock5
lisa wrote:with it true it ignored the mobs attacking the "NPC"
That will happen if you come into range of a mob that is already attacking an npc. In that situation the bot can't tell who the mob is attacking. If the mob starts attacking an npc while you are near then the bot can see that it's target is an npc so it attacks it. I'm not sure if I added support for mobs attacking mobs though. I'll have to look.
Edit: It does. When ANTI_KS is enabled it's just set to not attack mobs that are targeting players.
Re: Bloody Battlefield trouble
Posted: Tue Jan 22, 2013 7:56 am
by lisa
i was in range the whole time.
Little more info from before, I mentioned angle and also not attackable debug prints.
not attackable prints.
the interesting thing is that they had no name when checking what to attack though, pretty much just Id and no other info.
print(target.Name.." "..target.Id)
Code: Select all
[DEBUG] 93679104 target is not attackable
<UNKNOWN> 106775
<UNKNOWN> 105116
<UNKNOWN> 105116
<UNKNOWN> 105116
<UNKNOWN> 106679
Code: Select all
Command> print(GetIdName(106775))
Kulech Blooddrinker
Command> print(GetIdName(105116))
Defensive Energy Crystal
Command> print(GetIdName(106679))
Captain Gessart
as for the angle print, just 1 mob, again no name
Code: Select all
[DEBUG] 851916544 target height difference is too great
<UNKNOWN> 106772
Command> print(GetIdName(106772))
Omega Invader
Re: Bloody Battlefield trouble
Posted: Tue Jan 22, 2013 9:37 am
by rock5
The Omega Invader is probably on the Omega Platform above Bloody Battlefield. Just look up. So, yeah,height difference
would be a problem

If you have never been on the platform look for Cornelia Asaak nearby.
With the mobs with no name, it would be highly unlucky that GetIdName() just failed. It's more likely the name was reset at some point but not the id. So are they the ones you are not attacking? Is there anyway you could be sure of that? It would also be useful to print the addresses as well just to make sure they have valid addresses.
Re: Bloody Battlefield trouble
Posted: Tue Jan 22, 2013 7:13 pm
by lisa
addresses seem ok
Code: Select all
0x273A500 name:<UNKNOWN> Id:106866
0x265D0500 name:<UNKNOWN> Id:106778
0x265D5500 name:<UNKNOWN> Id:105116
0x265D7800 name:<UNKNOWN> Id:105116
0x2EEFC300 name:<UNKNOWN> Id:106778
0x30714600 name:<UNKNOWN> Id:105116
0x30715A00 name:<UNKNOWN> Id:106679
0x34781E00 name:<UNKNOWN> Id:106775
added more prints.
Code: Select all
0x30715A00 name:<UNKNOWN> Id:106679
pawn Address: 0x30715A00, name address 0x2F810500, Name is Captain Gessart
pawn Address: 0x30715A00, name address 0x2F810500, Name is Captain Gessart
I added this to update name
Code: Select all
printf("pawn Address: 0x%X, name address 0x%X, Name is %s\n",self.Address,namePtr,tmp)
and this to evaltarget
Code: Select all
target:updateAttackable()
if( not target.Attackable ) then
debug_target("target is not attackable")
printf("0x%X name:%s Id:%d\n",target.Address,target.Name,target.Id)
return false;
end
So the eval target has no name but when the pawn is updated it does get the name?
Ahh ok so in evaltarget it creates the pawn but doesn't update the info for the pawn.
Code: Select all
function evalTargetDefault(address, target)
if not target then
target = CPawn.new(address);
end
I added target:updateName() on the next line and now the prints show the name.
Code: Select all
0x30715A00 name:Captain Gessart Id:106679
Had a closer look and that seems to be working as intended, name isn't needed at that stage so it isn't updated.
Re: Bloody Battlefield trouble
Posted: Tue Jan 22, 2013 9:09 pm
by rock5
Let me take a step back. The original error was "target is not attackable". I don't see that in your lest post. What we need is a "target is not attackable" and a printout of it's id and name to see what it is. It doesn't really help to have a long list of ids and names if you don't know which the error relates to.
Try changing player.lua line 2140 to
Code: Select all
-- Not attackable
target:updateAttackable()
if( not target.Attackable ) then
debug_target("target is not attackable")
self:updateName()
printf("Id: %d Name: %s\n",self.Id,self.Name)
return false;
end
Re: Bloody Battlefield trouble
Posted: Wed Jan 23, 2013 12:56 am
by lisa
Hmm I did post my code and it did clearly have it in the attackable check, I didn't update the name in there but the name info is fine as I checked it with getIdname, which I also posted.
So this was for when not attackable.
Code: Select all
0x273A500 name:<UNKNOWN> Id:106866
0x265D0500 name:<UNKNOWN> Id:106778
0x265D5500 name:<UNKNOWN> Id:105116
0x265D7800 name:<UNKNOWN> Id:105116
0x2EEFC300 name:<UNKNOWN> Id:106778
0x30714600 name:<UNKNOWN> Id:105116
0x30715A00 name:<UNKNOWN> Id:106679
0x34781E00 name:<UNKNOWN> Id:106775
I worked out the name unknown is fine as it just wasn't updated yet.
BTW in the code you posted
should probably be
So it is saying the Kulech Blooddrinker isn't attackable but it should be.
Captain Gessart not attackable is fine though.
Re: Bloody Battlefield trouble
Posted: Wed Jan 23, 2013 1:07 am
by lisa
something that might help, or not.
in object.lua the bit checks for attackable flag are commented out and changed so that if type is monster then it says it is attackable, which isn't always true.
NPC that fight are actually type monster.
Code: Select all
--local attackableFlag = debugAssert(memoryReadUByte(proc, self.Address + addresses.pawnAttackable_offset)) or 0;
--printf("attackable flag: 0x%X (%s)\n", attackableFlag, self.Name);
--printf("check(player): %s\n", tostring( bitAnd(attackableFlag, ATTACKABLE_MASK_PLAYER) ));
if( self.Type == PT_MONSTER ) then
self.Attackable = true;
else
self.Attackable = false;
--[[
if( bitAnd(attackableFlag, ATTACKABLE_MASK_PLAYER) ) then
self.Attackable = true;
else
self.Attackable = false;
end]]
end
Re: Bloody Battlefield trouble
Posted: Wed Jan 23, 2013 1:19 am
by lisa
I think I will just have to spend a few days going through the code to see how everything works now.
If I spent a few minutes to look at evaltarget before then I would have known why there was no names yet and not been trying to work out why things weren't reading the memory in pawn.lua lol
Re: Bloody Battlefield trouble
Posted: Wed Jan 23, 2013 3:24 am
by rock5
I was thrown because I would expect 1 printout per debug message but where you had "target is not attackable" you had it followed by a few print messages. Anyway that's cleared up.
So you are saying these come up as not attackable.
Code: Select all
0x273A500 name:<UNKNOWN> Id:106866
0x265D0500 name:<UNKNOWN> Id:106778
0x265D5500 name:<UNKNOWN> Id:105116
0x265D7800 name:<UNKNOWN> Id:105116
0x2EEFC300 name:<UNKNOWN> Id:106778
0x30714600 name:<UNKNOWN> Id:105116
0x30715A00 name:<UNKNOWN> Id:106679
0x34781E00 name:<UNKNOWN> Id:106775
So the problem is the last one? The Kulech Blooddrinker? Is it possible it isn't attackable at some point? I'm not 100% sure of the sequence of events there. And I can't do any more testing there because there are never any mobs there any more.
lisa wrote:NPC that fight are actually type monster.
Code: Select all
--local attackableFlag = debugAssert(memoryReadUByte(proc, self.Address + addresses.pawnAttackable_offset)) or 0;
--printf("attackable flag: 0x%X (%s)\n", attackableFlag, self.Name);
--printf("check(player): %s\n", tostring( bitAnd(attackableFlag, ATTACKABLE_MASK_PLAYER) ));
if( self.Type == PT_MONSTER ) then
self.Attackable = true;
else
self.Attackable = false;
--[[
if( bitAnd(attackableFlag, ATTACKABLE_MASK_PLAYER) ) then
self.Attackable = true;
else
self.Attackable = false;
end]]
end
I don't think obj.Attackable is ever used. The couple of places .Attackable is used are both pawns. Pawns has it's own updateAttackable that checks the attackable flag.
Re: Bloody Battlefield trouble
Posted: Wed Jan 23, 2013 6:20 am
by lisa
doesn't attack the Kulech Blooddrinker. here is the pawn printout.
Code: Select all
Nature: 0
PotionLastHpEmptyTime: 0
Unstick_counter: 0
Last_ignore_target_time: 0
MaxMana: 0
PotionLastManaOnceEmptyTime: 0
Sleeping_time: 0
Lootable: false
PotionHpUsed: 0
Z: -17878.40625
Harvesting: false
Y: 651.74200439453
PhiriusHpUsed: 0
Mounted: false
MaxHP: 137350
PhiriusLastUseTime: 0
InventoryDoUpdate: false
free_debug1: 0
mobs: table: 038022C8
Focus: 0
LastExpUpdateTime: 1358939840
Stance: 0
Death_counter: 0
LastSkill: table: 03802318
LastExp: 0
GlobalCooldown: 0
Speed: 50
IgnoreTarget: 0
ExpInsertPos: 0
ExpUpdateInterval: 10
Casting: false
MaxMP: 1
Success_waypoints: 0
PhiriusLastManaEmptyTime: 0
Name: Kulech Blooddrinker
LastDistImprove: 1358939840
HP: 96674
Level3: 1
Moving: false
Fights: 0
PetPtr: 0
Last_ignore_target_ptr: 0
Direction: 1.4326471900941
PotionLastManaEmptyTime: 0
ExpTableMaxSize: 10
free_flag2: false
SkillQueue: table: 038022F0
PotionManaUsed: 0
free_flag3: false
TargetIcon: true
PotionLastHpOnceEmptyTime: 0
Buffs: table: 03802340
free_flag1: false
PotionHpOnceUsed: 0
ExpPerMin: 0
Psi: 0
free_counter3: 0
MaxEnergy: 0
GUID: 1930
MP: 1
free_counter2: 0
free_counter1: 0
Alive: true
Race: 4
failed_casts_in_a_row: 0
ranged_pull: false
Returning: false
Attackable: false
Aggressive: false
LastTargetPtr: 0
InParty: false
MaxRage: 0
Guild: <UNKNOWN>
Level: 74
Current_waypoint_type: 3
Battling: false
MaxMP2: 1
PotionLastUseTime: 0
fightStartTime: 0
Cast_to_target: 0
Mana: 0
BotStartTime_nr: 0
MaxFocus: 0
InventoryLastUpdate: 1358939840
BotStartTime: 1358939840
PhiriusLastHpEmptyTime: 0
PhiriusManaUsed: 0
DirectionY: -0.052903692492538
ActualSpeed: 0
Class1: 0
PotionLastOnceUseTime: 0
Class3: -1
PotionManaOnceUsed: 0
MP2: 1
Swimming: false
Sleeping: false
Address: 862489600
LastDamage: 97.595
ExpTable: table: 038022A0
X: -5048.6713867188
Fighting: false
Energy: 0
Type: 2
Rage: 0
TimeTillLevel: 0
Class2: -1
Id: 106775
level_detect_levelup: 0
Level2: 0
TargetPtr: 830858752
Only thing that seems weird is Class1: 0, there is no class 0
Code: Select all
CLASS_NONE = -1;
CLASS_WARRIOR = 1;
CLASS_SCOUT = 2;
CLASS_ROGUE = 3;
CLASS_MAGE = 4;
CLASS_PRIEST = 5;
CLASS_KNIGHT = 6;
CLASS_WARDEN = 7;
CLASS_DRUID = 8;
CLASS_WARLOCK = 9;
CLASS_CHAMPION = 10;
actually this is more important
Attackable: false
Found another mob with same name
Attackable: true
Not sure what to make of it at this stage, I will do some testing tomorrow, if I get time.
Re: Bloody Battlefield trouble
Posted: Wed Jan 23, 2013 7:48 am
by rock5
Class doesn't matter because mobs class is not checked. Probably 0 just means no class was assigned. We use -1 as an initial default value but probably if a mob has no class it reads as 0.
lisa wrote:actually this is more important
Attackable: false
Found another mob with same name
Attackable: true
Were there 2 mobs? Maybe one is a shadow object and you can only attack one of them.
I noticed something interesting too, Race = 4?
Code: Select all
RACE_HUMAN = 0;
RACE_ELF = 1;
RACE_DWARF = 2;
Maybe it means monster.
Re: Bloody Battlefield trouble
Posted: Wed Jan 23, 2013 7:54 am
by lisa
rock5 wrote:Were there 2 mobs? Maybe one is a shadow object and you can only attack one of them.
2 different mobs.
First 1 died before I could do much more testing on it, I think I accidently hit it with a shot and got rid of most of it's HP.
Second mob was attacking some other NPC, first was attacking Captain **
Did more pawn prints for other mobs attacking Captain ** but they returned attackable as true, so it isn't anything to do with attacking him.
Re: Bloody Battlefield trouble
Posted: Wed Jan 23, 2013 8:05 am
by rock5
lisa wrote:First 1 died before I could do much more testing on it
Hm... Are dead mobs attackable? Looks like they are, even ones that are fading away. It could just be some bug about that mob.
Re: Bloody Battlefield trouble
Posted: Wed Jan 23, 2013 9:16 pm
by lisa
still looking into this.
Code: Select all
if pawn.MaxHP > 20000 and pawn.Attackable == false then
print(pawn.Name)
end
So checks max HP and if not attackable, should only be NPC with green names, basically.
Code: Select all
Garon Supporter
Defensive Energy Crystal
Defensive Energy Crystal
Kulech Vanguard
Kulech Vanguard
Alliance Warrior
Alliance Warrior
Evan Wright
Ise Shekkat
Garon Supporter
Alliance Warrior
Garon Supporter
Defensive Energy Crystal
Defensive Energy Crystal
Defensive Energy Crystal
Mychar
Defensive Energy Crystal
Captain Gessart
Alliance Warriors
Alliance Warriors
So 2 mob names stick out for me.
Kulech Vanguard
Kulech Vanguard
Still testing obviously =)
pawn table prints of those 2.
Code: Select all
table: 0379EAF0
ExpTableMaxSize: 10
Battling: false
Energy: 0
free_counter1: 0
BotStartTime: 1358994009
Fighting: false
MaxHP: 133907
Attackable: false
PetPtr: 0
Casting: false
LastDamage: 63.476
ExpPerMin: 0
Direction: 1.3893364331612
Type: 2
ExpInsertPos: 0
Aggressive: false
Mana: 0
Last_ignore_target_ptr: 0
PotionHpOnceUsed: 0
TimeTillLevel: 0
DirectionY: -0.16397153406933
PotionLastHpEmptyTime: 0
LastSkill: table: 0379EBB8
GlobalCooldown: 0
PotionManaOnceUsed: 0
Focus: 0
Unstick_counter: 0
PotionLastManaEmptyTime: 0
Swimming: false
Class3: -1
LastExp: 0
Success_waypoints: 0
Guild: <UNKNOWN>
free_counter3: 0
Speed: 50
InParty: false
TargetIcon: true
SkillQueue: table: 0379EB90
MaxMana: 0
Level3: 1
free_flag3: false
Class1: 0
free_flag2: false
Sleeping: false
free_counter2: 0
free_debug1: 0
MaxEnergy: 0
ranged_pull: false
fightStartTime: 0
Class2: -1
Stance: 0
PotionLastOnceUseTime: 0
MaxRage: 0
Alive: true
X: -5378.9897460938
Y: 654.98828125
Buffs: table: 0379EBE0
Current_waypoint_type: 3
PotionManaUsed: 0
PotionLastHpOnceEmptyTime: 0
Name: Kulech Vanguard
MaxFocus: 0
mobs: table: 0379EB68
Returning: false
PotionLastManaOnceEmptyTime: 0
GUID: 2040
level_detect_levelup: 0
Nature: 0
PhiriusHpUsed: 0
MaxMP2: 1
free_flag1: false
InventoryDoUpdate: false
Cast_to_target: 0
IgnoreTarget: 0
InventoryLastUpdate: 1358994009
Race: 4
LastExpUpdateTime: 1358994009
Lootable: false
Fights: 0
Mounted: false
MP: 1
Address: 104128768
ExpUpdateInterval: 10
Id: 106774
PhiriusLastManaEmptyTime: 0
PhiriusManaUsed: 0
Level: 73
Sleeping_time: 0
MaxMP: 1
PhiriusLastHpEmptyTime: 0
Level2: 0
Last_ignore_target_time: 0
LastTargetPtr: 0
PotionHpUsed: 0
MP2: 1
PotionLastUseTime: 0
Psi: 0
failed_casts_in_a_row: 0
Harvesting: false
ActualSpeed: 0
Moving: false
Death_counter: 0
PhiriusLastUseTime: 0
ExpTable: table: 0379EB40
Rage: 0
LastDistImprove: 1358994009
BotStartTime_nr: 0
Z: -18233.1953125
TargetPtr: 525146368
HP: 62202
table: 0379F4C8
ExpTableMaxSize: 10
Battling: false
Energy: 0
free_counter1: 0
BotStartTime: 1358994009
Fighting: false
MaxHP: 130531
Attackable: false
PetPtr: 0
Casting: false
LastDamage: 122.419
ExpPerMin: 0
Direction: 2.5073859958707
Type: 2
ExpInsertPos: 0
Aggressive: false
Mana: 0
Last_ignore_target_ptr: 0
PotionHpOnceUsed: 0
TimeTillLevel: 0
DirectionY: 0.023421409824669
PotionLastHpEmptyTime: 0
LastSkill: table: 0379F590
GlobalCooldown: 0
PotionManaOnceUsed: 0
Focus: 0
Unstick_counter: 0
PotionLastManaEmptyTime: 0
Swimming: false
Class3: -1
LastExp: 0
Success_waypoints: 0
Guild: <UNKNOWN>
free_counter3: 0
Speed: 50
InParty: false
TargetIcon: true
SkillQueue: table: 0379F568
MaxMana: 0
Level3: 1
free_flag3: false
Class1: 0
free_flag2: false
Sleeping: false
free_counter2: 0
free_debug1: 0
MaxEnergy: 0
ranged_pull: false
fightStartTime: 0
Class2: -1
Stance: 0
PotionLastOnceUseTime: 0
MaxRage: 0
Alive: true
X: -5355.1000976563
Y: 649.86389160156
Buffs: table: 0379F5B8
Current_waypoint_type: 3
PotionManaUsed: 0
PotionLastHpOnceEmptyTime: 0
Name: Kulech Vanguard
MaxFocus: 0
mobs: table: 0379F540
Returning: false
PotionLastManaOnceEmptyTime: 0
GUID: 1690
level_detect_levelup: 0
Nature: 0
PhiriusHpUsed: 0
MaxMP2: 1
free_flag1: false
InventoryDoUpdate: false
Cast_to_target: 0
IgnoreTarget: 0
InventoryLastUpdate: 1358994009
Race: 4
LastExpUpdateTime: 1358994009
Lootable: false
Fights: 0
Mounted: false
MP: 1
Address: 104181504
ExpUpdateInterval: 10
Id: 106774
PhiriusLastManaEmptyTime: 0
PhiriusManaUsed: 0
Level: 72
Sleeping_time: 0
MaxMP: 1
PhiriusLastHpEmptyTime: 0
Level2: 0
Last_ignore_target_time: 0
LastTargetPtr: 0
PotionHpUsed: 0
MP2: 1
PotionLastUseTime: 0
Psi: 0
failed_casts_in_a_row: 0
Harvesting: false
ActualSpeed: 0
Moving: false
Death_counter: 0
PhiriusLastUseTime: 0
ExpTable: table: 0379F518
Rage: 0
LastDistImprove: 1358994009
BotStartTime_nr: 0
Z: -18219.90234375
TargetPtr: 525146368
HP: 121693
Re: Bloody Battlefield trouble
Posted: Wed Jan 23, 2013 9:28 pm
by lisa
did some race prints of the not attackable.
printf("Race: %d, Name:%s\n",pawn.Race,pawn.Name)
Code: Select all
Race: -1, Name:Evan Wright
Race: -1, Name:Ise Shekkat
Race: 6, Name:Alliance Warrior
Race: 9, Name:Defensive Energy Crystal
Race: 9, Name:Defensive Energy Crystal
Race: 6, Name:Alliance Warrior
Race: -1, Name:Alliance Warriors
Race: 9, Name:Defensive Energy Crystal
Race: 4, Name:Garon Supporter
Race: 4, Name:Garon Supporter
Race: 1, Name:MyChar
Race: 9, Name:Defensive Energy Crystal
Race: -1, Name:Captain Gessart
Race: 4, Name:Garon Supporter
Race: 4, Name:Kulech Vanguard
Race: 9, Name:Defensive Energy Crystal
Race: 4, Name:Garon Supporter
Race: 9, Name:Defensive Energy Crystal
Race: 4, Name:Kulech Vanguard
same name but different race, doesn't make sence to me, maybe race only works on players ?