president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
Hi folks, I need a little light on my new script, does not give any kind error, just don't work.
The main idea is a random teleport can appers in positon (1000, 1000, 7) or (1002, 1002, 7) or (1004, 1004, 7) with a actionid and will set a global storage.
Thanks.
The main idea is a random teleport can appers in positon (1000, 1000, 7) or (1002, 1002, 7) or (1004, 1004, 7) with a actionid and will set a global storage.
Code:
local t = {
{Position(1000, 1000, 7), storage = 125},
{Position(1002, 1002, 7), storage = 124},
{Position(1004, 1004, 7), storage = 123}
}
local v = t[math.random(#t)]
local teleport = Game.createItem(1387, 1, v)
if teleport:isTeleport() then
Game.setStorageValue(v.storage)
teleport:setActionId(98456)
end
Thanks.