Tenta deixar assim:
local config = {
pos = {x=518, y=840, z=7}
}
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 15 * 1000)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if exhaustion.check(cid,1988) == true then
time = math.ceil(exhaustion.get(cid,1988))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can use this again in "..time.." second(s).")
return true
end
doTeleportThing(cid,config.pos,false)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
doRemoveItem(item.uid)
doCreatureSay(cid, "This could do some good..", TALKTYPE_ORANGE_1)
exhaustion.set(cid,1988,15)
exhaustion.set(cid, 1990, 15)
return true
end
Abraços :smile_positivo:





info
Grupo: Campones
Registrado: 09/11/07
Posts: 5
Reputação: +1
Char no Tibia: Felipe of archer
Versao 8.57
eu acho q nao é tao dificil
É o seguinte: eu criei esse script baseado em um q eu ja tinha:
local config = {
pos = {x=518, y=840, z=7}
}
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 15 * 1000)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if exhaustion.check(cid,1988) == true then
time = math.ceil(exhaustion.get(cid,1988))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can use this again in "..time.." second(s).")
return true
end
doTeleportThing(cid,config.pos,false)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
doRemoveItem(item.uid)
doCreatureSay(cid, "This could do some good..", TALKTYPE_ORANGE_1)
exhaustion.set(cid,1988,15)
exhaustion.set(cid, 1990, 15)
end
return true
end
E dps quando eu vo testa aparece esse erro
[24/07/2011 02:25:32] [Error - LuaScriptInterface::loadFile] data/actions/scripts/buffs/tp_depot.lua:21: '<eof>' expected near 'end'
[24/07/2011 02:25:32] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/buffs/tp_depot.lua)
[24/07/2011 02:25:32] data/actions/scripts/buffs/tp_depot.lua:21: '<eof>' expected near 'end'
ve se vcs podem ajuda aew plxx