Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Olá pessoal!

 

Queria saber como eu posso fazer um script onde cada vocação pode usar só o outfit de sua respectiva classe.

Por exemplo, quero fazer assim:

 

Sorcerer pode usar apenas o Wizard;

Druid pode usar apenas o Druid;

Paladin pode usar apenas o Hunter;

e Knight pode usar apenas o Warrior.

 

Se alguém puder me ajudar, fico muito grato.

 

Abraço!

Link para o post
Compartilhar em outros sites

Você pode colocar um storage no outfits.xml, na tag outfit, tipo assim: quest="45000". O jogador vai precisar ter esse storage pra usar a outfit, aí você pode fazer ele ganhar essa storage do jeito que quiser, no primeiro login dele, por exemplo.

Link para o post
Compartilhar em outros sites
12 minutos atrás, Zanrix disse:

Você pode colocar um storage no outfits.xml, na tag outfit, tipo assim: quest="45000". O jogador vai precisar ter esse storage pra usar a outfit, aí você pode fazer ele ganhar essa storage do jeito que quiser, no primeiro login dele, por exemplo.

 

É que assim... Eu não manjo muito de fazer/editar os scripts, precisava da linha pronta e de como e onde colocar. :l

Mas obrigado pela intenção!

Link para o post
Compartilhar em outros sites
Agora, Exura ATS disse:

 

É que assim... Eu não manjo muito de fazer/editar os scripts, precisava da linha pronta e de como e onde colocar. :l

Mas obrigado pela intenção!

em outfit.xml, faça essas alterações:

<outfit id="2" quest="40001">
	<list gender="0" lookType="137" name="Hunter"/>
	<list gender="1" lookType="129" name="Hunter"/>
</outfit>

<outfit id="7" quest="40002"> 
	<list gender="0" lookType="142" name="Warrior"/>
	<list gender="1" lookType="134" name="Warrior"/>
</outfit>

<outfit id="9" quest="40003"> 
	<list gender="0" lookType="148" name="Druid"/>
	<list gender="1" lookType="144" name="Druid"/>
</outfit>

<outfit id="10" quest="40004"> 
	<list gender="0" lookType="149" name="Wizard"/>
	<list gender="1" lookType="145" name="Wizard"/>
</outfit>

em creaturescripts\scripts\firstitems.lua, em baixo de:

if getPlayerStorageValue(cid, 30001) == -1 then

coloca:

if getPlayerVocation(cid) == 3 then
	setPlayerStorageValue(cid, 40001, 1)  
end

if getPlayerVocation(cid) == 4 then
	setPlayerStorageValue(cid, 40002, 1)  
end

if getPlayerVocation(cid) == 2 then
	setPlayerStorageValue(cid, 40003, 1)  
end

if getPlayerVocation(cid) == 1 then
	setPlayerStorageValue(cid, 40004, 1)  
end

 

Link para o post
Compartilhar em outros sites
4 minutos atrás, Zanrix disse:

em outfit.xml, faça essas alterações:


<outfit id="2" quest="40001">
	<list gender="0" lookType="137" name="Hunter"/>
	<list gender="1" lookType="129" name="Hunter"/>
</outfit>

<outfit id="7" quest="40002"> 
	<list gender="0" lookType="142" name="Warrior"/>
	<list gender="1" lookType="134" name="Warrior"/>
</outfit>

<outfit id="9" quest="40003"> 
	<list gender="0" lookType="148" name="Druid"/>
	<list gender="1" lookType="144" name="Druid"/>
</outfit>

<outfit id="10" quest="40004"> 
	<list gender="0" lookType="149" name="Wizard"/>
	<list gender="1" lookType="145" name="Wizard"/>
</outfit>

em creaturescripts\scripts\firstitems.lua, em baixo de:


if getPlayerStorageValue(cid, 30001) == -1 then

coloca:


if getPlayerVocation(cid) == 3 then
	setPlayerStorageValue(cid, 40001, 1)  
end

if getPlayerVocation(cid) == 4 then
	setPlayerStorageValue(cid, 40002, 1)  
end

if getPlayerVocation(cid) == 2 then
	setPlayerStorageValue(cid, 40003, 1)  
end

if getPlayerVocation(cid) == 1 then
	setPlayerStorageValue(cid, 40004, 1)  
end

 

 

Meu firstitens.xml é assim:

Citar

<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="Kaiser" contact="[email protected]" enabled="yes">
    <description><![CDATA[
        Custom Fist Items
    ]]></description>
    <config name="firstitems_config"><![CDATA[
        config = {
            storage = 40046,
            items = {}
        }
    ]]></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

        -- All Vocation
            -- BackPack -- Rope -- in Backpack
            doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2120, 1)
            -- Brass Armor -- Body
            doPlayerAddItem(cid, 2465, 1)
            -- Steel Helmet -- Head
            doPlayerAddItem(cid, 2457, 1)
            -- Bonelord Shield -- Right Hand
            doPlayerAddItem(cid, 2518, 1)

        -- Sorcerer (Weapon) -- Hand
        if isSorcerer(cid) then
            doPlayerAddItem(cid, 2190, 1) -- Wand of Vortex -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")

        -- Druid (Weapon) -- Hand
        elseif isDruid(cid) then
            doPlayerAddItem(cid, 2182, 1) -- Snake Bite Rod -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")

        -- Paladin - Warrior (Weapon) -- Hand
        elseif isPaladin(cid) then
            doPlayerAddItem(cid, 2389, 5) -- Spear -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")

        -- Knight (Weapon) -- Hand
        elseif isKnight(cid) then
            doPlayerAddItem(cid, 8602, 1) -- Jagged Sword -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")
        end

        -- All Vocation
            -- Brass Legs -- in Feet
            doPlayerAddItem(cid, 2478, 1)
            -- Leather Boots -- in Boots
            doPlayerAddItem(cid, 2643, 1)
            -- Scarf -- in Necklacke
            doPlayerAddItem(cid, 2661, 1)
            -- Platinum Coin -- in Arrows
            doPlayerAddItem(cid, 2152, 1)
            -- Health Potion -- in Backpack
            doPlayerAddItem(cid, 7618, 10)
            -- Shovel -- in Backpack
            doPlayerAddItem(cid, 2554, 1)
            -- Crystal Ring -- in Ring
            doPlayerAddItem(cid, 2124, 1)
            -- Mana Potion -- in Backpack
            doPlayerAddItem(cid, 7620, 15)

        -- Knight (Weapon) -- in Backpack
        if isKnight(cid) then
            doPlayerAddItem(cid, 8601, 1) -- Steel Axe
            doPlayerAddItem(cid, 2439, 1) -- Daramanian mace
        end

    setPlayerStorageValue(cid, config.storage, 1)
    ]]></event>
</mod>

 

Não tem essa linha que tu pediu pra eu procurar :l

Link para o post
Compartilhar em outros sites
2 minutos atrás, Exura ATS disse:

 

Meu firstitens.xml é assim:

 

Não tem essa linha que tu pediu pra eu procurar :l

O teu é por mod, nunca mexi com isso... Mas tenta colocar em cima disso "-- All Vocation".

Link para o post
Compartilhar em outros sites
2 minutos atrás, Zanrix disse:

O teu é por mod, nunca mexi com isso... Mas tenta colocar em cima disso "-- All Vocation".

 

Aconteceu isso:

 

rkr6g1.png

 

Meu Outfits.xml:

Citar

<?xml version="1.0"?>
<outfits>
    <outfit id="2" "quest="40003">
        <list gender="0" lookType="137" name="Hunter">
        </list>
        <list gender="1" lookType="129" name="Hunter">
        </list>
    </outfit>

    <outfit id="7" "quest="40004">
        <list gender="0" lookType="142" name="Warrior">
        </list>
        <list gender="1" lookType="134" name="Warrior">
        </list>
    </outfit>

    <outfit id="9" "quest="40002">
        <list gender="0" lookType="148" name="Druid">
        </list>
        <list gender="1" lookType="144" name="Druid">
        </list>
    </outfit>

    <outfit id="10" "quest="40001">
        <list gender="0" lookType="149" name="Wizard">
        </list>
        <list gender="1" lookType="145" name="Wizard">
        </list>
    </outfit>

    <outfit id="32" access="3" premium="no">
        <list gender="0-3" lookType="75" name="Gamemaster"/>
    </outfit>

    <outfit id="33" access="4" premium="no">
        <list gender="0-3" lookType="266" name="Community Manager"/>
    </outfit>

    <outfit id="34" access="5" premium="no">
        <list gender="0-3" lookType="302" name="God"/>
    </outfit>

    <!-- <outfit id="" access="5" premium="no">
        <list gender="0-3" lookType="12" name="Archdemon"/>
    </outfit> -->
</outfits>

 

Link para o post
Compartilhar em outros sites
8 minutos atrás, Zanrix disse:

Da uma olhada como eu te passei ali, tem umas aspas erradas no seu código.

 

Opa, perdão, erro meu!

Vou arrumar e ver o que vai dar, já atualizo aqui...

 

Edit #1:

@Zanrix Então, não deu erro no distro, porém, quando criei um Sorcerer pra testar, ele nasceu com o Citizen Outfit e só dá pra trocar pro Warrior na janela de Change Outfit.

 

Outfits.xml:

Citar

<?xml version="1.0"?>
<outfits>
    <outfit id="2" quest="40003">
        <list gender="0" lookType="137" name="Hunter">
        </list>
        <list gender="1" lookType="129" name="Hunter">
        </list>
    </outfit>

    <outfit id="7" quest="40004">
        <list gender="0" lookType="142" name="Warrior">
        </list>
        <list gender="1" lookType="134" name="Warrior">
        </list>
    </outfit>

    <outfit id="9" quest="40002">
        <list gender="0" lookType="148" name="Druid">
        </list>
        <list gender="1" lookType="144" name="Druid">
        </list>
    </outfit>

    <outfit id="10" quest="40001">
        <list gender="0" lookType="149" name="Wizard">
        </list>
        <list gender="1" lookType="145" name="Wizard">
        </list>
    </outfit>

    <outfit id="32" access="3" premium="no">
        <list gender="0-3" lookType="75" name="Gamemaster"/>
    </outfit>

    <outfit id="33" access="4" premium="no">
        <list gender="0-3" lookType="266" name="Community Manager"/>
    </outfit>

    <outfit id="34" access="5" premium="no">
        <list gender="0-3" lookType="302" name="God"/>
    </outfit>

    <outfit id="" access="5" premium="no">
        <list gender="0-3" lookType="12" name="Archdemon"/>
    </outfit>
</outfits>

 

FirstItens.xml:

Citar

<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="Kaiser" contact="[email protected]" enabled="yes">
    <description><![CDATA[
        Custom Fist Items
    ]]></description>
    <config name="firstitems_config"><![CDATA[
        config = {
            storage = 40046,
            items = {}
        }
    ]]></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

        -- All Vocation
            -- BackPack -- Rope -- in Backpack
            doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2120, 1)
            -- Brass Armor -- Body
            doPlayerAddItem(cid, 2465, 1)
            -- Steel Helmet -- Head
            doPlayerAddItem(cid, 2457, 1)
            -- Bonelord Shield -- Right Hand
            doPlayerAddItem(cid, 2518, 1)

        -- Sorcerer (Weapon) -- Hand
        if isSorcerer(cid) then
            doPlayerAddItem(cid, 2190, 1) -- Wand of Vortex -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")

        -- Druid (Weapon) -- Hand
        elseif isDruid(cid) then
            doPlayerAddItem(cid, 2182, 1) -- Snake Bite Rod -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")

        -- Paladin - Warrior (Weapon) -- Hand
        elseif isPaladin(cid) then
            doPlayerAddItem(cid, 2389, 5) -- Spear -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")

        -- Knight (Weapon) -- Hand
        elseif isKnight(cid) then
            doPlayerAddItem(cid, 8602, 1) -- Jagged Sword -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")
        end

if getPlayerVocation(cid) == 3 then
    setPlayerStorageValue(cid, 40001, 1)  
end

if getPlayerVocation(cid) == 4 then
    setPlayerStorageValue(cid, 40002, 1)  
end

if getPlayerVocation(cid) == 2 then
    setPlayerStorageValue(cid, 40003, 1)  
end

if getPlayerVocation(cid) == 1 then
    setPlayerStorageValue(cid, 40004, 1)  
end

        -- All Vocation
            -- Brass Legs -- in Feet
            doPlayerAddItem(cid, 2478, 1)
            -- Leather Boots -- in Boots
            doPlayerAddItem(cid, 2643, 1)
            -- Scarf -- in Necklacke
            doPlayerAddItem(cid, 2661, 1)
            -- Platinum Coin -- in Arrows
            doPlayerAddItem(cid, 2152, 1)
            -- Health Potion -- in Backpack
            doPlayerAddItem(cid, 7618, 10)
            -- Shovel -- in Backpack
            doPlayerAddItem(cid, 2554, 1)
            -- Crystal Ring -- in Ring
            doPlayerAddItem(cid, 2124, 1)
            -- Mana Potion -- in Backpack
            doPlayerAddItem(cid, 7620, 15)

        -- Knight (Weapon) -- in Backpack
        if isKnight(cid) then
            doPlayerAddItem(cid, 8601, 1) -- Steel Axe
            doPlayerAddItem(cid, 2439, 1) -- Daramanian mace
        end

    setPlayerStorageValue(cid, config.storage, 1)
    ]]></event>
</mod>

 

Edit #2:

Opa, esqueci de mudar no FirstItens os IDs da "quest" que eu acabei mexendo no código que tu me mandou.

Editado por Exura ATS (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
7 minutos atrás, Exura ATS disse:

 

Opa, perdão, erro meu!

Vou arrumar e ver o que vai dar, já atualizo aqui...

@Zanrix Então, não deu erro no distro, porém, quando criei um Sorcerer pra testar, ele nasceu com o Citizen Outfit e só dá pra trocar pro Warrior na janela de Change Outfit.

 

Outfits.xml:

 

FirstItens.xml:

 

Você trocou ali os números na tag "quest", muda pra isso no seu outfits.xml:

<?xml version="1.0"?>
<outfits>
    <outfit id="2" quest="40001">
        <list gender="0" lookType="137" name="Hunter">
        </list>
        <list gender="1" lookType="129" name="Hunter">
        </list>
    </outfit>
    <outfit id="7" quest="40002">
        <list gender="0" lookType="142" name="Warrior">
        </list>
        <list gender="1" lookType="134" name="Warrior">
        </list>
    </outfit>
    <outfit id="9" quest="40003">
        <list gender="0" lookType="148" name="Druid">
        </list>
        <list gender="1" lookType="144" name="Druid">
        </list>
    </outfit>
    <outfit id="10" quest="40004">
        <list gender="0" lookType="149" name="Wizard">
        </list>
        <list gender="1" lookType="145" name="Wizard">
        </list>
    </outfit>
    <outfit id="32" access="3" premium="no">
        <list gender="0-3" lookType="75" name="Gamemaster"/>
    </outfit>
    <outfit id="33" access="4" premium="no">
        <list gender="0-3" lookType="266" name="Community Manager"/>
    </outfit>
    <outfit id="34" access="5" premium="no">
        <list gender="0-3" lookType="302" name="God"/>
    </outfit>
    <outfit id="" access="5" premium="no">
        <list gender="0-3" lookType="12" name="Archdemon"/>
    </outfit>
</outfits>

E eu esqueci de perguntar se você quer tirar a outfit citizen das vocações, se sim, adiciona isso no código:

<outfit id="1" quest="40000">
	<list gender="0" lookType="136" name="Citizen"/>
  	<list gender="1" lookType="128" name="Citizen"/>
</outfit>

 

Link para o post
Compartilhar em outros sites

@Zanrix É que eu tinha editado meu post antes, acho que tu acabou não vendo... Haha!

 

Então, depois de arrumar os quest ids, ficou tudo certo, cada outfit por cada vocação.

Porém, os personagens estão logando no jogo pela primeira vez com o Citizen. Não sei como tirar isso.

 

Meu FirstItens.xml atualizado:

Citar

<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="Kaiser" contact="[email protected]" enabled="yes">
    <description><![CDATA[
        Custom Fist Items
    ]]></description>
    <config name="firstitems_config"><![CDATA[
        config = {
            storage = 40046,
            items = {}
        }
    ]]></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

        -- All Vocation
            -- BackPack -- Rope -- in Backpack
            doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2120, 1)
            -- Brass Armor -- Body
            doPlayerAddItem(cid, 2465, 1)
            -- Steel Helmet -- Head
            doPlayerAddItem(cid, 2457, 1)
            -- Bonelord Shield -- Right Hand
            doPlayerAddItem(cid, 2518, 1)

        -- Sorcerer (Weapon) -- Hand
        if isSorcerer(cid) then
            doPlayerAddItem(cid, 2190, 1) -- Wand of Vortex -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")

        -- Druid (Weapon) -- Hand
        elseif isDruid(cid) then
            doPlayerAddItem(cid, 2182, 1) -- Snake Bite Rod -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")

        -- Paladin - Warrior (Weapon) -- Hand
        elseif isPaladin(cid) then
            doPlayerAddItem(cid, 2389, 5) -- Spear -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")

        -- Knight (Weapon) -- Hand
        elseif isKnight(cid) then
            doPlayerAddItem(cid, 8602, 1) -- Jagged Sword -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")
        end

if getPlayerVocation(cid) == 3 then
    setPlayerStorageValue(cid, 40003, 1)  
end

if getPlayerVocation(cid) == 4 then
    setPlayerStorageValue(cid, 40004, 1)  
end

if getPlayerVocation(cid) == 2 then
    setPlayerStorageValue(cid, 40002, 1)  
end

if getPlayerVocation(cid) == 1 then
    setPlayerStorageValue(cid, 40001, 1)  
end

        -- All Vocation
            -- Brass Legs -- in Feet
            doPlayerAddItem(cid, 2478, 1)
            -- Leather Boots -- in Boots
            doPlayerAddItem(cid, 2643, 1)
            -- Scarf -- in Necklacke
            doPlayerAddItem(cid, 2661, 1)
            -- Platinum Coin -- in Arrows
            doPlayerAddItem(cid, 2152, 1)
            -- Health Potion -- in Backpack
            doPlayerAddItem(cid, 7618, 10)
            -- Shovel -- in Backpack
            doPlayerAddItem(cid, 2554, 1)
            -- Crystal Ring -- in Ring
            doPlayerAddItem(cid, 2124, 1)
            -- Mana Potion -- in Backpack
            doPlayerAddItem(cid, 7620, 15)

        -- Knight (Weapon) -- in Backpack
        if isKnight(cid) then
            doPlayerAddItem(cid, 8601, 1) -- Steel Axe
            doPlayerAddItem(cid, 2439, 1) -- Daramanian mace
        end

    setPlayerStorageValue(cid, config.storage, 1)
    ]]></event>
</mod>

 

Link para o post
Compartilhar em outros sites
2 minutos atrás, Exura ATS disse:

@Zanrix É que eu tinha editado meu post antes, acho que tu acabou não vendo... Haha!

 

Então, depois de arrumar os quest ids, ficou tudo certo, cada outfit por cada vocação.

Porém, os personagens estão logando no jogo pela primeira vez com o Citizen. Não sei como tirar isso.

 

Meu FirstItens.xml atualizado:

 

Na parte que mudamos no FirstItens.xml, substitui por isso:

if getPlayerVocation(cid) == 3 then
    setPlayerStorageValue(cid, 40003, 1)
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, 137)
    else
    	doCreatureChangeOutfit(cid, 129)
    end
end
if getPlayerVocation(cid) == 4 then
    setPlayerStorageValue(cid, 40004, 1)  
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, 139)
    else
    	doCreatureChangeOutfit(cid, 131)
    end
end
if getPlayerVocation(cid) == 2 then
    setPlayerStorageValue(cid, 40002, 1)
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, 148)
    else
    	doCreatureChangeOutfit(cid, 144)
    end
end
if getPlayerVocation(cid) == 1 then
    setPlayerStorageValue(cid, 40001, 1)
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, 149)
    else
    	doCreatureChangeOutfit(cid, 145)
    end
end

 

Link para o post
Compartilhar em outros sites
4 minutos atrás, Zanrix disse:

Na parte que mudamos no FirstItens.xml, substitui por isso:


if getPlayerVocation(cid) == 3 then
    setPlayerStorageValue(cid, 40003, 1)
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, 137)
    else
    	doCreatureChangeOutfit(cid, 129)
    end
end
if getPlayerVocation(cid) == 4 then
    setPlayerStorageValue(cid, 40004, 1)  
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, 139)
    else
    	doCreatureChangeOutfit(cid, 131)
    end
end
if getPlayerVocation(cid) == 2 then
    setPlayerStorageValue(cid, 40002, 1)
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, 148)
    else
    	doCreatureChangeOutfit(cid, 144)
    end
end
if getPlayerVocation(cid) == 1 then
    setPlayerStorageValue(cid, 40001, 1)
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, 149)
    else
    	doCreatureChangeOutfit(cid, 145)
    end
end

 

 

Ainda tá nascendo com o Citizen Outfit. ):

Link para o post
Compartilhar em outros sites
5 minutos atrás, Zanrix disse:

Você criou um char novo? Que estranho

 

Pois é.

Dei um Backup no FirstItens e vou editar ele de novo, e testar mais uma vez, por via das dúvidas...

 

Edit:

@Zanrix O personagem que eu crio ainda tá vindo com o Citizen Outfit, e pra piorar agora tá dando um erro no distro e o personagem tá vindo "pelado".

 

Saca só:

 

2djnep.png

 

FirstItens.xml:

Citar

<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="Kaiser" contact="[email protected]" enabled="yes">
    <description><![CDATA[
        Custom Fist Items
    ]]></description>
    <config name="firstitems_config"><![CDATA[
        config = {
            storage = 40046,
            items = {}
        }
    ]]></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 getPlayerVocation(cid) == 3 then
    setPlayerStorageValue(cid, 40003, 1)
      if getPlayerSex(cid) == 0 then
          doCreatureChangeOutfit(cid, 137)
    else
        doCreatureChangeOutfit(cid, 129)
    end
end
if getPlayerVocation(cid) == 4 then
    setPlayerStorageValue(cid, 40004, 1)  
      if getPlayerSex(cid) == 0 then
          doCreatureChangeOutfit(cid, 139)
    else
        doCreatureChangeOutfit(cid, 131)
    end
end
if getPlayerVocation(cid) == 2 then
    setPlayerStorageValue(cid, 40002, 1)
      if getPlayerSex(cid) == 0 then
          doCreatureChangeOutfit(cid, 148)
    else
        doCreatureChangeOutfit(cid, 144)
    end
end
if getPlayerVocation(cid) == 1 then
    setPlayerStorageValue(cid, 40001, 1)
      if getPlayerSex(cid) == 0 then
          doCreatureChangeOutfit(cid, 149)
    else
        doCreatureChangeOutfit(cid, 145)
    end
end
        -- All Vocation
            -- BackPack -- Rope -- in Backpack
            doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2120, 1)
            -- Brass Armor -- Body
            doPlayerAddItem(cid, 2465, 1)
            -- Steel Helmet -- Head
            doPlayerAddItem(cid, 2457, 1)
            -- Bonelord Shield -- Right Hand
            doPlayerAddItem(cid, 2518, 1)

        -- Sorcerer (Weapon) -- Hand
        if isSorcerer(cid) then
            doPlayerAddItem(cid, 2190, 1) -- Wand of Vortex -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")

        -- Druid (Weapon) -- Hand
        elseif isDruid(cid) then
            doPlayerAddItem(cid, 2182, 1) -- Snake Bite Rod -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")

        -- Paladin - Warrior (Weapon) -- Hand
        elseif isPaladin(cid) then
            doPlayerAddItem(cid, 2389, 5) -- Spear -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")

        -- Knight (Weapon) -- Hand
        elseif isKnight(cid) then
            doPlayerAddItem(cid, 8602, 1) -- Jagged Sword -- Left Hand
            doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")
        end

        -- All Vocation
            -- Brass Legs -- in Feet
            doPlayerAddItem(cid, 2478, 1)
            -- Leather Boots -- in Boots
            doPlayerAddItem(cid, 2643, 1)
            -- Scarf -- in Necklacke
            doPlayerAddItem(cid, 2661, 1)
            -- Platinum Coin -- in Arrows
            doPlayerAddItem(cid, 2152, 1)
            -- Health Potion -- in Backpack
            doPlayerAddItem(cid, 7618, 10)
            -- Shovel -- in Backpack
            doPlayerAddItem(cid, 2554, 1)
            -- Crystal Ring -- in Ring
            doPlayerAddItem(cid, 2124, 1)
            -- Mana Potion -- in Backpack
            doPlayerAddItem(cid, 7620, 15)

        -- Knight (Weapon) -- in Backpack
        if isKnight(cid) then
            doPlayerAddItem(cid, 8601, 1) -- Steel Axe
            doPlayerAddItem(cid, 2439, 1) -- Daramanian mace
        end

    setPlayerStorageValue(cid, config.storage, 1)
    ]]></event>
</mod>

 

Editado por Exura ATS (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
6 minutos atrás, Exura ATS disse:

 

Pois é.

Dei um Backup no FirstItens e vou editar ele de novo, e testar mais uma vez, por via das dúvidas...

 

Edit:

@Zanrix O personagem que eu crio ainda tá vindo com o Citizen Outfit, e pra piorar agora tá dando um erro no distro e o personagem tá vindo "pelado".

 

Saca só:

 

2djnep.png

 

FirstItens.xml:

 

Difícil dizer o que está dando erro, só vejo o código em si ali na distro. Agora pouco não estava dando erro, não é? Não consegue reverter? Ia falar pra tentar assim agora (Mas não tem nada a ver com o erro):

if getPlayerVocation(cid) == 3 then
    setPlayerStorageValue(cid, 40003, 1)
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, {lookType = 137, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    else
    	doCreatureChangeOutfit(cid, {lookType = 129, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    end
end
if getPlayerVocation(cid) == 4 then
    setPlayerStorageValue(cid, 40004, 1)  
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, {lookType = 139, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    else
    	doCreatureChangeOutfit(cid, {lookType = 131, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    end
end
if getPlayerVocation(cid) == 2 then
    setPlayerStorageValue(cid, 40002, 1)
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, {lookType = 148, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    else
    	doCreatureChangeOutfit(cid, {lookType = 144, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    end
end
if getPlayerVocation(cid) == 1 then
    setPlayerStorageValue(cid, 40001, 1)
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, {lookType = 149, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    else
    	doCreatureChangeOutfit(cid, {lookType = 145, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    end
end

 

Link para o post
Compartilhar em outros sites
15 minutos atrás, Zanrix disse:

Difícil dizer o que está dando erro, só vejo o código em si ali na distro. Agora pouco não estava dando erro, não é? Não consegue reverter? Ia falar pra tentar assim agora (Mas não tem nada a ver com o erro):


if getPlayerVocation(cid) == 3 then
    setPlayerStorageValue(cid, 40003, 1)
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, {lookType = 137, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    else
    	doCreatureChangeOutfit(cid, {lookType = 129, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    end
end
if getPlayerVocation(cid) == 4 then
    setPlayerStorageValue(cid, 40004, 1)  
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, {lookType = 139, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    else
    	doCreatureChangeOutfit(cid, {lookType = 131, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    end
end
if getPlayerVocation(cid) == 2 then
    setPlayerStorageValue(cid, 40002, 1)
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, {lookType = 148, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    else
    	doCreatureChangeOutfit(cid, {lookType = 144, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    end
end
if getPlayerVocation(cid) == 1 then
    setPlayerStorageValue(cid, 40001, 1)
  	if getPlayerSex(cid) == 0 then
  		doCreatureChangeOutfit(cid, {lookType = 149, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    else
    	doCreatureChangeOutfit(cid, {lookType = 145, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0})
    end
end

 

 

Parece que tá funcionando tudo certo, só que os Knights tão vindo com Outfit Knight, eu queria Outfit Warrior neles, tanto male quanto female. Onde mudo?

Link para o post
Compartilhar em outros sites
1 minuto atrás, Exura ATS disse:

 

Parece que tá funcionando tudo certo, só que os Knights tão vindo com Outfit Knight, eu queria Outfit Warrior neles, tanto male quanto female. Onde mudo?

Opa, malz. Nesse último script muda o 139 pra 142 e o 131 pra 134.

Link para o post
Compartilhar em outros sites

@Zanrix Funcionou tudo perfeito, amigo. Só mudei os valores das "colors", pra não ficar tudo azul. Hahaha!

 

Obrigadão pela ajuda, de coração mesmo!

 

Como de costume, gravei um vídeo pra você ver na prática como funcionou tua ajuda.

Dá uma olhadinha:

 

 

 

Mais uma vez, obrigado, de coração mesmo!

Abraço. REP+

Editado por Exura ATS (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo