I was going to try to create my own compressed pack to open into a list of possible items. I didn't know where to start so I thought I would edit some that already exist. I wasn't really sure how to do this so I thought I would post what I got to see if I'm on the right track. Don't want to mess up the file and my source code.
Current code from CompShotPacks.java
public void useItem(L2PlayableInstance playable, L2ItemInstance item)
What I want to do is add a list of possible items that have a random chance to open and a random min-max amount. This is my attempt I don't know the code to do random min-max amount yet.
public void useItem(L2PlayableInstance playable, L2ItemInstance item)
Hopefully it would open and give you a 20% chance to recieve 1 of item 7580 and 30% chance to recieve 1 of 6847. This pack doesn't need random amount because its for recipes.
But if I edit the next pack I want it to open up into mats then I would need the random min-max amount. Which I don't know how to add so I can set the min amount and max amount right there.
Example:
Open pack,
(Rnd.get(100) >20)
itemToCreateId = 57;
(Rnd.get(3 - 5) (Get Min 3 or max of 5)
I don't know what the min max is so I just took a guess.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hood-services
https://campsite.bio/utchihaamkt
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hood-services
https://campsite.bio/utchihaamkt
Question
brett16
I was going to try to create my own compressed pack to open into a list of possible items. I didn't know where to start so I thought I would edit some that already exist. I wasn't really sure how to do this so I thought I would post what I got to see if I'm on the right track. Don't want to mess up the file and my source code.
Current code from CompShotPacks.java
What I want to do is add a list of possible items that have a random chance to open and a random min-max amount. This is my attempt I don't know the code to do random min-max amount yet.
Hopefully it would open and give you a 20% chance to recieve 1 of item 7580 and 30% chance to recieve 1 of 6847. This pack doesn't need random amount because its for recipes.
But if I edit the next pack I want it to open up into mats then I would need the random min-max amount. Which I don't know how to add so I can set the min amount and max amount right there.
Example:
Open pack,
(Rnd.get(100) >20)
itemToCreateId = 57;
(Rnd.get(3 - 5) (Get Min 3 or max of 5)
I don't know what the min max is so I just took a guess.
Link to comment
Share on other sites
15 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.
Note: Your post will require moderator approval before it will be visible.