Ir para conteúdo

Featured Replies

Postado
  • Autor

tenta

 

function onThink(interval, lastExecution)

local players = getPlayersOnline()

for i, tid in ipairs(players) do

if #getCreatureSummons(tid) >= 1 then

pl = getCreatureSummons(tid)[1]

if getCreatureSkullType(pl) == 3 or getCreatureSkullType(pl) == 4 then

return true

else

local owner = getCreatureMaster(pl)

local ball = getPlayerSlotItem(cid, 8)

local sexpoke = (tonumber(getItemAttribute(ball.uid, "sexo")))

doCreatureSetSkullType(pl, sexpoke)

end

end

end

return true

end

Continua o mesmo erro!

  • Respostas 13
  • Visualizações 676
  • Created
  • Última resposta

Top Posters In This Topic

Postado

Continua o mesmo erro!

tenta 

 

function onThink(interval, lastExecution)

local players = getPlayersOnline()

for i, tid in ipairs(players) do

if #getCreatureSummons(tid) >= 1 then

pl = getCreatureSummons(tid)[1]

if getCreatureSkullType(pl) == 3 or getCreatureSkullType(pl) == 4 then

return true

else

local owner = getCreatureMaster(pl)

local ball = getPlayerSlotItem(cid, 8)

local sexpoke = (tonumber(getItemAttribute(ball.uid, "sexo")))

doCreatureSetSkullType(cid, sexpoke)

end

end

end

return true

end

 

senão der tenta o de baixo

 

function onThink(interval, lastExecution)

local players = getPlayersOnline()

for i, tid in ipairs(players) do

if #getCreatureSummons(owner) > 1 then

pl = getCreatureSummons(owner)[1]

if getCreatureSkullType(pl) == 3 or getCreatureSkullType(pl) == 4 then

return true

else

local owner = getCreatureMaster(pl)

local ball = getPlayerSlotItem(owner, 8)

local sexpoke = (tonumber(getItemAttribute(ball.uid, "sexo")))

doCreatureSetSkullType(pl, sexpoke)

end

end

end

return true

end

 

 

isso chama uma lib sua da uma verificada lá >> local sexpoke = LIB >>> (tonumber(getItemAttribute(ball.uid, "sexo")))

Editado por alexxxxxxx (veja o histórico de edições)

 

20230912_034613.png.cf49b650c34dd7d7b1f79bd49c70f53c.png

Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código.  #OpenSource #Programação #Contribuição

 

Postado
  • Autor

tenta 

 

function onThink(interval, lastExecution)

local players = getPlayersOnline()

for i, tid in ipairs(players) do

if #getCreatureSummons(tid) >= 1 then

pl = getCreatureSummons(tid)[1]

if getCreatureSkullType(pl) == 3 or getCreatureSkullType(pl) == 4 then

return true

else

local owner = getCreatureMaster(pl)

local ball = getPlayerSlotItem(cid, 8)

local sexpoke = (tonumber(getItemAttribute(ball.uid, "sexo")))

doCreatureSetSkullType(cid, sexpoke)

end

end

end

return true

end

 

senão der tenta o de baixo

 

function onThink(interval, lastExecution)

local players = getPlayersOnline()

for i, tid in ipairs(players) do

if #getCreatureSummons(owner) > 1 then

pl = getCreatureSummons(owner)[1]

if getCreatureSkullType(pl) == 3 or getCreatureSkullType(pl) == 4 then

return true

else

local owner = getCreatureMaster(pl)

local ball = getPlayerSlotItem(owner, 8)

local sexpoke = (tonumber(getItemAttribute(ball.uid, "sexo")))

doCreatureSetSkullType(pl, sexpoke)

end

end

end

return true

end

 

 

isso chama uma lib sua da uma verificada lá >> local sexpoke = LIB >>> (tonumber(getItemAttribute(ball.uid, "sexo")))

O 1° deu o seguinte erro:

 

[29/01/2015 13:04:13] [Error - GlobalEvent Interface] 
[29/01/2015 13:04:13] data/globalevents/scripts/pokesexoP.lua:onThink
[29/01/2015 13:04:13] Description: 
[29/01/2015 13:04:13] (luaGetPlayerSlotItem) Player not found
 
[29/01/2015 13:04:13] [Error - GlobalEvent Interface] 
[29/01/2015 13:04:13] data/globalevents/scripts/pokesexoP.lua:onThink
[29/01/2015 13:04:13] Description: 
[29/01/2015 13:04:13] (luaGetItemAttribute) Item not found
 
[29/01/2015 13:04:13] [Error - GlobalEvent Interface] 
[29/01/2015 13:04:13] data/globalevents/scripts/pokesexoP.lua:onThink
[29/01/2015 13:04:13] Description: 
[29/01/2015 13:04:13] (luaDoCreatureSetSkullType) Creature not found
 
O 2°deu o seguinte erro:
 
[29/01/2015 13:07:07] [Error - GlobalEvent Interface] 
[29/01/2015 13:07:07] data/globalevents/scripts/pokesexoP.lua:onThink
[29/01/2015 13:07:07] Description: 
[29/01/2015 13:07:07] (luaGetCreatureSummons) Creature not found
 
[29/01/2015 13:07:07] [Error - GlobalEvent Interface] 
[29/01/2015 13:07:07] data/globalevents/scripts/pokesexoP.lua:onThink
[29/01/2015 13:07:07] Description: 
[29/01/2015 13:07:07] data/globalevents/scripts/pokesexoP.lua:4: attempt to get length of a boolean value
[29/01/2015 13:07:07] stack traceback:
[29/01/2015 13:07:08] data/globalevents/scripts/pokesexoP.lua:4: in function <data/globalevents/scripts/pokesexoP.lua:1>
[29/01/2015 13:07:08] [Error - GlobalEvents::think] Couldn't execute event: PokePlayerSexo
Postado

O tópico foi movido para a área correta, preste mais atenção da próxima vez!

Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

Este tópico foi movido:

De: "OTServSuporte OTServSuporte de Scripts"

Para: "OTServSuporte OTServSuporte de Servidores Derivados"

The corrupt fear us.

The honest support us.

The heroic join us.

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo