Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 05/24/16 em todas áreas

  1. Evento de Record Players

    Tricoder e 2 outros reagiu a Bodak Reborn por uma resposta no tópico

    3 pontos
    Estou na escola, fiz correndo. Não sei se vai funcionar. Bom, testa ai: local reward = { [1] = {storage = 46843, item = 2160, qnt = 5, players = 50}, [2] = {storage = 46844, item = 2160, qnt = 10, players = 60}, --[um número maior que o anterior] = {storage, ID do item, quantidade do item, quantidade de players necessários} } function onLogin (cid) local players = getPlayersOnline() for _, v in pairs (reward) do if getGlobalStorageValue (v[1]) <= 0 and players >= v[4] then setGlobalStorageValue (v[1], 1) for _, pid in ipairs (players) do for i = 1, #reward do doPlayerAddItem (pid, reward[i][2], reward[i][3]) end end end end return true end XML: <event type="login" name="recordReward" event="script" value="nome_arquivo.lua"/> Registre em login.lua: registerCreatureEvent(cid, "recordReward")
  2. Criando instalador para Client

    Lordoritos reagiu a Hona por uma resposta no tópico

    1 ponto
    Criando instalador para Client Download: baixaki,mediafire,4shared Abra o aplicativo [ Install Creator ]. Depois você vera uma tela em cima do aplicativo. Click em avançar. Agora escolha os arquivos lembrando elis devem estar em uma pasta. (o programa ira copiar tudo que estiver dentro da pasta) Depois de escolher os arquivos. Escolha o idioma de sua preferencia. Escolha o nome do programa. Depois click em avançar. Agora vc escolhe se seu instalador sera full (tela cheia)ou small (pequeno). Depois click em avançar. Olhe a imagem abaixo e façam o ki estar nela. Depois de configurar click em avançar. Agora coloque tudo sobre o aplicativo que vc quer criar. Depois click em avançar. Agora coloque a descrição da sua licença. Depois click em avançar. Agora escolha o local a onde o seu jogo sera salvo depois de instalado no pc do jogador. Depois click em avançar. Agora vamos criar um atalho para seu arquivo. Procure seu arquivo .exe na pasta. Agora coloque o nome do seu atalho. Depois marque a caixa que diz: Add desktop shortcut Agora click em avançar. Aki deixe em branco. Agora click em avançar Agora selecione se quer ou não uninstaller. Depois click em avançar. Agora marque a caixa que diz do not build the install program Agora clique em concluir. Agora click em Build. Agora escolha onde vai salvar o instalador. Depois inicie o teste se ficou como vc queria. Creditos: Adriano C
  3. Boa Tarde Tk's . Bom como já vi varios reclamando que não consegue abrir o remeres map editor para Clientes versão extended , estarei postando para ajudar vocês. Customized Remere's Map Editor Suporta Versão: 7.6 - 10.37 Features: * Suporte para extended clients. * Support for transparency (Menu File > Preferences > Client Version) Visual C++ Redistributable Packages (Required installation) GitHub Instalando: 1º Basta baixar a versão normal do Remere's Map Editor no Site do Remeres e instalar em seu computador. 2º Depois Baixa a versão que postei pra download. 3º Terceiro Extraia a versão que postei pra download na pasta aonde o Remere's Map Editor foi instalado. ​4º Substitui todos os arquivos quando pedir , sempre clicando em subistituir , Sim , Ok. 5º Abre o Remere's Map Editor e vai em Menu File > Preferences > Cliente Version , Clique em Extended e Selecione a pasta do cliente do pokemon ou que você deseja. 6º Basta Fechar o Remere's Map Editor e abrir novamente e selecionar o mapa que deseja editar. Obs: Os clientes regulares não apoiará dados com transparência e / ou opção Extended. Obs: Já esta configurado para versão do Servidor e do cliente que postei do Cyan By Senhor Extended Download : http://www.4shared.com/rar/YPgAc2hAce/Remeres_Map_Editor.html Scan : Clique Aqui Extended Download By Senhor : https://www.mediafire.com/?fyklwfdwcawxepv Scan : Clique aqui OBS: Coloquei Dois Download , Um que ta configurado para versão do meu Servidor e do Meu cliente estendido e o Outro está configurado para versão normal dos clientes estendidos. Créditos : Hjnilsson (RME) MartyX - Ajudou a compilar Comedinha (Bruno Carvalho) EdMignari Pessoal do TPForums Vudi por postar. Outros
  4. [Comando] Adicionando comando !bug

    Navazek reagiu a Factur por uma resposta no tópico

    1 ponto
    • Qual a finalidade? • Quando o player ficar preso em algum lugar, o comando !bug leva ele para o CP; Isso serve para não ter que ficar pedindo para os adms, e caso eles estiverem off ficar preso lá. • Código 1 - Scripts • Vamos lá Vá para o local : Data\talkactions\scripts Chegando neste local crie um novo arquivo chamado bug.lua Cole este código dentro: function onSay(cid, words, param) pos = {x=1057, y=1046, z=7} doSendMagicEffect(getPlayerPosition(cid),19) doPlayerSendCancel(cid,"Teleportado!") doTeleportThing(cid,pos) end • Editando • → Onde está escrito {x=1057, y=1046, z=7} são as coordenadas (altere apenas os números) → Onde está escrito (getPlayerPosition(cid),19) é o efeito que aparece quando usa o comando, Para ver os efeitos entre no seu jogo e utilize o comando "/z (numero)" Vá indo até encontrar um efeito legal e adicione o numero do efeito no lugar do 19. → Onde está escrito doPlayerSendCancel(cid,"Teleportado!") é a mensagem que vai aparecer quando o player chegar no cp. • Código 2 - Talkactions • Vá para o local Data\Talkactions Chegando ai abra o Talkactions.xml Cole este código: <talkaction words="!bug" access="1" script="bug.lua"/> → Onde está escrito words="!bug" é o comando que o player vai ter que dizer para ir pro cp • Finalização • Depois de ter editado tudo isso, Ligue o seu servidor, ou caso ja esteja on Vá no seu server e clicke em Reload → Reload Talkactions Quando aparecer reloaded talkactions Vá no seu jogo e diga !bug se não estiver online apenas abra-o seu server. • Créditos • Golf → Por fazer o script Factur → Por criar o tópico
  5. 1 ponto
    Olá Galera do Tibiaking! Hoje Vim Trazer Para voçes uma base parecida com OtPokémon pois editei muito nessa base em breve teremos v2 com as sprites substituidas base (PDA). Vamos Ao Que Importa Alguns Dos Nossos Sistemas Abaixo Agora vamos ao que interessa informaçoes do servidor começando com os Sistemas. Sistemas Moves System: 80% Caught System: 50% Go-Back System: 50% Portrait System: 50% Evolution System: 100% Ginasios 90% (Tentar Adicionar mais na V2) Changelog do servidor: • A Opçao Pokebag Do Client Esta Com o Sistema do Cassino Retire que Sera Aberto Normalmente Versao 1.0 • Adicionei Shiny Clefable - Shiny Wigglytuff - Shiny Tangrowth e Shiny Roserade • • Arrumei Os Attakes Dos Pokemons pareçidos com o OtPokémon (V2 Serao Todos) • • Adicionado Boost System Beta ( Esta Apenas Aumentar 300 De Hp, V2 Sera Arrumado ) • • Todos Os Shinys Alterados para Poderem Usar Level 1 e as Magias Tambem • • o Atake "Healarea" Nao Heala Players Apenas os Pokémons Downloads: Servidor Client (Pode usar este normal) Scan do Servidor Equipe: Apenas eu.
  6. [2016] Sprites Completas - PokeXGames

    Kaneki On reagiu a GOD Vitor por uma resposta no tópico

    1 ponto
    Eae Galera, estava vasculhando alguns fóruns e encontrei as novas sprites da PokeXGames, então resolvi trazer para o TK. Façam bom aproveito! Screenshot Como Abrir a spr pelo Object Builder Download Créditos
  7. [10.93] Projeto Capernia, RL MAP

    Janes123 reagiu a gordonbays por uma resposta no tópico

    1 ponto
    Capernia Datapack: making the ultimate datapack for OTS (Open Tibia Server) Bom dia a todos, considerando que todas as datapacks presentes nesse fórum contém bugs absurdos e estão longe de serem confiáveis para um servidor final, eu convido todos a participarem e colaborarem nesse projeto chamado Capernia. O objetivo é unificar as ações em um único projeto e permitir que as correções realizadas isoladamente se propaguem para todos em tempo real. Vários problemas já foram corrigidos como a replicação de cristal coins da ferumbras e queda de servidor pelo método da parcel. Novos problemas são reportados diariamente e eu farei o possível para atender a todos. Se você tem interesse em contribuir ou utilizar o projeto Capernia acesse: https://github.com/gordonbay/capernia-ots-datapack Estabilidade: Como todos sabem não existe projeto "Full" ou "100%" e o mesmo está longe de existir porém você pode fazer a diferença agora reportando erros encontrados ou enviando as suas atualizações, entretanto tudo é realizado utilizando o idioma inglês e sem customizações. A build está marcada como buggy, o que significa que você deve utilizar esse projeto assumindo o risco, não me responsabilizo por falhas encontradas ou exploradas. Compilações: As compilações executáveis são fornecidas com a intenção de facilitar o processo para o usuário, em nenhum momento serão fornecidos os códigos de fontes considerando que o foco desse projeto é a datapack e as mesmas podem ser acessadas pelo projeto responsável pelo seu desenvolvimento nesse link: https://github.com/otland/forgottenserver Ferramentas Compatíveis: Para edição do mapa: http://www.tibiaking.com/forum/topic/22469-1091-remeres-map-editor/ Para edição de itens: https://github.com/ottools/ItemEditor Bugs Encontrados: Nenhum bug referente ao projeto será respondido nesse fórum sendo que o procedimento correto para o mesmo é através do link: https://github.com/gordonbay/capernia-ots-datapack/issues porém leia esse artigo antes de postar: https://github.com/gordonbay/capernia-ots-datapack/wiki/Issues Últimas atualizações: 0.0.9 (17/05/2016) Bugfixes: fix wrong monsters corpses as requested here #17 fix missing Yalahar gates and Captain Max not checking mission status in order to teleport a character. As described here #16 fix Edron's Bog Raider's missing spaws and wrong map textures as requested here #14 0.0.8 (14/05/2016) Enhancements: added 10.92 new itens and potions 0.0.7 (13/05/2016) Bugfixes: fix a bug on Ferumbras' Ascendant Quest as requested here #13 Enhancements: Reward Chest has been removed from Thais due violations of Capernia rules about custom content
  8. 1 ponto
    Fala galerinha do TK, já vi gente pedindo aqui e por PM para mim o script de dar uma porcentagem a mais de exp para jogadores VIP. Então venho trabalhando com o lindo do xWhiteWolf para disponibilizar esse sisteminha simples e 100% funcional. Como funciona: Quando qualquer player logar irá aparecer a mensagem: Adquira sua VIP ACCOUNT "seusite" e obtenha X% a mais de EXP para facilitar sua hunt. Quando qualquer player logar e possuir VIP ACCOUNT irá aparecer: Você é um jogador vip, possui X% a mais de exp do que os jogadores free's. Diferente de muitos scripts já visto, a mensagem aparecerá em POP-UP quando o player logar (POP-UP é aquela janelinha que aparece para fechar, caixa de notificações ) Vamos ao script/instalação: Em data/creaturescritps/scripts crie um arquivo com o nome tkexp.lua e adicione dentro: function onLogin(cid) local rate = 1.5 -- 50% local config = { welvip = "Você é um jogador vip, possui "..((rate - 1)*100).."% a mais de exp do que os jogadores free's", not_vip = "Adquira sua vip em nosso site www.tibiaking.com e obtenha "..((rate - 1)*100).."% a mais de EXP para facilitar sua hunt!", s = 13540, -- storage vip } if getPlayerStorageValue(cid, config.s) - os.time() >= 1 then doPlayerSetExperienceRate(cid, rate) doPlayerPopupFYI(cid, config.welvip) else doPlayerPopupFYI(cid, config.not_vip) end return TRUE end Em data/creaturescripts/creaturescripts.xml adicione a seguinte linha: <event type="login" name="tkexp" script="tkexp.lua"/> Em data/creaturescripts/scritps abra o login.lua e embaixo de registerCreatureEvent(cid, "Frags") ou qualquer registerCreture... adicione a seguinte linha: registerCreatureEvent(cid, "tkexp") Pronto! Importante: Configurando: local rate = 1.5 -- 50% - Rate está 1.5 ou seja 1.0 = padrão, 1.5 = padrão + 0.5 = 50%, por exemplo: caso queira adicionar 30% a mais de exp para os vips use 1.3% (padrão de 1.0 mais 0.3 = 1.3) welvip = mensagem que aparecerá quando o player logar avisando que está vip e possui a porcentagem a mais de EXP not_vip = verifica que o player não é vip e mostra a mensagem fazendo um "Marketing" para comprarem mostrando o benefício s = 13540, = Aqui a storage da sua VIP Account, você poderá ver em suas libs, cada servidor tem um número, a maioria usa 13540 mas é importante verificar Tudo ok galera Caso não entendeu ou tenha alguma dúvida não tenha vergonha de perguntar, afinal ninguém nasceu sabendo não é? Espero que gostem e usem Até o próximo. Absolute.
  9. actions/scripts nome_arquivo.lua local config = { storage = 65013, item = {2160, 2145, 2159}, -- IDs dos itens. qnt = {5, 3, 8}, -- quantidade de cada item, respectivamente. Ou seja, serão 5 itens de ID 2160, 3 de ID 2145 e 8 de ID 2159. newPos = {x = 1560, y = 1321, z = 7}, -- posição para onde o jogador será teleportado ao dar use no baú. effect = 27, -- efeito. } function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue (cid, config.storage) <= 0 then for i = 1, #config.item do doPlayerAddItem (cid, config.item[i], config.qnt[i]) end setPlayerStorageValue (cid, config.storage, 1) doTeleportThing (cid, config.newPos) doSendMagicEffect (getThingPos(cid), config.effect) doPlayerSendTextMessage (cid, 25, "Parabéns! Você pegou o seu kit inicial!") else doPlayerSendCancel (cid, "Você já pegou o seu kit inicial!") end return true end XML: <action actionid="ACTION_ID_DO_BAÚ" event="script" value="nome_arquivo.lua"/>
  10. (Resolvido)[Error] Mysql Database

    LeoTK reagiu a Careless por uma resposta no tópico

    1 ponto
    Tenta seguir esse tutorial do Matheus..
  11. 1 ponto
    @Brunds Cara, dei uma procurada marota aqui, e encontrei que essa tabela é do comando do Deathlist in-game.. Execute essa query, e retorne o resultado... --------- Se funcionar, peço que altere o Titulo, pois... mesmo se não funcionar, se ta mostrando na Distro o problema é in-game e não web...
  12. (Resolvido)Pequena Duvida

    caioitalo1 reagiu a Careless por uma resposta no tópico

    1 ponto
    Primeiro você precisa da Sprite dele.. (Com o ObjectBuilder e o tibia.spr de um servidor que o tenha é facil de tira-lo.. o dificil é encontra-lo...) Para adiciona-lo ao seu servidor você precisa te-lo no seu arquivo .spr, tendo-o, você pode facilmente adiciona-lo ao items.xml e items.otb.. Para arquivos .XML, recomendo o Notepad++, já para a edição do .OTB, fica à seu critério, já que no meu PC quase nunca roda um... --- Esqueci de citar, que para adicionar o mesmo no seu .spr, você também pode utilizar o ObjectBuilder...
  13. Investimentos

    Tricoder reagiu a RonaldoSP por uma resposta no tópico

    1 ponto
    Olá, me chamo Ronaldo Silva e tenho 25 anos. Ultimamente vejo grandes projetos com um enorme potencial, mas infelizmente OFF por falta de fins. Venho através deste post para propor aos jovens (ou não) Ot admins, uma solução. Estou disposto a depositar meu tempo e dinheiro em projetos promissores, basta entrar em contato. Envie suas ideias para mim. Email: [email protected] Depois de enviado, irei responder nas próximas 12h para que possamos entrar em um acordo. Cordialmente, Ronaldo Silva
  14. Zombie Event Erro

    FidelixMonte reagiu a Vodkart por uma resposta no tópico

    1 ponto
    local config = { semana_mes = "semana", days = {1,2,3,4,5,6,7}, goblet = 5805, -- id of the gold goblet you'll get when finishing the event. rewards = {2195, 2152, 2160}, -- You will get this + a gold goblet with your name on. moneyReward = {2160, 10, 1}, -- second collumn(count) 0 if you don't want money to be used. or a stackable item you want more than 1 of. playerCount = 2001, -- Global storage for counting the players left/entered in the event zombieCount = 2002, -- Global storage for counting the zombies in the event teleportActionId = 2008, -- Action id of the teleport needed for the movement script teleportPosition = {x = 152, y = 51, z = 7, stackpos = 1}, -- Where the teleport will be created teleportToPosition = {x = 37, y = 272, z = 7}, -- Where the teleport will take you teleportId = 1387, -- Id of the teleport timeToStartEvent = 2, -- Minutes, after these minutes the teleport will be removed and the event will be declared started timeBetweenSpawns = 20, -- Seconds between each spawn of zombie zombieName = "event zombie", -- Name of the zombie that should be summoned playersNeededToStartEvent = 1, -- Players needed before the zombies can spawn. fromPosition = {x = 15, y = 273, z = 7}, -- top left cornor of the playground toPosition = {x = 68, y = 274, z = 7} -- bottom right cornor of the playground } function onTime() local time = os.date("*t") if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("Zombie event starting in " .. config.timeToStartEvent .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) end return TRUE end function startEvent() local get = getThingfromPos(config.teleportPosition) if get.itemid == config.teleportId then doRemoveItem(get.uid, 1) end local fromp, top = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("Good luck in the zombie event people! The teleport has closed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. config.timeBetweenSpawns .. " seconds! Good luck!") pvgaylord() end end end end else doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end end end function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 1 then pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)} doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(config.zombieCount) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) else local fromp, top = config.fromPosition, config.toPosition for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} cid = getThingfromPos(areapos).uid if isPlayer(cid) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doBroadcastMessage(getCreatureName(cid)..' has survived at zombie event!') for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end doBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.") elseif isMonster(cid) then doRemoveCreature(cid) end end end end end end function pvgaylord() local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0 for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do local areapos = {x = x, y = y, z = z, stackpos = 253} local cid = getThingfromPos(areapos).uid if isPlayer(cid) then p = p+1 elseif isMonster(cid) then m = m+1 end end end end if p ~= getGlobalStorageValue(config.playerCount) then setGlobalStorageValue(config.playerCount, p) end if p < 2 then return true end addEvent(pvgaylord,100,nil) end ------------------------------ Explicação para esse erro: fromPosition = {x = 15, y = 274, z = 7} toPosition = {x = 68, y = 273, z = 7} math.random números de ordem > neste caso estava de 274 para 273... local a,b = 273,274 print(math.random(a,b)) retorna por exemplo: 274 agora ao contrário: local a,b = 273,274 print(math.random(b,a)) retorna: 'input:2: bad argument #1 to 'random' (interval is empty)'
  15. (Resolvido)Ajustando Script

    caioitalo1 reagiu a Bodak Reborn por uma resposta no tópico

    1 ponto
    function onStepIn(cid, item, position, fromPosition) if isPlayer (cid) then doCreatureAddHealth (cid, -getCreatureHealth(cid)/100*99) end return true end
  16. Evento de Record Players

    Striker Macabrus reagiu a Vodkart por uma resposta no tópico

    1 ponto
    Script interessante... Mas aconselho a colocar para jogadores que tenham se registrado, porque no caso algum mage bomb pode logar em vários ACC Manager para usufruir de maneira indevida do sistema...Além disso acho mais legal dar recompensas aleatórias para os jogadores, ou até mesmo dependendo dos leveis... Ex: level 1 á 25 level 25 á 50 level 51 á 80 level 81 á 100 ganharem itens exclusivos dependendo do level!
  17. RME ERROR IMPORT MAP

    Tricoder reagiu a math0182 por uma resposta no tópico

    1 ponto
    Pessoal, me sinto um idiota. Resolvi esse problema...a pasta onde estava o mapa tinha acentos tipo "MAPA soluções" ai dava esse erro na hr de importar, mudei o nome da pasta e funcionou. Já vi muita gente com esse problema e ngm respondeu. !! :D
  18. (Resolvido)Mount Doll TFS 1.2

    tavinho187 reagiu a Sekk por uma resposta no tópico

    1 ponto
    Acusou erro na ultima linha... Ele quis comentar o site, porém colocou apenas um hífen... Deixa assim a ultima linha : end -- See more at: http://www.tibiaface.com/t438-talkactions-addon-doll-y-mount-doll-fixe-para-tfs-1-0#sthash.K1Pz7BWc.dpuf
  19. (Resolvido)Mount Doll TFS 1.2

    tavinho187 reagiu a Bodak Reborn por uma resposta no tópico

    1 ponto
    Boy, você copiou errado e veio com o link do site. Olha a última linha...
  20. [erro VIP SCRIPT]

    Leolinduxo reagiu a Bodak Reborn por uma resposta no tópico

    1 ponto
    -- Script Feito Por Dark Ownz function onUse(cid, item, fromPosition, itemEx, toPosition) local config={ removeOnUse = "yes" -- remover quando usar ("yes" or "no") } local days = 30 -- coloque os dias que serão a VIP! local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid,14965) local timenow = os.time() if getPlayerStorageValue(cid, 14965) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 14965, time) local quantity = math.floor((getPlayerStorageValue(cid, 14965) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") if (config.removeOnUse == "yes") then doRemoveItem(item.uid, 1) end return TRUE end
  21. Izanagi

    zPerseu reagiu a Bodak Reborn por uma resposta no tópico

    1 ponto
    spells function onCastSpell(cid) local exhausted = 30 -- tempo em segundos para usar a skill novamente. if getPlayerStorageValue (cid, 349999) < os.time() then setPlayerStorageValue (cid, 349999, exhausted + os.time()) setPlayerStorageValue (cid, 350000, getThingPos(cid).x) setPlayerStorageValue (cid, 350001, getThingPos(cid).y) setPlayerStorageValue (cid, 350002, getThingPos(cid).z) else doPlayerSendCancel (cid, "You're exhausted.") end return true end creaturescripts/scripts function onStatsChange(cid, attacker, type, combat, value) local percent = 0.3 -- 0.3 = 30%, 0.5 = 50%... etc local effect = 29 if type == STATSCHANGE_HEALTHLOSS and getCreatureMaxHealth (cid) * percent > getCreatureHealth (cid) and getPlayerStorageValue (cid, 350000) > 0 then doTeleportThing (cid, {x = getPlayerStorageValue (cid, 350000), y = getPlayerStorageValue (cid, 350001), z = getPlayerStorageValue (cid, 350002)}) doCreatureAddHealth (cid, getCreatureMaxHealth(cid)) doSendMagicEffect (getThingPos (cid), effect) setPlayerStorageValue (cid, 350000, 0) setPlayerStorageValue (cid, 350001, 0) setPlayerStorageValue (cid, 350002, 0) end return true end XML <event type="statschange" name="Izanagi" event="script" value="nome_arquivo.lua"/> Em login.lua registerCreatureEvent(cid, "Izanagi")
  22. [Uso livre] Mega Medicham

    Alberto Silvano reagiu a Zayon Owatari por uma resposta no tópico

    1 ponto
    Olá pessoal! A galera do meu servidor veio pedindo uma mega medicham, então tomei a liberdade de fazer uma com base na já existente mega medicham, dos jogos de nintendo. O uso dela é livre, ou seja, usem a vontade, coloquem no servidor de vocês e tudo mais. Só espero que, me deem meus devidos direitos, diferente de como fizeram com meu Mega Wobbuffet. zzzzz Beijos beijos.
  23. 1 ponto
    Olá, Bom como o Titulo diz Spriter Mega Medicham, Já q recortei e Alguns membros não saber recorta ta aew :D Download - http://www.mediafire.com/download/kqrztqhcehk8qo3/Mega+Medichan.rar Scan - https://www.virustotal.com/pt/file/b8094b096f23e8855bf15e0f94644bf78d368962e869f6d09e3b0fa27d8d3ccf/analysis/1463763020/ Créditos: Zoyon Owatari por Fazer ela.
  24. No - logout em treiners.

    xWhiteWolf reagiu a koete por uma resposta no tópico

    1 ponto
    Tenho uma ideia melhor cara, porque ao invés de fazer um script. você não vai no map edito e edita isso? sabe aquela cor verde que você coloca área pz? então área de non-logout é amarela. só pintar la de amarelo onde você não quer que o player deslogue.
  25. Sistema De Pontuação

    Striker Macabrus reagiu a Bodak Reborn por uma resposta no tópico

    1 ponto
    Le o post..
  26. Sistema De Pontuação

    Striker Macabrus reagiu a Bodak Reborn por uma resposta no tópico

    1 ponto
  27. [Uso livre] Mega Medicham

    edumasterrr reagiu a Killua Fran por uma resposta no tópico

    1 ponto
    +REP e.e @Zayon Owatari Olá, Obrigado por compartilha quando foi recorta no OBJ, Fico meio uma parte dos braços brancos encima da posição debaixo, mais apenas a posição q estar muito perto. Bom modifiquei um pouco a posição, agora ficar normal! Estar aqui* e.e Obrigado!
  28. Loteria apenas para Cast ON

    ADM Milord reagiu a Bodak Reborn por uma resposta no tópico

    1 ponto
    =)
  29. UPDATED (Sprites Cronos)

    edumasterrr reagiu a M Cronos por uma resposta no tópico

    1 ponto
    om, eu não sou nenhum artista, mas eu tenho uma noção. eu não criei nenhuma das sprites, somente editei as do tibia. que gostar pode usar a vontade. OBS: tem algumas que eu já tinha visto em uns posts em outros sites, mas eu não peguei de lá e colei aqui, eu editei como eu disse e postei. Edit, eu vou ver como eu faço pra postar aqui, por que eu poster de modo errado bom eu coloquei o link aqui de minha pagina no Facebook, onde eu postei as imagens. pois não estou conseguindo utilizar o devianart Pagina No Facebook com Mais Detalhes das sprites. https://www.facebook.com/profile.php?id=100081753247264 UPDATE 1 Download: https://www.mediafire.com/file/wha8f68squgwqvg/Download_sprites_Lorran_%281%29.rar/file Scan: https://www.virustotal.com/pt/url/5d3e216004ee6968303ee05b3693999b5fbbf8d76d49ca2947964249eeaafe91/analysis/1469251758/ Download https://www.mediafire.com/file/hzd3rn4ep7h6eze/Download_sprites_Lorran_%282%29.rar/file Scan: https://www.virustotal.com/pt/file/c8f91fc4e073ea19decd911bbb584aa5ad1651e24f4583dab4c861a406d1d45e/analysis/
  30. (Resolvido)script npc simples

    Striker Macabrus reagiu a Wakon por uma resposta no tópico

    1 ponto
    Em "Data/npc/scripts", arquivo.lua: local t = { money = 10000, pos = {x = 160, y = 54, z = 7} } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 msg = msg:lower(); if msgcontains(msg, 'the place of death') then if doPlayerRemoveMoney(cid, t.money) then doTeleportThing(cid, t.pos) selfSay('Boa sorte.', cid) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) else selfSay('Você não tem '.. t.money ..' gold coins.', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Em "Data/npc", arquivo.xml: <?xml version="1.0" encoding="UTF-8"?> <npc name="NOMEDONPC" script="travelTest.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Olá |PLAYERNAME|! Eu te levarei a melhor e maior quest por apenas 100kk, diga {The Place of Death} para entrar. MWAHAWAWAHWAWA!"/> </parameters> </npc> Configure o valor que será cobrado do player em money e a position que será levado após falar a msg necessária em pos.
  31. O RME NÃO TEM COMO FAZER MAPAS ONLINE(EU FAZENDO NO MEU PC E MEU AMIGO NO EDITANDO NO MESMO MAPA[MEU PC FICA HOSTEADO O MAPA])
  32. (Resolvido) Erro Gesior ACC

    thalesaraujomarcelo reagiu a rogerioml por uma resposta no tópico

    1 ponto
    ak ta dando Account maker is already installed! To reinstall open file 'config.ini' in directory 'config' and change: install = "no" to: install = "start" and enter this site again.
  33. CAST SYSTEM TFS 1.0

    ADM Milord reagiu a xWhiteWolf por uma resposta no tópico

    1 ponto
    TODOS OS CRÉDITOS DISSO VÃO PARA O MEMBRO CAOTIC DE OUTRO FÓRUM "ae galeerrra venho disponibilizar o famoso sistema de televisão poketibiano completo o sistema foi feito para ambos os clients tibianos. O sistema permite você assistir outro players jogando assim você fica sem usar itens,falar(so pm), se movimentar e etc... Vamos la: Vá em luascript.cpp e procure: int32_t LuaScriptInterface::luaGetTopCreature(lua_State* L) { //getTopCreature(pos) PositionEx pos; popPosition(L, pos); ScriptEnviroment* env = getEnv(); Tile* tile = g_game.getTile(pos); if(!tile) { pushThing(L, NULL, 0); return 1; } Thing* thing = tile->getTopCreature(); if(!thing || !thing->getCreature()) { pushThing(L, NULL, 0); return 1; } pushThing(L, thing, env->addThing(thing)); return 1; } E coloque embaixo: int32_t LuaScriptInterface::luaGetAllsTvs(lua_State* L) { //getAllsTvs(cid) ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID(popNumber(L)); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } Tvlist::iterator it; it = player->tv.begin(); lua_newtable(L); uint32_t tableplayers = 1; for(uint32_t i = 1; it != player->tv.end(); ++it, ++i) { Player* players = env->getPlayerByUID(*it); if (players) { lua_pushnumber(L, tableplayers); lua_pushnumber(L, env->addThing(players)); pushTable(L); tableplayers = tableplayers+1; } } return 1; } int32_t LuaScriptInterface::luaSetPlayerTv(lua_State* L) { ScriptEnviroment* env = getEnv(); Player* player_tv = env->getPlayerByUID(popNumber(L)); Creature* creature = env->getCreatureByUID(popNumber(L)); if (!creature) { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } Player* player = creature->getPlayer(); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } if (!player_tv) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } player_tv->tv.push_back(player->getID()); SpectatorVec::iterator it; SpectatorVec list = g_game.getSpectators(player->getPosition()); Player* tmpPlayer = NULL; Condition* condition = NULL; if((condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_GAMEMASTER, -1, 0, false, GAMEMASTER_INVISIBLE))) { creature->setHideName(false); player->addCondition(condition); g_game.internalCreatureChangeVisible(creature, VISIBLE_GHOST_DISAPPEAR); for(it = list.begin(); it != list.end(); ++it) { if((tmpPlayer = (*it)->getPlayer()) && !tmpPlayer->canSeeCreature(player)) tmpPlayer->sendMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF); } for(AutoList<Player>::iterator pit = Player::autoList.begin(); pit != Player::autoList.end(); ++pit) { if(!pit->second->canSeeCreature(player)) pit->second->notifyLogOut(player); } IOLoginData::getInstance()->updateOnlineStatus(player->getGUID(), false); if(player->isTrading()) g_game.internalCloseTrade(player); player->clearPartyInvitations(); if(player->getParty()) player->getParty()->leave(player); g_game.internalTeleport(player, player_tv->getPosition(), true); } lua_pushboolean(L, true); } int32_t LuaScriptInterface::luaDoSendChannelsTv(lua_State* L) { ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID(popNumber(L)); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } player->sendChannelsDialog(true); lua_pushboolean(L, true); return 1; } int32_t LuaScriptInterface::luaDoRemovePlayerTv(lua_State* L) { ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID(popNumber(L)); Player* creature = env->getPlayerByUID(popNumber(L)); if (!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } for(std::list<uint32_t>::iterator it = player->tv.begin(); it != player->tv.end(); ++it) { if ((*it) == creature->getID()) { Tvlist tv = player->tv; if (!creature) { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); return 1; } Player* player_tv = creature->getPlayer(); if (!player) { return 1; } SpectatorVec::iterator its; SpectatorVec list = g_game.getSpectators(player_tv->getPosition()); Player* tmpPlayer = NULL; Condition* condition = NULL; creature->setHideName(false); if((condition = player_tv->getCondition(CONDITION_GAMEMASTER, CONDITIONID_DEFAULT, GAMEMASTER_INVISIBLE))) { IOLoginData::getInstance()->updateOnlineStatus(player_tv->getGUID(), true); for(AutoList<Player>::iterator pit = Player::autoList.begin(); pit != Player::autoList.end(); ++pit) { if(!pit->second->canSeeCreature(player_tv)) pit->second->notifyLogIn(player_tv); } for(its = list.begin(); its != list.end(); ++its) { if((tmpPlayer = (*its)->getPlayer()) && !tmpPlayer->canSeeCreature(player_tv)) tmpPlayer->sendMagicEffect(player_tv->getPosition(), MAGIC_EFFECT_TELEPORT); } player_tv->removeCondition(condition); g_game.internalCreatureChangeVisible(creature, VISIBLE_GHOST_APPEAR); *it = NULL; } } } lua_pushboolean(L, true); } Continuando em luascript.cpp procure: //doCreatureSay(uid, text[, type = SPEAK_SAY[, ghost = false[, cid = 0[, pos]]]]) lua_register(m_luaState, "doCreatureSay", LuaScriptInterface::luaDoCreatureSay); Coloque embaixo: //doRemovePlayerTv(cid, id) lua_register(m_luaState, "removePlayerTv", LuaScriptInterface::luaDoRemovePlayerTv); //getAllsTv() lua_register(m_luaState, "getTvs", LuaScriptInterface::luaGetAllsTvs); //setPlayerTv(cid, player) lua_register(m_luaState, "setPlayerTv", LuaScriptInterface::luaSetPlayerTv); //doSendChannelstTv(cid) lua_register(m_luaState, "doSendChannelsTv", LuaScriptInterface::luaDoSendChannelsTv); Em luascript.h procure: static int32_t luaGetPlayerParty(lua_State* L); Coloque embaixo: static int32_t luaGetAllsTvs(lua_State* L); static int32_t luaSetPlayerTv(lua_State* L); static int32_t luaDoSendChannelsTv(lua_State* L); Vamos agora em game.cpp: Procure: bool Game::playerSay(uint32_t playerId, uint16_t channelId, SpeakClasses type, const std::string& receiver, const std::string& text) E substitua função por esta nova função: bool Game::playerSay(uint32_t playerId, uint16_t channelId, SpeakClasses type, const std::string& receiver, const std::string& text) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; std::string str; if (player->getStorage(34421, str) && str == "true") { if (type == SPEAK_SAY) { player->getStorage(292924, str); player->sendTextMessage(MSG_STATUS_SMALL, str.c_str()); return false; } switch(type) { case SPEAK_WHISPER: return playerWhisper(player, text); case SPEAK_YELL: return playerYell(player, text); case SPEAK_PRIVATE: case SPEAK_PRIVATE_RED: case SPEAK_RVR_ANSWER: return playerSpeakTo(player, type, receiver, text); case SPEAK_CHANNEL_O: case SPEAK_CHANNEL_Y: case SPEAK_CHANNEL_RN: case SPEAK_CHANNEL_RA: case SPEAK_CHANNEL_W: { if(playerTalkToChannel(player, type, text, channelId)) return true; return playerSay(playerId, 0, SPEAK_SAY, receiver, text); } case SPEAK_BROADCAST: return playerBroadcastMessage(player, SPEAK_BROADCAST, text); case SPEAK_RVR_CHANNEL: return playerReportRuleViolation(player, text); case SPEAK_RVR_CONTINUE: return playerContinueReport(player, text); default: break; } internalCreatureSay(player, SPEAK_SAY, text, false); return false; } uint32_t muteTime = 0; bool muted = player->isMuted(channelId, type, muteTime); if(muted) { char buffer[75]; sprintf(buffer, "You are still muted for %d seconds.", muteTime); player->sendTextMessage(MSG_STATUS_SMALL, buffer); return false; } if(player->isAccountManager()) { player->removeMessageBuffer(); return internalCreatureSay(player, SPEAK_SAY, text, false); } if(g_talkActions->onPlayerSay(player, type == SPEAK_SAY ? CHANNEL_DEFAULT : channelId, text, false)) return true; if(!muted) { ReturnValue ret = RET_NOERROR; if(!muteTime) { ret = g_spells->onPlayerSay(player, text); if(ret == RET_NOERROR || (ret == RET_NEEDEXCHANGE && !g_config.getBool(ConfigManager::BUFFER_SPELL_FAILURE))) return true; } player->removeMessageBuffer(); if(ret == RET_NEEDEXCHANGE) return true; } switch(type) { case SPEAK_SAY: return internalCreatureSay(player, SPEAK_SAY, text, false); case SPEAK_WHISPER: return playerWhisper(player, text); case SPEAK_YELL: return playerYell(player, text); case SPEAK_PRIVATE: case SPEAK_PRIVATE_RED: case SPEAK_RVR_ANSWER: return playerSpeakTo(player, type, receiver, text); case SPEAK_CHANNEL_O: case SPEAK_CHANNEL_Y: case SPEAK_CHANNEL_RN: case SPEAK_CHANNEL_RA: case SPEAK_CHANNEL_W: { if(playerTalkToChannel(player, type, text, channelId)) return true; return playerSay(playerId, 0, SPEAK_SAY, receiver, text); } case SPEAK_PRIVATE_PN: return playerSpeakToNpc(player, text); case SPEAK_BROADCAST: return playerBroadcastMessage(player, SPEAK_BROADCAST, text); case SPEAK_RVR_CHANNEL: return playerReportRuleViolation(player, text); case SPEAK_RVR_CONTINUE: return playerContinueReport(player, text); default: break; } return false; } Continuando em game.cpp procure a função: ReturnValue Game::internalMoveCreature(Creature* creature, Direction direction, uint32_t flags/* = 0*/) E substitua por esta função: ReturnValue Game::internalMoveCreature(Creature* creature, Direction direction, uint32_t flags/* = 0*/) { const Position& currentPos = creature->getPosition(); Cylinder* fromTile = creature->getTile(); Cylinder* toTile = NULL; Position destPos = getNextPosition(direction, currentPos); if(direction < SOUTHWEST && creature->getPlayer()) { Tile* tmpTile = NULL; if(currentPos.z != 8 && creature->getTile()->hasHeight(3)) //try go up { if((!(tmpTile = map->getTile(Position(currentPos.x, currentPos.y, currentPos.z - 1))) || (!tmpTile->ground && !tmpTile->hasProperty(BLOCKSOLID))) && (tmpTile = map->getTile(Position(destPos.x, destPos.y, destPos.z - 1))) && tmpTile->ground && !tmpTile->hasProperty(BLOCKSOLID)) { flags = flags | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE; destPos.z--; } } else if(currentPos.z != 7 && (!(tmpTile = map->getTile(destPos)) || (!tmpTile->ground && !tmpTile->hasProperty(BLOCKSOLID))) && (tmpTile = map->getTile(Position( destPos.x, destPos.y, destPos.z + 1))) && tmpTile->hasHeight(3)) //try go down { flags = flags | FLAG_IGNOREBLOCKITEM | FLAG_IGNOREBLOCKCREATURE; destPos.z++; } } ReturnValue ret = RET_NOTPOSSIBLE; if((toTile = map->getTile(destPos))) ret = internalMoveCreature(NULL, creature, fromTile, toTile, flags); if(ret != RET_NOERROR) { if(Player* player = creature->getPlayer()) { player->sendCancelMessage(ret); player->sendCancelWalk(); } } Player* player = creature->getPlayer(); if (player) { Tvlist::iterator it; it = player->tv.begin(); for(uint32_t i = 1; it != player->tv.end(); ++it, ++i) { Player* players = getPlayerByID(*it); if (players) { internalTeleport(players, player->getPosition(), true, 0); } } } return ret; } Procure a função: bool Game::playerRequestChannels(uint32_t playerId) Substitua a função por: bool Game::playerRequestChannels(uint32_t playerId) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; player->sendChannelsDialog(false); return true; } Agora vamos a protocolgame.cpp e procure a função; void ProtocolGame::sendChannelsDialog(bool tv) E substitua por esta função: void ProtocolGame::sendChannelsDialog(bool tv) { NetworkMessage_ptr msg = getOutputBuffer(); std::string str; if(msg) { if (tv) { uint16_t bytes = 0; for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) { it->second->getStorage(22120, str); if (str == "true") { bytes = bytes+1; } } if (bytes < 1) { player->sendCancel("Não há nenhuma tv online"); return; } TRACK_MESSAGE(msg); msg->AddByte(0xAB); msg->AddByte(bytes); uint16_t id = 200; for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) { it->second->getStorage(22120, str); if (str == "true") { id = id+1; it->second->getStorage(12121, str); msg->AddU16(id); msg->AddString(str); } } return; } TRACK_MESSAGE(msg); msg->AddByte(0xAB); ChannelList list = g_chat.getChannelList(player); msg->AddByte(list.size()); for(ChannelList::iterator it = list.begin(); it != list.end(); ++it) { if(ChatChannel* channel = (*it)) { msg->AddU16(channel->getId()); msg->AddString(channel->getName()); } } } } Procure em protocolgame.h a seguinta declaração: void sendChannelsDialog(); Substitua por: void sendChannelsDialog(bool tv); Agora vamos em player.h e procure: void sendChannelsDialog() {if(client) client->sendChannelsDialog();} E substitua por: void sendChannelsDialog(bool tv) {if(client) client->sendChannelsDialog(tv);} Vamos denovo a protocolgame.cpp e procure: if(player->isAccountManager()) { switch(recvbyte) { case 0x14: parseLogout(msg); break; case 0x96: parseSay(msg); break; default: sendCancelWalk(); break; } } Coloque embaixo: if (player->getStorage(34421, str) && str == "true") { player->getStorage(292924, str); switch(recvbyte) { case 0x14: parseLogout(msg); break; case 0x96: parseSay(msg); break; case 0x97: // request channels parseGetChannels(msg); break; case 0x98: // open channel parseOpenChannel(msg); break; case 0x99: // close channel parseCloseChannel(msg); break; case 0x9A: // open priv parseOpenPriv(msg); break; case 0x1E: // keep alive / ping response parseReceivePing(msg); break; default: player->sendTextMessage(MSG_INFO_DESCR, str); break; } Seguidamente vá em creatureevent.cpp e procure: else if(tmpStr == "preparedeath") m_type = CREATURE_EVENT_PREPAREDEATH; Coloque embaixo: else if(tmpStr == "selecttv") m_type = CREATURE_EVENT_SELECTTV; Procure depois: case CREATURE_EVENT_PREPAREDEATH: return "onPrepareDeath"; Coloque embaixo: case CREATURE_EVENT_SELECTTV: return "onSelectTv"; Procure: case CREATURE_EVENT_PREPAREDEATH: return "cid, deathList"; Coloque embaixo: case CREATURE_EVENT_SELECTTV: return "cid, id"; Procure: uint32_t CreatureEvent::executeChannelJoin(Player* player, uint16_t channelId, UsersMap usersMap) { //onJoinChannel(cid, channel, users) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { std::stringstream scriptstream; scriptstream << "local cid = " << env->addThing(player) << std::endl; scriptstream << "local channel = " << channelId << std::endl; scriptstream << "local users = {}" << std::endl; for(UsersMap::iterator it = usersMap.begin(); it != usersMap.end(); ++it) scriptstream << "users:insert(" << env->addThing(it->second) << ")" << std::endl; scriptstream << m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ char desc[35]; sprintf(desc, "%s", player->getName().c_str()); env->setEventDesc(desc); #endif env->setScriptId(m_scriptId, m_interface); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(player)); lua_pushnumber(L, channelId); UsersMap::iterator it = usersMap.begin(); lua_newtable(L); for(int32_t i = 1; it != usersMap.end(); ++it, ++i) { lua_pushnumber(L, i); lua_pushnumber(L, env->addThing(it->second)); lua_settable(L, -3); } bool result = m_interface->callFunction(3); m_interface->releaseEnv(); return result; } } else { std::cout << "[Error - CreatureEvent::executeChannelJoin] Call stack overflow." << std::endl; return 0; } } Coloque embaixo: uint32_t CreatureEvent::executeSelectTv(Player* player, uint16_t id) { //onSelectTv(cid, id) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { std::stringstream scriptstream; scriptstream << "local cid = " << env->addThing(player) << std::endl; scriptstream << "local id = " << id << std::endl; scriptstream << m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ char desc[35]; sprintf(desc, "%s", player->getName().c_str()); env->setEventDesc(desc); #endif env->setScriptId(m_scriptId, m_interface); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(player)); lua_pushnumber(L, id); bool result = m_interface->callFunction(2); m_interface->releaseEnv(); return result; } } else { std::cout << "[Error - CreatureEvent::executeChannelJoin] Call stack overflow." << std::endl; return 0; } } Vá em creatureevent.h e procure: CREATURE_EVENT_ATTACK, Coloque embaixo: CREATURE_EVENT_SELECTTV Procure continuando em creatureevent.h: uint32_t executeCombat(Creature* creature, Creature* target); Coloque embaixo: uint32_t executeSelectTv(Player* player, uint16_t id); Vá agora em game.cpp denovo e procure a função: bool Game::playerOpenChannel(uint32_t playerId, uint16_t channelId) Substitua a função por: bool Game::playerOpenChannel(uint32_t playerId, uint16_t channelId) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; if (channelId >= 200) { CreatureEventList tvEvents = player->getCreatureEvents(CREATURE_EVENT_SELECTTV); for(CreatureEventList::iterator it = tvEvents.begin(); it != tvEvents.end(); ++it) (*it)->executeSelectTv(player, channelId); return true; } ChatChannel* channel = g_chat.addUserToChannel(player, channelId); if(!channel) { #ifdef __DEBUG_CHAT__ std::cout << "Game::playerOpenChannel - failed adding user to channel." << std::endl; #endif return false; } if(channel->getId() != CHANNEL_RVR) player->sendChannel(channel->getId(), channel->getName()); else player->sendRuleViolationsChannel(channel->getId()); return true; } Vá em data/lib e crie um novo arquivo lua chamado tv system: names = {} storage_hastv = 22120 storage_watchtv = 34421 storage_nametv = 12121 storage_idwatchtv = 21213 storage_msgwatch = 292924 storage_namewatchtv = 21923 storage_save_group_id = 63732 smallerros = false ERROR_ID_NOT_FOUND = "ERROR\nPLAYER NOT FOUND\nSet Storage FALSE ON LOGIN" MSG_TV_SYSTEM = "Esta ação não e possivel você esta assistindo" MSG_CREATE_TV = "Parabéns, você criou sua TV " MSG_LOGOUT_TV = "Você saiu da tv " MSG_LOGOUT_TV_TOWN = "Você retornou a sua cidade " ID_ITEM_TV = 1949 ---- IMPORTANTE ID DA SUA CAM(CAMERA) MSG_WATCH_TV = "Você esta assitindo a uma tv" MSG_HAS_TV = "Você ja tem tv" MSG_NO_HAS_TV = "Você não tem tv" MSG_ENTER_PLAYER = "Um novo player entrou - " MININUM_STRING_CARACTER = 4 HAS_TV = "Você ja tem uma tv" MSG_DELETE_TV = "Você deletou sua channel com sucesso" MSG_WATCH_TV_ENTER_TV = "Você entrou na channel " NAME_WRONG = "Nome incorreto" MSG_HAS_NAME_TV = "Desculpe, ja existe uma tv com este nome escolha outro por favor" function setBooleanStorage(cid, storage, bool) if not bool then setPlayerStorageValue(cid, storage, -1) return true end setPlayerStorageValue(cid, storage, "true") return true end function checkFindStrings(str, array) for i=1, #array do if string.find(str, array[i]) then return true end end return false end function playerHasTv(cid) return getPlayerStorageValue(cid, storage_hastv) == "true" and true end function playerWatchTv(cid) return getPlayerStorageValue(cid, storage_watchtv) == "true" and true end function getTvOnlines() local t = {} local online = getPlayersOnline() for i=1, #online do if playerHasTv(online[i]) then table.insert(t, online[i]) end end return t end function getNamesTv(sep) local tvs = getTvOnlines() str = "" for i=1, #tvs do str = str..sep..getTvName(tvs[i]) end return str end function getIdByTvName(name) local tvs = getTvOnlines() for i=1, #tvs do if tvs[i] == name then return name end end return false end function stopWatchAllsPlayerTv(id) local onlines = getTvs(id) for i=1, #onlines do playerStopWatchTv(onlines[i]) end return true end function getNameTv(id) if not isPlayer(id) then print(ERROR_ID_NOT_FOUND) return false end local storage = getPlayerStorageValue(id, storage_nametv) if storage ~= -1 then return storage end return "" end function createNewTv(cid, name) if #name < MININUM_STRING_CARACTER or checkFindStrings(name, names) then doPlayerSendCancel(cid, NAME_WRONG) return false end local tvs = getTvOnlines() for i=1, #tvs do if getNameTv(tvs[i]) == name then doPlayerSendCancel(cid, MSG_HAS_NAME_TV) return false end end if playerHasTv(cid) then doPlayerSendCancel(cid, MSG_HAS_TV) return false end if playerWatchTv(cid) then doPlayerSendCancel(cid, MSG_WATCH_TV) return false end setBooleanStorage(cid, storage_hastv, true) setPlayerStorageValue(cid, storage_nametv, name) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_CREATE_TV..name) return true end function getTvNameById(id) if not isPlayer(id) then print(ERROR_ID_NOT_FOUND) return false end return getPlayerStorageValue(id, storage_nametv) end function playerWatchTv(cid, id) if not isPlayer(id) then if smallerros then print(ERROR_ID_NOT_FOUND) end return false end if playerHasTv(cid) then doPlayerSendCancel(cid, MSG_HAS_TV) return false end if playerWatchTv(cid) then doPlayerSendCancel(cid, MSG_WATCH_TV) return false end local name = getTvNameById(id) setBooleanStorage(cid, storage_watchtv, true) setPlayerStorageValue(cid, storage_msgwatch, MSG_TV_SYSTEM) setPlayerStorageValue(cid, storage_idwatchtv, id) setPlayerStorageValue(cid, storage_namewatchtv, name) setPlayerStorageValue(cid, storage_save_group_id, getPlayerGroupId(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_WATCH_TV_ENTER_TV) doPlayerSendTextMessage(id, MESSAGE_STATUS_CONSOLE_BLUE, MSG_ENTER_PLAYER..getCreatureName(cid)) setPlayerTv(cid, id) return true end function playerStopWatchTv(cid) local id = getPlayerStorageValue(cid, storage_idwatchtv) local name = getPlayerStorageValue(cid, storage_namewatchtv) local town = getPlayerTown(cid) local namet = getTownName(town) local post = getTownTemplePosition(town) if getPlayerStorageValue(cid, storage_watchtv) ~= "true" then return true end removePlayerTv(cid, id) setBooleanStorage(cid, storage_watchtv, false) setPlayerStorageValue(cid, storage_idwatchtv, -1) setPlayerStorageValue(cid, storage_namewatchtv, -1) setPlayerGroupId(cid, getPlayerStorageValue(cid, storage_save_group_id)) doTeleportThing(cid, post) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_LOGOUT_TV..name) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_LOGOUT_TV_TOWN..namet) return true end function deleteTv(cid) if getPlayerStorageValue(cid, 22120) ~= "true" then return false end stopWatchAllsPlayerTv(cid) setBooleanStorage(cid, storage_hastv) setPlayerStorageValue(cid, storage_nametv, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, MSG_DELETE_TV) return true end Agora vamos em actions e crie um arquivo lua chamado tv e coloque: function onUse(cid, item, fromPosition, itemEx, toPosition) doSendChannelsTv(cid) end Vá em actions.xml e coloque a seguinte configurando com o id da sua tv: <!-- TV --> <action itemid="1445" event="script" value="tv.lua"/> Agora vamos em talkactions e crie um novo arquivo lua chamado delete e coloque isto: function onSay(cid, words, param, channel) deleteTv(cid) return true end Agora vamos em talkactions.xml e coloque a seguinte tag: <talkaction words="/delete" event="script" value="delete.lua"/> Agora vamos a creaturescripts e crie um arquivo lua chamado createTv e coloque: function onTextEdit(cid, it:em, newText) if item.itemid == ID_ITEM_TV then createNewTv(cid, newText) return true end return true end Crie outro chamado de tv e coloque: function onSelectTv(cid, id) local tv = getTvOnlines() local idstarter = 200 for i=1, #tv do local tv = tv[i] local sub_id = i+idstarter if sub_id == id then playerWatchTv(cid, tv) end end return true end Crie outro chamado de tvlogout : function onLogout(cid) if isPlayer(cid) then deleteTv(cid) playerStopWatchTv(cid) end return true end Vá em creaturescripts.xml e coloque as seguintes as tags: <event type="textedit" name="newTv" event="script" value="createTv.lua"/> <event type="selecttv" name="selecttv" event="script" value="tv.lua"/> <event type="logout" name="tvlogout" event="script" value="tvlogout.lua"/> Vá em data/xml/group.xml e abra o arquivo e coloque o novo group: <group id="8" name="Tv" flags="3845069447162" customFlags="2097151" access="1" violationReasons="4" nameViolationFlags="2"/>
  34. Versões antigas TibiaBot NG

    Luiz Gustavo de Oliv reagiu a Puncker por uma resposta no tópico

    1 ponto
    Os arquivos .rar contém senha, por favor edite o post e nos forneça a senha para quem quer usar essas versões do NG.
Líderes está configurado para São Paulo/GMT-03:00

Informação Importante

Confirmação de Termo