Giving random stuff Albetros Source

03/11/2012 19:10 warzie005#1
Hi there,

I know how to make a NPC, but I don't know how to give random stuff away. I use the Albetros source.

Kind regards,
Warzie005
03/14/2012 10:08 I don't have a username#2
Random stuff? Like items? o.o
03/14/2012 18:20 warzie005#3
Quote:
Originally Posted by I don't have a username View Post
Random stuff? Like items? o.o
Yes, everytime you click that box you will get another item.
03/14/2012 18:51 I don't have a username#4
I assume there is something like Client.AddItem(ITEM_ID_HERE); just use System.Random or whatever Random-Generator the source is using and then make an array of the item ids and then do something like:
Code:
uint[] ItemIds = new uint[] { 410339, 420339 };//blade 130, sword 130
Client.AddItem(ItemIds[Rnd.Next(ItemIds.Length - 1)]);
^^