UbberN00ber Posted February 20, 2020 Share Posted February 20, 2020 how can i make a custom loot box with set items in it? want the box to be the cm menu nonplayer but i want to give box to player so they can place it on ground and loot it and then the box destroys itself. the box needs to contain about 5-7 set items with set quality. Link to comment Share on other sites More sharing options...
ExtremeLurker Posted February 20, 2020 Share Posted February 20, 2020 Can I have an example of the items you want to spawn? Link to comment Share on other sites More sharing options...
UbberN00ber Posted February 21, 2020 Author Share Posted February 21, 2020 this is just an example im looking to do something like 5 different boxes that only an admin can give to a player. so that can place the box and open it to get loot then have the box destroy lootbox 1 pickaxe lvl 6 gyro shovel lvl 5 lootbox 2 4x4 fireaxe lvl 6 ak47 lvl 6 500 7.62 ammo Link to comment Share on other sites More sharing options...
ExtremeLurker Posted February 21, 2020 Share Posted February 21, 2020 I know two different ways to do this. But I don't know a way off hand of controlling the individual item quality, only all the items in the container, so they can all be 6 for instance, but not some 6 and some 5. Also, I don't think there is a way to control the durability of the items in the container, unfortunately, so they get assigned random durability levels. Of course both of these issues are fixable if the game's code is patched via the DMT launcher, but I figure you might be looking for and XML only patch, as those mods are applied automatically to players rather than requiring you to distribute files. Link to comment Share on other sites More sharing options...
UbberN00ber Posted February 21, 2020 Author Share Posted February 21, 2020 ok so how to do it without the lvl if i can get a start there i can work with it Link to comment Share on other sites More sharing options...
ExtremeLurker Posted February 21, 2020 Share Posted February 21, 2020 I've made you something that you can use. You can look through it and alter it as you need. Unzip this to your mods folder. https://drive.google.com/uc?export=download&id=1fZOnuU7e275r7GDNhiZGFRHjLYmO4x4X To use it, in the game, open the console and type lp This will list the current players. Find the player you want to give a crate to, and look at their pos. Now type sea UbberN00berCrate1 x y z and replace x y and z with the pos values you saw for that player. This will cause a crate to appear next to that player. The mod also includes UbberN00berCrate2. Both the crates contain what you described. Give it a try and let me know if you have any questions. I also created a crate object that you can hold in your inventory, but that option doesn't work quite as well because there's not a command to give an item to a player, so you'd have to give it to yourself and then go to the player and give it to them, then they have to place it on the ground and break it to open it, so the HP on it is set to 1. I feel the option that I've given you above is a more elegant solution. Link to comment Share on other sites More sharing options...
UbberN00ber Posted February 21, 2020 Author Share Posted February 21, 2020 ty i will try it out Link to comment Share on other sites More sharing options...
ExtremeLurker Posted February 21, 2020 Share Posted February 21, 2020 ty i will try it out FYI, in my instructions I accidentally listed the command as se but it should be sea, so I edited the post. You can use the se command to spawn the crate as well (if you look up the entityid) but it doesn't spawn it right next to the player so I recommend the sea command instead. Link to comment Share on other sites More sharing options...
UbberN00ber Posted February 26, 2020 Author Share Posted February 26, 2020 this works but im wanting it to be an item box (list in CM) not an entity box (F6)... so i can spawn the box into the players inventory so they can place it down and open it for the loot... also i did notice the items are a lvl 6 but not full health if the health thing is random i can work with that but would like it at 100% health ty Link to comment Share on other sites More sharing options...
UbberN00ber Posted March 2, 2020 Author Share Posted March 2, 2020 anyone? Link to comment Share on other sites More sharing options...
Gamida Posted March 2, 2020 Share Posted March 2, 2020 as far as I know being an admin you can spawn any item of quality you choose right into players inventory. I take it you don't want all the items in one box but be able to give them a box with one item in it? Or is it like the class thing some servers do to give new players some items when they join?> Link to comment Share on other sites More sharing options...
UbberN00ber Posted March 2, 2020 Author Share Posted March 2, 2020 im looking for a way to spawn many items at once so like making a box the contains certain items that i can just spawn that box to players not having to do it 1 at a time Link to comment Share on other sites More sharing options...
Gamida Posted March 2, 2020 Share Posted March 2, 2020 Well the way ExtremeLurker mentioned is probably the way to go. Link to comment Share on other sites More sharing options...
UbberN00ber Posted March 2, 2020 Author Share Posted March 2, 2020 yeah but its an airdrop and all the items are damaged not full health Link to comment Share on other sites More sharing options...
UbberN00ber Posted March 2, 2020 Author Share Posted March 2, 2020 is there a way to set items to full health in the loot xml? <lootqualitytemplates> <lootqualitytemplate name="UbberN00berContainerQuality"> <qualitytemplate level="1,999999" default_quality="1"> <loot quality="6" prob="1" /> </qualitytemplate> </lootqualitytemplate> </lootqualitytemplates> Link to comment Share on other sites More sharing options...
ExtremeLurker Posted March 3, 2020 Share Posted March 3, 2020 yeah but its an airdrop and all the items are damaged not full health Unfortunately unless you create a patch for the game's code, there is not a way to spawn items at full durability that I'm aware of, as the game chooses a random durability when spawning loot. I mentioned this to you in a previous post already. You can add repair kits to the box if you want. I recommended the entity spawn because that way you can spawn it near the player as you wish and it works smoothly. The other solution is not as elegant, because there is not a command as far as I'm aware to give an item to a player, so you would have to give the box to yourself, teleport to the player, and then drop the box for them to allow them to pick it up. I'm not extremely familiar with the admin commands, though, so perhaps you know a command to directly give an item to a user. Furthermore, however, there is not a way to create a box that has items in it when you drop it, so you have to do a workaround where you create a box that has 1HP that deteriorates into a box that has the loot in it, so the player has to put the box on the floor, then hit it once, then they can open it. So for these two reasons (no command to give item, box has to be hit to deteriorate into a box that spawns the items), I recommend using the entity box that I created for you. Link to comment Share on other sites More sharing options...
UbberN00ber Posted March 4, 2020 Author Share Posted March 4, 2020 ok ty very much Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.