Ir para conteúdo
  • 0

Outfit Script


shadowbi

Pergunta

O pedido é o seguinte, cada outfit tem sua vocação, ex: se eu sou Knight e coloco a outfit citizen, minha vocação muda para Knight Citizen, coloquei a outfit druid, minha vocação muda para Knight Druid.

 

Se alguem puder ajudar, agradeço!

Link para o comentário
Compartilhar em outros sites

13 respostass a esta questão

Posts Recomendados

  • 0

Não notle2012 , não quero que cada vocação tem sua própria outfit, quero que cada outfit de uma "promotion", como dito acima, se sou Knight e estou usando a outfit Barbarian, então minha vocação vira Knight Barbarian, e assim com todas as outfits.

Link para o comentário
Compartilhar em outros sites

  • 0

entedi :)

vai em

data\creaturescripts\scripts\nomedoarquivo.lua

-- config by uotl£
local outfits =
{
    [128] = {vocation = 1,msg = "frase-aqui-1"},
    [129] = {vocation = 2,msg = "frase-aqui-2"},
    [130] = {vocation = 3,msg = "frase-aqui-3"},
    [131] = {vocation = 4,msg = "frase-aqui-4"},
}
-- config by uotl£

function onOutfit(cid, old, current)
    for sinal, valor in pairs (outfits) do
        if (getCreatureOutfit(cid).lookType) == sinal then
            doPlayerSetVocation(cid,valor.vocation)
            doPlayerSendTextMessage(cid, 22, ""..valor.msg.."")
            return true
        end
    end
    doPlayerSendTextMessage(cid, 22, "frase quando usa uma outfit q não tem promotion")
    return true
end 

creaturescripts.xml

<event type="outfit" name="nomedoarquivo" event="script" value="nomedoarquivo.lua"/>

login.lua

registerCreatureEvent(cid, "nomedoarquivo")

para editar

[128] --- aqui é outfit que player tem que ter

vocation = 1 -- aqui e vocation em id

msg = "frase-aqui-1 -- aqui e frase

 

e por fim me diz vc quer q

sempre que troca de outfit muda a vocation ou só uma vez?

Editado por notle2012
Link para o comentário
Compartilhar em outros sites

  • 0

Testei, mas tem um problema, ele muda a vocação até ai tudo bem mas ele não sabe que eu sou knight, dai ele muda pra vocação errada, entende? se sou Knight ele vira Knight BLABLA, etc. Se tem como você arrumar.

 

 

 

OBS: usando a outfit citizen só Knight vira Knight Citizen e o Druid usando Citizen ele vira Druid Citizen.

Editado por shadowbi
Link para o comentário
Compartilhar em outros sites

  • 0


<?xml version="1.0" encoding="UTF-8" ?>

- <vocations>

- <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="900" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0" />

</vocation>

- <vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="25" gainmanaticks="3" gainmanaamount="35" manamultiplier="1.1" attackspeed="900" soulmax="100" gainsoulticks="120" fromvoc="1">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0" />

</vocation>

- <vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="25" gainmanaticks="3" gainmanaamount="35" manamultiplier="1.1" attackspeed="900" soulmax="100" gainsoulticks="120" fromvoc="2">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0" />

</vocation>

- <vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="30" gainmanaticks="4" gainmanaamount="25" manamultiplier="1.4" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="3">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0" />

</vocation>

- <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="45" gainmanaticks="6" gainmanaamount="15" manamultiplier="3.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="4">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0" />

</vocation>

- <vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="60" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="400" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0" />

</vocation>

- <vocation id="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="60" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="400" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0" />

</vocation>

- <vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="75" gainmanaticks="3" gainmanaamount="65" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0" />

</vocation>

- <vocation id="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="150" gainmanaticks="4" gainmanaamount="40" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0" />

</vocation>

- <vocation id="9" name="Dark Sorcerer" description="an epic master sorcerer" needpremium="1" gaincap="10" gainhp="10" gainmana="50" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="400" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0" />

</vocation>

- <vocation id="10" name="Dark Druid" description="an epic elder druid" needpremium="1" gaincap="10" gainhp="10" gainmana="50" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="400" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0" />

</vocation>

- <vocation id="11" name="Dark Paladin" description="an epic royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0" />

</vocation>

- <vocation id="12" name="Dark Knight" description="an epic elite knight" needpremium="1" gaincap="50" gainhp="20" gainmana="10" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" />

<skill fist="1.1" club="1.0" sword="1.0" axe="1.0" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0" />

</vocation>

</vocations>

Link para o comentário
Compartilhar em outros sites

  • 0
-- config by uotl£
local outfits = {
    
    {vocation = {1,8},fits=128, msg = "parabéns de [Sorcerer] para [Citizen Sorcerer]"},
    {vocation = {5,4},fits=128, msg = "parabéns de [Master Sorcerer] para [Citizen Sorcerer]"},
    {vocation = {2,8},fits=128, msg = "parabéns de [Druid] para [Citizen Druid]"},
    {vocation = {6,4},fits=128, msg = "parabéns de [Elder Druid] para [Citizen Druid]"},
    {vocation = {3,8},fits=128, msg = "parabéns de [Paladin] para [Citizen Paladin]"},
    {vocation = {7,4},fits=128, msg = "parabéns de [Royal Paladin] para [Citizen Paladin]"},
    {vocation = {4,8},fits=128, msg = "parabéns de [Knight] para [Citizen Knight]"},
    {vocation = {8,4},fits=128, msg = "parabéns de [Elite Knight] para [Citizen Knight]"},
    
}
-- config by uotl£
function onOutfit(cid, old, current)
    onCheckVocation (cid)
    if isPlayer(cid) == true then
        local ANTES = getPlayerStorageValue(cid, 1598520)
        for i = 1,#outfits do
            if (getCreatureOutfit(cid).lookType) == outfits[i].fits then
                if getPlayerVocation(cid) == outfits[i].vocation[1] then
                    setPlayerStorageValue(cid,1598520,outfits[i].vocation[1])
                    doPlayerSetVocation(cid, getPlayerVocation(cid)+outfits[i].vocation[2])
                    doPlayerSendTextMessage(cid, 22, ""..outfits[i].msg.."")
                    return true
                end
            end
        end
        doPlayerSetVocation(cid,ANTES)
        return true
    end
end

function onCheckVocation (cid)
    if isPlayer(cid) == true then
        if getPlayerStorageValue(cid, 1598520) == -1 then
            setPlayerStorageValue(cid,1598520,getPlayerVocation(cid))
        end
        return true
    end
end

vocation.xml usa esse

<?xml version="1.0" encoding="UTF-8"?>
<vocations>
- <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="900" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0" /> 
  </vocation>
- <vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="25" gainmanaticks="3" gainmanaamount="35" manamultiplier="1.1" attackspeed="900" soulmax="100" gainsoulticks="120" fromvoc="1">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0" /> 
  </vocation>
- <vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="25" gainmanaticks="3" gainmanaamount="35" manamultiplier="1.1" attackspeed="900" soulmax="100" gainsoulticks="120" fromvoc="2">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0" /> 
  </vocation>
- <vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="30" gainmanaticks="4" gainmanaamount="25" manamultiplier="1.4" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="3">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0" /> 
  </vocation>
- <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="45" gainmanaticks="6" gainmanaamount="15" manamultiplier="3.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="4">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0" /> 
  </vocation>
- <vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="60" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="400" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0" /> 
  </vocation>
- <vocation id="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="60" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="400" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0" /> 
  </vocation>
- <vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="75" gainmanaticks="3" gainmanaamount="65" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0" /> 
  </vocation>
- <vocation id="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="150" gainmanaticks="4" gainmanaamount="40" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0" /> 
  </vocation>
- <vocation id="9" name="Citizen Sorcerer" description="an citizen sorcerer" needpremium="1" gaincap="10" gainhp="10" gainmana="50" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="400" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0" /> 
  </vocation>
- <vocation id="10" name="Citizen Druid" description="an citizen druid" needpremium="1" gaincap="10" gainhp="10" gainmana="50" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="400" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0" /> 
  </vocation>
- <vocation id="11" name="Citizen Paladin" description="an citizen paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0" /> 
  </vocation>
- <vocation id="12" name="Citizen Knight" description="an citizen knight" needpremium="1" gaincap="50" gainhp="20" gainmana="10" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50">
  <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0" /> 
  <skill fist="1.1" club="1.0" sword="1.0" axe="1.0" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0" /> 
  </vocation>
</vocations>

Link para o comentário
Compartilhar em outros sites

  • 0

Quero reabrir o tópico, percebi um erro no script, era para mudar a vocação quando eu colocasse a outfit Citizen, mas muda a vocação quando eu retiro a outfit Citizen.

 

 

 

REABRA O TÓPICO!

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...