Ir para conteúdo
  • 0

Pedido, Comando E Quest Que Reseta Vocation Se Tiver Tal Lvl


churupetinha

Pergunta

Ola galera eu gostaria de fazer 9 pedidos

6- comandos

3-quests

Explicaçao: meu ot tem as seguintes vocations como pode ver aki em baixo os ids e os nomes delas, o que eu gostaria de pedir e 6 comando que reseta a vocation se o player tiver a vocatino certa e o lvl cetos para reseta, apos a reseta alguma vocations dexa o playe um serto lvl, leiam aki em baixo e entenderam melhor :D

 

1-Sorcerer

2-Druid

3-Paladin

4-Knight

5-Mixed Assassin

6-Spin Assassin

7-Sacred Martyr

8-Lonely Star

9-Falling Star

10-Hellborn Deathdriver

11-Supreme Hellborn deathdrive

12-Apocalypse Deathbringer

13-Nova Hero.

Ae estar minha vocation o que eu quero e 6 comando que seja assim ...

 

Mixed Assassin:

 

Se eu for kina,druid,pali ou sorc... e o player falar !mixedpromo quando tiver lvl 10k+ ele vai resetar para o lvl 8 e fica na vocation numero 5 que e a mixed Assasin.

 

Spin Assassin:

 

Ae quando o player chegar no lvl 60k+ ele vai falar !spinpromo ele ira reseta para o lvl 8 e fica na vocation numero 6 que e a spin assassin...

 

Sacred Martyr:

 

Ae quando o player chegar no lvl 95k+ ele vai falar !sacredpromo ele ira reseta e vai valtar para o lvl 30k..

Obs... O playe so Pode reseta as vication mixed para spin se ele for a vocation mixed.e ele so pode reseta para a vocation sacred so se ele for spin...

 

Quests

 

Agora parte da quest que reseta vocation se tiver lvl permitido

 

Lonely Star:

 

O player so pode resetar para essa vocation se ele fizer a quest com a vocation Sacred Maryr com lvl 160k+ .

Apos a resetar o player trocarar de vocation e ficarar com o lvl 30k.

 

Falling Star:

 

O player so pode resetar para essa vocation se ele fizer a quest com a vocation Lonely Star Com lvl 130k+.

Apos a resetar o player trocarar de vocation e ficarar com o lvl 90k.

 

Hellborn Deathdriver:

 

O plaeyr so pode resetar para essa vocation se ele fizer a quest com a vocation Falling Star com lvl 250k+.

Apos a resetar o player trocarar de vocation e ficarar com o lvl 90k.

 

Para as outras vocation como a :

Superme Hellborn Deathdriver.

Apocalypse Deathbringer.

Nova Hero.

 

Vai ser por Comando.

Explicaçao:

 

Supreme Hellborn Deathdriver:

O player so pode resetar para essa vocation se ele tiver com a vocation Hellborn Deathdriver e tiver lvl 310k+.

Para o player resetar ele tenque falar !supremepromo.

 

Apocalypse Deathbringer:

O player so pode resetar para essa vocation se ele tiver com a vocation Supreme Hellborn Deathdriver e tiver lvl 550k+.

Para o player resetar ele tenque falar !forgottenpromo.

 

Nova Hero:

O player so pode resetar para essa vocation se ele tiver com a vocation Apocalypse Deathbringer e tiver lvl 715k+.

Para O player resetar ele tenque falar !novapromo.

 

Mano Se Vc Fizer Esses Script Agradeço muito msm mano!

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

Posts Recomendados

  • 0

--[[ SCRIPTING> MarcelloMkez <scriptING ]]

    --[[  [Advanced Reset System]
                  Autor: MarcelloMkez
                  Versão: 1.0
                  TFS: 0.3.6
                  Testado em: 8.50
                  Fórum: www.xtibia.com/forum/topic/138026-talk-action-advanced-reset-system/

    [Características]
           ~ Versão 1.0 ~

          - Resets no Look;  
          - Premium Account ou não;
          - Mudar Vocação;
          - Limite de Resets;
          - Opções para Abilitar e Desabilitar Condições;

        [Em Construção]

      - Stages Free e Premium; 
      - 'Talvez' um novo sistema de mudar Vocação;
          sem data para postagem.   ]]



   function onSay(cid, words, param)

--[Configurações de Condição]__

   config = {                                                                             --[[verdadeiro / Falso]]

     needPa = false,                   -- Precisa de Premium Account?                          [true / false]
     needPz = true,                    -- Precisa estar em Protection Zone?                    [true / false]      
     battle = false,                   -- Precisa estar sem Batlle para Resetar?               [true / false]
     withe = false,                    -- Players PK Withe pode Resetar?                       [true / false]       
     red = false,                      -- Players PK Red pode Resetar?                         [true / false]
     tp = true,                        -- Teleportar para o Templo após o reset?               [true / false]
     look = true,                      -- Mostrar Resets no Look do Player?                    [true / false]
     addLimite = false,                -- Abilitar Limite de Resets?                           [true / false]
     setClasse = true,                 -- Mudar Vocação do player quando resetar?              [true / false]
     storage = 2310,                   -- Storage                                                 [valor]


--[Configurações do Reset]__ 

             resetStatus = {    

             player = getPlayerGUID(cid),        -- Não Mude.
             lvl = 350 ,                         -- Level Necessário para Resetar.                                 [valor]
             lvlreset = 8,                       -- Level que retornará após o Reset.                              [valor]
             limite = 114,                       -- Máximo de resets que um player pode chegar.                    [valor]
             newClasse = 1,                      -- Id da Nova Vocação após o Reset.                               [valor]
             tempo= 5                            -- Tempo para o Player deslogar para Resetar. Em segundos.        [valor]
       },
   }   

--[Funções]__

                  function Reseting(cid)
            resets = getResets(cid)
                 setPlayerStorageValue(cid,config.storage,resets+1)
                  doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
                    doPlayerSetVocation(cid, config.resetStatus.newClasse)
                    doRemoveCreature(cid)
                   db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
                        db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
                         return TRUE
           end

                   function noAll(cid)
                  resets = getResets(cid)
                    setPlayerStorageValue(cid,config.storage,resets+1)
                    doRemoveCreature(cid)
                    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
                        db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
                return TRUE
               end

                       function noTeleporting(cid)
                      resets = getResets(cid)
                        setPlayerStorageValue(cid,config.storage,resets+1)
                         doPlayerSetVocation(cid, config.resetStatus.newClasse)
                        doRemoveCreature(cid)
                      db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
                        db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
            return TRUE
           end

                       function noLook(cid)
                      resets = getResets(cid)
                        setPlayerStorageValue(cid,config.storage,resets+1)
                        doPlayerSetVocation(cid, config.resetStatus.newClasse)
                        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
                        doRemoveCreature(cid)
                    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
                        db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
            return TRUE
           end

                       function noClasse(cid)
                     resets = getResets(cid)
                        setPlayerStorageValue(cid,config.storage,resets+1)
                        doTeleportThing(cid,   getTownTemplePosition(getPlayerTown(cid)))
                        doRemoveCreature(cid)
                       db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
                        db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
                         return TRUE
           end

                       function setClasse(cid)
                        resets = getResets(cid)
                        setPlayerStorageValue(cid,config.storage,resets+1)
                        doPlayerSetVocation(cid, config.resetStatus.newClasse)                  
                        doRemoveCreature(cid)
                       db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
                        db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
                         return TRUE
           end

                       function look(cid)
            resets = getResets(cid)
                        setPlayerStorageValue(cid,config.storage,resets+1)
                        doRemoveCreature(cid)
                      db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
                        db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
                         return TRUE
           end

                       function teleporting(cid)
            resets = getResets(cid)
                        setPlayerStorageValue(cid,config.storage,resets+1)
                        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
                        doRemoveCreature(cid)
            db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
                        db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
                         return TRUE
           end

                 function getResets(cid)
           resets = getPlayerStorageValue(cid,config.storage)

              if resets < 0 then
            resets = 0
          end
           return resets

       end


   local resets = getResets(cid)
   local needLvl ="Você precisa de "..config.resetStatus.lvl-getPlayerLevel(cid).." level's para resetar."
   local msg ="~~[Reset: "..getResets(cid).."]~~ 'Sucesso ao Resetar!  Você será deslogado em "..config.resetStatus.tempo.." Segundos."


 --[Condiçoes]__       

 if(config.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
  doPlayerSendTextMessage(cid,22,"Você Precisa estar em Protection Zone Para Resetar.")
   return TRUE

   elseif(config.addLimite == true) and (getResets(cid) == config.resetStatus.limite) then
       doPlayerSendTextMessage(cid, 22, "Você ja atingiu o Limite de Resets.")
   return TRUE

       elseif(config.withe == false) and (getCreatureSkullType(cid) == 3) then
    doPlayerSendTextMessage(cid,22,"Você ta PK White, por isso não pode resetar.")
   return TRUE

   elseif(config.red == false) and (getCreatureSkullType(cid) == 4) then
    doPlayerSendTextMessage(cid,22,"Você ta PK Red, por isso não pode resetar.")
    return TRUE

   elseif(config.needPa == true) and not isPremium(cid) then
    doPlayerSendTextMessage(cid,22,"Você Precisa ser Premium Account para Resetar.")
    return TRUE

   elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
    doPlayerSendTextMessage(cid,22,"Você Precisa estar sem Battle para Resetar.")      
   return TRUE 

       elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == true) then
         addEvent(Reseting, config.resetStatus.tempo* 1000, cid)

       elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == false) then 
        addEvent(noAll, config.resetStatus.tempo* 1000, cid)

       elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == true) then
         addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid)

       elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == true) then
         addEvent(noLook, config.resetStatus.tempo* 1000, cid)

       elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == false) then
          addEvent(noClasse, config.resetStatus.tempo* 1000, cid)

       elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == true) then
          addEvent(setClasse, config.resetStatus.tempo* 1000, cid)

       elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == false) then
          addEvent(look, config.resetStatus.tempo* 1000, cid)

       elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == false) then
          addEvent(teleporting, config.resetStatus.tempo* 1000, cid)

   elseif doPlayerSendCancel(cid, needLvl) then
      doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
          return TRUE
   end

       if doPlayerPopupFYI(cid, msg) then

       end
       return TRUE

end

--[by: MarcelloMkez]__

 

Utilize esse script feito pelo marcello , acho que dá pra ajudar um pouco ..

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

  • 0

mano vlw pela sua ajuda mas nao e esse que eu quero ...

o que eu quero e assim...

se o player for (kina,druid,pali ou sorc)ele pode reseta para a vocation que eu vou por

esse script ele so reseta se o player for uma vocation

 

lol eu sei que nao e obrigado a responder o topico mas ajuda com alguma coisa ae pf

Link para o comentário
Compartilhar em outros sites

  • 0

Me matei um pokin pra faze esse script, mais ta aew a parte que eu fiz pelo menos. Fiz apenas a parte de talkactions que é mais a minha aréa, dae a parte das quest's tens que encontrar outro scripter pra faze pra ti.

 

Vai em "data/talkactions/talkactions.xml" e poem a tag:

<talkaction words="!reset" script="reset.lua"/>

 

Agora entre na pasta "talkactions/scripts" duplique algum arquivo dessa pasta e renomeie para "reset" sem as aspas, e nele cole:

-- <Script by jhon992> --
function onSay(cid, words, param, channel)

if (param ~= "mixedpromo" and param ~= "spinpromo" and param ~= "sacredpromo" and param ~= "supremepromo" and param ~= "forgottenpromo" and param ~= "novapromo") then
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Incorrect parameter.")
 return TRUE
end

local config = {
mixedlvl = 10000, -- level para resetar mixed
spinlvl = 60000, -- level para resetar spin
sacredlvl = 95000, -- level para resetar sacred
supremelvl = 310000, -- level para resetar supreme
forgottenlvl = 550000, -- level para resetar forgotten
novalvl = 715000, -- level para resetar nova
vocationMixed = 5, -- id vocação mixed
vocationSpin = 6, -- id vocação spin
vocationSacred = 7,  -- id vocação sacred
vocationSupreme = 11, -- id vocação supreme
vocationForgotten = 12, -- id vocação forgotten
vocationNova = 13,  -- id vocação nova			  
lvlreset = 8, -- level apos resetar primeiras vocações
lvlSacred = 30000, -- level apos resetar vocação sacred
lvlNew = 100000, -- level apos resetar útimas 3 vocações
player = getPlayerGUID(cid),  -- não mexa!
pz = "no", -- players precisam estar em protection zone para usar? ("yes" or "no").
battle = "yes", -- players deve estar sem battle ("yes" or "no")
premium = "no" -- se precisa ser premium account ("yes" or "no")
}

if(config.pz == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You should be in the protection zone for use.")
  return TRUE
end

if(config.premium == "yes") and (not isPremium(cid)) then
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Only players with premium account can use.")
  return TRUE
end

if(config.battle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You can not use in battle.")
  return TRUE
end

if (param == "mixedpromo") then
  if (getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 4) then
    if (getPlayerLevel(cid) >= config.mixedlvl) then
     doPlayerSetVocation(cid, config.vocationMixed)
     doRemoveCreature(cid)
     db.executeQuery("UPDATE `players` SET `level` = "..config.lvlreset..", `experience` = 0 WHERE `id` = "..config.player)
     return TRUE
    else
     doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.mixedlvl..".")
     return TRUE
    end
  else
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
    return TRUE
  end
end

if (param == "spinpromo") then
  if (getPlayerVocation(cid) == 5) then
  if (getPlayerLevel(cid) >= config.spinlvl) then
    doPlayerSetVocation(cid, config.vocationSpin)
          doRemoveCreature(cid)
          db.executeQuery("UPDATE `players` SET `level` = "..config.lvlreset..", `experience` = 0 WHERE `id` = "..config.player)
          else
     doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.spinlvl..".")
     return TRUE
    end
  else
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
    return TRUE
  end
end

if (param == "sacredpromo") then
  if (getPlayerVocation(cid) == 6) then
  if (getPlayerLevel(cid) >= config.sacredlvl) then
    doPlayerSetVocation(cid, config.vocationSacred)
          doRemoveCreature(cid)
          db.executeQuery("UPDATE `players` SET `level` = "..config.lvlSacred..", `experience` = 0 WHERE `id` = "..config.player)
          else
     doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.sacredlvl..".")
     return TRUE
    end
  else
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
    return TRUE
  end
end

if (param == "supremepromo") then
  if (getPlayerVocation(cid) == 10) then
    if (getPlayerLevel(cid) >= config.supremedlvl) then
     doPlayerSetVocation(cid, config.vocationSupreme)
     doRemoveCreature(cid)
     db.executeQuery("UPDATE `players` SET `level` = "..config.lvlNew..", `experience` = 0 WHERE `id` = "..config.player)
     else
     doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.supremelvl..".")
     return TRUE
    end
  else
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
    return TRUE
  end
  end

if (param == "forgottenpromo") then
  if (getPlayerVocation(cid) == 11) then
  if (getPlayerLevel(cid) >= config.forgottenlvl) then
    doPlayerSetVocation(cid, config.vocationForgotten)
          doRemoveCreature(cid)
          db.executeQuery("UPDATE `players` SET `level` = "..config.lvlNew..", `experience` = 0 WHERE `id` = "..config.player)
          else
     doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.forgottenlvl..".")
     return TRUE
    end
  else
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
    return TRUE
  end
end

if (param == "novapromo") then
  if (getPlayerVocation(cid) == 12) then
  if (getPlayerLevel(cid) >= config.novalvl) then
    doPlayerSetVocation(cid, config.vocationNova)
          doRemoveCreature(cid)
          db.executeQuery("UPDATE `players` SET `level` = "..config.lvlNew..", `experience` = 0 WHERE `id` = "..config.player)
          else
     doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.novalvl..".")
     return TRUE
    end
  else
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
    return TRUE
  end
end

return TRUE
end

 

Deixei bem configurável pra você configurar como se achar melhor.

Explicando como funciona:

Resolvi fazer tudo em um script só, então não tinha como eu por para identificar apenas aqueles parâmetros que tu queria, se eu fizesse daquele jeito teria que fazer vários scripts diferentes.

Então vai funcionar da seguinte forma, tens que falar "!reset mixedpromo" ou "!reset spinpromo" sem as aspas, e assim por diante.

 

Espero ter te ajudado um pouco, e é isso aew! smile_positivo.gif

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

  • 0

cara quando eu falo !reset spinpromo e reseto quando eu do look no meu char fala que ele ta mixed ainda aruma ai ne vei

mas tirando isso ta perfeito seu script

Link para o comentário
Compartilhar em outros sites

  • 0

Me matei um pokin pra faze esse script, mais ta aew a parte que eu fiz pelo menos. Fiz apenas a parte de talkactions que é mais a minha aréa, dae a parte das quest's tens que encontrar outro scripter pra faze pra ti.

 

Vai em "data/talkactions/talkactions.xml" e poem a tag:

<talkaction words="!reset" script="reset.lua"/>

 

Agora entre na pasta "talkactions/scripts" duplique algum arquivo dessa pasta e renomeie para "reset" sem as aspas, e nele cole:

-- <Script by jhon992> --
function onSay(cid, words, param, channel)

if (param ~= "mixedpromo" and param ~= "spinpromo" and param ~= "sacredpromo" and param ~= "supremepromo" and param ~= "forgottenpromo" and param ~= "novapromo") then
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Incorrect parameter.")
 return TRUE
end

local config = {
mixedlvl = 10000, -- level para resetar mixed
spinlvl = 60000, -- level para resetar spin
sacredlvl = 95000, -- level para resetar sacred
supremelvl = 310000, -- level para resetar supreme
forgottenlvl = 550000, -- level para resetar forgotten
novalvl = 715000, -- level para resetar nova
vocationMixed = 5, -- id vocação mixed
vocationSpin = 6, -- id vocação spin
vocationSacred = 7,  -- id vocação sacred
vocationSupreme = 11, -- id vocação supreme
vocationForgotten = 12, -- id vocação forgotten
vocationNova = 13,  -- id vocação nova			  
lvlreset = 8, -- level apos resetar primeiras vocações
lvlSacred = 30000, -- level apos resetar vocação sacred
lvlNew = 100000, -- level apos resetar útimas 3 vocações
player = getPlayerGUID(cid),  -- não mexa!
pz = "no", -- players precisam estar em protection zone para usar? ("yes" or "no").
battle = "yes", -- players deve estar sem battle ("yes" or "no")
premium = "no" -- se precisa ser premium account ("yes" or "no")
}

if(config.pz == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You should be in the protection zone for use.")
  return TRUE
end

if(config.premium == "yes") and (not isPremium(cid)) then
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Only players with premium account can use.")
  return TRUE
end

if(config.battle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You can not use in battle.")
  return TRUE
end

if (param == "mixedpromo") then
  if (getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 4) then
 if (getPlayerLevel(cid) >= config.mixedlvl) then
  doPlayerSetVocation(cid, config.vocationMixed)
  doRemoveCreature(cid)
  db.executeQuery("UPDATE `players` SET `level` = "..config.lvlreset..", `experience` = 0 WHERE `id` = "..config.player)
  return TRUE
 else
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.mixedlvl..".")
  return TRUE
 end
  else
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
 return TRUE
  end
end

if (param == "spinpromo") then
  if (getPlayerVocation(cid) == 5) then
  if (getPlayerLevel(cid) >= config.spinlvl) then
 doPlayerSetVocation(cid, config.vocationSpin)
	   doRemoveCreature(cid)
	   db.executeQuery("UPDATE `players` SET `level` = "..config.lvlreset..", `experience` = 0 WHERE `id` = "..config.player)
	   else
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.spinlvl..".")
  return TRUE
 end
  else
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
 return TRUE
  end
end

if (param == "sacredpromo") then
  if (getPlayerVocation(cid) == 6) then
  if (getPlayerLevel(cid) >= config.sacredlvl) then
 doPlayerSetVocation(cid, config.vocationSacred)
	   doRemoveCreature(cid)
	   db.executeQuery("UPDATE `players` SET `level` = "..config.lvlSacred..", `experience` = 0 WHERE `id` = "..config.player)
	   else
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.sacredlvl..".")
  return TRUE
 end
  else
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
 return TRUE
  end
end

if (param == "supremepromo") then
  if (getPlayerVocation(cid) == 10) then
 if (getPlayerLevel(cid) >= config.supremedlvl) then
  doPlayerSetVocation(cid, config.vocationSupreme)
  doRemoveCreature(cid)
  db.executeQuery("UPDATE `players` SET `level` = "..config.lvlNew..", `experience` = 0 WHERE `id` = "..config.player)
  else
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.supremelvl..".")
  return TRUE
 end
  else
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
 return TRUE
  end
  end

if (param == "forgottenpromo") then
  if (getPlayerVocation(cid) == 11) then
  if (getPlayerLevel(cid) >= config.forgottenlvl) then
 doPlayerSetVocation(cid, config.vocationForgotten)
	   doRemoveCreature(cid)
	   db.executeQuery("UPDATE `players` SET `level` = "..config.lvlNew..", `experience` = 0 WHERE `id` = "..config.player)
	   else
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.forgottenlvl..".")
  return TRUE
 end
  else
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
 return TRUE
  end
end

if (param == "novapromo") then
  if (getPlayerVocation(cid) == 12) then
  if (getPlayerLevel(cid) >= config.novalvl) then
 doPlayerSetVocation(cid, config.vocationNova)
	   doRemoveCreature(cid)
	   db.executeQuery("UPDATE `players` SET `level` = "..config.lvlNew..", `experience` = 0 WHERE `id` = "..config.player)
	   else
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.novalvl..".")
  return TRUE
 end
  else
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
 return TRUE
  end
end

return TRUE
end

 

Deixei bem configurável pra você configurar como se achar melhor.

Explicando como funciona:

Resolvi fazer tudo em um script só, então não tinha como eu por para identificar apenas aqueles parâmetros que tu queria, se eu fizesse daquele jeito teria que fazer vários scripts diferentes.

Então vai funcionar da seguinte forma, tens que falar "!reset mixedpromo" ou "!reset spinpromo" sem as aspas, e assim por diante.

 

Espero ter te ajudado um pouco, e é isso aew! smile_positivo.gif

Me matei um pokin pra faze esse script, mais ta aew a parte que eu fiz pelo menos. Fiz apenas a parte de talkactions que é mais a minha aréa, dae a parte das quest's tens que encontrar outro scripter pra faze pra ti.

 

Vai em "data/talkactions/talkactions.xml" e poem a tag:

<talkaction words="!reset" script="reset.lua"/>

 

Agora entre na pasta "talkactions/scripts" duplique algum arquivo dessa pasta e renomeie para "reset" sem as aspas, e nele cole:

-- <Script by jhon992> --
function onSay(cid, words, param, channel)

if (param ~= "mixedpromo" and param ~= "spinpromo" and param ~= "sacredpromo" and param ~= "supremepromo" and param ~= "forgottenpromo" and param ~= "novapromo") then
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Incorrect parameter.")
 return TRUE
end

local config = {
mixedlvl = 10000, -- level para resetar mixed
spinlvl = 60000, -- level para resetar spin
sacredlvl = 95000, -- level para resetar sacred
supremelvl = 310000, -- level para resetar supreme
forgottenlvl = 550000, -- level para resetar forgotten
novalvl = 715000, -- level para resetar nova
vocationMixed = 5, -- id vocação mixed
vocationSpin = 6, -- id vocação spin
vocationSacred = 7,  -- id vocação sacred
vocationSupreme = 11, -- id vocação supreme
vocationForgotten = 12, -- id vocação forgotten
vocationNova = 13,  -- id vocação nova			  
lvlreset = 8, -- level apos resetar primeiras vocações
lvlSacred = 30000, -- level apos resetar vocação sacred
lvlNew = 100000, -- level apos resetar útimas 3 vocações
player = getPlayerGUID(cid),  -- não mexa!
pz = "no", -- players precisam estar em protection zone para usar? ("yes" or "no").
battle = "yes", -- players deve estar sem battle ("yes" or "no")
premium = "no" -- se precisa ser premium account ("yes" or "no")
}

if(config.pz == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You should be in the protection zone for use.")
  return TRUE
end

if(config.premium == "yes") and (not isPremium(cid)) then
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Only players with premium account can use.")
  return TRUE
end

if(config.battle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You can not use in battle.")
  return TRUE
end

if (param == "mixedpromo") then
  if (getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 4) then
 if (getPlayerLevel(cid) >= config.mixedlvl) then
  doPlayerSetVocation(cid, config.vocationMixed)
  doRemoveCreature(cid)
  db.executeQuery("UPDATE `players` SET `level` = "..config.lvlreset..", `experience` = 0 WHERE `id` = "..config.player)
  return TRUE
 else
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.mixedlvl..".")
  return TRUE
 end
  else
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
 return TRUE
  end
end

if (param == "spinpromo") then
  if (getPlayerVocation(cid) == 5) then
  if (getPlayerLevel(cid) >= config.spinlvl) then
 doPlayerSetVocation(cid, config.vocationSpin)
	   doRemoveCreature(cid)
	   db.executeQuery("UPDATE `players` SET `level` = "..config.lvlreset..", `experience` = 0 WHERE `id` = "..config.player)
	   else
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.spinlvl..".")
  return TRUE
 end
  else
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
 return TRUE
  end
end

if (param == "sacredpromo") then
  if (getPlayerVocation(cid) == 6) then
  if (getPlayerLevel(cid) >= config.sacredlvl) then
 doPlayerSetVocation(cid, config.vocationSacred)
	   doRemoveCreature(cid)
	   db.executeQuery("UPDATE `players` SET `level` = "..config.lvlSacred..", `experience` = 0 WHERE `id` = "..config.player)
	   else
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.sacredlvl..".")
  return TRUE
 end
  else
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
 return TRUE
  end
end

if (param == "supremepromo") then
  if (getPlayerVocation(cid) == 10) then
 if (getPlayerLevel(cid) >= config.supremedlvl) then
  doPlayerSetVocation(cid, config.vocationSupreme)
  doRemoveCreature(cid)
  db.executeQuery("UPDATE `players` SET `level` = "..config.lvlNew..", `experience` = 0 WHERE `id` = "..config.player)
  else
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.supremelvl..".")
  return TRUE
 end
  else
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
 return TRUE
  end
  end

if (param == "forgottenpromo") then
  if (getPlayerVocation(cid) == 11) then
  if (getPlayerLevel(cid) >= config.forgottenlvl) then
 doPlayerSetVocation(cid, config.vocationForgotten)
	   doRemoveCreature(cid)
	   db.executeQuery("UPDATE `players` SET `level` = "..config.lvlNew..", `experience` = 0 WHERE `id` = "..config.player)
	   else
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.forgottenlvl..".")
  return TRUE
 end
  else
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
 return TRUE
  end
end

if (param == "novapromo") then
  if (getPlayerVocation(cid) == 12) then
  if (getPlayerLevel(cid) >= config.novalvl) then
 doPlayerSetVocation(cid, config.vocationNova)
	   doRemoveCreature(cid)
	   db.executeQuery("UPDATE `players` SET `level` = "..config.lvlNew..", `experience` = 0 WHERE `id` = "..config.player)
	   else
  doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You need level "..config.novalvl..".")
  return TRUE
 end
  else
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You don't have vocation for this reset.")
 return TRUE
  end
end

return TRUE
end

 

Deixei bem configurável pra você configurar como se achar melhor.

Explicando como funciona:

Resolvi fazer tudo em um script só, então não tinha como eu por para identificar apenas aqueles parâmetros que tu queria, se eu fizesse daquele jeito teria que fazer vários scripts diferentes.

Então vai funcionar da seguinte forma, tens que falar "!reset mixedpromo" ou "!reset spinpromo" sem as aspas, e assim por diante.

 

Espero ter te ajudado um pouco, e é isso aew! smile_positivo.gif

da pra mim responde?

Link para o comentário
Compartilhar em outros sites

  • 0

axo que e na minha vocation xml se pode ve o erro porfavor?

 

 

 

 

 

<?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="1000" 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" 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="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="1000" 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" 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="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="1000" 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" 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="5" gainmanaticks="4" gainmanaamount="5" 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" 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="5" gainmanaticks="6" gainmanaamount="5" 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" 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="Mixed Assassin" description="a mixed assassin" needpremium="0" gaincap="20" gainhp="25" gainmana="25" gainhpticks="5" gainhpamount="150" gainmanaticks="5" gainmanaamount="150" manamultiplier="2.2" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="0">

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

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

</vocation>

<vocation id="6" name="Spin Assassin" description="a spin assassin" needpremium="0" gaincap="30" gainhp="30" gainmana="30" gainhpticks="3" gainhpamount="260" gainmanaticks="3" gainmanaamount="160" manamultiplier="3.3" attackspeed="1100" soulmax="200" gainsoulticks="15" fromvoc="5">

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

<skill fist="1.3" club="1.3" sword="1.3" axe="1.3" distance="1.3" shielding="1.3" fishing="1.3" experience="1.3"/>

</vocation>

<vocation id="7" name="Sacred Martyr" description="a sacred martyr" needpremium="0" gaincap="40" gainhp="40" gainmana="40" gainhpticks="4" gainhpamount="170" gainmanaticks="4" gainmanaamount="170" manamultiplier="4.4" attackspeed="1200" soulmax="200" gainsoulticks="15" fromvoc="6">

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

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

</vocation>

<vocation id="8" name="Lonely Star" description="a lonely star" needpremium="0" gaincap="50" gainhp="50" gainmana="50" gainhpticks="5" gainhpamount="180" gainmanaticks="5" gainmanaamount="180" manamultiplier="5.5" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="7">

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

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

</vocation>

<vocation id="9" name="Falling Star" description="a falling star" needpremium="0" gaincap="60" gainhp="60" gainmana="60" gainhpticks="6" gainhpamount="190" gainmanaticks="6" gainmanaamount="190" manamultiplier="6.6" attackspeed="1400" soulmax="200" gainsoulticks="15" fromvoc="8">

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

<skill fist="1.6" club="1.6" sword="1.6" axe="1.6" distance="1.6" shielding="1.6" fishing="1.6" experience="1.6"/>

</vocation>

<vocation id="10" name="Hellborn Deathdriver" description="a hellborn deathdriver" needpremium="0" gaincap="70" gainhp="70" gainmana="70" gainhpticks="7" gainhpamount="200" gainmanaticks="7" gainmanaamount="200" manamultiplier="7.7" attackspeed="1500" soulmax="200" gainsoulticks="15" fromvoc="9">

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

<skill fist="1.7" club="1.7" sword="1.7" axe="1.7" distance="1.7" shielding="1.7" fishing="1.7" experience="1.7"/>

</vocation>

<vocation id="11" name="Supreme Hellborn King" description="a supreme hellborn king" needpremium="0" gaincap="80" gainhp="80" gainmana="80" gainhpticks="8" gainhpamount="210" gainmanaticks="8" gainmanaamount="210" manamultiplier="8.8" attackspeed="1600" soulmax="200" gainsoulticks="15" fromvoc="10">

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

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

</vocation>

<vocation id="12" name="Apocalypse Deathbringer" description="a apocalypse deathbringer" needpremium="0" gaincap="90" gainhp="90" gainmana="90" gainhpticks="9" gainhpamount="220" gainmanaticks="9" gainmanaamount="220" manamultiplier="9.9" attackspeed="1700" soulmax="200" gainsoulticks="15" fromvoc="11">

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

<skill fist="1.9" club="1.9" sword="1.9" axe="1.9" distance="1.9" shielding="1.9" fishing="1.9" experience="1.9"/>

</vocation>

<vocation id="13" name="Nova Hero" description="a nova hero" needpremium="0" gaincap="100" gainhp="100" gainmana="100" gainhpticks="10" gainhpamount="230" gainmanaticks="10" gainmanaamount="230" manamultiplier="10.10" attackspeed="1800" soulmax="200" gainsoulticks="15" fromvoc="12">

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

<skill fist="1.10" club="1.10" sword="1.10" axe="1.10" distance="1.10" shielding="1.10" fishing="1.10" experience="1.10"/>

</vocation>

<vocation id="14" name="Addicted Zealot" description="a nova hero" needpremium="1" gaincap="110" gainhp="110" gainmana="110" gainhpticks="11" gainhpamount="240" gainmanaticks="11" gainmanaamount="240" manamultiplier="11.11" attackspeed="1900" soulmax="200" gainsoulticks="15" fromvoc="13">

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

<skill fist="1.11" club="1.11" sword="1.11" axe="1.11" distance="1.11" shielding="1.11" fishing="1.11" experience="1.11"/>

</vocation>

<vocation id="15" name="Addicted Zealot" description="a addicted zealot" needpremium="1" gaincap="110" gainhp="110" gainmana="110" gainhpticks="11" gainhpamount="240" gainmanaticks="11" gainmanaamount="240" manamultiplier="11.11" attackspeed="1900" soulmax="200" gainsoulticks="15" fromvoc="14">

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

<skill fist="1.11" club="1.11" sword="1.11" axe="1.11" distance="1.11" shielding="1.11" fishing="1.11" experience="1.11"/>

</vocation>

</vocations>

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...