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

Event plugin

tokenzz

:thinking:
Joined
Feb 2, 2013
Messages
779
Solutions
2
Reaction score
346
Hiho,

I've recently just put together some of my knowledge into what I'd think is a pretty cool add-on to tibia that allows staff members to manage & handle events with ease.

Code:
-- Made by Linus (t0kenz), Otland name: tokenzz

local requiredGroup = 3
local MSG = ".:: Events Options ::.\nPossible Events:\n*Football\nExample of how you use it: /event football\nIf you wish to end a current event, type for an example: /event footballstop"
local item = 1810
local EventMsg = "Walk through this teleport to get back to thais temple!"
local EventMsg1 = "Walk through this teleport to get to the current Event!"

local eventfootball = "The football event has started! \n Go to Thais, Carlin or Venore and step into the teleport to join!"
local teleportfootball = {x = 32791, y = 31167, z = 8}
local teleportfootballback = {x = 32791, y = 31167, z = 8}

local thaisdp = {x = 32342, y = 32220, z = 7}
local carlindp = {x = 32329, y =31779, z = 7}
local venoredp = {x = 32915, y = 32072, z = 7}
local Temple = {x = 32369, y= 32241, z= 7}

local footballplayers_pos = { -- tiles in the football arena, if players stand on these if /event footballstop is executed, then they will get teleported to thais temple.
{x = 32343, y = 32218, z = 7},
{x = 32345, y = 32218, z = 7}
}


function onSay(cid, words, param)
 local param = param.explode(param, ',')
 doShowTextDialog(cid, item, MSG)
 if param == "football" then
  broadcastMessage(eventfootball, MESSAGE_EVENT_ADVANCE) 
  doCreateTeleport(1387, teleportfootball, thaisdp)
  doCreateTeleport(1387, teleportfootball, carlindp)
  doCreateTeleport(1387, teleportfootball, venoredp)
  doCreateTeleport(1387, Temple, teleportfootballback) -- Teleport going back from Football event
  doCreateItem(1304, 1, {x = 32790, y = 31168, z = 8}) -- Stone blocking regular teleport to the football arena
  local blackboard = doCreateItem(1818, 1, {x = 32790, y = 31167, z = 8})  -- Thais blackboard information
  doSetItemText(blackboard, EventMsg)
  local blackboard1 = doCreateItem(1811, 1, {x = 32342, y = 32219, z = 7}) -- Football event blackboard information
  doSetItemText(blackboard1, EventMsg1)
  local blackboard2 = doCreateItem(1815, 1, {x = 32914, y = 32072, z = 7})
  doSetItemText(blackboard2, EventMsg1)
  local blackboard3 = doCreateItem(1810, 1, {x = 32329, y = 31778, z = 7})
  doSetItemText(blackboard3, EventMsg1)
 elseif param == "footballstop" then
  doRemoveItem(getTileItemById(thaisdp, 1387).uid, 1)
  doRemoveItem(getTileItemById(carlindp, 1387).uid, 1)
  doRemoveItem(getTileItemById(venoredp, 1387).uid, 1)
  doRemoveItem(getTileItemById(teleportfootballback, 1387).uid, 1)
  doRemoveItem(getTileItemById({x = 32790, y = 31168, z = 8}, 1304).uid, 1)
  doRemoveItem(getTileItemById({x = 32790, y = 31167, z = 8}, 1818).uid, 1)
  doRemoveItem(getTileItemById({x = 32342, y = 32219, z = 7}, 1811).uid, 1)
  doRemoveItem(getTileItemById({x = 32914, y = 32072, z = 7}, 1815).uid, 1)
  doRemoveItem(getTileItemById({x = 32329, y = 31778, z = 7}, 1810).uid, 1)
  for i = 1, #footballplayers_pos do
  local player = getThingfromPos(pos)
  if player.itemid > 0 then
  if isPlayer(player.uid)  then
  doTeleportThing(player, Temple)
end
end

My issue is that it doesn't seem to work. "
data/talkactions/scripts/events.lua:58: 'end' expected (to close 'function' at line 22) near '<eof>'
"

Kind regards
 
adds a end to end :p
Fixed.

Code:
-- Made by t0kenz --



local requiredGroup = 3
local MSG = ".:: Events Options ::.\nPossible Events:\n*Football\nExample of how you use it: /event football\nIf you wish to end a current event, type for an example: /event footballstop"
local item = 1810
local EventMsg = "Walk through this teleport to get back to thais temple!"
local EventMsg1 = "Walk through this teleport to get to the current Event!"

local eventfootball = "The football event has started! \n Go to Thais, Carlin or Venore and step into the teleport to join!"
local teleportfootball = {x = 32791, y = 31167, z = 8}
local teleportfootballback = {x = 32791, y = 31167, z = 8}

local thaisdp = {x = 32342, y = 32220, z = 7}
local carlindp = {x = 32329, y =31779, z = 7}
local venoredp = {x = 32915, y = 32072, z = 7}
local Temple = {x = 32369, y= 32241, z= 7}

local footballplayers_pos = { -- tiles in the football arena, if players stand on these if /event footballstop is executed, then they will get teleported to thais temple.
{x = 1, y = 1, z = 1},
{x = 1, y = 1, z = 1},
{x = 1, y = 1, z = 1},
{x = 1, y = 1, z = 1}
}



function onSay(cid, words, param)
    local param = param.explode(param, ',')
    doShowTextDialog(cid, item, MSG)
    return true
end
    if param == "football" then
        broadcastMessage(eventfootball, MESSAGE_EVENT_ADVANCE) 
        doCreateTeleport(1387, teleportfootball, thaisdp)
        doSendMagicEffect(thaisdp, CONST_ME_MAGIC_BLUE)
        doCreateTeleport(1387, teleportfootball, carlindp)
        doSendMagicEffect(carlindp, CONST_ME_MAGIC_BLUE)       
        doCreateTeleport(1387, teleportfootball, venoredp)
        doSendMagicEffect(venoredp, CONST_ME_MAGIC_BLUE)
        doCreateTeleport(1387, Temple, teleportfootballback) -- Teleport going back from Football event
        doSendMagicEffect(teleportfootballback, CONST_ME_MAGIC_BLUE)       
        doCreateItem(1304, 1, {x = 32790, y = 31168, z = 8}) -- Stone blocking regular teleport to the football arena
        doSendMagicEffect({x = 32790, y = 31168, z = 8}, CONST_ME_MAGIC_BLUE)       
        local blackboard = doCreateItem(1818, 1, {x = 32790, y = 31167, z = 8})  -- Thais blackboard information
        doSendMagicEffect({x = 32790, y = 31167, z = 8}, CONST_ME_MAGIC_BLUE)
        doSetItemText(blackboard, EventMsg)
        local blackboard1 = doCreateItem(1811, 1, {x = 32342, y = 32219, z = 7}) -- Football event blackboard information
        doSendMagicEffect({x = 32342, y = 32219, z = 7}, CONST_ME_MAGIC_BLUE)
        doSetItemText(blackboard1, EventMsg1)
        local blackboard2 = doCreateItem(1815, 1, {x = 32914, y = 32072, z = 7})
        doSendMagicEffect({x = 32914, y = 32072, z = 7}, CONST_ME_MAGIC_BLUE)
        doSetItemText(blackboard2, EventMsg1)
        local blackboard3 = doCreateItem(1810, 1, {x = 32329, y = 31778, z = 7})
        doSendMagicEffect({x = 32329, y = 31778, z = 7}, CONST_ME_MAGIC_BLUE)       
        doSetItemText(blackboard3, EventMsg1)
    elseif param == "footballstop" then
        doRemoveItem(getTileItemById(thaisdp, 1387).uid, 1)
        doSendMagicEffect(thaisdp, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById(carlindp, 1387).uid, 1)
        doSendMagicEffect(venoredp, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById(venoredp, 1387).uid, 1)
        doSendMagicEffect(venoredp, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById(teleportfootballback, 1387).uid, 1)
        doSendMagicEffect(teleportfootballback, CONST_ME_MAGIC_RED)       
        doRemoveItem(getTileItemById({x = 32790, y = 31168, z = 8}, 1304).uid, 1)
        doSendMagicEffect({x = 32790, y = 31168, z = 8}, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById({x = 32790, y = 31167, z = 8}, 1818).uid, 1)
        doSendMagicEffect({x = 32790, y = 31167, z = 8}, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById({x = 32342, y = 32219, z = 7}, 1811).uid, 1)
        doSendMagicEffect({x = 32342, y = 32219, z = 7}, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById({x = 32914, y = 32072, z = 7}, 1815).uid, 1)
        doSendMagicEffect({x = 32914, y = 32072, z = 7}, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById({x = 32329, y = 31778, z = 7}, 1810).uid, 1)
        doSendMagicEffect({x = 32329, y = 31778, z = 7}, CONST_ME_MAGIC_RED)
        for i = 1, #footballplayers_pos do
        local player = getThingfromPos(pos)
        if player.itemid > 0 then
        if isPlayer(player.uid)  then
            doTeleportThing(player, Temple)
            end
        end
    end
end

My issue now is that when I type /event football or /event footballstop, nothing happens.
 
Last edited:
Because you ended the script before it had a chance is one reason :p
Code:
function onSay(cid, words, param)
    local param = param.explode(param, ',')
    doShowTextDialog(cid, item, MSG)
    return true
end
As soon as the return statement is reached (in this case inside the interface, onSay) the script ends and control returns to the thing that called it, in this case the server.

So try it now, i only corrected the return statement issue and removed the end statement.
Code:
-- Made by t0kenz --

local requiredGroup = 3
local MSG = ".:: Events Options ::.\nPossible Events:\n*Football\nExample of how you use it: /event football\nIf you wish to end a current event, type for an example: /event footballstop"
local item = 1810
local EventMsg = "Walk through this teleport to get back to thais temple!"
local EventMsg1 = "Walk through this teleport to get to the current Event!"

local eventfootball = "The football event has started! \n Go to Thais, Carlin or Venore and step into the teleport to join!"
local teleportfootball = {x = 32791, y = 31167, z = 8}
local teleportfootballback = {x = 32791, y = 31167, z = 8}

local thaisdp = {x = 32342, y = 32220, z = 7}
local carlindp = {x = 32329, y =31779, z = 7}
local venoredp = {x = 32915, y = 32072, z = 7}
local Temple = {x = 32369, y= 32241, z= 7}

local footballplayers_pos = { -- tiles in the football arena, if players stand on these if /event footballstop is executed, then they will get teleported to thais temple.
{x = 1, y = 1, z = 1},
{x = 1, y = 1, z = 1},
{x = 1, y = 1, z = 1},
{x = 1, y = 1, z = 1}
}



function onSay(cid, words, param)
    local param = param.explode(param, ',')
    doShowTextDialog(cid, item, MSG)

    if param == "football" then
        broadcastMessage(eventfootball, MESSAGE_EVENT_ADVANCE)
        doCreateTeleport(1387, teleportfootball, thaisdp)
        doSendMagicEffect(thaisdp, CONST_ME_MAGIC_BLUE)
        doCreateTeleport(1387, teleportfootball, carlindp)
        doSendMagicEffect(carlindp, CONST_ME_MAGIC_BLUE)     
        doCreateTeleport(1387, teleportfootball, venoredp)
        doSendMagicEffect(venoredp, CONST_ME_MAGIC_BLUE)
        doCreateTeleport(1387, Temple, teleportfootballback) -- Teleport going back from Football event
        doSendMagicEffect(teleportfootballback, CONST_ME_MAGIC_BLUE)     
        doCreateItem(1304, 1, {x = 32790, y = 31168, z = 8}) -- Stone blocking regular teleport to the football arena
        doSendMagicEffect({x = 32790, y = 31168, z = 8}, CONST_ME_MAGIC_BLUE)     
        local blackboard = doCreateItem(1818, 1, {x = 32790, y = 31167, z = 8})  -- Thais blackboard information
        doSendMagicEffect({x = 32790, y = 31167, z = 8}, CONST_ME_MAGIC_BLUE)
        doSetItemText(blackboard, EventMsg)
        local blackboard1 = doCreateItem(1811, 1, {x = 32342, y = 32219, z = 7}) -- Football event blackboard information
        doSendMagicEffect({x = 32342, y = 32219, z = 7}, CONST_ME_MAGIC_BLUE)
        doSetItemText(blackboard1, EventMsg1)
        local blackboard2 = doCreateItem(1815, 1, {x = 32914, y = 32072, z = 7})
        doSendMagicEffect({x = 32914, y = 32072, z = 7}, CONST_ME_MAGIC_BLUE)
        doSetItemText(blackboard2, EventMsg1)
        local blackboard3 = doCreateItem(1810, 1, {x = 32329, y = 31778, z = 7})
        doSendMagicEffect({x = 32329, y = 31778, z = 7}, CONST_ME_MAGIC_BLUE)     
        doSetItemText(blackboard3, EventMsg1)
    elseif param == "footballstop" then
        doRemoveItem(getTileItemById(thaisdp, 1387).uid, 1)
        doSendMagicEffect(thaisdp, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById(carlindp, 1387).uid, 1)
        doSendMagicEffect(venoredp, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById(venoredp, 1387).uid, 1)
        doSendMagicEffect(venoredp, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById(teleportfootballback, 1387).uid, 1)
        doSendMagicEffect(teleportfootballback, CONST_ME_MAGIC_RED)     
        doRemoveItem(getTileItemById({x = 32790, y = 31168, z = 8}, 1304).uid, 1)
        doSendMagicEffect({x = 32790, y = 31168, z = 8}, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById({x = 32790, y = 31167, z = 8}, 1818).uid, 1)
        doSendMagicEffect({x = 32790, y = 31167, z = 8}, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById({x = 32342, y = 32219, z = 7}, 1811).uid, 1)
        doSendMagicEffect({x = 32342, y = 32219, z = 7}, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById({x = 32914, y = 32072, z = 7}, 1815).uid, 1)
        doSendMagicEffect({x = 32914, y = 32072, z = 7}, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById({x = 32329, y = 31778, z = 7}, 1810).uid, 1)
        doSendMagicEffect({x = 32329, y = 31778, z = 7}, CONST_ME_MAGIC_RED)
        for i = 1, #footballplayers_pos do
        local player = getThingfromPos(pos)
        if player.itemid > 0 then
        if isPlayer(player.uid)  then
            doTeleportThing(player, Temple)
            end
        end
    end
    return true
end
 
Last edited by a moderator:
Because you ended the script before it had a chance is one reason :p
Code:
function onSay(cid, words, param)
    local param = param.explode(param, ',')
    doShowTextDialog(cid, item, MSG)
    return true
end
As soon as the return statement is reached (in this case inside the interface, onSay) the script ends and control returns to the thing that called it, in this case the server.

So try it now, i only corrected the return statement issue and removed the end statement.
Code:
-- Made by t0kenz --

local requiredGroup = 3
local MSG = ".:: Events Options ::.\nPossible Events:\n*Football\nExample of how you use it: /event football\nIf you wish to end a current event, type for an example: /event footballstop"
local item = 1810
local EventMsg = "Walk through this teleport to get back to thais temple!"
local EventMsg1 = "Walk through this teleport to get to the current Event!"

local eventfootball = "The football event has started! \n Go to Thais, Carlin or Venore and step into the teleport to join!"
local teleportfootball = {x = 32791, y = 31167, z = 8}
local teleportfootballback = {x = 32791, y = 31167, z = 8}

local thaisdp = {x = 32342, y = 32220, z = 7}
local carlindp = {x = 32329, y =31779, z = 7}
local venoredp = {x = 32915, y = 32072, z = 7}
local Temple = {x = 32369, y= 32241, z= 7}

local footballplayers_pos = { -- tiles in the football arena, if players stand on these if /event footballstop is executed, then they will get teleported to thais temple.
{x = 1, y = 1, z = 1},
{x = 1, y = 1, z = 1},
{x = 1, y = 1, z = 1},
{x = 1, y = 1, z = 1}
}



function onSay(cid, words, param)
    local param = param.explode(param, ',')
    doShowTextDialog(cid, item, MSG)
    if param == "football" then
        broadcastMessage(eventfootball, MESSAGE_EVENT_ADVANCE)
        doCreateTeleport(1387, teleportfootball, thaisdp)
        doSendMagicEffect(thaisdp, CONST_ME_MAGIC_BLUE)
        doCreateTeleport(1387, teleportfootball, carlindp)
        doSendMagicEffect(carlindp, CONST_ME_MAGIC_BLUE)   
        doCreateTeleport(1387, teleportfootball, venoredp)
        doSendMagicEffect(venoredp, CONST_ME_MAGIC_BLUE)
        doCreateTeleport(1387, Temple, teleportfootballback) -- Teleport going back from Football event
        doSendMagicEffect(teleportfootballback, CONST_ME_MAGIC_BLUE)   
        doCreateItem(1304, 1, {x = 32790, y = 31168, z = 8}) -- Stone blocking regular teleport to the football arena
        doSendMagicEffect({x = 32790, y = 31168, z = 8}, CONST_ME_MAGIC_BLUE)   
        local blackboard = doCreateItem(1818, 1, {x = 32790, y = 31167, z = 8})  -- Thais blackboard information
        doSendMagicEffect({x = 32790, y = 31167, z = 8}, CONST_ME_MAGIC_BLUE)
        doSetItemText(blackboard, EventMsg)
        local blackboard1 = doCreateItem(1811, 1, {x = 32342, y = 32219, z = 7}) -- Football event blackboard information
        doSendMagicEffect({x = 32342, y = 32219, z = 7}, CONST_ME_MAGIC_BLUE)
        doSetItemText(blackboard1, EventMsg1)
        local blackboard2 = doCreateItem(1815, 1, {x = 32914, y = 32072, z = 7})
        doSendMagicEffect({x = 32914, y = 32072, z = 7}, CONST_ME_MAGIC_BLUE)
        doSetItemText(blackboard2, EventMsg1)
        local blackboard3 = doCreateItem(1810, 1, {x = 32329, y = 31778, z = 7})
        doSendMagicEffect({x = 32329, y = 31778, z = 7}, CONST_ME_MAGIC_BLUE)   
        doSetItemText(blackboard3, EventMsg1)
    elseif param == "footballstop" then
        doRemoveItem(getTileItemById(thaisdp, 1387).uid, 1)
        doSendMagicEffect(thaisdp, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById(carlindp, 1387).uid, 1)
        doSendMagicEffect(venoredp, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById(venoredp, 1387).uid, 1)
        doSendMagicEffect(venoredp, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById(teleportfootballback, 1387).uid, 1)
        doSendMagicEffect(teleportfootballback, CONST_ME_MAGIC_RED)   
        doRemoveItem(getTileItemById({x = 32790, y = 31168, z = 8}, 1304).uid, 1)
        doSendMagicEffect({x = 32790, y = 31168, z = 8}, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById({x = 32790, y = 31167, z = 8}, 1818).uid, 1)
        doSendMagicEffect({x = 32790, y = 31167, z = 8}, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById({x = 32342, y = 32219, z = 7}, 1811).uid, 1)
        doSendMagicEffect({x = 32342, y = 32219, z = 7}, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById({x = 32914, y = 32072, z = 7}, 1815).uid, 1)
        doSendMagicEffect({x = 32914, y = 32072, z = 7}, CONST_ME_MAGIC_RED)
        doRemoveItem(getTileItemById({x = 32329, y = 31778, z = 7}, 1810).uid, 1)
        doSendMagicEffect({x = 32329, y = 31778, z = 7}, CONST_ME_MAGIC_RED)
        for i = 1, #footballplayers_pos do
        local player = getThingfromPos(pos)
        if player.itemid > 0 then
            if isPlayer(player.uid)  then
                doTeleportThing(player, Temple)
                end
            end
        end
    end
    return true
end

Fixed the error
 
Last edited:
@Codex NG

Still having an issue with the param not working. /event works however.

ty in advance
 
There ya go nice and messy :p
Code:
-- Made by t0kenz --

local requiredGroup = 3
local item = 1810
local teleporter = 1387

local text = {
    MSG = ".:: Events Options ::.\nPossible Events:\n*Football\nExample of how you use it: /event football\nIf you wish to end a current event, type for an example: /event footballstop",
    EventMsg = "Walk through this teleport to get back to thais temple!",
    EventMsg1 = "Walk through this teleport to get to the current Event!",
    ['football'] = {
        msg = "The football event has started! \n Go to Thais, Carlin or Venore and step into the teleport to join!",
        temple = {x = 32369, y = 32241, z = 7},
        toLocation = {x = 32791, y = 31167, z = 8},
    },
    ['footballstop'] = {
        temple = {x = 32369, y = 32241, z = 7},
        toLocation = {x = 32791, y = 31167, z = 8}
    },
}

local depos = {
    {x = 32342, y = 32220, z = 7}, -- thais dp
    {x = 32329, y = 31779, z = 7}, -- carlin dp
    {x = 32915, y = 32072, z = 7} -- venore dp
}

local footballplayers_pos = { -- tiles in the football arena, if players stand on these if /event footballstop is executed, then they will get teleported to thais temple.
    {x = 1, y = 1, z = 1},
    {x = 1, y = 1, z = 1},
    {x = 1, y = 1, z = 1},
    {x = 1, y = 1, z = 1}
}

local other = {
    { id = 1304, location = {x = 32790, y = 31168, z = 8} }, -- Stone blocking regular teleport to the football arena
    { id = 1818, location = {x = 32790, y = 31167, z = 8}, text = text.EventMsg }, -- Thais blackboard information
    { id = 1811, location = {x = 32342, y = 32219, z = 7}, text = text.EventMsg1 }, -- Football event blackboard information
    { id = 1815, location = {x = 32914, y = 32072, z = 7}, text = text.EventMsg1 },
    { id = 1810, location = {x = 32329, y = 31778, z = 7}, text = text.EventMsg1 }
}

function onSay(cid, words, param)
    local param = param.explode(param, ', ')
    doShowTextDialog(cid, item, text.MSG)

    if param == 'football' then
        broadcastMessage(text[param].msg, MESSAGE_EVENT_ADVANCE)
        for _, location in pairs(depos) do
            doCreateTeleport(teleporter, text[param].toLocation, location)
            doSendMagicEffect(location, CONST_ME_MAGIC_BLUE)
        end
     
        doCreateTeleport(teleporter, text[param].temple, text[param].toLocation) -- Teleport going back from Football event
        doSendMagicEffect(text[param].toLocation, CONST_ME_MAGIC_BLUE)
     
        for _, items in ipairs(other) do
            local temp = doCreateItem(items.id, 1, items.location)
            doSendMagicEffect(items.location, CONST_ME_MAGIC_BLUE)
            if items.text then
                doSetItemText(temp, items.text)
            end
        end
    end
    if param == "footballstop" then
        for _, location in ipairs(depos) do
            local tileItem = getTileItemById(location, teleporter).uid
            if tileItem then
                doRemoveItem(tileItem, 1)
                doSendMagicEffect(location, CONST_ME_MAGIC_RED)
            end
        end
     
        local tp = getTileItemById(text[param].toLocation, teleporter).uid
        if tp then
            doRemoveItem(tp, 1)
            doSendMagicEffect(text[param].toLocation, CONST_ME_MAGIC_RED)
        end
     
        for _, items in ipairs(other) do
            local temp = getTileItemById(items.location, items.id)
            if temp then
                doRemoveItem(temp, 1)
                doSendMagicEffect(items.location, CONST_ME_MAGIC_RED)
            end
        end
        for i = 1, #footballplayers_pos do
            local player = getThingfromPos(footballplayers_pos[i]).uid
            if isPlayer(player) then
                doTeleportThing(player, text[param].temple)
            end
        end
    end
    return true
end

Edit: I updated the code corrections already
 
Last edited:
ok place this print in the script and screen shot the console
Code:
local param = param.explode(param, ', ')
print( type(param) ~= 'table' and param or unpack(param) )
 
Back
Top