WhatFT Posted March 20, 2012 Posted March 20, 2012 I don't know how to get a DB Script on this kind of Prize Box.. What is the DB SCRIPT for this one? Thinking that the Item/Prize Box contains -Chance to get Random Items -The same as the Old Blue/Purple Boxes. -Will not replace or Will replace OBB & OPB. Quote
Flaid Posted March 20, 2012 Posted March 20, 2012 There's quite a few ways to do it, if you really want to obtain a random item, use this script. It's a simple function. function script PrizeBox { setarray .PrizeBoxItems[0],5013,6414,5142,4124,5123; set .Random, getarraysize( .BoxItems ); getitem .PrizeBoxItems[ rand( .Random ) ]; end; } On this line you set the items you want the box to randomly give out: setarray .PrizeBoxItems[0],5013,6414,5142,4124,5123; Now you simply add this as your item script. 20000,Prize_Box,Prize Box,0,150,,80,,,,,0xFFFFFFFF,31,2,,,,,,{ callfunc "PrizeBox"; },{},{} Quote
Emistry Posted March 20, 2012 Posted March 20, 2012 (edited) try this http://upaste.me/index.php?show=17976 aw...Flaid is a minute faster than me..>.< Edited March 20, 2012 by Emistry Quote
WhatFT Posted March 20, 2012 Author Posted March 20, 2012 (edited) XD Which one will I better to use? @Emistry What will I put in the [ .Random ] ? Edited March 20, 2012 by Paulinds Quote
simplemhan Posted March 20, 2012 Posted March 20, 2012 (edited) you can also try this item_db2 script 25500,Custom_Box,Custom Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem groupranditem(IG_whatever),1; },{},{} const.txt: IG_whatever<TAB>55 Find IG_Advanced_Weapons_Box 61, check the last number and name for the last IG_ and add the following below that IG_whatever 62 (Depending on the last ID in there of course AND make sure to tab after IG_whatever, NOT space) item_group_db.txt: import: db/item_whatever.txt item_whatever.txt: 62,<Item ID>,<Rate> 62,<Item ID>,<Rate> 62,<Item ID>,<Rate> 62,<Item ID>,<Rate> // As many as you want item_whatever.txt // Structure of Database: // GroupID,ItemID,Rate 62,ID,1 //The Group ID you must set in your db/const.txt 62,5013,1 //Lord Kaho's Horn itemdb.h #define MAX_ITEMGROUP #62 - change this to your IG_whatever# and add plus 1 means #define MAX_ITEMGROUP #63 for my example. Edited March 20, 2012 by simplemhan Quote
Flaid Posted March 20, 2012 Posted March 20, 2012 XD Which one will I better to use? It doesn't matter, they are the same, almost scripted the same even. Quote
Emistry Posted March 20, 2012 Posted March 20, 2012 XD Which one will I better to use? It doesn't matter, they are the same, almost scripted the same even. well...both are origin of my script...O.O anyway... the 1 post by Flaid just can get 1 item.. the below 1 i post... you can set how many items can be get in 1 box.. and every single items that you can get in the box have it's own quantity... anyway...choose at your own... Quote
Flaid Posted March 20, 2012 Posted March 20, 2012 Your script? How can it be your script if I was the first to post here D: Quote
simplemhan Posted March 20, 2012 Posted March 20, 2012 mine is the same script in old blue box, ect. Quote
Emistry Posted March 20, 2012 Posted March 20, 2012 well..whatever...i dont wannt argu on this stuff...so just let it be...perhap my misunderstanding... @TS.. there is nothing you have to change in the script part.. all you have to do is just edit the setarray part for the item listing / amount Quote
WhatFT Posted March 20, 2012 Author Posted March 20, 2012 THANKS FOR SHARING EVERYONE !! Appreciate it Quote
Question
WhatFT
I don't know how to get a DB Script on this kind of Prize Box..
What is the DB SCRIPT for this one?
Thinking that the Item/Prize Box contains
-Chance to get Random Items
-The same as the Old Blue/Purple Boxes.
-Will not replace or Will replace OBB & OPB.
10 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.