Histórico de Curtidas
-
JEAN JR recebeu reputação de Gabrielx17 em (Resolvido)TOWN IDUP! @KotZletY se tiver como dar um HELP kk
Pessoal, depois de muito tentar, consegui HAHA no caso oque está fazendo o player voltar para o TOWN ID 1 toda hora que iniciava o servidor era isso ai.
Estou deixando a resposta para outros que estiverem com o mesmo problema. É uma query que fazia um UPDATE pra TOWNID voltar pra 1.
O arquivo está em data/globalevents/scripts/start.lua
-
JEAN JR recebeu reputação de Rafinhawilliam em (Resolvido)TOWN IDUP! @KotZletY se tiver como dar um HELP kk
Pessoal, depois de muito tentar, consegui HAHA no caso oque está fazendo o player voltar para o TOWN ID 1 toda hora que iniciava o servidor era isso ai.
Estou deixando a resposta para outros que estiverem com o mesmo problema. É uma query que fazia um UPDATE pra TOWNID voltar pra 1.
O arquivo está em data/globalevents/scripts/start.lua
-
JEAN JR recebeu reputação de Yan Liima em (Resolvido)ERRO NA SOURCE (SCRIPT DE MINERAÇÃO)Mano, me perdoe a expressão. Mas, você é FOD@ !! TE AMO VLW MANO
-
JEAN JR deu reputação a Belmont em [Solução] Códigos Caracteres EspeciasHoje venho aqui trazer a solução pra vocês que colam scripts e jogam em seus arquivos, essa solução nada mais é que remover os caracteres especias que vem junto quando você usa o famoso comando CTRL+C e CTRL+V, esse erro se apresenta de várias formas.
Para resolver, basta você ir no diretório do arquivo abri-lo e ir até a linha que mostra no executável(distro) e procurar o caractere especial, LEMBRANDO que ele pode vim oculto, você ira precisar procurar em letra por letra, no vídeo abaixo explica como procurar o caractere especial oculto letra por letra. O que eu fiz ai no vídeo foi somente apagar o caractere oculto.
Os caracteres ocultos, eles podem serem visualizados com mais facilidade ou com mais dificuldade, no caso desse vídeo, foi bem fácil de visualizar, mais em fim, é só você ir até a linha que mostra no executável(distro) vai no final do código e vem apertando a tecla na direção esquerda até acha-lo.
-
JEAN JR recebeu reputação de Belmont em Cidade [8.60]Boa manin, bota talento ai.
Pra mim, que não desperto interesse em mappear já está bom. Mas sei que pra vocês vai além disso.
Belo trabalho !
-
JEAN JR deu reputação a Belmont em Cidade [8.60]Meu primeiro mapa feito, estou despertando essa habilidade de mapear com ajuda de alguns integrantes da comunidade. @Coltera, @Nolis e @Astra Moskov. Obrigado pelas dicas, criticas construtivas. Pretendo melhorar o máximo possível.
Phineasz.zip - Scan
-
JEAN JR deu reputação a Ryzor em sistema de refinamento perfeito 2.0Autor : Mock
Servidor Testado : TFS 0.3.6
Vamos instalar.
Adcione essa tag no actions.xml:
<action itemid="8306" event="script" value="upgrade.lua"/>
<action itemid="8305" event="script" value="upgrade.lua"/>
Bom a segunda é um segundo item que tem 100% a mais de chance de acertou, ou seja esse nunca falha, e o normal com nem uma chance adcional é o itemid 8305.
Agora em upgrade.lua coloque isso:
Veja ele funcionando:
E agora com a possibilidade do slot ssystem conjunto com esse sistema vc pode fazer coisas assim:
Código:
12:02 You see a knife +1 [hp.+7%] (Atk:8, Def:6).
Creditos
Mock ( Por Fazer O Script )
GodMarini ( Por Trazer Ao TK )
-
JEAN JR deu reputação a .Smile em (Resolvido)Ajuda Exp Ring Por Stagesfunction onEquip(cid, item, slot) if getPlayerStorageValue(cid, 120365) - os.time() <= 0 then doTransformItem(item.uid, 10502, 1) doPlayerSendTextMessage(cid, 22, 'Agora ganha 3x mais experiencia!') doPlayerSetExperienceRate(cid, 3.0) setPlayerStorageValue(cid, 120365, os.time()+2) end return true end function onDeEquip(cid, item, slot) doPlayerSendTextMessage(cid, 22, 'Experiencia extra cancelada.') doPlayerSetExperienceRate(cid, 1) return true end Se possível teste em diferentes leveis do stages pra ver se está tudo funcionando corretamente.
-
JEAN JR recebeu reputação de mullino em (Resolvido)Ajuda Exp Ring Por Stagesfunction onEquip(cid, item, slot) local LevelPlayer = getPlayerLevel(cid) if getPlayerStorageValue(cid, 120365) - os.time() <= 0 then doTransformItem(item.uid, 10502, 1) if LevelPlayer >= 1 and LevelPlayer <= 5000 then doPlayerSendTextMessage(cid, 22, 'Agora ganha 3x mais experiencia!') doPlayerSetExperienceRate(cid, getConfigValue("rateExperience")*0.3) setPlayerStorageValue(cid, 120365, os.time()+2) end elseif LevelPlayer >= 5001 and LevelPlayer <= 10000 then doPlayerSendTextMessage(cid, 22, 'Agora ganha 2.5x mais experiencia!') doPlayerSetExperienceRate(cid, getConfigValue("rateExperience")*0.25) setPlayerStorageValue(cid, 120365, os.time()+2) end elseif LevelPlayer >= 10001 and LevelPlayer <= 15000 then doPlayerSendTextMessage(cid, 22, 'Agora ganha 2x mais experiencia!') doPlayerSetExperienceRate(cid, getConfigValue("rateExperience")*0.2) setPlayerStorageValue(cid, 120365, os.time()+2) end elseif LevelPlayer >= 15001 then doPlayerSendTextMessage(cid, 22, 'Agora ganha 1.5x mais experiencia!') doPlayerSetExperienceRate(cid, getConfigValue("rateExperience")*0.15) setPlayerStorageValue(cid, 120365, os.time()+2) end return true end end function onDeEquip(cid, item, slot) doPlayerSendTextMessage(cid, 22, 'Experiencia extra cancelada.') doPlayerSetExperienceRate(cid, 1) return true end
vê se isso funciona pra vc mano.
EXPLICANDO UM POUCO:
level 1 ao 5k ele vai ter 3x mais de exp quando equipar
level 5k ao 10k ele vai ter 2.5
level 10k ao 15k ele vai ter 2.0
level 15k pra cima ele vai ter 1.5
-
JEAN JR deu reputação a Yan Liima em (Resolvido)ERRO NA SOURCE (SCRIPT DE MINERAÇÃO)Ele está tentando executar uma função que não existe em seu servidor. Em libs/050-function.lua adicione isto:
function setItemName(uid,name) return doItemSetAttribute(uid,'name',name) end Vê se funciona agora.
-
JEAN JR deu reputação a Belmont em Tile Teleport x Tempo - TFS 0.4Se ouvesse algum tipo de prêmio pra quem mais pede, faz tópico, cara, sem dúvidas você seria o GRANDE vencedor. E o pior, você não pede, é como se os scripter, ajudantes da comunidade estivessem contratados por você... Nem pede por favor, nem da um Obrigado, apenas faz o tópico e espera o script chegar na mão neer.
-
JEAN JR deu reputação a Zazeros em (Resolvido)RESPAW COM PLAYER NA TELA@JEAN JR Cara, não é mais fácil um script que summona um monstro quando da um certo tempo? Como se fosse script de invasão, mas com 1 monstro só, ou quantos você quiser
-
JEAN JR deu reputação a DdJs em (Resolvido)RESPAW COM PLAYER NA TELASe for em esquema de raid funciona sim, mesmo se o lugar tiver player o bicho spawna. Aqui no fórum tem uns scripts de raids bem maneiros que da pra configurar dia e hora exata.
-
JEAN JR deu reputação a Belmont em (Resolvido)SCRIPT EFEITO EM TOP LEVEL (TEMPO REAL)@JEAN JR Tenta assim
<event type="login" name="TopEffect" event="script" value="topeffect.lua"/> <event type="advance" name="CheckTop" event="script" value="topeffect.lua"/>
-
JEAN JR deu reputação a Yan Liima em NPC DE VOCAÇÃO TIBIA DBOEntão o problema era apenas com o servidor dele kkkk. Mexo com DBO à anos, fiz muita coisa com esse derivado. Se não fosse por mim muitos servidores hoje em dia não existiria. Infelizmente muitos não sabem disso. Esse derivado não precisa de SRC propria para rodar. A não ser que seja na versão 8.0... Ou o problema seria com a source em que ele está utilizando ou com alguma configuração no script feita por ele. De qualquer forma parabéns pelo script. REP +.
-
JEAN JR deu reputação a diarmaint em NPC DE VOCAÇÃO TIBIA DBOValeu, assim que testar dou o feedback
-
JEAN JR deu reputação a RevallTOP em NPC DE VOCAÇÃO TIBIA DBOMuito bom
-
JEAN JR recebeu reputação de Yan Liima em NPC DE VOCAÇÃO TIBIA DBOEai Galera do TK, tranquilo ? Hoje uma pessoa do TibiaKing me procurou pedindo ajuda com Account Manager no TIBIA DBO pelo motivo de não ter dinheiro para hospedar o site, porem no TIBIA DBO pelo que pesquisei ele não tem Account Manager e não dá pra criar por conta de algumas Sources que não tem, e realmente no OT DBO dele dava BUG ao tentar criar por Account Manager (Que eu mesmo criei por conta de não ter).
Mas vamos ao que Interessa. Acabei fazendo o NPC Yaman (do começo do jogo) de NPC de escolha de Vocação, e quero disponibilizar pra quem estiver com o mesmo problema e não tenha site.
1º Vai na pasta data/npc/scripts/ e abre a Script do NPC Yaman;
2º Copie o código abaixo e cole lá;
3º Salve, abra o jogo e desfrute.
OBS: O player sempre quando morre volta para o mesmo lugar, então coloquei uma validação de que se o Player já estiver com uma vocação ele apenas vai ser teleportado para a city.
local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false local pos = {x=99, y=188, z=7} function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Hey!.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) if getPlayerVocation(cid) == 0 then msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 5 then selfSay('Olá, Escolha sua Vocacao: Goku, Vegeta, Piccolo, C17, Gohan, Trunks, Cell, Freeza, Majin Boo, Broly, C18, Uub, Goten, Chibi Trunks, Cooler, Dende, Tsuful, Bardock, Kuririn, Pan, Kaio, Videl, Janemba, Tenshinhan, Jenk, Raditz, C16, Turles, Bulma, Shenron.') talk_start = 1 elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 5 then selfSay('Sorry, ' .. getCreatureName(cid) .. '! ????????.') elseif focus == cid then talk_start = os.clock() elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 5 then selfSay('Good bye, ' .. getCreatureName(cid) .. '!') focus = 0 talk_start = 0 elseif(msgcontains(msg, 'goku') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar um Goku ?') talk_start = 2 idVocacao = 1 elseif(msgcontains(msg, 'vegeta') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Vegeta ?') talk_start = 2 idVocacao = 17 elseif(msgcontains(msg, 'piccolo') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Piccolo ?') talk_start = 2 idVocacao = 32 elseif(msgcontains(msg, 'c17') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar C17 ?') talk_start = 2 idVocacao = 45 elseif(msgcontains(msg, 'gohan') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Gohan ?') talk_start = 2 idVocacao = 57 elseif(msgcontains(msg, 'trunks') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Trunks ?') talk_start = 2 idVocacao = 71 elseif(msgcontains(msg, 'cell') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Cell ?') talk_start = 2 idVocacao = 83 elseif(msgcontains(msg, 'freeza') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Freeza ?') talk_start = 2 idVocacao = 95 elseif(msgcontains(msg, 'majin boo') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Majin Boo ?') talk_start = 2 idVocacao = 111 elseif(msgcontains(msg, 'broly') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Broly ?') talk_start = 2 idVocacao = 127 elseif(msgcontains(msg, 'c18') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar C18 ?') talk_start = 2 idVocacao = 140 elseif(msgcontains(msg, 'uub') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Uub ?') talk_start = 2 idVocacao = 152 elseif(msgcontains(msg, 'goten') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Goten ?') talk_start = 2 idVocacao = 164 elseif(msgcontains(msg, 'chibi trunks') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Chibi Trunks ?') talk_start = 2 idVocacao = 178 elseif(msgcontains(msg, 'cooler') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Cooler ?') talk_start = 2 idVocacao = 192 elseif(msgcontains(msg, 'dende') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Dende ?') talk_start = 2 idVocacao = 206 elseif(msgcontains(msg, 'tsuful') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Tsuful ?') talk_start = 2 idVocacao = 218 elseif(msgcontains(msg, 'bardock') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Bardock ?') talk_start = 2 idVocacao = 230 elseif(msgcontains(msg, 'kuririn') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Kuririn ?') talk_start = 2 idVocacao = 244 elseif(msgcontains(msg, 'pan') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Pan ?') talk_start = 2 idVocacao = 256 elseif(msgcontains(msg, 'kaio') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Kaio ?') talk_start = 2 idVocacao = 268 elseif(msgcontains(msg, 'videl') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Videl ?') talk_start = 2 idVocacao = 280 elseif(msgcontains(msg, 'janemba') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Janemba ?') talk_start = 2 idVocacao = 292 elseif(msgcontains(msg, 'tenshinhan') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Tenshinhan ?') talk_start = 2 idVocacao = 304 elseif(msgcontains(msg, 'jenk') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Jenk ?') talk_start = 2 idVocacao = 316 elseif(msgcontains(msg, 'raditz') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Raditz ?') talk_start = 2 idVocacao = 328 elseif(msgcontains(msg, 'c16') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar C16 ?') talk_start = 2 idVocacao = 340 elseif(msgcontains(msg, 'turles') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Turles ?') talk_start = 2 idVocacao = 352 elseif(msgcontains(msg, 'bulma') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Bulma ?') talk_start = 2 idVocacao = 364 elseif(msgcontains(msg, 'shenron') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Shenron ?') talk_start = 2 idVocacao = 376 elseif(msgcontains(msg, 'yes') and talk_start == 2) then doPlayerSetVocation(cid, idVocacao) doTeleportThing(cid, pos) talk_start = 0 end else doTeleportThing(cid, pos) end end function onThink() doNpcSetCreatureFocus(focus) if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 6 then selfSay('Good bye then.') focus = 0 end end end
-
JEAN JR deu reputação a Yan Liima em NPC DE VOCAÇÃO TIBIA DBONão entendi muito bem, mas Account Manager contém em todas distro, e sim é possivel fazer com que se escolha a vocação pelo account manager.
Vou acabar com o misterio.
Em config.lua Só ativar o newPlayerChooseVoc. Deixando assim:
newPlayerChooseVoc = true Agora em vocations.xml só por: manager="1" em todos os personagem que será possivel criar no account manager. Ex:
<vocation id="1" name="Goku" description="a goku" manager="1"> Mas de qualquer forma esse NPC irá ajudar muitas pessoas. E sobre outfit pedido pelo @diarmaint a função é essa:
doCreatureChangeOutfit(cid, {lookType = ID})
-
JEAN JR recebeu reputação de KotZletY em (Resolvido)TOWN IDUP! @KotZletY se tiver como dar um HELP kk
Pessoal, depois de muito tentar, consegui HAHA no caso oque está fazendo o player voltar para o TOWN ID 1 toda hora que iniciava o servidor era isso ai.
Estou deixando a resposta para outros que estiverem com o mesmo problema. É uma query que fazia um UPDATE pra TOWNID voltar pra 1.
O arquivo está em data/globalevents/scripts/start.lua
-
JEAN JR recebeu reputação de RevallTOP em NPC DE VOCAÇÃO TIBIA DBOEai Galera do TK, tranquilo ? Hoje uma pessoa do TibiaKing me procurou pedindo ajuda com Account Manager no TIBIA DBO pelo motivo de não ter dinheiro para hospedar o site, porem no TIBIA DBO pelo que pesquisei ele não tem Account Manager e não dá pra criar por conta de algumas Sources que não tem, e realmente no OT DBO dele dava BUG ao tentar criar por Account Manager (Que eu mesmo criei por conta de não ter).
Mas vamos ao que Interessa. Acabei fazendo o NPC Yaman (do começo do jogo) de NPC de escolha de Vocação, e quero disponibilizar pra quem estiver com o mesmo problema e não tenha site.
1º Vai na pasta data/npc/scripts/ e abre a Script do NPC Yaman;
2º Copie o código abaixo e cole lá;
3º Salve, abra o jogo e desfrute.
OBS: O player sempre quando morre volta para o mesmo lugar, então coloquei uma validação de que se o Player já estiver com uma vocação ele apenas vai ser teleportado para a city.
local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false local pos = {x=99, y=188, z=7} function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Hey!.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) if getPlayerVocation(cid) == 0 then msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 5 then selfSay('Olá, Escolha sua Vocacao: Goku, Vegeta, Piccolo, C17, Gohan, Trunks, Cell, Freeza, Majin Boo, Broly, C18, Uub, Goten, Chibi Trunks, Cooler, Dende, Tsuful, Bardock, Kuririn, Pan, Kaio, Videl, Janemba, Tenshinhan, Jenk, Raditz, C16, Turles, Bulma, Shenron.') talk_start = 1 elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 5 then selfSay('Sorry, ' .. getCreatureName(cid) .. '! ????????.') elseif focus == cid then talk_start = os.clock() elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 5 then selfSay('Good bye, ' .. getCreatureName(cid) .. '!') focus = 0 talk_start = 0 elseif(msgcontains(msg, 'goku') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar um Goku ?') talk_start = 2 idVocacao = 1 elseif(msgcontains(msg, 'vegeta') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Vegeta ?') talk_start = 2 idVocacao = 17 elseif(msgcontains(msg, 'piccolo') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Piccolo ?') talk_start = 2 idVocacao = 32 elseif(msgcontains(msg, 'c17') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar C17 ?') talk_start = 2 idVocacao = 45 elseif(msgcontains(msg, 'gohan') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Gohan ?') talk_start = 2 idVocacao = 57 elseif(msgcontains(msg, 'trunks') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Trunks ?') talk_start = 2 idVocacao = 71 elseif(msgcontains(msg, 'cell') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Cell ?') talk_start = 2 idVocacao = 83 elseif(msgcontains(msg, 'freeza') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Freeza ?') talk_start = 2 idVocacao = 95 elseif(msgcontains(msg, 'majin boo') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Majin Boo ?') talk_start = 2 idVocacao = 111 elseif(msgcontains(msg, 'broly') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Broly ?') talk_start = 2 idVocacao = 127 elseif(msgcontains(msg, 'c18') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar C18 ?') talk_start = 2 idVocacao = 140 elseif(msgcontains(msg, 'uub') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Uub ?') talk_start = 2 idVocacao = 152 elseif(msgcontains(msg, 'goten') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Goten ?') talk_start = 2 idVocacao = 164 elseif(msgcontains(msg, 'chibi trunks') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Chibi Trunks ?') talk_start = 2 idVocacao = 178 elseif(msgcontains(msg, 'cooler') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Cooler ?') talk_start = 2 idVocacao = 192 elseif(msgcontains(msg, 'dende') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Dende ?') talk_start = 2 idVocacao = 206 elseif(msgcontains(msg, 'tsuful') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Tsuful ?') talk_start = 2 idVocacao = 218 elseif(msgcontains(msg, 'bardock') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Bardock ?') talk_start = 2 idVocacao = 230 elseif(msgcontains(msg, 'kuririn') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Kuririn ?') talk_start = 2 idVocacao = 244 elseif(msgcontains(msg, 'pan') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Pan ?') talk_start = 2 idVocacao = 256 elseif(msgcontains(msg, 'kaio') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Kaio ?') talk_start = 2 idVocacao = 268 elseif(msgcontains(msg, 'videl') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Videl ?') talk_start = 2 idVocacao = 280 elseif(msgcontains(msg, 'janemba') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Janemba ?') talk_start = 2 idVocacao = 292 elseif(msgcontains(msg, 'tenshinhan') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Tenshinhan ?') talk_start = 2 idVocacao = 304 elseif(msgcontains(msg, 'jenk') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Jenk ?') talk_start = 2 idVocacao = 316 elseif(msgcontains(msg, 'raditz') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Raditz ?') talk_start = 2 idVocacao = 328 elseif(msgcontains(msg, 'c16') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar C16 ?') talk_start = 2 idVocacao = 340 elseif(msgcontains(msg, 'turles') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Turles ?') talk_start = 2 idVocacao = 352 elseif(msgcontains(msg, 'bulma') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Bulma ?') talk_start = 2 idVocacao = 364 elseif(msgcontains(msg, 'shenron') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Shenron ?') talk_start = 2 idVocacao = 376 elseif(msgcontains(msg, 'yes') and talk_start == 2) then doPlayerSetVocation(cid, idVocacao) doTeleportThing(cid, pos) talk_start = 0 end else doTeleportThing(cid, pos) end end function onThink() doNpcSetCreatureFocus(focus) if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 6 then selfSay('Good bye then.') focus = 0 end end end
-
JEAN JR deu reputação a Bruno Minervino em TopLevel EffectFala galera,
Um membro fez um pedido, e achei que deveria compartilhar com vocês, algo simples porém útil. Principalmente em OT's do estilo Baiak.
O que o script faz ?
Ele simplesmente manda um efeito para o Top Level caso ele estiver online.
Instalação:
Em data/creaturescripts/creaturescripts.xml adicione:
<event type="login" name="TopEffect" event="script" value="topeffect.lua"/> <event type="advance" name="CheckTop" event="script" value="topeffect.lua"/> Agora crie um arquivo em data/creaturescripts/scripts com o nome topeffect.lua e adicione:
--[[ Script by Bruno Minervino para o Tibia King Caso for postar, colocar os créditos ]] local config = { tempo = 10, --tempo em segundos mensagem = { texto = "[TOP]", --não use mais de 9 caracteres efeito = TEXTCOLOR_LIGHTBLUE --efeito para a função doSendAnimatedText }, efeito = 30, --efeito da função doSendMagicEffect globalstr = 5687 -- uma global storage qualquer q esteje vazia } --[[ Não mexa em nada abaixo ]] local topPlayer = getGlobalStorageValue(config.globalstr) > 0 and getGlobalStorageValue(config.globalstr) or 0 function onLogin(cid) local query = db.getResult("SELECT `id`, `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then local pid = query:getDataString("id") local name = query:getDataString("name") if getPlayerName(cid) == name then if topPlayer ~= getPlayerID(cid) then topPlayer = getPlayerID(cid) end setGlobalStorageValue(config.globalstr, pid) TopEffect(cid) end end registerCreatureEvent(cid, "CheckTop") return true end function onAdvance(cid, skill, oldlevel, newlevel) if skill == 8 then local query = db.getResult("SELECT `id`, `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then local level = tonumber(query:getDataString("level")) if level < newlevel and topPlayer ~= getPlayerID(cid) then doBroadcastMessage("O jogador " .. getPlayerName(cid) .. " tornou-se o novo Top Level. Parabens!", 22) topPlayer = getPlayerID(cid) doSaveServer() setGlobalStorageValue(config.globalstr, getPlayerID(cid)) TopEffect(cid) end end end return true end function TopEffect(cid) if not isPlayer(cid) then return true end if topPlayer == getPlayerID(cid) then doSendAnimatedText(getCreaturePosition(cid), config.mensagem.texto, config.mensagem.efeito) doSendMagicEffect(getCreaturePosition(cid), config.efeito) addEvent(TopEffect, config.tempo * 1000, cid) end end function getPlayerNameById(id) local query = db.getResult("SELECT `name` FROM `players` WHERE `id` = " .. db.escapeString(id)) if query:getID() ~= -1 then return query:getDataString("name") end return 0 end function getPlayerIdByName(name) local query = db.getResult("SELECT `id` FROM `players` WHERE `name` = " .. db.escapeString(name)) if query:getID() ~= -1 then return tonumber(query:getDataString("id")) end return 0 end function getPlayerID(cid) return getPlayerIdByName(getPlayerName(cid)) end
Espero ajudar!
-
JEAN JR recebeu reputação de KotZletY em NPC DE VOCAÇÃO TIBIA DBOEai Galera do TK, tranquilo ? Hoje uma pessoa do TibiaKing me procurou pedindo ajuda com Account Manager no TIBIA DBO pelo motivo de não ter dinheiro para hospedar o site, porem no TIBIA DBO pelo que pesquisei ele não tem Account Manager e não dá pra criar por conta de algumas Sources que não tem, e realmente no OT DBO dele dava BUG ao tentar criar por Account Manager (Que eu mesmo criei por conta de não ter).
Mas vamos ao que Interessa. Acabei fazendo o NPC Yaman (do começo do jogo) de NPC de escolha de Vocação, e quero disponibilizar pra quem estiver com o mesmo problema e não tenha site.
1º Vai na pasta data/npc/scripts/ e abre a Script do NPC Yaman;
2º Copie o código abaixo e cole lá;
3º Salve, abra o jogo e desfrute.
OBS: O player sempre quando morre volta para o mesmo lugar, então coloquei uma validação de que se o Player já estiver com uma vocação ele apenas vai ser teleportado para a city.
local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false local pos = {x=99, y=188, z=7} function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Hey!.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) if getPlayerVocation(cid) == 0 then msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 5 then selfSay('Olá, Escolha sua Vocacao: Goku, Vegeta, Piccolo, C17, Gohan, Trunks, Cell, Freeza, Majin Boo, Broly, C18, Uub, Goten, Chibi Trunks, Cooler, Dende, Tsuful, Bardock, Kuririn, Pan, Kaio, Videl, Janemba, Tenshinhan, Jenk, Raditz, C16, Turles, Bulma, Shenron.') talk_start = 1 elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 5 then selfSay('Sorry, ' .. getCreatureName(cid) .. '! ????????.') elseif focus == cid then talk_start = os.clock() elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 5 then selfSay('Good bye, ' .. getCreatureName(cid) .. '!') focus = 0 talk_start = 0 elseif(msgcontains(msg, 'goku') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar um Goku ?') talk_start = 2 idVocacao = 1 elseif(msgcontains(msg, 'vegeta') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Vegeta ?') talk_start = 2 idVocacao = 17 elseif(msgcontains(msg, 'piccolo') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Piccolo ?') talk_start = 2 idVocacao = 32 elseif(msgcontains(msg, 'c17') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar C17 ?') talk_start = 2 idVocacao = 45 elseif(msgcontains(msg, 'gohan') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Gohan ?') talk_start = 2 idVocacao = 57 elseif(msgcontains(msg, 'trunks') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Trunks ?') talk_start = 2 idVocacao = 71 elseif(msgcontains(msg, 'cell') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Cell ?') talk_start = 2 idVocacao = 83 elseif(msgcontains(msg, 'freeza') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Freeza ?') talk_start = 2 idVocacao = 95 elseif(msgcontains(msg, 'majin boo') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Majin Boo ?') talk_start = 2 idVocacao = 111 elseif(msgcontains(msg, 'broly') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Broly ?') talk_start = 2 idVocacao = 127 elseif(msgcontains(msg, 'c18') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar C18 ?') talk_start = 2 idVocacao = 140 elseif(msgcontains(msg, 'uub') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Uub ?') talk_start = 2 idVocacao = 152 elseif(msgcontains(msg, 'goten') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Goten ?') talk_start = 2 idVocacao = 164 elseif(msgcontains(msg, 'chibi trunks') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Chibi Trunks ?') talk_start = 2 idVocacao = 178 elseif(msgcontains(msg, 'cooler') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Cooler ?') talk_start = 2 idVocacao = 192 elseif(msgcontains(msg, 'dende') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Dende ?') talk_start = 2 idVocacao = 206 elseif(msgcontains(msg, 'tsuful') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Tsuful ?') talk_start = 2 idVocacao = 218 elseif(msgcontains(msg, 'bardock') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Bardock ?') talk_start = 2 idVocacao = 230 elseif(msgcontains(msg, 'kuririn') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Kuririn ?') talk_start = 2 idVocacao = 244 elseif(msgcontains(msg, 'pan') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Pan ?') talk_start = 2 idVocacao = 256 elseif(msgcontains(msg, 'kaio') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Kaio ?') talk_start = 2 idVocacao = 268 elseif(msgcontains(msg, 'videl') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Videl ?') talk_start = 2 idVocacao = 280 elseif(msgcontains(msg, 'janemba') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Janemba ?') talk_start = 2 idVocacao = 292 elseif(msgcontains(msg, 'tenshinhan') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Tenshinhan ?') talk_start = 2 idVocacao = 304 elseif(msgcontains(msg, 'jenk') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Jenk ?') talk_start = 2 idVocacao = 316 elseif(msgcontains(msg, 'raditz') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Raditz ?') talk_start = 2 idVocacao = 328 elseif(msgcontains(msg, 'c16') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar C16 ?') talk_start = 2 idVocacao = 340 elseif(msgcontains(msg, 'turles') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Turles ?') talk_start = 2 idVocacao = 352 elseif(msgcontains(msg, 'bulma') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Bulma ?') talk_start = 2 idVocacao = 364 elseif(msgcontains(msg, 'shenron') and talk_start == 1) then selfSay('Voce Deseja Realmente se tornar Shenron ?') talk_start = 2 idVocacao = 376 elseif(msgcontains(msg, 'yes') and talk_start == 2) then doPlayerSetVocation(cid, idVocacao) doTeleportThing(cid, pos) talk_start = 0 end else doTeleportThing(cid, pos) end end function onThink() doNpcSetCreatureFocus(focus) if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 6 then selfSay('Good bye then.') focus = 0 end end end
-
JEAN JR deu reputação a Vodkart em (Resolvido)Atacar Magia em Player Apenasfunction onCastSpell(cid, var) local jogadorpos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local monsterpos = getCreaturePosition(target) if target and isPlayer(target) then doTeleportThing(cid,monsterpos) doTeleportThing(target,jogadorpos) doSendMagicEffect(jogadorpos, 65) doSendMagicEffect(monsterpos, 65) else doPlayerSendTextMessage(cid,20,'It is not possible to use on creatures.') end return true end
-
JEAN JR deu reputação a Roy em (Resolvido)Atacar Magia em Player ApenasTroque essa linha:
if target == isMonster or isCreature then Por essa e veja se funciona.
if target == isPlayer then