I need couple of action :P

i will use this action to raise magic level ...
utana_vid
PHP Code:
if mp 500
and cancast "utana vid" then
cast 
"utana vid"
end 
exura_vita
PHP Code:
if mp 1000
and cancast "exura vita" then
cast 
"utana vid"
end 
First
So , i have a backpack with mana potion on ground i wan my char to loot 600 GMP potion from it only when i my character dropped all the empty flask on floor .. before to do this i wan the bot to stop both action i will use to raise mlvl [exura_vita & utana_vid]

Second!
I wan my second request , i wan my character to drop all empty GMP only when all the 600GMP are used !

Thanks to the one who will help me ill def. rep+ on this !!