ZelosAvalon 14 Posted April 12, 2015 how can i make an box ? when ppl open it, will earn a random item? i found this code but idk how it work, can any1 explain me ? { getrandgroupitem(IG_GiftBox_2),1; },{},{} Quote Share this post Link to post Share on other sites
0 Soul1992 2 Posted April 12, 2015 (edited) open /db/item_db2.txt make a new item - 25500,Custom_Box,Custom Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem groupranditem(IG_whatever),1; },{},{} next step is open /db/const.txt Find IG_Advanced_Weapons_Box 61 below add this IG_whatever 63 //IG_whatever must be same in the item_db2.txt script command next step open ra/db/item_group_db.txt import: db/item_whatever.txt - put this next step make a new script named item_whatever.txt - place this in /db/ next step open item_whatever.txt - in /db/item_whatever.txt //Explanation 63 - is the number you input in const.txt // - 1111 - this is the itemID // - 9 - this is the rate 63,1111,9 63,<Item ID>,<Rate> next step open src/map/itemdb.h find this part #define MAX_ITEMGROUP #62 the number is 62 where in const.txt the max group number is 62 - but you add another item group.. - just add + 1 in 62 so make it #define MAX_ITEMGROUP #63 Edited April 12, 2015 by Soul1992 Quote Share this post Link to post Share on other sites
0 ZelosAvalon 14 Posted April 13, 2015 open /db/item_db2.txt make a new item - 25500,Custom_Box,Custom Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem groupranditem(IG_whatever),1; },{},{} next step is open /db/const.txt Find IG_Advanced_Weapons_Box 61 below add this IG_whatever 63 //IG_whatever must be same in the item_db2.txt script command next step open ra/db/item_group_db.txt import: db/item_whatever.txt - put this next step make a new script named item_whatever.txt - place this in /db/ next step open item_whatever.txt - in /db/item_whatever.txt //Explanation 63 - is the number you input in const.txt // - 1111 - this is the itemID // - 9 - this is the rate 63,1111,9 63,<Item ID>,<Rate> next step open src/map/itemdb.h find this part #define MAX_ITEMGROUP #62 the number is 62 where in const.txt the max group number is 62 - but you add another item group.. - just add + 1 in 62 so make it #define MAX_ITEMGROUP #63 don't work for Hercules! =/ Quote Share this post Link to post Share on other sites
0 viruskiller 0 Posted April 13, 2015 Learn it ^^ heres the files where you edit the contents of the box dbreitem_group.conf There is a link and definition on how to do it Now search the said item on the itemdb then check how they are done or coded so that you can copy it hope this help Quote Share this post Link to post Share on other sites
Share this post
Link to post
Share on other sites