local firstItems = {}
firstItems[0] =
{
2512,
2428,
2124,
2478,
2643
}
firstItems[1] =
{
2512,
2190,
2461,
2649,
2642
}
firstItems[2] =
{
2512,
2182,
2461,
2649,
2642
}
firstItems[3] =
{
2512,
5907,
2461,
2649,
2642
}
firstItems[4] =
{
2512,
2376,
2461,
2649,
2642
}
function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do
doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1)
end
if getPlayerSex(cid) == 0 then
doPlayerAddItem(cid, 2652, 1)
else
doPlayerAddItem(cid, 2652, 1)
end
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2160, 3)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2420, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2675, 5)
doAddContainerItem(bag, 2680, 5)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end
info
Grupo: Visconde
Registrado: 24/11/12
Posts: 474
Reputação: +98
Gênero: Masculino

Editado Maio 31 por AdilsonTsunami
como assim pq meu ot nw usa acc manager cria pelo site a conta ai eu excluo ali a linha do zero
info
Grupo: Visconde
Registrado: 24/11/12
Posts: 474
Reputação: +98
Gênero: Masculino

Sim, ou deixa ela ali você que sabe, não vai interferir em nada.
Abç
info
Grupo: Visconde
Registrado: 02/01/14
Posts: 304
Reputação: +149
Gênero: Outro
Char no Tibia: Psy Skyline

vai mysql muda a cap do account manager pra 400 e pokemon trainer sample pra 400 vai dar certo!
mais nw tem pokemon trainer é tbia nao poketibia
info
Grupo: Conde
Registrado: 07/04/15
Posts: 962
Reputação: +258
Gênero: Masculino

É só adicionar os items no samples da database, que quando o char for criado, ele vai estar igual o sample.
e como adiciona os itens nos samples pela data base não entendo muito
info
Grupo: Conde
Registrado: 07/04/15
Posts: 962
Reputação: +258
Gênero: Masculino

^ Você loga nos samples e adiciona manualmente os itens.
não consigo loga mais vi ali na data base feet body etc... vo alterar ali mais não vai da comflito no script firstitems.lua ???
fiz e não deu bom segui o tuto do adylson tsunami mais ai os que ja tem conta não conseguem logar fika dando erro de first itens
so os novos plaiers que da certo vo tenta editar o do tsunami com os meus itens q começa pra ve se da se conseguir volto pra dar como resolvido
Usa o meu, só reeditar, o número 0 é do acc manager:local firstItems = {} firstItems[0] = { 2512, 2428, 2124, 2478, 2643 } firstItems[1] = { 2512, 2190, 2461, 2649, 2642 } firstItems[2] = { 2512, 2182, 2461, 2649, 2642 } firstItems[3] = { 2512, 5907, 2461, 2649, 2642 } firstItems[4] = { 2512, 2376, 2461, 2649, 2642 } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1) end if getPlayerSex(cid) == 0 then doPlayerAddItem(cid, 2652, 1) else doPlayerAddItem(cid, 2652, 1) end local bag = doPlayerAddItem(cid, 1988, 1) doAddContainerItem(bag, 2160, 3) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2420, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2675, 5) doAddContainerItem(bag, 2680, 5) setPlayerStorageValue(cid, 30001, 1) end return TRUE end
se eu usar o seu os char que ja tem conta não conseguem entrar por causa desse erro aki
não queria ter que reiniciar o servidor pra por os samples dinovo e tenta loga com eles reinstalando o site e fazendo toda aquela mão de obra se aguem souber oporque desse erro
Editado Maio 31 por sk8sk8ter
info
Grupo: Conde
Registrado: 07/04/15
Posts: 962
Reputação: +258
Gênero: Masculino

^ usa esse que eu acabei de fazer baseado nesse seu :
local items = {
[1] = {2512, 2190, 2461, 2649, 2642},
[2] = {2512, 2182, 2461, 2649, 2642},
[3] = {2512, 5907, 2461, 2649, 2642},
[4] = {2512, 2376, 2461, 2649, 2642},
}
function onLogin(cid)
if getPlayerStorageValue(cid, 30001) < 1 then
local item = items[getPlayerVocation(cid)]
for i = #item do
doPlayerAddItem(cid, item[i], 1)
end
doPlayerAddItem(cid, 2652, 1)
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2160, 3)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2420, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2675, 5)
doAddContainerItem(bag, 2680, 5)
setPlayerStorageValue(cid, 30001, 1)
end
return true
end
e ai funcionou ?
^ usa esse que eu acabei de fazer baseado nesse seu :
local items = { [1] = {2512, 2190, 2461, 2649, 2642}, [2] = {2512, 2182, 2461, 2649, 2642}, [3] = {2512, 5907, 2461, 2649, 2642}, [4] = {2512, 2376, 2461, 2649, 2642}, } function onLogin(cid) if getPlayerStorageValue(cid, 30001) < 1 then local item = items[getPlayerVocation(cid)] for i = #item do doPlayerAddItem(cid, item[i], 1) end doPlayerAddItem(cid, 2652, 1) local bag = doPlayerAddItem(cid, 1988, 1) doAddContainerItem(bag, 2160, 3) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2420, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2675, 5) doAddContainerItem(bag, 2680, 5) setPlayerStorageValue(cid, 30001, 1) end return true ende ai funcionou ?
não funcionou mais me ajudou pq percebi que todos os scripts tem uma cid diferente da minha que é cid,5000 fui testando outra cid e a sua deu certo pelomenos por inquanto obrigado pela atenção
oque fiz so peguei meu script e troquei minha cid,5000 pela q vc passo que é cid,3001
![]()



info
Grupo: Artesão
Registrado: 20/04/15
Posts: 134
Reputação: +2
galera não sei oque é mais meu ot o cara cria o char ai as vezes aparece com os items e as vezes aparece pelado oque acontece sera ??? ja tentei varios tutoriais aki e nada de resolver sera que pode ser data base ou script vo posta aki
function onLogin(cid)
if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then
if isSorcerer(cid) then
local bag = doPlayerAddItem(cid, 9774, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)
doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2190, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 2643, 1)
setPlayerStorageValue(cid, 50000, 1)
elseif isDruid(cid) then
local bag = doPlayerAddItem(cid, 9774, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)
doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2182, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 2643, 1)
setPlayerStorageValue(cid, 50000, 1)
elseif isPaladin(cid) then
local bag = doPlayerAddItem(cid, 9774, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)
doPlayerAddItem(cid, 2389, 3)
doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2643, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 2463, 1)
setPlayerStorageValue(cid, 50000, 1)
elseif isKnight(cid) then
local bag = doPlayerAddItem(cid, 9774, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)
doAddContainerItem(bag, 8601, 1)
doAddContainerItem(bag, 2383, 1)
doAddContainerItem(bag, 2417, 1)
doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 2643, 1)
setPlayerStorageValue(cid, 50000, 1)
end
end
return TRUE
end
obrigado desde ja a equipe x tibia