
Tudo que Vodkart postou
-
[Pedido] Exp potion 0.3.6 8.54
bacana, só tem um problema, como vai subir 3 msg com 3 tempos diferentes? acho meio inviavel. se eu tiver tempo vou desenvolver uma exp potion pra vender no mercado... kk zoas, pra postar mesmo. fora essa do tempo você poderia ver por uma talk quanto tempo falta, ou quando ela acabar ser avisado...
-
(Resolvido)Proibir a entrada de revive no torneio
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,msg = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid,msg:lower() local item_block = {12343,12345,12344,12346,12347,12348} -- coloque o id dos revives e itens que queira bloquear if msgcontains(msg, 'torneio') or msgcontains(msg, 'enter') then for _, var in pairs(item_block) do if getPlayerItemCount(cid, var) > 0 then selfSay('You can not enter the tournament with revives, please throw them out.', cid) return true end end selfSay('You want to participate in the tournament by '..torneio.price..' gps / dollars?', cid) talkState[talkUser] = 2 elseif msgcontains(msg, "yes") and talkState[talkUser] == 2 then if os.date("%X") < torneio.startHour or os.date("%X") > torneio.endHour then selfSay('Registration for the tournament finished, come back later.', cid) return true elseif not doPlayerRemoveMoney(cid, torneio.price) then selfSay('You do not have enough money ('..torneio.price..').', cid) return true end doTeleportThing(cid, torneio.waitPlace) doPlayerSendTextMessage(cid, 21, "Welcome, this is the waiting room, you wait here while the tournament does not start. Start time: {"..torneio.endHour.."}.") return true elseif msg == 'no' then selfSay('Sure you do not want to participate? Okay, see you next time!', cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) coloque o id de todos os itens que queira bloquear nesta tabela, acho que faltou alguns, confere ai!! local item_block = {12343,12345,12344,12346,12347,12348} -- coloque o id dos revives e itens que queira bloquear
-
(Resolvido)[Correção De Script] Matar monstros e spawnar boss
sim até ai eu entendi, no caso ele teria que matar esse respawn certo, para cada monstro morto iria atribuir uma storage, ok.... Mas como é local aberto outro pode vim e matar entende? e mesmo se outro matasse e tal, qndo sumonasse o boss outro poderia vir e matar o boss dele tbm...
-
(Resolvido)NPC Informativo que marca no mapa.
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 msg = string.lower(msg) local config = { [{"shovel","rope","backpack","riona"}] = {type = MAPMARK_SHOVEL, pos = {x=149,y=47,z=7}, name = "Riona\'s Tool Shop"}, [{"demon","demons"}] = {type = MAPMARK_TICK, pos = {x=133,y=38,z=7}, name = "Demons"} } for var, ret in pairs(config) do for _, check in pairs(var) do if msg == check then type,pos,name = ret.type,ret.pos,ret.name selfSay('Do you want me to add a mapmark '..msg..'? {yes}', cid) talkState[talkUser] = 1 end end end if(msgcontains(msg, 'yes') and talkState[talkUser] >= 1) then doPlayerAddMapMark(cid, pos, type, name) npcHandler:say('Here you are.', cid) talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and talkState[talkUser] >= 1) then selfSay('Well then, hope you can find it yourself!', cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
(Resolvido)[Correção De Script] Matar monstros e spawnar boss
no caso isso é uma quest? exemplo um area system? vai poder entrar 1 player por vez?
-
(Resolvido)Alguem pode colocar um tempo nessa exp potion?
function onUse(cid, item, frompos, item2, topos) local pausa = 20*60*1000 -- (1000 = 1 segundos) Tempo que o script durará local texto = "Você Multiplicou +25% da sua Experiencia por 20 minutos" -- Texto que irá receber ao usar a potion. local textofinal = "Acabou o potion de Experiencia." -- Texto que irá receber quando o efeito da potion acabar. local exp = 1.25 -- O quanto que você quer que dobre sua experiencia, por exemplo 2 é 2x as rates do seu server. local expfinal = 1 --Não mude, isso é para a experiencia voltar ao normal. local limitedeuso = 49015 local tempo = 20*60*1000 -- 1000 = 1s então 1000 vezes 60 vezes 30 = 30 minutos local textofinal1 = "Você já esta sob efeito da potion, se nao estiver, teste relogar!" local seuitem = 6544 -- seu item que dará double exp local efeito1 = 22 -- efeito que ficara com o char por meia hora local efeito2 = 14 -- efeito que acontecera no momento que usar a pot --fim da parte configuravel não mecha se nao tiver conhecimento de scripting local timeEffect = 1801 -- tempo em segundos que o efeito vai apareceer no player, 31 = 30 segundos. sempre coloque 1 segundo a mais. local function effect(cid, seconds) if not isCreature(cid) then return LUA_ERROR end local t, pos = convertTime(0, seconds), getCreaturePosition(cid) doSendMagicEffect(pos, 22) doSendAnimatedText(pos, t.minutes > 0 and t.minutes..":"..t.seconds or t.seconds, math.random(191,191)) if seconds ~= 1 then addEvent(effect, 1000, cid,seconds-1) end end local function potion(cid) doPlayerSetExperienceRate(cid,expfinal) doPlayerSendTextMessage(cid,22,textofinal) end if item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() <= 0) then doRemoveItem(item.uid,1) doPlayerSetExperienceRate(cid,exp) doSendMagicEffect(frompos,efeito2) setPlayerStorageValue(cid, limitedeuso, os.time() + 1800) doPlayerSendTextMessage(cid,22,texto) addEvent(potion,pausa,cid) effect(cid, 20*60) elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) end return true end ve se esse erro persiste.
-
(Resolvido)Alguem pode colocar um tempo nessa exp potion?
vc ja mexeu nas cores na função lá? por exemplo não precisa de math.random se a cor é só uma doSendAnimatedText(pos, t.minutes > 0 and t.minutes..":"..t.seconds or t.seconds, 215)
-
(Resolvido)Alguem pode colocar um tempo nessa exp potion?
coloca essa função na lib se não tiver function convertTime(minutes,seconds) local hours = 0 repeat if seconds >= 60 then minutes = minutes + 1; seconds = seconds - 60 elseif minutes >= 60 then hours = hours + 1; minutes = minutes - 60 end until seconds < 60 and minutes < 60 return {hours = hours, seconds = seconds, minutes = minutes} end -------------------------- function onUse(cid, item, frompos, item2, topos) local pausa = 20*60*1000 -- (1000 = 1 segundos) Tempo que o script durará local texto = "Você Multiplicou +25% da sua Experiencia por 20 minutos" -- Texto que irá receber ao usar a potion. textofinal = "Acabou o potion de Experiencia." -- Texto que irá receber quando o efeito da potion acabar. local exp = 1.25 -- O quanto que você quer que dobre sua experiencia, por exemplo 2 é 2x as rates do seu server. expfinal = 1 --Não mude, isso é para a experiencia voltar ao normal. local limitedeuso = 49015 local tempo = 20*60*1000 -- 1000 = 1s então 1000 vezes 60 vezes 30 = 30 minutos local textofinal1 = "Você já esta sob efeito da potion, se nao estiver, teste relogar!" local seuitem = 6544 -- seu item que dará double exp local efeito1 = 22 -- efeito que ficara com o char por meia hora local efeito2 = 14 -- efeito que acontecera no momento que usar a pot --fim da parte configuravel não mecha se nao tiver conhecimento de scripting local timeEffect = 1801 -- tempo em segundos que o efeito vai apareceer no player, 31 = 30 segundos. sempre coloque 1 segundo a mais. function effect(cid, seconds) if not isCreature(cid) then return LUA_ERROR end local t, pos = convertTime(0, seconds), getCreaturePosition(cid) doSendMagicEffect(pos, 22) doSendAnimatedText(pos, t.minutes > 0 and t.minutes..":"..t.seconds or t.seconds, math.random(191,191)) if seconds ~= 1 then addEvent(effect, 1000, cid,seconds-1) end end if item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() <= 0) then doRemoveItem(item.uid,1) doPlayerSetExperienceRate(cid,exp) doSendMagicEffect(frompos,efeito2) setPlayerStorageValue(cid, limitedeuso, os.time() + 1800) doPlayerSendTextMessage(cid,22,texto) addEvent(potion,pausa,cid) effect(cid, 20*60) elseif item.itemid == seuitem and (getPlayerStorageValue(cid, limitedeuso) - os.time() > 0) then doPlayerSendTextMessage(cid,22,textofinal1) end return true end function potion(cid) doPlayerSetExperienceRate(cid,expfinal) doPlayerSendTextMessage(cid,22,textofinal) end
- TeamSpeak Channel [Imbuing System]
-
O que você colocaria na porta de level 999?
Eu colocaria um TP que te levaria para o tibia 3D
- [Sistema] Battlefield Event! V.1
-
[Pedido] Npc que Troca Items Dou REP+
quero saber qual é o erro que dá pq eu testei e mais 2 membros do tk e não tiveram problema. versão do tfs? erro no distro?
-
(Resolvido)Erro ao logar em qualquer conta
data / lib / 100-compat.lua ve se acha essa linha: hasCondition = hasCreatureCondition getCreatureCondition = hasCreatureCondition se não achar, adc ela no mesmo.
-
(Resolvido)[Creaturescript] Morrer em uma area e ser teleportado pra um local x (sem perder lvl)
function onPrepareDeath(cid, killers) local areas = { {{x=909,y=1019,z=7}, {x=1000,y=1019,z=7}}, -- pos começo e final da area {{x=156,y=1019,z=7}, {x=200,y=1019,z=7}}, {{x=200,y=1019,z=7}, {x=300,y=1019,z=9}} } for _, var in ipairs(areas) do if isInRange(getCreaturePosition(cid), var[1], var[2]) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true) doRemoveConditions(cid, false) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSendTextMessage(cid,22,"You Died.") return false end end return true end ------------------------------------- não esqueça de registrar no player e a TAG
-
[Pedido] Npc que Troca Items Dou REP+
https://tibiaking.com/forums/topic/90934-npc-de-troca-ajuda/?tab=comments#comment-498288
-
(Resolvido)Sistema De Teleporte Para Baiak 8.60
function doTeleportWithDelay(cid, pos, delay) if not isCreature(cid) then return LUA_ERROR end if delay > 0 then if getCreatureCondition(cid, CONDITION_INFIGHT) or not getTilePzInfo(getCreaturePosition(cid)) then setPlayerStorageValue(cid, 548745, 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} O teletransporte foi desativado pois você entrou em estado de combate, ou em zonas especiais.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} "..delay.." segundos para se teletransportar.") addEvent(doTeleportWithDelay, 1000, cid, pos, delay-1) else doTeleportThing(cid, pos) doSendMagicEffect(getPlayerPosition(cid),pos) end end function onSay(cid, words, param) local param = param:lower() local time, t = 5, { ["depot"] = {x=129, y=54, z=6}, ["templo"] = {x=160, y=54, z=7}, ["arena"] = {x=125, y=351, z=9} } if not t[param] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} Desculpe, este lugar não existe.") return true elseif getCreatureCondition(cid, CONDITION_INFIGHT) or not getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} Este comando só pode ser usado fora de áreas de combate ou pz lock.") return true elseif getPlayerStorageValue(cid, 548745) - os.time() > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} aguarde, você está em processo de teletransporte.") return true end setPlayerStorageValue(cid, 548745, os.time()+time) return doTeleportWithDelay(cid, t[param], time) end no onLogin adc isso antes do ultimo return true setPlayerStorageValue(cid, 548745, 0) -- TP SYSTEM
-
[HELP] Alguns scripts dando erro !
1° adc na lib function isInRange(position, fromPosition, toPosition) return (position.x >= fromPosition.x and position.y >= fromPosition.y and position.z >= fromPosition.z and position.x <= toPosition.x and position.y <= toPosition.y and position.z <= toPosition.z) end a função agora é chamada de hasCreatureCondition vai em : data / lib / 100-compat.lua ve se acha essa linha: hasCondition = hasCreatureCondition getCreatureCondition = hasCreatureCondition se não achar, adc ela no mesmo. 3° https://tibiaking.com/forums/topic/34780-eliminando-erros-ao-passar-do-npcs-036/
-
Script arena erros na distro
<?xml version="1.0" encoding="UTF-8"?> <mod name="Arena" version="1.0" author="DrakyLucas" contact="XTibia" enabled="yes"> <config name="arena_config"><![CDATA[ config = { delay = 120, -- tempo de um level para o outro posicaoPlayer = {x = 114,y = 579,z = 7}, -- posio q o player vai cair dps de entra no TP posicaoArena = {{x = 104,y = 568,z = 7},{x = 124,y = 590,z = 7}}, premio = { {2160,100}, {13654,100}, {13655,100}, }, -- ID, Quantidade... s aceita de 1 a 100 por vez, e voc pode adicionar quantos itens quiser. storage = 16445, -- no mecha.. posicaoTp = {x = 169, y = 52, z = 7}, -- posicao que o teleporte vai aparecer acesso = 3, -- acesso minimo para ser ignorado pelo evento, e o mesmo acesso para poder inicializa-lo } -- voc pode adicionar quantos leveis desejar -- [NumeroDoLevel] = {{"Nome",Quantidade},{"Nome",Quantidade},{"Nome",Quantidade},{"Nome",Quantidade},{"Nome",Quantidade}}, leveis = { [1] = {{"Android1",8}}, [2] = {{"Android2",6},{"android1",2}}, [3] = {{"Android3",8}}, [4] = {{"Android4",5},{"Android3",3}}, [5] = {{"Android5",3},{"Android3",2},{"Android2",1}}, [6] = {{"Android6",5},{"Android4",1},{"Android1",2}}, [7] = {{"Android7",5},{"Android3",1},{"Android1",1}}, [8] = {{"Android8",8}}, [9] = {{"Android9",6},{"Android1",1},{"Android2",2}}, [10] = {{"Android10",2},{"Android3",3},{"Android9",3}}, } function abrirTeleport(n) doItemSetAttribute(doCreateItem(1387, config.posicaoTp), "aid", 2941) -- cria o tp e deixa aid 2941 doBroadcastMessage("The arena Event will begin! teleport was open and missing ".. n .. " players for the event to start!") doSetStorage(config.storage, n) end function fecharTPeAguardarEvento() doRemoveItem(getTileItemById(config.posicaoTp, 1387).uid,100) doBroadcastMessage("The event already collusion " .. #getPlayersInArena() .. " and players will start " .. config.delay .. " seconds!") addEvent(evento,config.delay*1000,1) end function HaveCreatureArena(area, remove, clean) -- for x = area[1].x - 1, area[2].x + 1 do for y = area[1].y - 1, area[2].y + 1 do local pos = {x=x, y=y, z=area[1].z} local m = getTopCreature(pos).uid if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end if clean ~= false then doCleanTile(pos, false) end end end end function resetEvento() doSetStorage(config.storage, -1) end function criarMonstros(lv) local monstro = leveis[lv] local area = {config.posicaoArena[1],config.posicaoArena[2]} for i = 1,#monstro do for k=1,monstro[2]do pos = {x=math.random(area[1].x,area[2].x), y=math.random(area[1].y,area[2].y), z=area[1].z} monstrinho = doCreateMonster(monstro[1], pos) registerCreatureEvent(monstrinho, "removerCorpse") end end end function evento(i) if #getPlayersInArena() == 0 then doBroadcastMessage("All they died") doBroadcastMessage("End of the Event.") HaveCreatureArena({config.posicaoArena[1],config.posicaoArena[2]}, true, true) -- remove monstros, itens da arena resetEvento() return true end if i == (#leveis +1) then HaveCreatureArena({config.posicaoArena[1],config.posicaoArena[2]}, true, true) doBroadcastMessage("finalized event, " .. #getPlayersInArena() .. " They survived the event!") for _, pid in ipairs(getPlayersInArena()) do doPlayerSendTextMessage(pid,22,"Congratulations, you survived the event!") addItens(pid) doTeleportThing(pid,getTownTemplePosition(getPlayerTown(pid))) end resetEvento() return true end for _, pid in ipairs(getPlayersInArena()) do doPlayerSendTextMessage(pid,22,"Lest Go Level " .. i .. " !!!") end criarMonstros(i) addEvent(evento,config.delay*1000,i+1) end function addItens(pid) for i=1,#config.premio do doPlayerAddItem(pid,config.premio[1],config.premio[2]) end doPlayerSendTextMessage(pid,22,"Congratulations, you have received their prizes!") end function getPlayersInArena() local t = {} for _, pid in pairs(getPlayersOnline()) do if getPlayerAccess(pid) < config.acesso then if isInRange(getCreaturePosition(pid), config.posicaoArena[1], config.posicaoArena[2]) then table.insert(t, pid) end end end return t end ]]></config> <talkaction words="/arena" event="buffer"><![CDATA[ domodlib('arena_config') if getPlayerAccess(cid) < config.acesso then return doPlayerSendCancel(cid,"Voce nao tem acesso para esse comando") end if tonumber(param) ~= nil then -- se o parametro numerico if tonumber(param) > 0 then doSetStorage(config.storage, param) abrirTeleport(param) end else doPlayerSendTextMessage(cid,19,"Digite /arena e um numero.. \n exemplo: \n/arena 5") end ]]></talkaction> <movevent type="StepIn" actionid="2941" event="script"><![CDATA[ domodlib('arena_config') if getPlayerAccess(cid) > config.acesso then doTeleportThing(cid, config.posicaoPlayer) return false end -- GM nao conta doSetStorage(config.storage,getStorage(config.storage) - 1) doTeleportThing(cid, config.posicaoPlayer) registerCreatureEvent(cid, "naoAtacarPlayer") registerCreatureEvent(cid, "morrerNaArena") if getStorage(config.storage) <= 0 then fecharTPeAguardarEvento() end return true ]]></movevent> <event type="login" name="VerSeTaNaArenaEExpulsa" event="script"><![CDATA[ domodlib('arena_config') if isInRange(getCreaturePosition(cid), config.posicaoArena[1], config.posicaoArena[2]) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return true ]]></event> <event type="combat" name="naoAtacarPlayer" event="script"><![CDATA[ domodlib('arena_config') if isPlayer(cid) and isPlayer(target) then if isInRange(getPlayerPosition(cid), config.posicaoArena[1], config.posicaoArena[2]) and isInRange(getPlayerPosition(target), config.posicaoArena[1], config.posicaoArena[2]) then doPlayerSendCancel(cid, "Do not attack your friends.") return false end end return true ]]></event> <event type="death" name="removerCorpse" event="script"><![CDATA[ domodlib('arena_config') doCreatureSay(cid,"No one will have my loot! Buaahahahha",1) pos = getCreaturePosition(cid) addEvent(doCleanTile, 1 , pos, false) return true ]]></event> <event type="preparedeath" name="morrerNaArena" event="script"><![CDATA[ domodlib('arena_config') function onPrepareDeath(cid, killers) if isInRange(getPlayerPosition(cid), config.posicaoArena[1], config.posicaoArena[2]) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true) doRemoveConditions(cid, false) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSendTextMessage(cid,22,"You Died.") return false end return true end]]></event> </mod>
-
Nokturnos new show off
Eu que não entendo nada de tudo, particularmente achei bem bonito os mapas!! Parabéns!!
-
(Resolvido)Editar Jail System 0.3.6 8.54
Tirando a ideia 4, eu achei bacana. porque na ideia 4 ao invés de deixar se matarem, não cria um tile saindo "se enforque!" ai deixa os players decidirem se querem se matar ou não?
-
NPC Oldschool / sem trade
https://tibiaking.com/forums/topic/90826-npc-de-buy-e-sell-no-modo-antigo/
-
[SCRIPT] keywordHandler
vai em \data\npc\lib\npcsystem e me posta o seu npcsystem.lua
-
[8.6] Task System 4.0! (Task system + Daily Task System)
pronto, upei no pastebin os arquivos, isso irá corrigir tbm!! abraços
-
[ILHA] Pequena ilha 11.49
Parabéns, seu tópico de conteúdo foi aprovado! Muito obrigado pela sua contribuição, nós do Tibia King agradecemos. Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP.
-
[8.6] Task System 4.0! (Task system + Daily Task System)
https://pastebin.com/raw/P5hqMC3j