felipevaini 0 #1 Postado 7 Fevereiro, 2020 Antes de fazer a sua pergunta, tenha certeza de ter lido as regras da seção e o guia abaixo: https://forums.otserv.com.br/index.php?/forums/topic/168583-regras-da-seção/ https://forums.otserv.com.br/index.php?/forums/topic/165121-como-fazer-uma-pergunta-ou-o-grande-guia-do-usuário-com-dúvidas/ Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.). The Forgotten Server 1.3, Globalhaut 12.15 Base: Editei as 4 vocs no firstitens, ED MS e RP estao vindo com os itens corretos, porem o EK esta vindo com uns itens que nao existe no script. Qual é a sua pergunta? Tem algo de errado nesse script? Ou esse erro pode estar ligado a outro comando. Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo: firstitems.lua Spoiler local config = { [0] = { --club, coat items = {{2398, 1}, {2461, 1}, {2467, 1}, {2649, 1}}, --container rope, shovel, red apple container = {{2120, 1}, {2554, 1}, {2674, 2},{2160, 5}} }, [1] = { --equipment spellbook, wand of vortex, magician's robe, mage hat, studded legs, leather boots, scarf items = {{2175, 1}, {2190, 1}, {8819, 1}, {8820, 1}, {2468, 1}, {2643, 1}, {2661, 1}}, --container platinum coin, rope, shovel, mana potion container = {{2152, 20}, {7620, 5}, {18559, 1}, {2120, 1},{2160, 5}} }, [2] = { --equipment spellbook, snakebite rod, magician's robe, mage hat, studded legs, leather boots scarf items = {{2175, 1}, {2182, 1}, {8819, 1}, {8820, 1}, {2468, 1}, {2643, 1}, {2661, 1}}, --container platinum coin, rope, shovel, mana potion container = {{2152, 20}, {7620, 5}, {18559, 1}, {2120, 1},{2160, 5}} }, [3] = { --equipment dwarven shield, 5 spear, ranger's cloak, ranger legs scarf, legion helmet items = {{2525, 1}, {2389, 5}, {2660, 1}, {8923, 1}, {2643, 1}, {2661, 1}, {2480, 1}}, --container platinum coin, rope, shovel, health potion, mana potion container = {{2152, 20}, {7618, 5}, {7620, 5}, {18559, 1}, {2120, 1},{2160, 5}} }, [4] = { --equipment dwarven shield, steel axe, brass armor, brass helmet, brass legs scarf items = {{2525, 1}, {8601, 1}, {2465, 1}, {2460, 1}, {2478, 1}, {2643, 1}, {2661, 1}}, --container platinum coin, jagged sword, daramian mace, rope, shovel, health potion, mana potion container = {{2152, 20}, {8602, 1}, {2439, 1}, {7618, 5}, {7620, 5}, {18559, 1}, {2120, 1},{2160, 5}} } } function onLogin(player) local targetVocation = config[player:getVocation():getId()] if not targetVocation then return true end if player:getLastLoginSaved() ~= 0 then return true end if (player:getSlotItem(CONST_SLOT_LEFT)) then return true end for i = 1, #targetVocation.items do player:addItem(targetVocation.items[1], targetVocation.items[2]) end local backpack = player:getVocation():getId() == 0 and player:addItem(1987) or player:addItem(1988) if not backpack then return true end for i = 1, #targetVocation.container do backpack:addItem(targetVocation.container[1], targetVocation.container[2]) end return trueend Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo: Spoiler Abaixo a imagem dos itens que vem no EK. Compartilhar este post Link para o post Compartilhar em outros sites
0 felipevaini 0 #2 Postado 8 Fevereiro, 2020 Duvida sanada, problema resolvido. Nao ia adiantar nada eu ficar editando .lua, pois o char Knight Sample ja estava com esses itens. Para quem tiver o mesmo problema, verifique isso antes. Compartilhar este post Link para o post Compartilhar em outros sites
Antes de fazer a sua pergunta, tenha certeza de ter lido as regras da seção e o guia abaixo:
https://forums.otserv.com.br/index.php?/forums/topic/168583-regras-da-seção/
https://forums.otserv.com.br/index.php?/forums/topic/165121-como-fazer-uma-pergunta-ou-o-grande-guia-do-usuário-com-dúvidas/
Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.).
The Forgotten Server 1.3, Globalhaut 12.15
Base:
Editei as 4 vocs no firstitens, ED MS e RP estao vindo com os itens corretos, porem o EK esta vindo com uns itens que nao existe no script.
Qual é a sua pergunta?
Tem algo de errado nesse script? Ou esse erro pode estar ligado a outro comando.
Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo:
firstitems.lua
local config = {
[0] = {
--club, coat
items = {{2398, 1}, {2461, 1}, {2467, 1}, {2649, 1}},
--container rope, shovel, red apple
container = {{2120, 1}, {2554, 1}, {2674, 2},{2160, 5}}
},
[1] = {
--equipment spellbook, wand of vortex, magician's robe, mage hat, studded legs, leather boots, scarf
items = {{2175, 1}, {2190, 1}, {8819, 1}, {8820, 1}, {2468, 1}, {2643, 1}, {2661, 1}},
--container platinum coin, rope, shovel, mana potion
container = {{2152, 20}, {7620, 5}, {18559, 1}, {2120, 1},{2160, 5}}
},
[2] = {
--equipment spellbook, snakebite rod, magician's robe, mage hat, studded legs, leather boots scarf
items = {{2175, 1}, {2182, 1}, {8819, 1}, {8820, 1}, {2468, 1}, {2643, 1}, {2661, 1}},
--container platinum coin, rope, shovel, mana potion
container = {{2152, 20}, {7620, 5}, {18559, 1}, {2120, 1},{2160, 5}}
},
[3] = {
--equipment dwarven shield, 5 spear, ranger's cloak, ranger legs scarf, legion helmet
items = {{2525, 1}, {2389, 5}, {2660, 1}, {8923, 1}, {2643, 1}, {2661, 1}, {2480, 1}},
--container platinum coin, rope, shovel, health potion, mana potion
container = {{2152, 20}, {7618, 5}, {7620, 5}, {18559, 1}, {2120, 1},{2160, 5}}
},
[4] = {
--equipment dwarven shield, steel axe, brass armor, brass helmet, brass legs scarf
items = {{2525, 1}, {8601, 1}, {2465, 1}, {2460, 1}, {2478, 1}, {2643, 1}, {2661, 1}},
--container platinum coin, jagged sword, daramian mace, rope, shovel, health potion, mana potion
container = {{2152, 20}, {8602, 1}, {2439, 1}, {7618, 5}, {7620, 5}, {18559, 1}, {2120, 1},{2160, 5}}
}
}
function onLogin(player)
local targetVocation = config[player:getVocation():getId()]
if not targetVocation then
return true
end
if player:getLastLoginSaved() ~= 0 then
return true
end
if (player:getSlotItem(CONST_SLOT_LEFT)) then
return true
end
for i = 1, #targetVocation.items do
player:addItem(targetVocation.items[1], targetVocation.items[2])
end
local backpack = player:getVocation():getId() == 0 and player:addItem(1987) or player:addItem(1988)
if not backpack then
return true
end
for i = 1, #targetVocation.container do
backpack:addItem(targetVocation.container[1], targetVocation.container[2])
end
return true
end
Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:
Abaixo a imagem dos itens que vem no EK.
Compartilhar este post
Link para o post
Compartilhar em outros sites