Jump to content
  • 0

need help creating a random picking item box


Question

Posted (edited)

this is the item.db script

57002,Lunar_Pumpkin_Box,Lunar Pumpkin Box,2,2,,200,,,,,0xFFFFFFFF,63,2,,,,,,{ getrandgroupitem(IG_LPumpkinBox,1); },{},{}

if i change IG_LPumpkinBox for IG_CookieBag, i get cookies so the item itself is working

 

then i added this in item flag

57002,2 //lunarpumpkinbox

same for cookie bag and old blue box

 

then i added this in item misc

IG_LPumpkinBox,501,1    // Red Potion
IG_LPumpkinBox,502,1    // Orange Potion
IG_LPumpkinBox,503,1    // Yellow Potion

like cookie bag

 

what step am i missing that dont allow it to work?

Edited by quakeman00

4 answers to this question

Recommended Posts

  • 1
Posted (edited)
37 minutes ago, quakeman00 said:

what step am i missing that dont allow it to work?

You need to add  IG_LPumpkinBox to your db/const.txt file like.

IG_LPumpkinBox	5555
IG_LPumpkinBox,57002,2
getrandgroupitem(IG_LPumpkinBox,1);

 

Alternatively you can just declare an ID instead of a variable in the item_group_db.txt as well like.

5555,57002,2

Then call it with getrandgroupitem like.

getrandgroupitem(5555,1);

This helps when trying to keep everything in an import file.

Edited by Skorm
  • Upvote 2
  • 0
Posted (edited)

apreciated for the answer but why is there no information about old blue box and cookie bag in any item group and const file?

 

i mean it worked , thx alot , but i dont see why those also work and dont share the same rules

Edited by quakeman00
  • 0
Posted
1 minute ago, quakeman00 said:

apreciated for the answer but why is there no information about old blue box and cookie bag in any item group and const file?

I believe they just added it directly in source, but trust me I just went over this with someone else and it works.

  • 0
Posted

oh i know it work , as soon as i added it in the const fine , i started gettign potions left and right XD , thx alot , its working and i apreciate it , i just tough i could folow thier syntaxt and get the same result ,

 

thx again

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...