non agro problem

04/18/2009 16:07 ProgMata#1
Hi i have this hack but ranger mob sometimes hit (hera, lasputin, etc.) how ti fix this?
thanks help.

Quote:
[ENABLE]
alloc(newmem,1024)
label(returnhere)
label(originalcode)
label(exit)

0053DB4A:
jmp newmem
nop
nop
returnhere:

newmem:

originalcode:
movzx eax,word ptr [esi+00000154]

//mov eax,01
//mov word ptr [esi+00000156],ax
mov [esi+00000070], 41000000 // speed mob
//40c00000 = 6 lv 1 (to replace the above blue color)
//40400000 = 12 lv 2 (to replace the above blue color)
//41c00000 = 24 lv 3 (to replace the above blue color)
mov byte ptr [esi+00000174],00 // malee attack range = 0
mov byte ptr [esi+00000244],00 // magic attack range = 0
mov [esi+00000240],0000000 //other attack range = 0
mov [esi+0000023c],0000000 //other attack range = 0
mov [esi+00000238],0000000 //other attack range = 0
mov eax,03
mov word ptr [esi+00000154],ax

exit:
jmp returnhere


[DISABLE]
dealloc(newmem)

0053DB4A:
movzx eax,word ptr [esi+00000154]
04/18/2009 17:21 giljs#2
The way the non-aggro script works, it sets the attack range to 0. For melee attackers, they can never be at 0 range. But Ranged attackers can hit you if they attack at the instant they are standing right on top of you.

The only way to make a true non-aggro would be to edit the game data. The reason that a script can't give it to you is that you have to change each mob's AIKey value, and the values for ranged non-aggro are different than melee non-aggro. A script changes ALL of a given value to be the....wait, there IS a way for full non-aggro. Since Melee cannot attack at range 0, a script needs to be written that will set the AI_Key of all monsters to "1" (ranged non-aggro).