[IMPLEMENTED] New CreateDFNItemList

If Wishes were UOX Coders, we'd be done by now ;P Post your wishes/suggestions for UOX3 changes/improvements here.
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

New CreateDFNItemList

Post by dragon slayer »

CreateDFNItemlist(mChar.socket, mChar, "ITMELIST 1", AMOUNT, "ITEM", true, COLOR);
basicly almost like dfn but will pull from the itemlists.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Feature request granted...
... because it is already possible. You just need to make sure that you add a "list object" instead of trying to reference the itemlists directly. Example:

Code: Select all

var myItem1 = CreateDFNItem( socket, socket.currentChar, "listobject33", 1, "ITEM", true );
The above will spawn a random item based on this "listobject" entry from itemlists.dfn...

Code: Select all

// Male Fancy Shoes & Boots
[listobject33]
{
itemlist=33
}
Which points to [ITEMLIST 33]:

Code: Select all

// Male Fancy Shoes & Boots
[ITEMLIST 33]
{
0x170b
0x170f
0x1711
}
The same can be done for the fishing itemlists in fishinglist.dfn, if you add the same type of "list objects" there. For example, to spawn items from this itemlist from fishinglist.dfn...

Code: Select all

//Random Treasure (Paintings)
[ITEMLIST fishtreasure]
{
0x0ec8
0x0ee7
0x0ea0
0x0ea1
0x0ea2
0x0ea5
0x0ea6
}
...you could add the following to the same file:

Code: Select all

[fishtreasure] // Name here can be anything, but helps if it identifies the itemlist
{
itemlist=fishtreasure
}
Finally, you could add items from that itemlist in a script:

Code: Select all

var myItem1 = CreateDFNItem( socket, socket.currentChar, "fishtreasure", 1, "ITEM", true );
-= Ho Eyo He Hum =-
Post Reply