Memory Read (Not Working)

05/06/2012 12:04 Shortpants#1
Fixed :]
05/06/2012 12:32 Interest07#2
you use offset[4] here:
Code:
$NPC_ID_OFFSET[4] = $i * 0x00000004
and offset[5] here
Code:
$NPC_CURRENT_HP_OFFSET[5] = $i * 0x00000004
whatever else is going on, I can't imagine that being correct :)

That being said,

Code:
$NPC_COUNT_OFFSET[1] = 0x0000001C
$NPC_COUNT_OFFSET[2] = 0x0000001C
$NPC_COUNT_OFFSET[3] = 0x00000024
$NPC_COUNT_OFFSET[4] = 0x00000014
would be the size of the NPC list, so you don't have to loop through 769 values.

Also, HP values of NPCs don't get updated until you've selected them.
05/06/2012 12:35 Shortpants#3
Quote:
Originally Posted by Interest07 View Post
you use offset[4] here:
Code:
$NPC_ID_OFFSET[4] = $i * 0x00000004
and offset[5] here
Code:
$NPC_CURRENT_HP_OFFSET[5] = $i * 0x00000004
whatever else is going on, I can't imagine that being correct :)
I fixed that, NPC_ID_OFFSET[4] is now [5] as well. ( Sorry, I tried a lot of things )
Quote:
2148532959 - 0/0
2148533140 - 0/0
2148533142 - 0/0
2148533143 - 0/0
2148533144 - 38336/38336
2148533145 - 0/0
2148533146 - 0/0
2148533147 - 0/0
2148533166 - 0/0
2148533167 - 0/0
2148533168 - 0/0
2148533257 - 0/0
2148533311 - 0/0
2148533312 - 0/0
2148533313 - 0/0
2148533314 - 0/0
2148533316 - 0/0
2148533359 - 0/0
2148532841 - 0/0
2148532843 - 0/0
2148532849 - 0/0
2148532843 - 0/0
2148532849 - 0/0
2148532849 - 0/0
2148532845 - 0/0
2148532849 - 0/0
3361502062 - 828125655/1953393007
Still,, makes no sense. ( I have been trying to figure it out for hours now ).
Edit: As you can see the ID works, but max/current hp doesnt.
05/06/2012 12:51 Sᴡoosh#4
Keep in mind that the HP/Max HP is only sent from server if you target the NPC. Otherwise it's not loaded.
05/06/2012 13:10 Shortpants#5
Then what is the x * 4 for?
05/06/2012 13:17 Sᴡoosh#6
Quote:
Originally Posted by Shortpants View Post
Then what is the x * 4 for?
That's what resolves the pointer to the individual NPC structures.

Pointers are 4 byte in 32 bit processes, so that+ why it's i * 4. The i is the index, i.e the place where mob is found in list. I guess you're using unsorted mob list? I didn't check your offsets/code :)

Edit : yeah, you are using unsorted one.
05/06/2012 13:34 Shortpants#7
Quote:
Originally Posted by Sᴡoosh View Post
That's what resolves the pointer to the individual NPC structures.

Pointers are 4 byte in 32 bit processes, so that+ why it's i * 4. The i is the index, i.e the place where mob is found in list. I guess you're using unsorted mob list? I didn't check your offsets/code :)

Edit : yeah, you are using unsorted one.
I am targeting mobs using packets.

It will select the first monster ( this takes a while because it's using packets to target), then it will wait until the target state ( BASE+0x34+0xBB4 ) is different than zero.

Then it will hit an other loop where it will wait until the monster is dead.

The thing is that it will try to target already-dead targets because they're not removed from the index instantly. Resulting in an infinite loop.

The only thing that I can think of ( since checking whether the current target is different than the last one, is still not fast enough ).. is to check the monster HP before actually targeting it. :-/

Since you stated such thing is impossible, then, what is a good different approach?
05/06/2012 13:39 Sᴡoosh#8
+0x02C8

(1 - Idle; 2 - Physical Attack; 3 - Magical (ranged) Attack; 4 - Die animation; 5 - Moving)
05/06/2012 13:41 Shortpants#9
Quote:
Originally Posted by Sᴡoosh View Post
+0x02C8

(1 - Idle; 2 - Physical Attack; 3 - Magical (ranged) Attack; 4 - Die animation; 5 - Moving)
Hmmm..? What is that supposed to mean?
05/06/2012 13:42 Sᴡoosh#10
That you can find out if the mob you're trying to target is already dead, but still in list because of unfinished dieing animation.
05/06/2012 13:51 Shortpants#11
Thanks alot sir! Works like a charm now :]]
05/06/2012 13:59 Sᴡoosh#12
Nice to hear :)
05/06/2012 15:36 Shortpants#13
Which pop-ups a question, how would you integrate Anti- KillSteal?
05/06/2012 16:59 Interest07#14
Quote:
Originally Posted by Shortpants View Post
Which pop-ups a question, how would you integrate Anti- KillSteal?
Several ways really:

Before targeting a new mob for killing:
-check if it's full HP
-check if it isn't actively targeting something else (compare its targetId with your playerId and/or your petId, make sure its aggressive flag is also set)
-you could check if it's moving towards a certain player ('complicated')
-check if it's next to another player
-...

So just implement a function isMobAvailable(NPC* npc, int yourId) which uses 1 or more of the above checks and return a true or false.

Then whenever you're done killing your current target, loop through the npc list, check whether one of them is already attacking you (kill this first), and otherwise find the closest that is available.
05/08/2012 00:31 dumbfck#15
Just a quick note... It's potentially helpful if you leave your posts intact when your problem is fixed rather than editing them to just "fixed" - That way, others can see if the problem relates to a similar problem they might be facing and if the thread is relevant to them :)