Jump to content
  • 0

Script for box like obb


GM Takumirai

Question


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

- requesting a script like an obb

- example:

1 box if open it will randomly select 10 items inside the list of the box.. can someone teach me how to script it?

Edited by Takumirai
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  308
  • Reputation:   3
  • Joined:  12/18/11
  • Last Seen:  

this is the same script in obb.

item_db2 script

25500,Custom_Box,Custom Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem groupranditem(IG_whatever),1; },{},{}

const.txt:

IG_whatever<TAB>62

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 by simplemhan
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:  

- Ok let me try this.. thanks for quick response

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  308
  • Reputation:   3
  • Joined:  12/18/11
  • Last Seen:  

you need to recompile.

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:  

:) so helpful and the guide is easy to follow..

-- SOLVED --

Edited by Takumirai
Link to comment
Share on other sites

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...