Ir para conteúdo
  • 0

Error - MoveEvents -- Ajuda Rapidinha !


Squash01

Pergunta

Entao Galera Esta dando este Erro na Distro

[6/12/2015 23:6:7] [Error - MoveEvents Interface]
[6/12/2015 23:6:7] data/movements/scripts/warzone.lua:onStepIn
[6/12/2015 23:6:7] Description:
[6/12/2015 23:6:7] attempt to index a nil value
[6/12/2015 23:6:7] stack traceback:
[6/12/2015 23:6:7] [C]: in function 'doTeleportThing'
[6/12/2015 23:6:7] data/movements/scripts/warzone.lua:20: in function

Aqui esta o Script

--- [[ Warzone Event by Killua, antigo amoeba13 ]] ---

local kickposs = {x=160, y=53, z=7} -- Posicao pra onde o player vai ser kikado se permanecer mais de 30 minutos na sala do Deathstriker.(Se ele sair voluntariamente, vai pra essa pos tbm)

function kikar(cid)
doTeleportThing(cid, kickposs)
doPlayerSendTextMessage(cid, 18, "You have been removed from the boss room, because you can not stay for more than 30 minutes.")
return true
end

function onStepIn(cid, item, position, topos, frompos)
if not isPlayer(cid) then
return false
end

if item.actionid == 5157 then
doPlayerSendTextMessage(cid, 18, "You have half an hour to heroically defeat Deathstrike. Otherwise you'll be teleported out by the gnomish emergency device.")
evento = addEvent(kikar, 30*60*1000, cid)
elseif item.actionid == 5158 then
doTeleportThing(cid, tpsaida)
stopEvent(evento)
end
return true
end

Queria Que Alguem podesse arrumar este erro...
Valendo Sempre REP+ e Ficaria muito Grato !!
Link para o comentário
Compartilhar em outros sites

5 respostass a esta questão

Posts Recomendados

  • 0

Vlw Arrumou

Agora da este erro !

 

[7/12/2015 0:20:16] [Error - Action Interface]
[7/12/2015 0:20:16] In a timer event called from:
[7/12/2015 0:20:16] data/actions/scripts/warzone.lua:onUse
[7/12/2015 0:20:16] Description:
[7/12/2015 0:20:16] (LuaInterface::luaDoCreateItem) Item not found

 

Link para o comentário
Compartilhar em outros sites

  • 0

Aqui o Script do Warzone do Actions

 

--- [[ Warzone Event by Killua, antigo amoeba13 ]] ---

local posdotp = {x= 400, y=1739, z=7} -- Posicao que o tp vai ser criado (Eh o tp que leva pra sala do Deathstriker)
local salaDeathstriker = {x=417, y=1736, z=7} -- Posicao da sala do Deathstriker (Pos pra onde o player vai qd entrar no tp)
local posDeathstriker = {x=420, y=1735, z=7} -- Posicao onde o Deathstriker vai nascer.

function removerTp(tp)
local t = getTileItemById(posdotp, 1387)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(posdotp, CONST_ME_POFF)
end
end

function TirarCristal()
local cristal = getTileItemById(posdotp, 6973) -- Id do cristal azul que some para dar lugar ao tp
if cristal then
doRemoveItem(cristal.uid, 1)
end
return true
end


function onUse(cid, item, fromPosition, itemEx, toPosition)
local times = {100, 5000, 15000, 20000, 30000, 35000, 45000, 55000, 60000, 65000, 75000, 85000, 100000, 115000, 120000}
local change = false
local position = {x = 394 + math.random(1, 10), y = 1738 + math.random(1, 8), z = 7}

if os.time()-getGlobalStorageValue(cid, 96963) > 30*60 then

for _, time in ipairs(times) do
if(change) then
addEvent(doCreateMonster, time, "Demon", position)
addEvent(doSendMagicEffect, time, position, CONST_ME_TELEPORT)
else
addEvent(doCreateMonster, time, "Dragon", position)
addEvent(doSendMagicEffect, time, position, CONST_ME_TELEPORT)
end
addEvent(doCreateMonster, time, "Giant Spider", position)
addEvent(doSendMagicEffect, time, position, CONST_ME_TELEPORT)
change = change and false or true
end

addEvent(doCreateMonster, 3*60*1000, "Deathstrike", posDeathstriker)
addEvent(doSendMagicEffect, 4 * 60 * 1000, posDeathstriker, CONST_ME_TELEPORT)
addEvent(TirarCristal, 2*60*1000)
addEvent(doCreateTeleport, 121000, 1387, salaDeathstriker, posdotp)
setGlobalStorageValue(96963, os.time())
addEvent(removerTp, 60000+121000)
addEvent(doCreateItem, 60000+122000, 17999, posdotp)
doCreatureSay(cid, "The crystals are damaging!", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid, "Wait 30 minutes to start again.")
end
return true
end

 


Arrumei Vlw ai

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...