Ir para conteúdo

Adriano SwaTT

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    Adriano SwaTT recebeu reputação de AyslaaN em (AJUDA) Como Criar Itens   
    Um desses tutoriais encontrados aqui mesmo no forum lhe ajudará'

    Criando um item de ID própria
    Criar novo item com Sprite já existente
    Adicionando Sprites no Client



    Espero que lhe ajude, caso contrário, contacte-me'

    Abraços & Boa sorte.
  2. Curtir
    Bom dia, venho lhe trazer boas novas, caso não tenha conseguido solucionar seu problema ainda.

    Faça o download deste "DatEditor", clicando no nome do mesmo. (Link direto do forum, postado por Vittu)
    Link do Scan.

    E na hora de abrir seus arquivos "Tibia.dat" e "Tibia.spr" da versão 8.60, estou postando essa observação que provavelmente solucionará seu problema. (funcionou comigo)

    Ao abrir o Dat Editor e clicar em "Open" ou "Ctrl + O" ...
    Abrirá uma janela como a da imagem abaixo:



    Carregue seu arquivo Tibia.dat e Tibia.spr do Tibia 8.60 e onde está "780" ao lado do botão "Open", marque a opção "760".
    Ou seja, quando selecionado a opção 760 é para versões recentes do Tibia, e quando marcado 780 é para versões abaixo de 8.5x'


    Creio que funcionará, caso dê algum erro... contacte-me'

    Abraços & Boa sorte.
  3. Gostei
    Adriano SwaTT recebeu reputação de Sotomayor em (Resolvido)Ring Anti-Paralyze   
    Boa noite, após alguns testes na distro Alissow 0.3.6...
    Segue abaixo:
     
    Primeiramente, precisaremos adicionar um pequeno detalhe à runa paralyze.
    Em spells/scripts/support/paralyze rune.lua, adicione as funções em negrito e ficará como abaixo:



     
    Agora em CreatureScripts.xml, adicione a tag abaixo:

    <event type="combat" name="RingParalyze" event="script" value="ring_paralyze.lua" />  
    Agora o script ring_paralyze.lua terá o script abaixo:



     
    Agora em login.lua, adicione a tag abaixo junto com as do gênero:

    registerCreatureEvent(cid, "RingParalyze")  
    Boa sorte.
    Aguardo retorno se foi útil.
  4. Gostei
    Adriano SwaTT deu reputação a HenriqueFisch13 em [RESOLVIDO] Bug Bless   
    Testado em TFS 0.4
     
    Bem eu tive esse erro no meu otserver 8.60 e depois de um longo tempo descobri o erro, é bem simples
    o erro que vinha acontecendo no meu baiak era, o Player que comprasse bless depois de X mortes ele voltava para o Level 1, sem mas delongas vou explicar o que se deve fazer.
     
    Abra a paste do seu otserver e vá em seuot/data/XML/vocation.xml
     
    em Vocation.XML você deve remover a frase  "word lessloss="30" independente do valor que esteja ali contido, feito isso seu problema foi resolvido.
  5. Obrigado
    Adriano SwaTT recebeu reputação de koyotestark em [NPC] Bank (Igual Tibia Global)   
    Procurei aqui pelo forum, e não achei um NPC de Bank que fosse tão perfeito como este que estou postando...
    Eu mesmo havia postado há alguns dias atrás um NPC de Bank, mas não é tão bom quanto este...

    Detalhes do NPC:
    Executa as funções como do Tibia Global.
    Deposit, Transfer, Withdraw, Change Gold, Change Platinum, Change Crystal...

    Funcionando perfeitamente...
    #Testado'

    Vamos ao que interessa.

    Crie um arquivo chamado "bank.xml" na pasta "data / npc"... Cole o código abaixo dentro do arquivo:
    <?xml version="1.0" encoding="UTF-8"?> <npc name="BankMan" script="data/npc/scripts/bank.lua" walkinterval="25" floorchange="0" access="5" > <health now="150" max="150"/> <look type="132" head="115" body="0" legs="114" feet="0" addons="3" corpse="2212"/> <parameters> <parameter key="message_greet" value="Welcome |PLAYERNAME|! Here, you can {deposit}, {withdraw} or {transfer} your money from your bank account. I can change your coins too."/> <parameter key="message_alreadyfocused" value="You are drunked ? I talk with you."/> <parameter key="message_farewell" value="Goodbye. I wanna see your money... oh you again."/> </parameters> </npc> Salve e feche o arquivo.

    Agora vá na pasta Scripts e crie um arquivo chamado "bank.lua" e cole o código abaixo dentro do mesmo:
     
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid --------------------MESSAGES------------------------------------------------------------------------------ if msgcontains(msg, 'deposit') then selfSay('Please tell me how much gold it is you would like to deposit.', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'withdraw') then selfSay('Please tell me how much gold you would like to withdraw.', cid) talkState[talkUser] = 3 elseif msgcontains(msg, 'transfer') then selfSay('Please tell me the amount of gold coins you would like to transfer.', cid) talkState[talkUser] = 5 elseif msgcontains(msg, 'change gold') then selfSay('How many platinum coins do you want to get?', cid) talkState[talkUser] = 8 elseif msgcontains(msg, 'change platinum') then selfSay('Do you want to change your platinum coins to gold or crystal?', cid) talkState[talkUser] = 10 elseif msgcontains(msg, 'change crystal') then selfSay('How many crystal coins do you want to change to platinum?', cid) talkState[talkUser] = 15 elseif msgcontains(msg, 'balance') then n = getPlayerBalance(cid) selfSay('Your balance are '..n..' golds.', cid) talkState[talkUser] = 0 ----------------------DEPOSIT------------------------------------------------------- elseif talkState[talkUser] == 1 then if msgcontains(msg, 'all') then n = getPlayerMoney(cid) selfSay('Do you want deposit '..n..' golds ?', cid) talkState[talkUser] = 2 else n = getNumber(msg) selfSay('Do you want deposit '..n..' golds ?', cid) talkState[talkUser] = 2 end elseif talkState[talkUser] == 2 then if msgcontains(msg, 'yes') then if getPlayerMoney(cid) >= n then doPlayerDepositMoney(cid,n) selfSay('Sucessfull. Now your balance account is ' ..getPlayerBalance(cid)..' golds.', cid) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) end else selfSay('Ok then', cid) end ----------------------WITHDRAW------------------------------------------------------------------------------------- elseif talkState[talkUser] == 3 then if msgcontains(msg, 'all') then n = getPlayerBalance(cid) selfSay('Do you want withdraw '..n..' golds ?', cid) talkState[talkUser] = 4 else n = getNumber(msg) selfSay('Do you want withdraw '..n..' golds ?', cid) talkState[talkUser] = 4 end elseif talkState[talkUser] == 4 then if msgcontains(msg, 'yes') then if getPlayerBalance(cid) >= n then doPlayerWithdrawMoney(cid, n) selfSay('Here you are, '..n..' gold. Now your balance account is ' ..getPlayerBalance(cid)..' golds.', cid) talkState[talkUser] = 0 else selfSay('There is not enough gold on your account', cid) end else selfSay('Ok then', cid) end ----------------------TRANSFER---------------------------------------------------------------------------------------- elseif talkState[talkUser] == 5 then if msgcontains(msg, 'all') then n = getPlayerBalance(cid) selfSay('Who would you like transfer '..n..' gold to?', cid) talkState[talkUser] = 6 else n = getNumber(msg) selfSay('Who would you like transfer '..n..' gold to?', cid) talkState[talkUser] = 6 end elseif talkState[talkUser] == 6 then p = msg selfSay('So you would like to transfer '..n..' gold to '..p..'?', cid) talkState[talkUser] = 7 elseif talkState[talkUser] == 7 then if msgcontains(msg, 'yes') then if getPlayerBalance(cid) >= n then if doPlayerTransferMoneyTo(cid, p, n) == TRUE then selfSay('You have transferred '..n..' gold to '..p..' and your account balance is '..getPlayerBalance(cid)..' golds.', cid) talkState[talkUser] = 0 else selfSay('This player does not exist. Please tell me a valid name!', cid) talkState[talkUser] = 0 end else selfSay('There is not enough gold on your account', cid) talkState[talkUser] = 0 end else selfSay('Ok then', cid) talkState[talkUser] = 0 end ----------------------CHANGE GOLD--------------------------------------------------------------------------------- elseif talkState[talkUser] == 8 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..b..' of your gold coins to '..n..' platinum coins for you?', cid) talkState[talkUser] = 9 elseif talkState[talkUser] == 9 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2148, b) == TRUE then doPlayerAddItem(cid, 2152, n) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end ---------------------CHANGE PLATINUM------------------------------------------------------------------------- elseif talkState[talkUser] == 10 then if msgcontains(msg, 'gold') then selfSay('How many platinum coins do you want to change to gold?', cid) talkState[talkUser] = 11 elseif msgcontains(msg, 'crystal') then selfSay('How many crystal coins do you want to get?', cid) talkState[talkUser] = 13 end elseif talkState[talkUser] == 11 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..n..' of your platinum coins to '..b..' gold coins for you?', cid) talkState[talkUser] = 12 elseif talkState[talkUser] == 12 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2152, n) == TRUE then doPlayerAddItem(cid, 2148, b) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end elseif talkState[talkUser] == 13 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..b..' of your platinum coins to '..n..' crystal coins for you?', cid) talkState[talkUser] = 14 elseif talkState[talkUser] == 14 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2152, b) == TRUE then doPlayerAddItem(cid, 2160, n) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end ---------------------CHANGE CRYSTAL------------------------------------------------------------------------------- elseif talkState[talkUser] == 15 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..n..' of your crystal coins to '..b..' platinum coins for you?', cid) talkState[talkUser] = 16 elseif talkState[talkUser] == 16 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2160, n) == TRUE then doPlayerAddItem(cid, 2152, b) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -- function maded by Gesior-- function getNumber(txt) --return number if its number and is > 0, else return 0 x = string.gsub(txt,"%a","") x = tonumber(x) if x ~= nill and x > 0 then return x else return 0 end end  
     
     

    Salve o arquivo e feche-o.

    Agora seu NPC está pronto, basta adicioná-lo ao seu mapa usando o Map Editor.
    Espero que seja de utilidade de alguém...

    Créditos: Tibiaa4e (outro forum)
    Pequeno Tuto: Adriano Swatt
     
    Testado em:
    Versões do Client: 8.54 e 8.60.
    Versões da Distro: TFS 3.4.5, TFS 0.4 e Alissow 0.4.1.

    Espero que seja útil.


    Abraços'
  6. Obrigado
    Adriano SwaTT recebeu reputação de juvelino em [NPC] Bank'   
    Bom, aqui nem tem muito oque explicar...
    É um NPC de BANK como todos conhecem'

    Vamos lá...

    1º Passo
    Vá na pasta "Data / NPC", crie um arquivo com o nome de "Banker.xml", abra o arquivo criado e cole o código abaixo dentro.
    Obs: O nome do arquivo pode ser o que desejar, só o que está em azul, ou seja, a extensão, que não pode ser alterada'





    2º Passo
    Dentro da pasta "Scripts", crie um arquivo chamado "bank.lua" e dentro do mesmo cole o código abaixo:



    Salve e feche o arquivo.

    Agora seu NPC está pronto, basta adicioná-lo ao seu mapa usando o Map Editor.
    Espero que seja de utilidade de alguém...

    Abraços e bom uso ae'


    Script feito por: Vodkart
    Alterado por: Adriano Swatt
    Pequeno Tutorial feito por: Adriano Swatt
  7. Gostei
    Adriano SwaTT deu reputação a SuggestName em [Linux] Compilar TFS 1.0 [Fácil]   
    Colar crédito do que ? Ele aprendeu a compilar e ensinou de uma forma bem explicada, As vezes vejo que as pessoas que deviam dar o suporte mais atrapalham do que ajudam,
     
    Por isso não frequente mais forum BR de tibia.
  8. Gostei
    Sinopse - World Of Deads é um jogo MMORPG baseado em um pós apocalipse zumbi, no ano de 2019 um virus conhecido por Genesis Covid, teria se espalhado e devastado toda a terra, e dentro do jogo você irá encontrar vários grupos de sobreviventes, que lutam para sobreviver mediante as circunstância, com a esperança que um dia tudo isso vai acabar.
     
    Quem somos? - Somos amantes de jogos de sobrevivência, tentando sair um pouco do padrão de Naruto, Poketibia, Digimon, Dbo, dentre outros, alguns já conhecem a gente, outros não... já jogamos e conhecemos, alguns Tibia que envolvia zombie, mas hoje em dia nenhum está mais online, e a gente viu que muitos gostam desse estilo de jogo, então decidimos dar inicio ao World OF Deads.
    Nossa equipe é forma no momento apenas por dois integrantes, Sendo um programador e um Mapper.
     
    Programador - Adriano SwaTT @Adriano SwaTT
    Mapper - Gaspar @alaogaspar
     
    Qual base estamos usando? - Estamos usando a TFS 1.3,  100% clean, leve, sem lag... Tudo está sendo criado do zero, Estamos desenvolvedo para PC e Mobile.
     
    Quais sistemas já tem implementado? 
     
    System Pilhagem - Um sistema que te permite vasculhar moveis, lixo, carros e etc, para encontrar itens melhores e se fortalecer. 
    System Real Vision Angle- Sistema onde você só verá os zombies que estão no seu campo de visão de 180°, ou seja se você estiver de costa para um zombie não o verá chegando, a não ser que se vire... colocamos para dar um impacto mais realista no jogo.
    System Real Shot Angle- Uma melhoria no sistema de tiro, feito para ficar mais realista.
    Dentre outros sistemas básico como, armas, recarga e etc, também já estão implementado.
     
    O que está na fila?
    Sistema de construção de abrigo, fortalezas e etc.
    Sistema para dominar abrigos, fortalezas.
    Não irei colocar muita coisa aqui, quaisquer dúvida entrem no nosso discord que está no final do post.
     
     
    Tem vagas para ingressar no projeto ?
    Sim, temos vagas... mas apenas para pessoas acima de 18 anos, com experiencia.
     
    Mapper - 1 Vaga.
    Sprites - 2 Vagas.
    Programador - 1 Vaga.
    Web Master - 1 Vaga.
    Designer - 1 Vaga.
    OTclient Maker - 1 Vaga
     
    Prints do jogo?
     
     
     
    Quer saber mais do projeto? entre no nosso Discord.
    Quer ser parte da equipe? Entre no nosso discord e chamem o ADM no pv.
     
     
    OBRIGADO PELA ATENÇÃO, AGUARDO TODOS VOCÊS NESSA AVENTURA.
     
     
     
      Redes sociais 
     
    Facebook: https://www.facebook.com/worldofdeads
    Discord: https://discord.gg/bcyvzpntPE
     
     
  9. Gostei
    Adriano SwaTT recebeu reputação de chefim em Bloquear Acesso do Account Manager No Site   
    Boa tarde,
     
    Para quem não obteve êxito no bloqueio com o código acima.
     
    No mesmo arquivo, procure por:
    $account_players = $account_logged->getPlayersList();  
    E adicione este abaixo:
    $acc_id = $account_logged->getId(); if($acc_id == 1) die("Está conta está BLOQUEADA."); (Mesmo código só que em lugar diferente pois comigo também não havia funcionado do outro modo)
     
    Salve e teste.
     
    Lembre-se de atualizar a página antes de testar.
     
    Boa sorte.
     
  10. Gostei
    Adriano SwaTT recebeu reputação de Orientalz em (Resolvido)Tile que enxe stamina   
    Teste este:
    Registre em movements.xml as tags abaixo:

    <movevent type="StepIn" actionid="12129" event="script" value="tile_stamina.lua"/>     <movevent type="StepOut" actionid="12129" event="script" value="tile_stamina.lua"/>  
    Crie o arquivo tile_stamina.lua e cole o código abaixo dentro:

    ---------- Script by: Adriano Swatt -------- local maxstamina = 2520  -- quantidade máxima de Stamina (Não sei se é este valor mesmo) local qtdd = 1 -- quantidade de Stamina é adicionada local tempo = 5 -- em segundos para cada regeneração local tileid, action = 412, 12129 -- ID do Piso de Stamina, ActionID usada no Piso ----------- FIM DAS CONFIGURAÇÕES ----------- function onStepIn(cid, item, position, fromPosition) local getpos = getPlayerPosition(cid) local tilepos = getTileItemById(getpos, tileid).actionid local getsta = getPlayerStamina(cid)     if getsta < maxstamina and isPlayer(cid) then         addEvent(GetStamina, 100, cid)     else         doTeleportThing(cid, fromPosition)         doPlayerSendCancel(cid, "Sua stamina já está cheia.")     end return true end function onStepOut(cid, item, position, fromPosition)     stopEvent(GetStamina) return true end function GetStamina(cid) local getpos = getPlayerPosition(cid) local tilepos = getTileItemById(getpos, tileid).actionid local getsta = getPlayerStamina(cid)     if tilepos == action then             if getsta < maxstamina and isPlayer(cid) then             doPlayerSendCancel(cid, "Sua stamina está subindo.")             setPlayerStamina(cid, getsta + qtdd)             addEvent(GetStamina, tempo * 1000, cid)         else             doTeleportThing(cid, fromPosition)             doPlayerSendCancel(cid, "Sua stamina já está cheia.")         end     end return true end  
    Poste o resultado.
    Boa sorte.
  11. Gostei
    Adriano SwaTT recebeu reputação de Gaspar085 em Alguém vivo ainda?   
    Coroi, não fui notificado sobre a marcação.
     
    Eu sou Corretor de Imóveis e eventualmente faço alguns códigos porque ainda amo a área. \o/
     
    Saudades do tempo de programação fiel a Tibia, tenho projetos congelados que devo por em prática ainda este ano.
     
    Abraços a todos.
  12. Gostei
    Adriano SwaTT recebeu reputação de jhonathan wendrell em [NPC] Bank (Igual Tibia Global)   
    Procurei aqui pelo forum, e não achei um NPC de Bank que fosse tão perfeito como este que estou postando...
    Eu mesmo havia postado há alguns dias atrás um NPC de Bank, mas não é tão bom quanto este...

    Detalhes do NPC:
    Executa as funções como do Tibia Global.
    Deposit, Transfer, Withdraw, Change Gold, Change Platinum, Change Crystal...

    Funcionando perfeitamente...
    #Testado'

    Vamos ao que interessa.

    Crie um arquivo chamado "bank.xml" na pasta "data / npc"... Cole o código abaixo dentro do arquivo:
    <?xml version="1.0" encoding="UTF-8"?> <npc name="BankMan" script="data/npc/scripts/bank.lua" walkinterval="25" floorchange="0" access="5" > <health now="150" max="150"/> <look type="132" head="115" body="0" legs="114" feet="0" addons="3" corpse="2212"/> <parameters> <parameter key="message_greet" value="Welcome |PLAYERNAME|! Here, you can {deposit}, {withdraw} or {transfer} your money from your bank account. I can change your coins too."/> <parameter key="message_alreadyfocused" value="You are drunked ? I talk with you."/> <parameter key="message_farewell" value="Goodbye. I wanna see your money... oh you again."/> </parameters> </npc> Salve e feche o arquivo.

    Agora vá na pasta Scripts e crie um arquivo chamado "bank.lua" e cole o código abaixo dentro do mesmo:
     
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid --------------------MESSAGES------------------------------------------------------------------------------ if msgcontains(msg, 'deposit') then selfSay('Please tell me how much gold it is you would like to deposit.', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'withdraw') then selfSay('Please tell me how much gold you would like to withdraw.', cid) talkState[talkUser] = 3 elseif msgcontains(msg, 'transfer') then selfSay('Please tell me the amount of gold coins you would like to transfer.', cid) talkState[talkUser] = 5 elseif msgcontains(msg, 'change gold') then selfSay('How many platinum coins do you want to get?', cid) talkState[talkUser] = 8 elseif msgcontains(msg, 'change platinum') then selfSay('Do you want to change your platinum coins to gold or crystal?', cid) talkState[talkUser] = 10 elseif msgcontains(msg, 'change crystal') then selfSay('How many crystal coins do you want to change to platinum?', cid) talkState[talkUser] = 15 elseif msgcontains(msg, 'balance') then n = getPlayerBalance(cid) selfSay('Your balance are '..n..' golds.', cid) talkState[talkUser] = 0 ----------------------DEPOSIT------------------------------------------------------- elseif talkState[talkUser] == 1 then if msgcontains(msg, 'all') then n = getPlayerMoney(cid) selfSay('Do you want deposit '..n..' golds ?', cid) talkState[talkUser] = 2 else n = getNumber(msg) selfSay('Do you want deposit '..n..' golds ?', cid) talkState[talkUser] = 2 end elseif talkState[talkUser] == 2 then if msgcontains(msg, 'yes') then if getPlayerMoney(cid) >= n then doPlayerDepositMoney(cid,n) selfSay('Sucessfull. Now your balance account is ' ..getPlayerBalance(cid)..' golds.', cid) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) end else selfSay('Ok then', cid) end ----------------------WITHDRAW------------------------------------------------------------------------------------- elseif talkState[talkUser] == 3 then if msgcontains(msg, 'all') then n = getPlayerBalance(cid) selfSay('Do you want withdraw '..n..' golds ?', cid) talkState[talkUser] = 4 else n = getNumber(msg) selfSay('Do you want withdraw '..n..' golds ?', cid) talkState[talkUser] = 4 end elseif talkState[talkUser] == 4 then if msgcontains(msg, 'yes') then if getPlayerBalance(cid) >= n then doPlayerWithdrawMoney(cid, n) selfSay('Here you are, '..n..' gold. Now your balance account is ' ..getPlayerBalance(cid)..' golds.', cid) talkState[talkUser] = 0 else selfSay('There is not enough gold on your account', cid) end else selfSay('Ok then', cid) end ----------------------TRANSFER---------------------------------------------------------------------------------------- elseif talkState[talkUser] == 5 then if msgcontains(msg, 'all') then n = getPlayerBalance(cid) selfSay('Who would you like transfer '..n..' gold to?', cid) talkState[talkUser] = 6 else n = getNumber(msg) selfSay('Who would you like transfer '..n..' gold to?', cid) talkState[talkUser] = 6 end elseif talkState[talkUser] == 6 then p = msg selfSay('So you would like to transfer '..n..' gold to '..p..'?', cid) talkState[talkUser] = 7 elseif talkState[talkUser] == 7 then if msgcontains(msg, 'yes') then if getPlayerBalance(cid) >= n then if doPlayerTransferMoneyTo(cid, p, n) == TRUE then selfSay('You have transferred '..n..' gold to '..p..' and your account balance is '..getPlayerBalance(cid)..' golds.', cid) talkState[talkUser] = 0 else selfSay('This player does not exist. Please tell me a valid name!', cid) talkState[talkUser] = 0 end else selfSay('There is not enough gold on your account', cid) talkState[talkUser] = 0 end else selfSay('Ok then', cid) talkState[talkUser] = 0 end ----------------------CHANGE GOLD--------------------------------------------------------------------------------- elseif talkState[talkUser] == 8 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..b..' of your gold coins to '..n..' platinum coins for you?', cid) talkState[talkUser] = 9 elseif talkState[talkUser] == 9 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2148, b) == TRUE then doPlayerAddItem(cid, 2152, n) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end ---------------------CHANGE PLATINUM------------------------------------------------------------------------- elseif talkState[talkUser] == 10 then if msgcontains(msg, 'gold') then selfSay('How many platinum coins do you want to change to gold?', cid) talkState[talkUser] = 11 elseif msgcontains(msg, 'crystal') then selfSay('How many crystal coins do you want to get?', cid) talkState[talkUser] = 13 end elseif talkState[talkUser] == 11 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..n..' of your platinum coins to '..b..' gold coins for you?', cid) talkState[talkUser] = 12 elseif talkState[talkUser] == 12 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2152, n) == TRUE then doPlayerAddItem(cid, 2148, b) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end elseif talkState[talkUser] == 13 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..b..' of your platinum coins to '..n..' crystal coins for you?', cid) talkState[talkUser] = 14 elseif talkState[talkUser] == 14 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2152, b) == TRUE then doPlayerAddItem(cid, 2160, n) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end ---------------------CHANGE CRYSTAL------------------------------------------------------------------------------- elseif talkState[talkUser] == 15 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..n..' of your crystal coins to '..b..' platinum coins for you?', cid) talkState[talkUser] = 16 elseif talkState[talkUser] == 16 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2160, n) == TRUE then doPlayerAddItem(cid, 2152, b) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -- function maded by Gesior-- function getNumber(txt) --return number if its number and is > 0, else return 0 x = string.gsub(txt,"%a","") x = tonumber(x) if x ~= nill and x > 0 then return x else return 0 end end  
     
     

    Salve o arquivo e feche-o.

    Agora seu NPC está pronto, basta adicioná-lo ao seu mapa usando o Map Editor.
    Espero que seja de utilidade de alguém...

    Créditos: Tibiaa4e (outro forum)
    Pequeno Tuto: Adriano Swatt
     
    Testado em:
    Versões do Client: 8.54 e 8.60.
    Versões da Distro: TFS 3.4.5, TFS 0.4 e Alissow 0.4.1.

    Espero que seja útil.


    Abraços'
  13. Gostei
    Adriano SwaTT recebeu reputação de Alberto Cabrera em Bloquear Acesso do Account Manager No Site   
    Boa tarde,
     
    Para quem não obteve êxito no bloqueio com o código acima.
     
    No mesmo arquivo, procure por:
    $account_players = $account_logged->getPlayersList();  
    E adicione este abaixo:
    $acc_id = $account_logged->getId(); if($acc_id == 1) die("Está conta está BLOQUEADA."); (Mesmo código só que em lugar diferente pois comigo também não havia funcionado do outro modo)
     
    Salve e teste.
     
    Lembre-se de atualizar a página antes de testar.
     
    Boa sorte.
     
  14. Obrigado
    Adriano SwaTT recebeu reputação de eliasferro em [PEDIDO] Clientes: Bio Survive Tibia e CS tibia   
    Boa noite, postei recentemente para download o Bio Hazard em Tibia, então vou lhes fornecer também:
     
    Bio Survive Download



     
     
    CS Tibia v2.0 [by: Roksas] Download



     
    Pronto, ambos postados.
    Boa sorte com seus Projetos.
  15. Curtir
    Adriano SwaTT recebeu reputação de Lurk em [NPC] Bank (Igual Tibia Global)   
    Procurei aqui pelo forum, e não achei um NPC de Bank que fosse tão perfeito como este que estou postando...
    Eu mesmo havia postado há alguns dias atrás um NPC de Bank, mas não é tão bom quanto este...

    Detalhes do NPC:
    Executa as funções como do Tibia Global.
    Deposit, Transfer, Withdraw, Change Gold, Change Platinum, Change Crystal...

    Funcionando perfeitamente...
    #Testado'

    Vamos ao que interessa.

    Crie um arquivo chamado "bank.xml" na pasta "data / npc"... Cole o código abaixo dentro do arquivo:
    <?xml version="1.0" encoding="UTF-8"?> <npc name="BankMan" script="data/npc/scripts/bank.lua" walkinterval="25" floorchange="0" access="5" > <health now="150" max="150"/> <look type="132" head="115" body="0" legs="114" feet="0" addons="3" corpse="2212"/> <parameters> <parameter key="message_greet" value="Welcome |PLAYERNAME|! Here, you can {deposit}, {withdraw} or {transfer} your money from your bank account. I can change your coins too."/> <parameter key="message_alreadyfocused" value="You are drunked ? I talk with you."/> <parameter key="message_farewell" value="Goodbye. I wanna see your money... oh you again."/> </parameters> </npc> Salve e feche o arquivo.

    Agora vá na pasta Scripts e crie um arquivo chamado "bank.lua" e cole o código abaixo dentro do mesmo:
     
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid --------------------MESSAGES------------------------------------------------------------------------------ if msgcontains(msg, 'deposit') then selfSay('Please tell me how much gold it is you would like to deposit.', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'withdraw') then selfSay('Please tell me how much gold you would like to withdraw.', cid) talkState[talkUser] = 3 elseif msgcontains(msg, 'transfer') then selfSay('Please tell me the amount of gold coins you would like to transfer.', cid) talkState[talkUser] = 5 elseif msgcontains(msg, 'change gold') then selfSay('How many platinum coins do you want to get?', cid) talkState[talkUser] = 8 elseif msgcontains(msg, 'change platinum') then selfSay('Do you want to change your platinum coins to gold or crystal?', cid) talkState[talkUser] = 10 elseif msgcontains(msg, 'change crystal') then selfSay('How many crystal coins do you want to change to platinum?', cid) talkState[talkUser] = 15 elseif msgcontains(msg, 'balance') then n = getPlayerBalance(cid) selfSay('Your balance are '..n..' golds.', cid) talkState[talkUser] = 0 ----------------------DEPOSIT------------------------------------------------------- elseif talkState[talkUser] == 1 then if msgcontains(msg, 'all') then n = getPlayerMoney(cid) selfSay('Do you want deposit '..n..' golds ?', cid) talkState[talkUser] = 2 else n = getNumber(msg) selfSay('Do you want deposit '..n..' golds ?', cid) talkState[talkUser] = 2 end elseif talkState[talkUser] == 2 then if msgcontains(msg, 'yes') then if getPlayerMoney(cid) >= n then doPlayerDepositMoney(cid,n) selfSay('Sucessfull. Now your balance account is ' ..getPlayerBalance(cid)..' golds.', cid) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) end else selfSay('Ok then', cid) end ----------------------WITHDRAW------------------------------------------------------------------------------------- elseif talkState[talkUser] == 3 then if msgcontains(msg, 'all') then n = getPlayerBalance(cid) selfSay('Do you want withdraw '..n..' golds ?', cid) talkState[talkUser] = 4 else n = getNumber(msg) selfSay('Do you want withdraw '..n..' golds ?', cid) talkState[talkUser] = 4 end elseif talkState[talkUser] == 4 then if msgcontains(msg, 'yes') then if getPlayerBalance(cid) >= n then doPlayerWithdrawMoney(cid, n) selfSay('Here you are, '..n..' gold. Now your balance account is ' ..getPlayerBalance(cid)..' golds.', cid) talkState[talkUser] = 0 else selfSay('There is not enough gold on your account', cid) end else selfSay('Ok then', cid) end ----------------------TRANSFER---------------------------------------------------------------------------------------- elseif talkState[talkUser] == 5 then if msgcontains(msg, 'all') then n = getPlayerBalance(cid) selfSay('Who would you like transfer '..n..' gold to?', cid) talkState[talkUser] = 6 else n = getNumber(msg) selfSay('Who would you like transfer '..n..' gold to?', cid) talkState[talkUser] = 6 end elseif talkState[talkUser] == 6 then p = msg selfSay('So you would like to transfer '..n..' gold to '..p..'?', cid) talkState[talkUser] = 7 elseif talkState[talkUser] == 7 then if msgcontains(msg, 'yes') then if getPlayerBalance(cid) >= n then if doPlayerTransferMoneyTo(cid, p, n) == TRUE then selfSay('You have transferred '..n..' gold to '..p..' and your account balance is '..getPlayerBalance(cid)..' golds.', cid) talkState[talkUser] = 0 else selfSay('This player does not exist. Please tell me a valid name!', cid) talkState[talkUser] = 0 end else selfSay('There is not enough gold on your account', cid) talkState[talkUser] = 0 end else selfSay('Ok then', cid) talkState[talkUser] = 0 end ----------------------CHANGE GOLD--------------------------------------------------------------------------------- elseif talkState[talkUser] == 8 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..b..' of your gold coins to '..n..' platinum coins for you?', cid) talkState[talkUser] = 9 elseif talkState[talkUser] == 9 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2148, b) == TRUE then doPlayerAddItem(cid, 2152, n) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end ---------------------CHANGE PLATINUM------------------------------------------------------------------------- elseif talkState[talkUser] == 10 then if msgcontains(msg, 'gold') then selfSay('How many platinum coins do you want to change to gold?', cid) talkState[talkUser] = 11 elseif msgcontains(msg, 'crystal') then selfSay('How many crystal coins do you want to get?', cid) talkState[talkUser] = 13 end elseif talkState[talkUser] == 11 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..n..' of your platinum coins to '..b..' gold coins for you?', cid) talkState[talkUser] = 12 elseif talkState[talkUser] == 12 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2152, n) == TRUE then doPlayerAddItem(cid, 2148, b) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end elseif talkState[talkUser] == 13 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..b..' of your platinum coins to '..n..' crystal coins for you?', cid) talkState[talkUser] = 14 elseif talkState[talkUser] == 14 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2152, b) == TRUE then doPlayerAddItem(cid, 2160, n) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end ---------------------CHANGE CRYSTAL------------------------------------------------------------------------------- elseif talkState[talkUser] == 15 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..n..' of your crystal coins to '..b..' platinum coins for you?', cid) talkState[talkUser] = 16 elseif talkState[talkUser] == 16 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2160, n) == TRUE then doPlayerAddItem(cid, 2152, b) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -- function maded by Gesior-- function getNumber(txt) --return number if its number and is > 0, else return 0 x = string.gsub(txt,"%a","") x = tonumber(x) if x ~= nill and x > 0 then return x else return 0 end end  
     
     

    Salve o arquivo e feche-o.

    Agora seu NPC está pronto, basta adicioná-lo ao seu mapa usando o Map Editor.
    Espero que seja de utilidade de alguém...

    Créditos: Tibiaa4e (outro forum)
    Pequeno Tuto: Adriano Swatt
     
    Testado em:
    Versões do Client: 8.54 e 8.60.
    Versões da Distro: TFS 3.4.5, TFS 0.4 e Alissow 0.4.1.

    Espero que seja útil.


    Abraços'
  16. Gostei
    Adriano SwaTT recebeu reputação de Frenesy em (Resolvido)Ajuda Simples [doPlayerAddMana(cid, -mana)]   
    Boa noite galera, estou com um probleminha chato aqui que é o seguinte:
    Estou usando um script que remove mana do player de tempo em tempo (segundos)...
    Porém, quando ele remove a mana, ele deixa o player com "Battle" [condition infight], dito isso, gostaria de saber como faço para que remova a mana, mas sem deixar INFIGHT.
     
    Estou usando a seguinte tag:

    doPlayerAddMana(cid, -mana) .
    A solução foi add "false" a tag:

    doPlayerAddMana(cid, -mana, false) Pois existe um bool que é confirmado sempre como verdadeiro caso não use o parâmetro indiciado a ele ( 3 ), caso verdadeiro, o script irá executar a removação de mana como combat, ou seja, toda a funcionalidade em relação ao combate será executada, caso falso, ele irá retorna apenas a mudança de mana. - Null (Usuário)
     
     
    Fico aguardando resposta.
     
    Desde já, muito obrigado.
  17. Curtir
    Adriano SwaTT recebeu reputação de thelifeofpbion em [Tutorial] Criando Mana Rune   
    É, todos conhecem a "Mana Rune", então nem tenho muito o que fala...
    Então vamos lá..

    A Imagem da Runa que será a "Mana Rune" está no spoiler abaixo.





    1º Passo





    2º Passo





    3º Passo




    Apague o que está codificado e adicione o código abaixo em seu lugar.

    <item id="2281" article="a" name="Mana Rune"> <attribute key="weight" value="120" /> </item>


    É, eu acho que é isso...Espero que funcione.


    Créditos pelo Script: Miter (Outro Forum)
    Script Editado por: AdrianoSwaTT
    TUTORIAL feito por: AdrianoSwaTT


    Abraços galera
  18. Gostei
    Adriano SwaTT recebeu reputação de FiNub em Sistema: Cassino Slots.   
    Até teria, mas estou sem pc para fazer esse code agora..
     
    Sobre o problema do item ficar na mesa, não interfere em nada, pois quando clica para jogar novamente o item só muda para o próximo, não cria outro (que eu me lembre).
     
    Teste e dê um feed.
     
    Boa sorte.
  19. Gostei
    Adriano SwaTT recebeu reputação de FiNub em Sistema: Cassino Slots.   
    Certo, no final de tudo no script, abaixo do último END, adicione o código abaixo:
    function doCassinoRemoveLuckyItem(cid) if isPlayer(cid) then for i = 0, #items do g = getTileItemById(iluck_pos, items[i][1]) if g.uid > 0 then doRemoveItem(g.uid) doSendMagicEffect(iluck_pos, CONST_ME_POFF) end end end return true end  
    Agora procure por:
    setPlayerStorageValue(cid, gstrg, 0)  
    No script e abaixo disso adicione a linha:
    doCassinoRemoveLuckyItem(cid)  
    Agora só testar e postar o feed.
     
    Boa sorte.
  20. Gostei
    Adriano SwaTT recebeu reputação de FiNub em Sistema: Cassino Slots.   
    Por nada, bro.
     
    Faça bom proveito do code.
     

  21. Gostei
    Adriano SwaTT recebeu reputação de FiNub em Sistema: Cassino Slots.   
    Boa noite,
     
    Cada sala precisa de suas próprias storages nessas variáveis:
    local gstrg = 12129 -- Não Mexa, Storage de Controle Item Global. local gstrg_control = 12130 -- Não Mexa, Storage de Controle Jogo em Execução. local istrg = {12131, 12132, 12133} -- Não Mexa, Storage de Itens.  
    Ex:
    1ª Sala:
    local gstrg = 12129 -- Não Mexa, Storage de Controle Item Global. local gstrg_control = 12130 -- Não Mexa, Storage de Controle Jogo em Execução. local istrg = {12131, 12132, 12133} -- Não Mexa, Storage de Itens.  
    2ª Sala:
    local gstrg = 12135 -- Não Mexa, Storage de Controle Item Global. local gstrg_control = 12136 -- Não Mexa, Storage de Controle Jogo em Execução. local istrg = {12137, 12138, 12139} -- Não Mexa, Storage de Itens.  
    Sucessivamente sem cessar.
     
    Boa sorte.
  22. Curtir
    Adriano SwaTT recebeu reputação de mullino em Bloquear Acesso do Account Manager No Site   
    Boa tarde,
     
    Para quem não obteve êxito no bloqueio com o código acima.
     
    No mesmo arquivo, procure por:
    $account_players = $account_logged->getPlayersList();  
    E adicione este abaixo:
    $acc_id = $account_logged->getId(); if($acc_id == 1) die("Está conta está BLOQUEADA."); (Mesmo código só que em lugar diferente pois comigo também não havia funcionado do outro modo)
     
    Salve e teste.
     
    Lembre-se de atualizar a página antes de testar.
     
    Boa sorte.
     
  23. Gostei
    Adriano SwaTT recebeu reputação de Helder Junio adm em (Resolvido)[Pedido] Bike System Poketibia   
    Ok, apesar de já ter no tópico o código, fiz uma pequena alteração no mesmo.
     
    Registre o evento em movements.xml.
    <movevent type="DeEquip" itemid="1212" slot="ring" event="script" value="bikesystem.lua"/> E o bikesystem.lua será o abaixo:
    local strg = 12120 -- Montado na Bike function onDeEquip(cid, item) if getPlayerStorageValue(cid, strg) > 0 then doPlayerSendCancel(cid, "You can't take out this item while you are monted.") return false end return true end  
    Boa sorte.
  24. Gostei
    Adriano SwaTT recebeu reputação de Helder Junio adm em Bike Systema   
    Teste este para bloquear de usar a bike quanto estiver com outro sistema ativo,
     
    Lembre de por a storage de controle dos sistemas que deseja bloquear em "local strgs = {12345, 54321, 23456}" seguindo o exemplo.
     
    local strgs = {XXXX, XXXX} -- Coloque a Storage de Controle dos Sistemas Que Deseja Bloquear. local config = { velocidadeDaSuaBike = 1000, -- A volocidade da bike (1-9) outfitMale = 1787, -- Outfit male outfitFemale = 1619, -- Outfit female storageValue = 5602, -- Storage Para a bike } function onUse(cid, item, itemEx, fromPosition, toPosition) ctrl = 0 for x = 1, #strgs do if getPlayerStorageValue(cid, strgs[x]) > 0 then ctrl = ctrl + 1 end end if ctrl < 1 then if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_RING).uid then doPlayerSendCancel(cid, "Voce deve colocar sua bike no local correto.") return TRUE end if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end if getPlayerStorageValue(cid, config.storageValue) <= 0 then local a = {lookType = config.outfitMale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} local b = {lookType = config.outfitFemale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} setPlayerStorageValue(cid, 3624, ""..getPlayerStamina(cid).."") doSendMagicEffect(getThingPos(cid), 18) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, config.velocidadeDaSuaBike) setPlayerStorageValue(cid, config.storageValue, 1) if getPlayerSex(cid) == 0 then doSetCreatureOutfit(cid, b, -1) else doSetCreatureOutfit(cid, a, -1) end else setPlayerStorageValue(cid, config.storageValue, 0) doSendMagicEffect(getThingPos(cid), 18) doRemoveCondition(cid, CONDITION_OUTFIT) doRegainSpeed(cid) end else doPlayerSendCancel(cid, "Você não pode estar com nenhum outro sistema ativo para usar a bike.") end return true end  
    Daqui a pouco tento montar o outro para você, teste e dê um feedback.
     
    Boa sorte.
     
  25. Gostei
    Adriano SwaTT recebeu reputação de StormsHard em (Resolvido)[PEDIDO]Promotion por item   
    Bom dia.
     
    Abaixo segue o script:

    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end     function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid ---------- Início das Configurações ---------- local item1 = {2157, 100} -- Id e Quantidade local item2 = {2328, 100} -- Id e Quantidade local get = getItemNameById ---------- Fim das Configurações --------------     if msgcontains(msg, 'promote') or msgcontains(msg, 'promotion') then selfSay('Deseja ser promovido pagando '..item1[2]..' '..get(item1[1])..' e '..item2[2]..' '..get(item2[1])..'?', cid) talkState[talkUser] = 1     elseif talkState[talkUser] == 1 then     if msgcontains(msg, 'sim') or msgcontains(msg, 'yes') then     if getPlayerItemCount(cid, item1[1]) >= item1[2] and getPlayerItemCount(cid, item2[1]) >= item2[2] then         doPlayerRemoveItem(cid, item1[1], item1[2])         doPlayerRemoveItem(cid, item2[1], item2[2])         doSendMagicEffect(getCreaturePosition(cid), 14)         setPlayerPromotionLevel(cid, getPlayerPromotionLevel(cid)+1)         selfSay('Parabens agora voce e um(a) '..getPlayerVocationName(getPlayerVocation(cid))..'!', cid)     else         selfSay('voce nao tem os items exigidos.', cid)         talkState[talkUser] = 0     end     end end     return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Obs: Testado e funcionando perfeitamente em 0.3.6, porém, creio que funcione com você também.
     
    Boa sorte.

Informação Importante

Confirmação de Termo