Postado Dezembro 15, 2014 10 anos Bom estou com um problema que é o seguinte. Quando os players nascem em rookguard, eles nascem sem item algum. Já procurei em todas as pastas e não achei firstitems. Já tentei o modo de adicionar a pasta mods e criar firstitems.xml, mas da error no console e mesmo assim fica sem item. Se alguém souber arrumar, darei rep+ !!!
Postado Dezembro 15, 2014 10 anos Qual erro aparece? @Edit: Se quiser, aqui tem o meu first items: Va na pasta data/creaturescripts e adicione esta tag ao arquivo creaturescripts.xml: <event type="login" name="FirstItems" script="firstitems.lua"/> Agora va na pasta data/creaturescripts/scripts e crie um arquivo chamado firstitems.lua e coloque isso dentro: Mostrar conteúdo oculto 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, 2160, 3) 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, 2160, 3) 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, 2160, 3) 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, 2160, 3) 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 Agora na mesma pasta abra o arquivo login.lua e adicione esta tag antes do ultimo "return true": registerCreatureEvent(cid, "FirstItems") Obs: Não uso esse, ele só está no meu server. Mas já usei. Daqui a pouco posto o que eu uso, que é em mods. Editado Dezembro 15, 2014 10 anos por danihcv (veja o histórico de edições) Te ajudei?? REP + e ficamos quites... http://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'> Atenciosamente, Daniel. Abraços! Meus tutoriais: Programação: Resolvendo QUALQUER erro na data base. Scripts (system's, creaturescripts, mod's, NPC's, etc): (Sistema) GOD Ambient Light Full. Adicionando novas mounts ao servidor [NPC] Papai Noel que dá presente todo ano. Web-site: Resolvendo problema de caracteres especiais em PHP Formatando textos em PHP! Mudando a cor, tamanho, fonte, etc. Criando e configurando tabelas para paginas PHP
Postado Dezembro 15, 2014 10 anos Autor Bom, no momento eu não vou ter o error, por que já exclui a pasta mods. Mais ele dava um error em questão de uma potion e outros itens. Itens que estavam configurados para ganhar. Mais só quero que ganhe itens para no vocation. Aqueles itens como club etc... Editado Dezembro 15, 2014 10 anos por Natsurm (veja o histórico de edições)
Postado Dezembro 15, 2014 10 anos Aqui está meu firstitems em mod: Mostrar conteúdo oculto <?xml version="1.0" encoding="UTF-8"?> <mod name="First Items" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes"> <config name="firstitems_config"><![CDATA[ config = { storage = 30001, items = {2525, 8602} } ]]></config> <event type="login" name="FirstItems" event="buffer"><![CDATA[ domodlib('firstitems_config') if(getPlayerStorageValue(cid, config.storage) > 0) then return end for _, id in ipairs(config.items) do doPlayerAddItem(cid, id, 1) end if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then doPlayerAddItem(cid, 2651, 1) else doPlayerAddItem(cid, 2650, 1) end doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2152, 10) doPlayerAddItem(cid, 2389, 1) doPlayerAddItem(cid, 2789, 50) doPlayerAddItem(cid, 2190, 1) doPlayerAddItem(cid, 2428, 1) doPlayerAddItem(cid, 3966, 1) doPlayerAddItem(cid, 2182, 1) doPlayerAddItem(cid, 2120, 1) doPlayerAddItem(cid, 2554, 1) setPlayerStorageValue(cid, config.storage, 1) ]]></event> </mod> Basta criar um arquivo chamado firstitems.xml dentro da pasta mods e colocar isso dentro. Se ajudei pf REP+ Te ajudei?? REP + e ficamos quites... http://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'> Atenciosamente, Daniel. Abraços! Meus tutoriais: Programação: Resolvendo QUALQUER erro na data base. Scripts (system's, creaturescripts, mod's, NPC's, etc): (Sistema) GOD Ambient Light Full. Adicionando novas mounts ao servidor [NPC] Papai Noel que dá presente todo ano. Web-site: Resolvendo problema de caracteres especiais em PHP Formatando textos em PHP! Mudando a cor, tamanho, fonte, etc. Criando e configurando tabelas para paginas PHP
Postado Dezembro 15, 2014 10 anos Autor Usei o seu script e deu esse error no console: Citar [Warning - Event::checkScript] Can not load script: scripts/firstitems.lua cannot open data/creaturescripts/scripts/firstitems.lua: No such file or directory
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.