thanks ghost. also the sub you wrote broke my looting script not sure why. lol ill post it here
sub loot
FINDITEM %CORPSE G_3
if ( #FINDKIND > -1 ) && ( %attacking = #false ) && ( %looting = #false )
   {
   set %noloot #false
   goto lootloop
   }
if #findkind = -1
   {
   set %noloot #true
   }
lootloop:
set %newcorpse #findID
set #LOBJECTID %newcorpse
if #CONTTYPE = %CORPSE
{
  set %opencorpse #CONTID
}
nextCPos 25 450
wait 20
EVENT MACRO 17
wait 20
FINDITEM %loot C_ , %opencorpse
if #findcnt > 0
 {
  set %looting #true
   exevent drag #findID
   wait 10
   EXEVENT DROPC %mapbag
   wait 10
 }
if #findcnt < 1
 {
 set %looting #false
 }
;FINDITEM POF C_ , %opencorpse
;if ( #findcnt > 0 ) && ( %USEBOS = #true )
; {
;   exevent drag #findID #findstack
;   wait 10
;   EXEVENT DROPC #BACKPACKID
;   wait 10
; }
ignoreitem %newcorpse 1
return