Postado Maio 23, 2015 10 anos Ponha isso dentro e modifique os items iniciais e me diga se funciona, também o looktype inicial de homem e mulher, add mesmos items homem e mulher... Gente preciso da ajuda de vocês, estou quebrando minha cabeça a horas, já procurei em toda net e não consegui resolver meu problema. O problema é o seguinte, ao logar um personagem independente de nv, ele ganha os itens inicias, toda vez que logarem o personagem iram ganhar os mesmo itens, varias e varias vezes, O certo seria ele ganhar esses itens uma unica vez e apenas para personagens nv 1. Já tentei de tudo e não conseguir resolver Aqui meu firstitem.xml <?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 = {1988, 1987, 2382, 2120, 2580, 2550, 7385, 2395, 0} -- 7385 (pokeinfo) -- 2395 (portfoil) ok -- 2382 (pokedex) ok -- 0 (coin case) ok -- 2550 (order) ok -- 1987 (bag) ok -- 1988 (badge case) ok -- 2120 (rope) ok -- 2580 (fishing rod) ok } ]]> </config> <event type="login" name="FirstItems" event="script"> <![CDATA[ domodlib('firstitems_config') function onLogin(cid) if getCreatureName(cid) == "Account Manager" then doSetCreatureOutfit(cid, {lookType="511"}, 1) return true end if getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid > 0 then local bag = getPlayerItemById(cid, false, 1987).uid doAddContainerItem(bag, 12344, 30) doAddContainerItem(bag, 2392, 35) doAddContainerItem(bag, 2160, 1) doAddContainerItem(bag, 12245, 1) doAddContainerItem(bag, 27669, 1) doAddContainerItem(bag, 27670, 1) return true end for _, id in ipairs(config.items) do doPlayerAddItem(cid, id, 1) end local bag = getPlayerItemById(cid, false, 1988).uid doAddContainerItem(bag, 12267, 1) doAddContainerItem(bag, 12266, 1) doAddContainerItem(bag, 12264, 1) doAddContainerItem(bag, 12265, 1) doAddContainerItem(bag, 12263, 1) doAddContainerItem(bag, 12262, 1) doAddContainerItem(bag, 12261, 1) doAddContainerItem(bag, 12260, 1) return true end ]]></event> </mod> Agradeço dese já! EDITADO PRINTS Editado Maio 25, 2015 10 anos por Filipe Fagundes (veja o histórico de edições) Status servidor pokechu:
Postado Maio 23, 2015 10 anos Diretor <?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 = {1988, 1987, 2382, 2120, 2580, 2550, 7385, 2395, 0} -- 7385 (pokeinfo) -- 2395 (portfoil) ok -- 2382 (pokedex) ok -- 0 (coin case) ok -- 2550 (order) ok -- 1987 (bag) ok -- 1988 (badge case) ok -- 2120 (rope) ok -- 2580 (fishing rod) ok } ]]> </config> <event type="login" name="FirstItems" event="script"> <![CDATA[ domodlib('firstitems_config') function onLogin(cid) if(getPlayerStorageValue(cid, config.storage) > 0) then return true end if getCreatureName(cid) == "Account Manager" then doSetCreatureOutfit(cid, {lookType="511"}, 1) return true end if getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid > 0 then local bag = getPlayerItemById(cid, false, 1987).uid doAddContainerItem(bag, 12344, 30) doAddContainerItem(bag, 2392, 35) doAddContainerItem(bag, 2160, 1) doAddContainerItem(bag, 12245, 1) doAddContainerItem(bag, 27669, 1) doAddContainerItem(bag, 27670, 1) return true end for _, id in ipairs(config.items) do doPlayerAddItem(cid, id, 1) setPlayerStorageValue(cid, config.storage, 1) end local bag = getPlayerItemById(cid, false, 1988).uid doAddContainerItem(bag, 12267, 1) doAddContainerItem(bag, 12266, 1) doAddContainerItem(bag, 12264, 1) doAddContainerItem(bag, 12265, 1) doAddContainerItem(bag, 12263, 1) doAddContainerItem(bag, 12262, 1) doAddContainerItem(bag, 12261, 1) doAddContainerItem(bag, 12260, 1) return true end ]]></event> </mod> tenta xd Editado Maio 23, 2015 10 anos por alexxxxxxx (veja o histórico de edições) Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
Postado Maio 23, 2015 10 anos <?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 = {1988, 1987, 2382, 2120, 2580, 2550, 7385, 2395, 0} -- 7385 (pokeinfo) -- 2395 (portfoil) ok -- 2382 (pokedex) ok -- 0 (coin case) ok -- 2550 (order) ok -- 1987 (bag) ok -- 1988 (badge case) ok -- 2120 (rope) ok -- 2580 (fishing rod) ok } ]]> </config> <event type="login" name="FirstItems" event="script"> <![CDATA[ domodlib('firstitems_config') function onLogin(cid) if getCreatureName(cid) == "Account Manager" then doSetCreatureOutfit(cid, {lookType="511"}, 1) return true end if getPlayerStorageValue(cid, config.storage) <= 0 then if getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid > 0 then local bag = getPlayerItemById(cid, false, 1987).uid doAddContainerItem(bag, 12344, 30) doAddContainerItem(bag, 2392, 35) doAddContainerItem(bag, 2160, 1) doAddContainerItem(bag, 12245, 1) doAddContainerItem(bag, 27669, 1) doAddContainerItem(bag, 27670, 1) return true end for _, id in ipairs(config.items) do doPlayerAddItem(cid, id, 1) end local bag = getPlayerItemById(cid, false, 1988).uid doAddContainerItem(bag, 12267, 1) doAddContainerItem(bag, 12266, 1) doAddContainerItem(bag, 12264, 1) doAddContainerItem(bag, 12265, 1) doAddContainerItem(bag, 12263, 1) doAddContainerItem(bag, 12262, 1) doAddContainerItem(bag, 12261, 1) doAddContainerItem(bag, 12260, 1) setPlayerStorageValue(cid, config.storage, 1) return true end ]]></event> </mod> [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Maio 23, 2015 10 anos Autor <?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 = {1988, 1987, 2382, 2120, 2580, 2550, 7385, 2395, 0} -- 7385 (pokeinfo) -- 2395 (portfoil) ok -- 2382 (pokedex) ok -- 0 (coin case) ok -- 2550 (order) ok -- 1987 (bag) ok -- 1988 (badge case) ok -- 2120 (rope) ok -- 2580 (fishing rod) ok } ]]> </config> <event type="login" name="FirstItems" event="script"> <![CDATA[ domodlib('firstitems_config') function onLogin(cid) if(getPlayerStorageValue(cid, config.storage) > 0) then return true end if getCreatureName(cid) == "Account Manager" then doSetCreatureOutfit(cid, {lookType="511"}, 1) return true end if getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid > 0 then local bag = getPlayerItemById(cid, false, 1987).uid doAddContainerItem(bag, 12344, 30) doAddContainerItem(bag, 2392, 35) doAddContainerItem(bag, 2160, 1) doAddContainerItem(bag, 12245, 1) doAddContainerItem(bag, 27669, 1) doAddContainerItem(bag, 27670, 1) return true end for _, id in ipairs(config.items) do doPlayerAddItem(cid, id, 1) setPlayerStorageValue(cid, config.storage, 1) end local bag = getPlayerItemById(cid, false, 1988).uid doAddContainerItem(bag, 12267, 1) doAddContainerItem(bag, 12266, 1) doAddContainerItem(bag, 12264, 1) doAddContainerItem(bag, 12265, 1) doAddContainerItem(bag, 12263, 1) doAddContainerItem(bag, 12262, 1) doAddContainerItem(bag, 12261, 1) doAddContainerItem(bag, 12260, 1) return true end ]]></event> </mod> tenta xd Não funcionou brother continua com o mesmo problema :/ Nenhum dos dois funcionou, continuou o mesmo problema Status servidor pokechu:
Postado Maio 23, 2015 10 anos Diretor :/ Editado Maio 24, 2015 10 anos por alexxxxxxx (veja o histórico de edições) Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
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.