Page 1 of 1

lua command question

Posted: Sat Mar 05, 2016 12:21 am
by Lappy
not sure where this question belongs, hope this is the right forum.

i recently found out about the lua command and that you can spawn items in your inventory. is it possible to spawn multiple items at once?
for example; i want 100 copper plate and 100 iron plate. i am currently using 2 seperate commands for this;
/c game.local_player.insert{name='copper-plate', count=100}
/c game.local_player.insert{name='iron-plate', count=100}

it is possible to ask both items in 1 command?
i've tried to place several things in between like '' + '', the '' , '' and '' and '' but with no luck.

Re: lua command question

Posted: Sat Mar 05, 2016 12:33 am
by Klonan
Not really, but you can make it one command and make it shorter like this

Code: Select all

/c local p = game.local_player p.insert{name = "iron-stick", count = 10} p.insert{name = "copper-cable", count = 50} p.insert{name = "stone", count = 50}

Re: lua command question

Posted: Sat Mar 05, 2016 10:43 am
by Lappy
thank you!
this will save me a lot of copy-paste if i just make one long command.
nothing better than 6 exoskeletons early to find the perfect spot to begin :mrgreen: