Ir para conteúdo

Featured Replies

Postado

 

 

Gente, estou com dois scripts atualmente porém, ambos estão dando o mesmo erro e não sei como concertar, alguém poderia me ajudar? 

Segue foto do erro seguido de códigos, se não estiver na área correta me avisem onde devo postar esse tipo de conteúdo.

image.thumb.png.b7a947fbf167854a7c6c8992c44bd03a.png

Esses são os erros.

 

Abaixo os códigos:

 

Script 1: Ao equipar os 3 itens ter um efeito no jogador.

Script 2:    Ao equipar o shield terá efeitos de digitos subindo como tem no código.

 

OBS: TODOS OS CÓDIGOS FORAM RETIRADOS AQUI DO TIBIAKING, CASO SEJA NECESSÁRIO POSTAR ME AVISEM.

 

local interval = 3 -- intervalo em segundos entre dois efeitos
local set_effect = CONST_ME_FIREWORK_RED -- edite o id do efeito

local set = {
[CONST_SLOT_HEAD] = 10561, -- id do helmet
[CONST_SLOT_ARMOR] = 10555, -- || armor
[CONST_SLOT_RIGHT] = 10562, --|| legs
}

function onEquip(cid, item, slot)
SendEffect(cid, set_effect, interval)
return true
end

function SendEffect(cid, effect, time)
    if isPlayer(cid) then
        local check = true
        for slot, id in pairs(set) do
            if getPlayerSlotItem(cid, slot).itemid ~= id then
                check = false
                break
            end
        end
        if check == true then
            doSendMagicEffect(getPlayerPosition(cid), effect)
            addEvent(SendEffect, time*1000, cid, effect, time) 
        end
    end
    return true
end
local table = {
itemNeed = 10570, --
txt = {"´ .    ,". ".    ´ ,", "`  .  ,", ",    ` ."},
delay = 1000,
cor = {26, 30, 31, 32}, 
effect = 3 
}

function doPlayerLoopEff(cid)
 if isPlayer(cid) and getPlayerSlotItem(cid, CONST_SLOT_RING).itemid == table.itemNeed then
  doSendMagicEffect(getThingPos(cid), table.effect)
  doSendAnimatedText(getThingPos(cid), table.txt[math.random(#table.txt)], table.cor[math.random(#table.cor)])
  addEvent(function() doPlayerLoopEff(cid) end, table.delay)
 end 
end


function onEquip(cid, item, slot)
 doPlayerLoopEff(cid)
 return true
end

 

  • Respostas 5
  • Visualizações 443
  • Created
  • Última resposta

Top Posters In This Topic

Posted Images

Postado
local interval = 3 -- intervalo em segundos entre dois efeitos
local set_effect = CONST_ME_FIREWORK_RED -- edite o id do efeito
local set = {
[CONST_SLOT_HEAD] = 10561, -- id do helmet
[CONST_SLOT_ARMOR] = 10555, -- || armor
[CONST_SLOT_RIGHT] = 10562, --|| legs
}
function onEquip(cid, item, slot)
SendEffect(cid, set_effect, interval)
return true
end
function SendEffect(cid, effect, time)
    if isPlayer(cid) then
        local check = true
        for slot, id in pairs(set) do
            if getPlayerSlotItem(cid, slot).itemid ~= id then
                check = false
                break
            end
        end
        if check == true then
            doSendMagicEffect(getPlayerPosition(cid), effect)
            addEvent(SendEffect, time*1000, cid, effect, time) 
        end
    end
    return true
end
local table = {
itemNeed = 10570, --
txt = {"´ .    ,", ".    ´ ,", "`  .  ,", ",    ` ."},
delay = 1000,
cor = {26, 30, 31, 32}, 
effect = 3 
}
function doPlayerLoopEff(cid)
 if isPlayer(cid) and getPlayerSlotItem(cid, CONST_SLOT_RING).itemid == table.itemNeed then
  doSendMagicEffect(getThingPos(cid), table.effect)
  doSendAnimatedText(getThingPos(cid), table.txt[math.random(#table.txt)], table.cor[math.random(#table.cor)])
  addEvent(function() doPlayerLoopEff(cid) end, table.delay)
 end 
end
function onEquip(cid, item, slot)
 doPlayerLoopEff(cid)
 return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo