Ir para conteúdo
  • 0

[PEDIDO] Change Sex Com HAT


yuriowns

Pergunta

 

Salve rapazeada, tranquilo? Estou com um script que muda o sexo do personagem clicando em um item, porém quando está com o mage full masculino, ele muda para o mage full feminino e não para o summoner que teria o hat, mas quando muda do feminino pro masculino funciona certinho, não sei o motivo, alguém pode me ajudar?

script do item:
 

Spoiler
function onUse(cid, item, itemEx, toPosition)
 
local pos = getCreaturePosition(cid)
if (getTilePzInfo(getPlayerPosition(cid)) == TRUE) then
if (getPlayerSex(cid) == 1) then
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,22, "Changesex successfully!")
doPlayerSetSex(cid, 0)
doRemoveCreature(cid)
else
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,22 , "Changesex successfully!")
doPlayerSetSex(cid, 1)
doRemoveCreature(cid)
end
else
doPlayerSendTextMessage(cid, 22, "You can only use this item inside protection zone!")
end
return true
end

 

Por ser um servidor 7.4 com addons no client, vou postar o outfits.xml e o addons.xml também:

 

outfits.xml:
 

 
Spoiler
<?xml version="1.0"?>
<outfits>
    <outfit id="1">
        <list gender="0" lookType="258" name="Citizen"/>
        <list gender="1" lookType="267" name="Citizen"/>
    </outfit>

 

    <outfit id="2">
        <list gender="0" lookType="259" name="Hunter"/>
        <list gender="1" lookType="268" name="Hunter"/>
    </outfit>

 

    <outfit id="3">
        <list gender="0" lookType="339" name="Mage"/>
        <list gender="1" lookType="412" name="Mage"/>
    </outfit>

 

    <outfit id="4">
        <list gender="0" lookType="261" name="Knight"/>
        <list gender="1" lookType="270" name="Knight"/>
    </outfit>

 

    <outfit id="5">
        <list gender="0" lookType="329" name="Noblewoman"/>
        <list gender="1" lookType="297" name="Nobleman"/>
    </outfit>

 

    <outfit id="6" premium="no">
        <list gender="1" lookType="316" name="Summoner"/>
        <list gender="0" lookType="432" name="Summoner"/>
    </outfit>

 

    <outfit id="7">
        <list gender="0" lookType="139" name="Warrior"/>
        <list gender="1" lookType="134" name="Warrior"/>
    </outfit>
   
    <outfit id="8" premium="no">
        <list gender="1" lookType="436" name="Druid"/>
        <list gender="0" lookType="431" name="Druid"/>
    </outfit>  
   
    <outfit id="9" premium="no">
        <list gender="1" lookType="414" name="Oriental"/>
        <list gender="0" lookType="434" name="Oriental"/>
    </outfit>  

 

    <outfit id="10" premium="no">
        <list gender="1" lookType="435" name="Assassin"/>
        <list gender="0" lookType="437" name="Assassin"/>
    </outfit>
   
    <outfit id="11" premium="yes">
        <list gender="0" lookType="337" name="Guardian"/>
        <list gender="1" lookType="308" name="Guardian"/>
    </outfit>
   
    <outfit id="12" premium="yes">
        <list gender="0" lookType="338" name="Spike Elite"/>
        <list gender="1" lookType="309" name="Spike Elite"/>
    </outfit>
   
    <outfit id="13" premium="yes">
        <list gender="1" lookType="307" name="Mysticelite"/>
        <list gender="0" lookType="336" name="Mysticelite"/>
    </outfit>
   
    <outfit id="14" premium="yes">
        <list gender="1" lookType="411" name="Golden"/>
        <list gender="0" lookType="433" name="Golden"/>
    </outfit>
    <!--
    <outfit id="15" premium="yes">
        <list gender="1" lookType="438" name="Yalahari"/>
        <list gender="0" lookType="439" name="Yalahari"/>
    </outfit>
    -->
</outfits>
 
addons.xml:
 
Spoiler
function onLogin(cid)
if getPlayerStorageValue(cid,8470001) >= 1 then --Summoner Addon
        doPlayerAddOutfit(cid,316, 3)
else
end
if getPlayerStorageValue(cid,8470002) >= 1 then --Golden addon
        doPlayerAddOutfit(cid,411, 3)
        doPlayerAddOutfit(cid,433, 3)
end
if getPlayerStorageValue(cid,8470003) >= 1 then --Oriental Addon
        doPlayerAddOutfit(cid,414, 3)
        doPlayerAddOutfit(cid,434, 3)
end
if getPlayerStorageValue(cid,8470004) >= 1 then -- Druid addon
        doPlayerAddOutfit(cid,436, 3)
        doPlayerAddOutfit(cid,431, 3)
end
if getPlayerStorageValue(cid,8470005) >= 1 then --Assassin addon
        doPlayerAddOutfit(cid,435, 3)
        doPlayerAddOutfit(cid,437, 3)
end
if getPlayerStorageValue(cid,8470010) >= 1 then --Mage male 1/summoner female 2
        doPlayerAddOutfit(cid,432, 2)
                doPlayerAddOutfit(cid,412, 1)
end
if getPlayerStorageValue(cid,8470006) >= 1 then --Mage female addon
        doPlayerAddOutfit(cid,339, 3)
end
if getPlayerStorageValue(cid,8470011) >= 1 then --summoner female 1 addon
        doPlayerAddOutfit(cid,432, 1)
end
if getPlayerStorageValue(cid,8470012) >= 1 then --Mage addon 2 female
                doPlayerAddOutfit(cid,412, 2)
end
if getPlayerStorageValue(cid,8470013) >= 1 then --Warrior addon
                doPlayerAddOutfit(cid,440, 3)
                doPlayerAddOutfit(cid,443, 3)
end
return true
end

 

Desde já agradeço demais a atenção!!

Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...