Ir para conteúdo
  • 0

Problem Script


BrenoNeto

Pergunta

Esta dando muitos erros nesta script, alguem poderia me ajudar a resolver ?

 

local outfits = {

[2383] = {check_outfit = {214}, set_outfit = 218},

[2377] = {check_outfit = {214}, set_outfit = 218},

[2397] = {check_outfit = {214}, set_outfit = 216},

[2417] = {check_outfit = {214}, set_outfit = 216},

[2432] = {check_outfit = {214}, set_outfit = 221},

[2421] = {check_outfit = {214}, set_outfit = 221 },

[2376] = {check_outfit = {214}, set_outfit = 219},

[2383] = {check_outfit = {231}, set_outfit = 234},

[2377] = {check_outfit = {231}, set_outfit = 234},

[2397] = {check_outfit = {231}, set_outfit = 235},

[2417] = {check_outfit = {231}, set_outfit = 235},

[2432] = {check_outfit = {231}, set_outfit = 233},

[2421] = {check_outfit = {231}, set_outfit = 233},

[2376] = {check_outfit = {231}, set_outfit = 235},

}

 

local out = outfits[item.itemid].check_outfit[getCreatureOutfit(cid).lookType]

local set = outfits[item.itemid].set_outfit

 

function onEquip(cid, item)

if isCreature(cid)

for i = 31398, 31399 do

setPlayerStorageValue(cid, i, 1)

end

 

if out(cid) then

 

doSetCreatureOutfit(cid, set)

end

end

return true

end

 

function onDeEquip(cid)

if isCreature(cid)

for i = 31398, 31399 do

setPlayerStorageValue(cid, i, -1)

end

 

if getPlayerStorageValue(cid, 18391) >= 1 or getPlayerStorageValue(cid, 18393) >= 1 or getPlayerStorageValue(cid, 41078) >= 1 or getPlayerStorageValue(cid, 41079) >= 1 then

return true

end

 

doRemoveCondition(cid, CONDITION_OUTFIT)

end

return true

end

 

 

Link para o comentário
https://xtibia.com/forum/topic/213636-problem-script/
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

local outfits = {
[2383] = {check_outfit = {214}, set_outfit = 218},
[2377] = {check_outfit = {214}, set_outfit = 218},
[2397] = {check_outfit = {214}, set_outfit = 216},
[2417] = {check_outfit = {214}, set_outfit = 216},
[2432] = {check_outfit = {214}, set_outfit = 221},
[2421] = {check_outfit = {214}, set_outfit = 221 },
[2376] = {check_outfit = {214}, set_outfit = 219},
[2383] = {check_outfit = {231}, set_outfit = 234},
[2377] = {check_outfit = {231}, set_outfit = 234},
[2397] = {check_outfit = {231}, set_outfit = 235},
[2417] = {check_outfit = {231}, set_outfit = 235},
[2432] = {check_outfit = {231}, set_outfit = 233},
[2421] = {check_outfit = {231}, set_outfit = 233},
[2376] = {check_outfit = {231}, set_outfit = 235},
}

local out = outfits[item.itemid].check_outfit
local set = outfits[item.itemid].set_outfit

function onEquip(cid, item)
if isPlayer(cid) then
for i = 31398, 31399 do
 setPlayerStorageValue(cid, i, 1)
end
if getCreatureOutfit(cid).lookType == out then
 doSetCreatureOutfit(cid, set)
end
end
return true
end

function onDeEquip(cid)
--- Checagens de linhas verdadeiras, ficam em primeiro lugar.
if getPlayerStorageValue(cid, 18391) >= 1 or getPlayerStorageValue(cid, 18393) >= 1 or getPlayerStorageValue(cid, 41078) >= 1 or getPlayerStorageValue(cid, 41079) >= 1 then
return true
end

if isPlayer(cid) then
for i = 31398, 31399 do
setPlayerStorageValue(cid, i, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
end
return true
end

Link para o comentário
https://xtibia.com/forum/topic/213636-problem-script/#findComment-1515293
Compartilhar em outros sites


local outfits = {
[2383] = {check_outfit = {214}, set_outfit = 218},
[2377] = {check_outfit = {214}, set_outfit = 218},
[2397] = {check_outfit = {214}, set_outfit = 216},
[2417] = {check_outfit = {214}, set_outfit = 216},
[2432] = {check_outfit = {214}, set_outfit = 221},
[2421] = {check_outfit = {214}, set_outfit = 221},
[2376] = {check_outfit = {214}, set_outfit = 219},
[2383] = {check_outfit = {231}, set_outfit = 234},
[2377] = {check_outfit = {231}, set_outfit = 234},
[2397] = {check_outfit = {231}, set_outfit = 235},
[2417] = {check_outfit = {231}, set_outfit = 235},
[2432] = {check_outfit = {231}, set_outfit = 233},
[2421] = {check_outfit = {231}, set_outfit = 233},
[2376] = {check_outfit = {231}, set_outfit = 235},
}

local out = outfits[item.itemid].check_outfit
local set = outfits[item.itemid].set_outfit

function onEquip(cid, item)
if isPlayer(cid) then
for i = 31398, 31399 do
 setPlayerStorageValue(cid, i, 1)
end
if getCreatureOutfit(cid).lookType == out then
 doSetCreatureOutfit(cid, set)
end
return true
end

function onDeEquip(cid)
--- Checagens de linhas verdadeiras, ficam em primeiro lugar.
if getPlayerStorageValue(cid, 18391) >= 1 or getPlayerStorageValue(cid, 18393) >= 1 or getPlayerStorageValue(cid, 41078) >= 1 or getPlayerStorageValue(cid, 41079) >= 1 then
return true
end

if isPlayer(cid) then
for i = 31398, 31399 do
setPlayerStorageValue(cid, i, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end

Link para o comentário
https://xtibia.com/forum/topic/213636-problem-script/#findComment-1515968
Compartilhar em outros sites

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...