@chri
No? :S
But there was no mention that he only wanted it in pzone? And still i'm pretty sure that doesn't solve it either as the bot doesn't take in to account if the ITEM is outside pz or not so it will still perform the action and get outside of depot and the only way to get it back in is to have a secondary action to walk back in if pzone is false but still that's dangerous enough to the point where people will kill you. Assuming you're playing on a PVP server ofcourse.
Ask yourself the question first, if he wanted to pick items up they are most likely items from a spawn, e.g vials, gold coins.. That is the most probable use of this script, so it will in most instances be working for the script. Well as I said this script is most likely used in spawns and therefore if you do die and you're in temple then it will not go and pick up items in or outside of the $pzone cos of the $pzone parameter.
If this script is meant to work inside depot and stuff then fair enough it wont be ideal using just $pzone but there are still ways around it without much difficulty, e.g $posx > 'aaaaa' etc