sokarpupe Posted April 17, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 11 Reputation: 0 Joined: 07/06/17 Last Seen: June 23, 2018 Share Posted April 17, 2018 Hi, I need to create my own boxes, for example, "old blue box", any guide ?. Thank you. Quote Link to comment Share on other sites More sharing options...
0 Stolao Posted April 17, 2018 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Share Posted April 17, 2018 You call also try using a function like https://github.com/Stolao/Npc_Release/blob/master/Custom_Functions/F_ItemWeight.txt Quote Link to comment Share on other sites More sharing options...
0 Shinto Posted April 17, 2018 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 15 Reputation: 1 Joined: 12/16/17 Last Seen: January 24, 2019 Share Posted April 17, 2018 (edited) I use this procedureitem_db.txt // I create the item box33000, Renewal_Box, Renewal Box, 18.10,, 10 ,,,,, 0xFFFFFFFF, 63.2 ,,,,,, {getgroupitem (IG_RNBOX); }, {}, {}then in item_group_db.txtI enter the items that can come out// ID_BOX,ITEM_ID,RATE_ITEM_Drop, Amount <---- If I'm wrong, this is the procedure IG_RNBOX, 607,5,3 // Yggdrasil Berry IG_RNBOX, 7517.3 // Gold Coin IG_RNBOX, 12522.4 // Blessing Scroll try also to take a look on the forum item_group_db surely there will be some tutorials Edited April 17, 2018 by Shinto Quote Link to comment Share on other sites More sharing options...
0 sokarpupe Posted April 18, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 11 Reputation: 0 Joined: 07/06/17 Last Seen: June 23, 2018 Author Share Posted April 18, 2018 (edited) I see guides, but it's so obsolete first entry in the item_db 21031,Caja_1,Caja de Nivel,2,0,,0,,,,,0xFFFFFFFF,63,2,,,70,,2000,{ getrandgroupitem(IG_LVLBOX,1); },{},{} then entry in rA/src/map/script_constants.hpp export_constant(IG_LVLBOX); then i modify in rA/src/map/itemdb.hpp #define MAX_ITEMGROUP_RANDGROUP 4 to #define MAX_ITEMGROUP_RANDGROUP 5 then in rA/db/re i create this item_lvlbox.txt // LVLBOX Obtainable Items Database // // Structure of Database: // GroupID,ItemID,Rate // LVLBOX IG_LVLBOX,501,1 // Red Potion IG_LVLBOX,502,1 // Orange Potion IG_LVLBOX,503,1 // Yellow Potion IG_LVLBOX,504,1 // White Potion and i recompile my svr whit ./configure, and it did not work :S I know i forget something, but i do not know what it is, help Edited April 18, 2018 by sokarpupe Quote Link to comment Share on other sites More sharing options...
0 Shinto Posted April 18, 2018 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 15 Reputation: 1 Joined: 12/16/17 Last Seen: January 24, 2019 Share Posted April 18, 2018 (edited) in the past I also used that guide without having results ... try to do so: first entry in the item_db 21031,Caja_1,Caja de Nivel,2,0,,0,,,,,0xFFFFFFFF,63,2,,,70,,2000,{ getgroupitem(IG_LVLBOX); },{},{} ( use getgroupitem instead of getrandgroupitem ) there is no need to modify script_costants.hpp and itemdb.hppthen for second open item_group_db.txtand enter // GroupID,ItemID,Rate // LVLBOX IG_LVLBOX,501,1 // Red Potion IG_LVLBOX,502,1 // Orange Potion IG_LVLBOX,503,1 // Yellow Potion IG_LVLBOX,504,1 // White Potion I tried it with an item box that I created and it works .... I hope I helped you Edited April 18, 2018 by Shinto Quote Link to comment Share on other sites More sharing options...
0 Stolao Posted April 18, 2018 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Share Posted April 18, 2018 (edited) use my function its much easier 21031,Caja_1,Caja de Nivel,2,0,,0,,,,,0xFFFFFFFF,63,2,,,70,,2000,{ callfunc "F_RandWeight",501,1,502,1503,1,504,1; },{},{} the chance will be item weight/total weight, in the above example each potion has a 1 weight with 4 total items meaning 1/4 chance Edited April 18, 2018 by Stolao Quote Link to comment Share on other sites More sharing options...
0 llchrisll Posted April 19, 2018 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share Posted April 19, 2018 (edited) Btw if you make your custom boxes before editing the itemdb.hpp, use the db/const.txt. You just have to look up the latest of box identifier in the itemdb.hpp count the lines, and use the next free value as identifier. 2nd option would be an custom function to generate the items. With their respective chances. That's an option if you don't want to do the part above, and much easier to edit in my opinion but you need to script the chances of course. Regards, Chris Edited April 19, 2018 by llchrisll Quote Link to comment Share on other sites More sharing options...
0 sokarpupe Posted April 19, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 11 Reputation: 0 Joined: 07/06/17 Last Seen: June 23, 2018 Author Share Posted April 19, 2018 STOLAO, where entry your scrit? in rA/db/re??? or is npc custom script? Quote Link to comment Share on other sites More sharing options...
0 Stolao Posted April 20, 2018 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Share Posted April 20, 2018 3 hours ago, sokarpupe said: STOLAO, where entry your scrit? in rA/db/re??? or is npc custom script? On 4/17/2018 at 4:20 AM, Stolao said: You call also try using a function like https://github.com/Stolao/Npc_Release/blob/master/Custom_Functions/F_ItemWeight.txt i posted in my 1st post.... Quote Link to comment Share on other sites More sharing options...
0 sokarpupe Posted April 20, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 11 Reputation: 0 Joined: 07/06/17 Last Seen: June 23, 2018 Author Share Posted April 20, 2018 3 hours ago, Stolao said: i posted in my 1st post.... thx, I use your scrip, but ... it did not work, I don't know which direction to enter the script in my rA emulator, i entry this in rA/npc/custom and, use the line item . 21031,Caja_1,Caja de Nivel,2,0,,0,,,,,0xFFFFFFFF,63,2,,,70,,2000,{ callfunc "F_RandWeight",501,1,502,1503,1,504,1; },{},{} and it did not work Quote Link to comment Share on other sites More sharing options...
0 Stolao Posted April 20, 2018 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Share Posted April 20, 2018 8 hours ago, sokarpupe said: thx, I use your scrip, but ... it did not work, I don't know which direction to enter the script in my rA emulator, i entry this in rA/npc/custom and, use the line item . 21031,Caja_1,Caja de Nivel,2,0,,0,,,,,0xFFFFFFFF,63,2,,,70,,2000,{ callfunc "F_RandWeight",501,1,502,1503,1,504,1; },{},{} and it did not work Ok I haven't updated/tested the script in a while let me check once I get home assuming someone else doesn't show a fix before then Quote Link to comment Share on other sites More sharing options...
0 sokarpupe Posted April 22, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 11 Reputation: 0 Joined: 07/06/17 Last Seen: June 23, 2018 Author Share Posted April 22, 2018 Stolao, excuse me, any solution? Quote Link to comment Share on other sites More sharing options...
0 Stolao Posted April 22, 2018 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Share Posted April 22, 2018 4 hours ago, sokarpupe said: Stolao, excuse me, any solution? 21031,Caja_1,Caja de Nivel,2,0,,0,,,,,0xFFFFFFFF,63,2,,,70,,2000,{ callfunc("F_RandWeight",501,1,502,1,503,1,504,1); },{},{ it was missing a comma in the other one, creating inf loop, fixed this works fine just tested Quote Link to comment Share on other sites More sharing options...
0 sokarpupe Posted April 22, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 11 Reputation: 0 Joined: 07/06/17 Last Seen: June 23, 2018 Author Share Posted April 22, 2018 thx Stolao for your script and suport, i thought you scrip was wrong, but no, the line was wrong xD i use 11 hours ago, Stolao said: but this line also wrong. when i thought and see the problem and change some things, and finalliy, this line works 21031,Caja_1,Caja de Nivel,2,0,,0,,,,,0xFFFFFFFF,63,2,,,70,,2000,{callfunc ("F_RandWeight",501,1,502,1,503,1,504,1); },{},{} Thanks to everyone who commented and tried to solve my question, Thx Stolao Quote Link to comment Share on other sites More sharing options...
Question
sokarpupe
Hi, I need to create my own boxes, for example, "old blue box", any guide ?. Thank you.
Link to comment
Share on other sites
13 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.