Search and move corpses

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
westrupp
Adept Poster
Posts: 89
Joined: Wed Aug 01, 2007 3:07 am

Search and move corpses

Post by westrupp »

This script search and print name of corpse but dont move corpse, i already tryied others sintaxes but dont work, any have ideia?

Code: Select all

        foreach corpse in ListItemsNearLocationOfType( coords.x, coords.y, coords.z, 5, UOBJ_CORPSE )
            PrintTextAbovePrivate( corpse, corpse.desc, character );
            MoveItemToLocation(corpse, obj.x, obj.y, obj.z , MOVEITEM_FORCELOCATION);
        endforeach
Thanks,
Last edited by westrupp on Fri Mar 28, 2008 5:43 am, edited 1 time in total.
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

That does not make sense.

I don't know what the obj is, but try this snippet instead:

Code: Select all

foreach corpse in ListItemsNearLocationOfType( coords.x, coords.y, coords.z, 5, UOBJ_CORPSE ) 
            PrintTextAbovePrivate( corpse, corpse.desc, character ); 
            MoveItemToLocation(corpse, obj.x, obj.y, obj.z , MOVEITEM_FORCELOCATION); 
        endforeach
westrupp
Adept Poster
Posts: 89
Joined: Wed Aug 01, 2007 3:07 am

Post by westrupp »

ncrsn wrote:That does not make sense.

I don't know what the obj is, but try this snippet instead:
I not in my home now and make this new script i forget change name of variable but already tryed this and dont work, he still dont move corpses...

:(
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

Corpses are unmovable by default; thus.

Code: Select all

foreach corpse in ListItemsNearLocationOfType( coords.x, coords.y, coords.z, 5, UOBJ_CORPSE ) 
            PrintTextAbovePrivate( corpse, corpse.desc, character ); 
            corpse.movable := 1;
            MoveItemToLocation(corpse, obj.x, obj.y, obj.z , MOVEITEM_FORCELOCATION); 
            corpse.movable := 0;
        endforeach
That should do.
westrupp
Adept Poster
Posts: 89
Joined: Wed Aug 01, 2007 3:07 am

Post by westrupp »

thanks for the hinkt, i try this...
westrupp
Adept Poster
Posts: 89
Joined: Wed Aug 01, 2007 3:07 am

Post by westrupp »

ncrsn wrote:Corpses are unmovable by default; thus.

Code: Select all

foreach corpse in ListItemsNearLocationOfType( coords.x, coords.y, coords.z, 5, UOBJ_CORPSE ) 
            PrintTextAbovePrivate( corpse, corpse.desc, character ); 
            corpse.movable := 1;
            MoveItemToLocation(corpse, obj.x, obj.y, obj.z , MOVEITEM_FORCELOCATION); 
            corpse.movable := 0;
        endforeach
That should do.
this work perfect, thanks...

any idea how equip items from corpse?
Post Reply