simplemhan Posted March 7, 2012 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 308 Reputation: 3 Joined: 12/18/11 Last Seen: March 4, 2014 Share Posted March 7, 2012 (edited) Thanks for helping me. Edited March 7, 2012 by simplemhan Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 7, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Share Posted March 7, 2012 (edited) .. 501,Red_Potion,Red Potion,0,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "CustomBox"; },{},{} function script CustomBox { setarray .BoxItems[0],501,502,503; set .Random, getarraysize( .BoxItems ); getitem .BoxItems[ rand( .Random ) ], 1; announce "["+strcharinfo(0)+"] has just obtained a ["+getitemname(.BoxItems[ .Random ])+"] from a Custom Box.",0; end; } edit item list here setarray .BoxItems[0],501,502,503; Re-Edit : Fixed Announcement Problems Edited March 30, 2012 by Emistry Quote Link to comment Share on other sites More sharing options...
Reducto Posted March 7, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 231 Reputation: 9 Joined: 12/16/11 Last Seen: August 10, 2016 Share Posted March 7, 2012 (edited) @Emistry How about putting a percentage in a specific item? Example; 501 // Which is Red Potion (0.01%) 502 (0.20%) Edited March 7, 2012 by Cuspid Quote Link to comment Share on other sites More sharing options...
LCDTheOG Posted March 7, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 223 Reputation: 36 Joined: 12/13/11 Last Seen: February 1 Share Posted March 7, 2012 function script CustomBox { setarray .BoxItems[0],501,502,503,504; set .rand, rand(100); if (.rand <= 5){ getitem .BoxItems[0],1;} if (.rand <= 10 && .rand > 5){ getitem .BoxItems[1],1;} if (.rand <= 25 && .rand > 10){ getitem .BoxItems[2],1;} if (.rand > 25){ getitem .BoxItems[3],1;} end; } Edit the if blocks to your liking Quote Link to comment Share on other sites More sharing options...
Pneuma Posted March 7, 2012 Group: Members Topic Count: 82 Topics Per Day: 0.02 Content Count: 846 Reputation: 138 Joined: 02/26/14 Last Seen: March 7, 2018 Share Posted March 7, 2012 Why not just make a new box? Its not that hard :/ I have made 3 custom boxes that do not use this method Quote Link to comment Share on other sites More sharing options...
Reducto Posted March 7, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 231 Reputation: 9 Joined: 12/16/11 Last Seen: August 10, 2016 Share Posted March 7, 2012 @Pneuma Can you put a guide on how to create a custom box? Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 7, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Share Posted March 7, 2012 http://www.eathena.ws/board/index.php?showtopic=266515&hl=custom+box http://www.eathena.ws/board/index.php?s=&showtopic=268618&view=findpost&p=1469481 http://www.eathena.ws/board/index.php?s=&showtopic=276917&view=findpost&p=1518804 http://www.eathena.ws/board/index.php?showtopic=159563 Alternate Way : http://www.eathena.ws/board/source-Creating-Your-Own-Item-Givers-t84389.html Rate Explanation : http://www.eathena.ws/board/index.php?s=&showtopic=275237&view=findpost&p=1509681 Quote Link to comment Share on other sites More sharing options...
LCDTheOG Posted March 8, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 223 Reputation: 36 Joined: 12/13/11 Last Seen: February 1 Share Posted March 8, 2012 we should put that guide here since eA = dead in the water. Quote Link to comment Share on other sites More sharing options...
Question
simplemhan
Thanks for helping me.
Edited by simplemhanLink to comment
Share on other sites
7 answers to this question
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.