p_T_s Posted December 23, 2008 Posted December 23, 2008 I have seen this on another game and was wondering if anyone can help me get it to work? I want to add books to a book shop, Each book will give a different amount of IQ when bought and used but i want to be able to add all the books to the shop but then have only 5 show at a time, lets say book A, B, C, D, and E... But then every hour change around to say, Book F, H, A, Z, Y etc etc.... Any one? Quote
p_T_s Posted December 30, 2008 Author Posted December 30, 2008 Re: Random Item in shop B U M P :-D Quote
AlabamaHit Posted December 31, 2008 Posted December 31, 2008 Re: Random Item in shop make an array with the books, then pull rand from array? I think that would be the best...... Quote
POG1 Posted December 31, 2008 Posted December 31, 2008 Re: Random Item in shop $books = array(1=>array(60,61,62,63),2=>array(64,65,66,67),3=>array(68,69,70,71)); $books = $books[mt_rand(1,3)]]; echo $books; Quote
p_T_s Posted January 9, 2009 Author Posted January 9, 2009 Re: Random Item in shop So to use array, do i have to create a seperate shops.php or just add it into the current one? If someone wants to make this mod for me with all sqls, crons and php files.... I will gladly pay for it! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.