Ok, first of all if you want to put it in the Player class then I don't really get why you always try to search for it in the memory instead of using getlocal0 (a.k.a. "*this"). It makes no sense at all, and probably it doesn't even work (note that I'm not an avm2/as3 expert). Since Player is a child of GameObject (and BasicObject), it has both map_ and objectType_ fields.
Another thing:
What is that setlocal, getlocal? setlocal and getlocal need an argument (a number that specifies the register where you want to store or load the data). On the top of it, there is no reason to put such instructions there, remove it.
The update method is already in a loop so you don't need to make another one in it and stop the game from working. It should simply look like this:
check for map and class
if matches jump to autouse
[else] jump to end
autouse:
[other checks like cooldown, mana, hp, etc]
call player's useAltWeapon method
end:
So you need to call the useAltWeapon with the mouse coordinates (map has mouseX and mouseY fields) and a constant which is 1 if I remember correctly.
Autopot is a lot easier, since you only need to check the hp, and use a hp pot if necessary (you can find out how in game/_-hw under the useHealthPotion part. optionally you can loop through the inv slots looking for hp pots and call the useItem(slotid) method)