Jump to content
  • 0

need help creating a random picking item box


quakeman00

Question


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   2
  • Joined:  03/08/13
  • Last Seen:  

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

4 answers to this question

Recommended Posts

  • 1

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   2
  • Joined:  03/08/13
  • Last Seen:  

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

  • 0

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   2
  • Joined:  03/08/13
  • Last Seen:  

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

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