Hello, I made a xmlspawner that has about 15 diff statics placed in gift boxes. I have it spawn one at a time when player has a drop item in his pack. Then the spawner takes the item so the spawner dont drop too many gifts. All working as intended.

However, I cant seem to make it spawn a random one from the list. It always spawns the first one. All 15 random items are in sub 1 then in sub 2 I have TAKE/item. With a max of 1 item. I cant seem to find a answer as the info on this wonderful system is getting harder to find. Any help is appreciated as always.

Edit: whoops, posted in wrong forums, still on first cup of coffee. :)

Johnny Ace_12-2_08.41.jpg
 
Last edited:
The way you have the Xmlspawner set up, you would have to change the maximum amount that was spawned. Since everything is set at one, and you're only ever spawning one, what you should probably consider is combining all those line entries into one entry, and then use a RNDStrList in the code:
Code:
GiftBox/ADD,1/{RNDSTRLIST,<item>,<item2>,<item3>, <etc>}

Each <item> is each GiftBox. Since you have 10, that means, this would be your:
Code:
GiftBox/ADD,1/{RNDSTRLIST,<Item1>,<Item2>,<Item3>}

I would need to see the whole GiftBox line entry to be able to help further.
 
Thank you for the reply, I knew the RNDLIST or RNDSTRLIST would work, but I was sure there was a way to do it this way. thanks again.
[doublepost=1480777496][/doublepost]Hello again, I am having a problem this morning trying to get this to work. This entry only spawns a empty gift box.

GiftBox/ADD,1/{RNDSTRLIST,<Static,7695/movable/true>,<Static,7696/movable/true>,<Static,7697/movable/true>,<Static,7698/movable/true>,<Static,7699/movable/true>,<Static,7700/movable/true>}
[doublepost=1480777750][/doublepost]GiftBox/ADD,1/RNDSTRLIST,<Static,7695/movable/true>,<Static,7696/movable/true>,<Static,7697/movable/true>,<Static,7698/movable/true>,<Static,7699/movable/true>,<Static,7700/movable/true>

Still only adds a empty giftbox
 
Back