FindNotoriety

Search for the mobile with specified type ObjType and its Notoriety (in client looks like Objects peacefulness - usually object name color) on the ground.

Returns the last object found using the function.

If no objects found, or char disconnected - returns 0.

Search result:

The parameter Notoriety can be used:

1 - innocent(blue) 2 - guilded/ally(green) 3 - attackable but not criminal(gray) 4 - criminal(gray) 5 - enemy(orange) 6 - murderer(red)

0,7 - not in use.

Pascal

function FindNotoriety(ObjType:Word; Notoriety:Byte):Cardinal

Python

def FindNotoriety(ObjType, Notoriety): -> uint

Example Pascal

if (FindNotoriety(-1,3) > 0) then //attack mob
    Attack(FindItem);