affinity865 Posted January 16, 2012 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 2 Reputation: 0 Joined: 01/16/12 Last Seen: January 23, 2012 Share Posted January 16, 2012 (edited) I'm trying to make a custom item to give one random item based on chance. The item is basically Old Blue Box just with different items. So far I've put my item_db code in: 22556,Quest_Prize2,Quest Prize Box 2,2,10000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem groupranditem(IG_qpb2),1; },{},{} and I made the .txt file in the db folder and named it item_qpb2.txt just like Old Blue Box and put the items i want in there like so: 15,22550,35 15,22551,25 15,22552,15 15,22553,10 15,22554,5 But I can't seem to get this to work. I'm guessing its because of the IG_qpb2 part in the item_db code but I don't know what to do about that. Edited January 16, 2012 by affinity865 Quote Link to comment Share on other sites More sharing options...
Z3R0 Posted January 16, 2012 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted January 16, 2012 http://ea.dj-yhn.com...c=groupranditem Details for command groupranditem: * groupranditem <group id>; Returns the item_id of a random item picked from the group specified. The different groups and their group number are specified in db/item_group_db.txt When used in conjunction with other functions, you can get a random item. For example, for a random pet lure: getitem groupranditem(15),1; 1 Quote Link to comment Share on other sites More sharing options...
affinity865 Posted January 16, 2012 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 2 Reputation: 0 Joined: 01/16/12 Last Seen: January 23, 2012 Author Share Posted January 16, 2012 Okay cool it seems to be working now, thanks! I didn't realize I could put (15) instead of (IG_blah) Quote Link to comment Share on other sites More sharing options...
KeyWorld Posted January 17, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share Posted January 17, 2012 Yeah you can define your own name in db/const.txt Quote Link to comment Share on other sites More sharing options...
Yasunari Ishibashi Posted November 27, 2012 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 157 Reputation: 2 Joined: 01/06/12 Last Seen: August 25, 2014 Share Posted November 27, 2012 how to add a script to the group annoucher random item? eg I opened the box and I get automatic Jellopy annoucher that namaplayer get Jellopy. whether it can be made like that? please help make the script thanks. Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted November 27, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Share Posted November 27, 2012 use this http://rathena.org/board/topic/65196-tcg-drainer-very-useful-to-most-of-the-servers-just-like-lotti-girl-in-pro/ Quote Link to comment Share on other sites More sharing options...
Question
affinity865
I'm trying to make a custom item to give one random item based on chance. The item is basically Old Blue Box just with different items. So far I've put my item_db code in:
and I made the .txt file in the db folder and named it item_qpb2.txt just like Old Blue Box and put the items i want in there like so:
But I can't seem to get this to work. I'm guessing its because of the IG_qpb2 part in the item_db code but I don't know what to do about that.
Edited by affinity865Link to comment
Share on other sites
5 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.