roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,210
- Solutions
- 35
- Reaction score
- 206
Hi, i'm tring to create a code that player will use a lever, and will receive:
A bag with 4 backpack inside it.
Now I need to add items inside the backpacks, how can I do it?
each backpack needs to receive these items
A bag with 4 backpack inside it.
LUA:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local bag = player:addItem(1992, 1) -- a bag
bag:addItem(1999, 1) -- backpack 1
bag:addItem(1999, 1) -- backpack 2
bag:addItem(1999, 1) -- backpack 3
bag:addItem(1999, 1) -- backpack 4
return true
end
Now I need to add items inside the backpacks, how can I do it?
Code:
backpack items = {11991, 1000}, {5880,30}, {5891,25}, {10558,10}
Last edited: