• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Items in boxes/bags saves and comes back after restart?

Candlejack

Don't hug me I'm scared
Joined
Jun 20, 2012
Messages
87
Reaction score
38
Location
nowhere
I want to have a box, or bag, in the game so that when stuff is but in it and the server saves the contents of the bag/box saves and comes back after the server is back online.

I'd like many of these bags/boxes in the game.

Is there a way to do this with just LUA scripts? I'd like players to be able to use them and move them around.
 
Well.. I can think of an 'interesting way' to do it.. lol
Make a house for your gm, and just add 1 sqm's all over the place with the boxes on them.
It would definitely save the items for next server save.. but it might be a hassle
 
Well.. I can think of an 'interesting way' to do it.. lol
Make a house for your gm, and just add 1 sqm's all over the place with the boxes on them.
It would definitely save the items for next server save.. but it might be a hassle
Taking same idea to next level.
Whenever your serversave comes. Kick all players from server, because your about to have a bumpy road.
Loop trough entire server map and for each container what has actionid 3000 put a house zone under them
After you open server remove all the house zones with I'd serversave from map
 
Taking same idea to next level.
Whenever your serversave comes. Kick all players from server, because your about to have a bumpy road.
Loop trough entire server map and for each container what has actionid 3000 put a house zone under them
After you open server remove all the house zones with I'd serversave from map

Hmm, that's a really interesting idea - What's the LUA function to create a house zone?
Having trouble finding one.
 
registerMethod("Tile", "hasProperty", LuaScriptInterface::luaTileHasProperty);
registerMethod("Tile", "hasFlag", LuaScriptInterface::luaTileHasFlag);
registerMethod("Tile", "getHouse", LuaScriptInterface::luaTileGetHouse);

maybe some of these.. no clue, but these are only ones what get close. not sure can you change something with these or only check..

You are better off generating the bag and everything whats inside a bag to global table.
and when server is open you load the table and spawn everything what is in table to their positions and clear the table.
 
You are better off generating the bag and everything whats inside a bag to global table.
and when server is open you load the table and spawn everything what is in table to their positions and clear the table.

Thanks for the reply - Do you think I could do this with LUA or would I have to go into the source?
 
Back
Top