Jump to content
  • 0

Group random item problem


affinity865

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  01/16/12
  • Last Seen:  

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 by affinity865
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

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;

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  01/16/12
  • Last Seen:  

Okay cool it seems to be working now, thanks!

I didn't realize I could put (15) instead of (IG_blah)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

Yeah you can define your own name in db/const.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...