Ir para conteúdo

Featured Replies

Postado

Bom galera seguinte, meu servidor não está começando com os itens necessários, gostaria do set demon como inicial, seguinte das armas snakebite rod, crossbow e bolt, wand vortex, uma sword, axe e club, backpack e 100 crystal coins.

segue agora o firstitems.xml do meu servidor, alguém pode incluir oque pedi acima nesse doc?

 

<?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 = {2050, 2382}
        }
    ]]></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

            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, 1987, 1), 2674, 1)
            setPlayerStorageValue(cid, config.storage, 1)
            return true
        end
    ]]></event>
</mod>
 

Resolvido por KotZletY

Ir para solução
Postado
  • Solução

@magrelo751 

Spoiler

<?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 = {
			{id = 2050, count = 1}, 
			{id = 2382, count = 1},
			{id = 2160, count = 100},
			}
        }
    ]]></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

            for _, item in ipairs(config.items) do
                doPlayerAddItem(cid, item.id, item.count)
            end

            if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then
                doPlayerAddItem(cid, 2651, 1)
            else
                doPlayerAddItem(cid, 2650, 1)
            end

            doAddContainerItem(doPlayerAddItem(cid, 1987, 1), 2674, 1)
            setPlayerStorageValue(cid, config.storage, 1)
            return true
        end
    ]]></event>
</mod>

 

 

Postado
  • Autor

Obrigado ao Flavio e KotZlety, ainda não testei o conteúdo passado, mas entendi o mesmo, estou com outro problema para inicializar o OT mas assim que consertar-lo, testarei os ensinamentos aqui passado.

Editado por magrelo751 (veja o histórico de edições)

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo