Official Core: 096.7
Official Core: 097 2008-02-26
POL Home
FAQ
Search
Memberlist
Usergroups
Register
Profile
Log in to check your private messages
Log in
Override properties for CreateItem* functions
PenUltima Online Forum Index
->
Feature Suggestions
Display posts from previous
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
Override properties for CreateItem* functions
Author
Message
MontuZ
Distro Developer
Joined: 10 Feb 2006
Posts: 293
Location: Myrtle Beach, South Carolina
Posted: Mon Mar 17, 2008 10:57 pm
Post subject: Override properties for CreateItem* functions
Just like;
CreateNpcFromTemplate( template, x, y, z, override_properties := 0, realm := _DEFAULT_REALM)
Only for items.
Author
Message
ncrsn
Joined: 10 Feb 2006
Posts: 165
Posted: Tue Mar 18, 2008 3:37 am
Post subject:
You can already.
Get item's info using GetItemDescriptor(objtype / objtypename) and change values in it before creating the item.
Code:
var objtype := OBJTYPE_AXE; // 3907
var descriptor := GetItemDescriptor(objtype);
print(descriptor);
descriptor.color := COLOR_RED;
// Results a red axe.
CreateItemInBackpack(who, descriptor, 1);
Overriding the values in struct is sometimes a bit hard (cprops...), but it is doable. Also note that r/o values cannot be changed (weight).
Author
Message
MontuZ
Distro Developer
Joined: 10 Feb 2006
Posts: 293
Location: Myrtle Beach, South Carolina
Posted: Tue Mar 18, 2008 8:49 am
Post subject:
Good stuff,
http://docs.polserver.com/pol097/singlefunc.php?funcname=GetItemDescriptor&xmlfile=polsysem.xml
PenUltima Online Forum Index
->
Feature Suggestions
All times are GMT - 4 Hours
Page
1
of
1
Powered by
phpBB
© 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty