| Author |
Message |
westrupp
Joined: 01 Aug 2007 Posts: 26 Location: Brazil
|
Posted: Fri Mar 28, 2008 9:17 am Post subject: Search and move corpses |
|
|
This script search and print name of corpse but dont move corpse, i already tryied others sintaxes but dont work, any have ideia?
| Code: |
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 9:43 am; edited 1 time in total |
|
 |
|
|
 |
 |
| Author |
Message |
ncrsn
Joined: 10 Feb 2006 Posts: 168
|
Posted: Fri Mar 28, 2008 9:21 am Post subject: |
|
|
That does not make sense.
I don't know what the obj is, but try this snippet instead:
| Code: |
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
|
|
|
 |
|
| Author |
Message |
ncrsn
Joined: 10 Feb 2006 Posts: 168
|
Posted: Fri Mar 28, 2008 10:01 am Post subject: |
|
|
Corpses are unmovable by default; thus.
| Code: |
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. |
|
 |
|
| Author |
Message |
westrupp
Joined: 01 Aug 2007 Posts: 26 Location: Brazil
|
Posted: Sat Mar 29, 2008 3:52 am Post subject: |
|
|
| ncrsn wrote: | Corpses are unmovable by default; thus.
| Code: |
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? |
|
 |
|
|