ID:165235   Feb 2 2007, 8:32 am (Edited on Feb 2 2007, 9:27 am) Yes, I looked through the Blue Book, however it doesn't have the type of randomization that I wanted. Now I want 1 out of a number(which they have the code for set numbers, however I want mine to work so players can choose how many cards they want to use,not a set number)so it would be 1 out of deck size. Yea, I can do this the long way, by going, 1-60=60 card deak,then do it for each number 1-61,1-62, and so on, but that will take up alot of lines. So can someone give me a code that would work the way I want it to? PS. Yea, lol I know my example Isn't actual code, I just did it that way to explain what I want it to do, but not as sloppy, or long, as that example would need to be, if I coded it.
 <-> Feb 2 2007, 9:45 am Zoltor wrote: Yes, I looked through the Blue Book, however it doesn't have the type of randomization that I wanted. Now I want 1 out of a number(which they have the code for set numbers, however I want mine to work so players can choose how many cards they want to use,not a set number)so it would be 1 out of deck size. Yea, I can do this the long way, by going, 1-60=60 card deak,then do it for each number 1-61,1-62, and so on, but that will take up alot of lines. So can someone give me a code that would work the way I want it to? PS. Yea, lol I know my example Isn't actual code, I just did it that way to explain what I want it to do, but not as sloppy, or long, as that example would need to be, if I coded it. sound like you want the player's "INPUT" on the size of the deck. if that's what you are looking for: ```mob var/Hand = 20 //starting amount of cards you haveproc/UseDeck(var/mob/M) var/cards = 0 do cards = input("How many cards?(1-[M.Hand])",,1) as num if((cards>M.hand) || (cards<1)) //invalid number of cards alert("You must pick between 1 and [M.Hand]") while((cards>M.hand) || (cards<1)) ```
 <-> Feb 2 2007, 9:51 am In response to Jik This seems like it might work, I'll have to try it out to see for sure, but it sounds like it will work, ty