• 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!

Tables help

avalock

New Member
Joined
Feb 5, 2013
Messages
16
Reaction score
3
Location
Great Britain
Hey guys, i'm trying to write a script to find out where a player has used an item essentially from a list of possibilities.

My config example:
Lua:
local Zones = {
[1] = {
Name = "One",
StonePos = {x = 0, y = 0, z = 0},
GoTo = {x = 0, y = 0, z = 0},
},
[2] = {
Name = "Two",
StonePos = {x = 0, y = 0, z = 0},
GoTo = {x = 0, y = 0, z = 0},
},
[3] = {
Name = "One",
StonePos = {x = 0, y = 0, z = 0},
GoTo = {x = 0, y = 0, z = 0},
}}

Basically i can't figure out how to get getThingfromPos to find out when player "uses" the item which position he/she is at then return the table id. So i can make the script teleport the players friends to him. Been looking for table tutorials but can't find one here. If there is one and i've missed it could someone also post the link? Thanks!

Edit: i could make a a new elsif for each possibility and know how to do this, but didn't want a huge script if its possible to do it a lot smaller and simpler. Thanks!
 
Last edited:
Back
Top Bottom