CreateItemInBackpack( of_character, objtype, amount := 1)

Archive of the older Feature Request Forum Posts
Locked
GEEK
New User
Posts: 29
Joined: Sat Jul 22, 2006 8:25 am

CreateItemInBackpack( of_character, objtype, amount := 1)

Post by GEEK »

CreateItemInBackpack( of_character, objtype, amount := 1 );

a new parameter like:
CreateItemInBackpack( of_character, objtype, amount := 1, NO_NOT_USE_STAK_IF_FOUND);

to order command to create new item and not to add ti prevous stack....
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

Use GetItemDescriptor() in polsys.em and create the object using that.
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

I know this is a bit screwy and takes a couple more cycles but

var item := CreateItemDescriptor(objtype);
item.CProps.NoStack := 1;
item := CreateItemInBackpack(of_character, item, amount := 1);
EraseObjProperty(item, "NoStack");


Just a note that CreateItemDescriptor is in POLSYS not UO.

CreateItemDescriptor was made for us to manipulate items before creation so we can create them straight into the stack instead of individually but of course this could be used the other way too :D gotta love double-sided features :wink:
GEEK
New User
Posts: 29
Joined: Sat Jul 22, 2006 8:25 am

Post by GEEK »

Beh... I have create item to earth and moved after to backpack but thanks for answers :-)
Locked