
Tudo que Vodkart postou
-
(Resolvido)Membros da staff esta no !rank
modaldialog2 = { title = "Rank System", message = "Selecione a classificação que você quer ver:", buttons = { { id = 1, value = "Ver" }, { id = 2, value = "Sair" }, }, buttonEnter = 1, buttonEscape = 2, choices = { { id = 1, value = "Rank Soco" }, { id = 2, value = "Rank Clava" }, { id = 3, value = "Rank Espada" }, { id = 4, value = "Rank Machado" }, { id = 5, value = "Rank Distancia" }, { id = 6, value = "Rank Escudo" }, { id = 7, value = "Rank Pesca" }, { id = 8, value = "Rank Magia" }, { id = 9, value = "Rank Level" } }, popup = false } function getGroupDb(player_id) local query = db.getResult("SELECT `group_id` FROM `players` WHERE `id`= "..player_id) return query:getDataInt("group_id") end function callback2(cid, button, choice) if (button == 1) then local str = "" if (choice == 1) then str = "--[ Rank Soco ]--\n" query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 0 ORDER BY `value` DESC;") if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end if getGroupDb(query:getDataString("player_id")) < 3 then str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]" k = k + 1 end until not query:next() end elseif (choice == 2) then str = "--[ Rank Clava ]--\n" query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 1 ORDER BY `value` DESC;") if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end if getGroupDb(query:getDataString("player_id")) < 3 then str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]" k = k + 1 end until not query:next() end elseif (choice == 3) then str = "--[ Rank Espada ]--\n" query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 2 ORDER BY `value` DESC;") if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end if getGroupDb(query:getDataString("player_id")) < 3 then str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]" k = k + 1 end until not query:next() end elseif (choice == 4) then str = "--[ Rank Machado ]--\n" query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 3 ORDER BY `value` DESC;") if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end if getGroupDb(query:getDataString("player_id")) < 3 then str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]" k = k + 1 end until not query:next() end elseif (choice == 5) then str = "--[ Rank Distancia ]--\n" query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 4 ORDER BY `value` DESC;") if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]" k = k + 1 until not query:next() end elseif (choice == 6) then str = "--[ Rank Escudo ]--\n" query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 5 ORDER BY `value` DESC;") if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end if getGroupDb(query:getDataString("player_id")) < 3 then str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]" k = k + 1 end until not query:next() end elseif (choice == 7) then str = "--[ Rank Pesca ]--\n" query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 6 ORDER BY `value` DESC LIMIT 20;") if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end if getGroupDb(query:getDataString("player_id")) < 3 then str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]" k = k + 1 end until not query:next() end elseif (choice == 8) then str = "--[ Rank Magia ]--\n" query = db.getResult("SELECT `maglevel`, `name` FROM `players` WHERE `group_id` < 3 ORDER BY `maglevel` DESC LIMIT 20;") if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("maglevel") .. "]" k = k + 1 until not query:next() end elseif (choice == 9) then str = "--[ Rank Level ]--\n" query = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` < 3 ORDER BY `experience` DESC LIMIT 20;") if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("level") .. "]" k = k + 1 until not query:next() end end doShowTextDialog(cid, 5785, str) end end function onSay(cid, words, param) addDialog(modaldialog2, 1002, cid, callback2); return true end
-
mesmo com a bless full o player pode compra a bless varias vezes
local bless = 5 local cost = 50000 function onSay(cid, words, param) if not isPremium(cid) then doPlayerSendCancel(cid, 'Desculpe, apenas jogadores donate podem comprar bless por comando.') return true elseif getPlayerBlessing(cid, 1) then doPlayerSendCancel(cid, "Você já tem todas as bless.") return true elseif not doPlayerRemoveMoney(cid, cost) then doPlayerSendCancel(cid, "Você não tem dinheiro suficiente.") return true end for i = 1, bless do doPlayerAddBlessing(cid, i) end doCreatureSay(cid, "Você agora é abençoado!" ,19) doSendMagicEffect(getPlayerPosition(cid), 49) return true end
-
(Resolvido)Modificar Script de Encher Vida
deleta esse script ai que vc tem e a tag dele tbm. ai coloca esse: fulllifepvp.lua function isInPvpFight(cid) return getPlayerStorageValue(cid, 887568) - os.time() <= 0 and false or true end function onLogin(cid) registerCreatureEvent(cid, "InFightAdvance") registerCreatureEvent(cid, "InFightCombat") setPlayerStorageValue(cid, 887568, 0) return true end function onAdvance(cid, skill, oldlevel, newlevel) if skill == SKILL__LEVEL and not isInPvpFight(cid) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid)) end return true end function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then local time = 120 -- 2 minutos que demora pra sair o pvp, modifique ali o tempo setPlayerStorageValue(cid, 887568, os.time()+time) end return true end TAG <event type="login" name="InFightLogin" event="script" value="fulllifepvp.lua"/> <event type="advance" name="InFightAdvance" event="script" value="fulllifepvp.lua"/> <event type="combat" name="InFightCombat" event="script" value="fulllifepvp.lua"/>
-
[Pedido] Correção Scripts
local interval = 3 -- intervalo em segundos entre dois efeitos local set_effect = CONST_ME_FIREWORK_RED -- edite o id do efeito local set = { [CONST_SLOT_HEAD] = 10561, -- id do helmet [CONST_SLOT_ARMOR] = 10555, -- || armor [CONST_SLOT_RIGHT] = 10562, --|| legs } function onEquip(cid, item, slot) SendEffect(cid, set_effect, interval) return true end function SendEffect(cid, effect, time) if isPlayer(cid) then local check = true for slot, id in pairs(set) do if getPlayerSlotItem(cid, slot).itemid ~= id then check = false break end end if check == true then doSendMagicEffect(getPlayerPosition(cid), effect) addEvent(SendEffect, time*1000, cid, effect, time) end end return true end local table = { itemNeed = 10570, -- txt = {"´ . ,", ". ´ ,", "` . ,", ", ` ."}, delay = 1000, cor = {26, 30, 31, 32}, effect = 3 } function doPlayerLoopEff(cid) if isPlayer(cid) and getPlayerSlotItem(cid, CONST_SLOT_RING).itemid == table.itemNeed then doSendMagicEffect(getThingPos(cid), table.effect) doSendAnimatedText(getThingPos(cid), table.txt[math.random(#table.txt)], table.cor[math.random(#table.cor)]) addEvent(function() doPlayerLoopEff(cid) end, table.delay) end end function onEquip(cid, item, slot) doPlayerLoopEff(cid) return true end
-
(Resolvido)[pedido] Npc Bless 0.4
falha minha local itemid, count = 2160, 5 -- ID do item que precisa e sua count 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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, "yes") then for b = 1,5 do if getPlayerBlessing(cid, b) then selfSay('Voce ja tem Bless e nao precisa de outra!', cid) return true end end if not doPlayerRemoveItem(cid, itemid, count) then selfSay("Voce precisa de ".. count .." ".. getItemInfo(itemid).name .." para comprar bless.", cid) return true end for i = 1,5 do doPlayerAddBlessing(cid, i) end doSendMagicEffect(getPlayerPosition(cid), 6) selfSay("Voce comprou a bless!", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
(Resolvido)[pedido] Npc Bless 0.4
local itemid, count = 2160, 5 -- ID do item que precisa e sua count 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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, "yes") then for b = 1,5 do if getPlayerBlessing(cid, b) then selfSay('Voce ja tem Bless e nao precisa de outra!', cid) return true doSendMagicEffect(getPlayerPosition(cid), 3) end end if not doPlayerRemoveItem(cid, itemid, count) then selfSay("Voce precisa de ".. count .." ".. getItemInfo(itemid).name .." para comprar bless.", cid) return true end for i = 1,5 do doPlayerAddBlessing(cid, i) end doSendMagicEffect(getPlayerPosition(cid), 6) selfSay("Voce comprou a bless!", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
(Resolvido)Ajuda com Erro
function Paralizy(cid) if not isCreature(cid) then return LUA_ERROR end local HelmetID = 12692 --- ID DO ITEM if getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == HelmetID then doRemoveCondition(cid, CONDITION_PARALYZE) addEvent(Paralizy, 1*100, cid) end return true end function onEquip(cid, item, slot) doRemoveCondition(cid, CONDITION_PARALYZE) addEvent(Paralizy, 1*100, cid) return true end
-
(Resolvido)Help Botar proibido usar spells em x lugar
kk ainda bem que copiou bem certinho local config = {pos = {x=1765, y=578, z=7},tempo = 30,effect1 = 10,effect2 = 10} local areas ={ -- areas bloqueadas {from = {x=97, y=1773, z=7},to = {x=109, y=1785, z=7}}, -- Evento {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}} } function onCastSpell(cid, var) for _, var in ipairs(areas) do if isInRange(getCreaturePosition(cid), var.from, var.to) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Voce nao pode usar essa magia nesse local") return true end end if isPlayer(getCreatureTarget(cid)) then target = getCreatureTarget(cid) addEvent(doTeleportThing, 1000*config.tempo, target, getThingPos(target), true) addEvent(doSendMagicEffect, 1000*config.tempo, getThingPos(target), config.effect2) doSendMagicEffect(getThingPos(target), config.effect1) doTeleportThing(target, config.pos) if isCreature(cid) then doPlayerSendTextMessage(target, 27, "Voce ".. getCreatureName(cid) ..".") end if isPlayer(cid) and isCreature(target) then doPlayerSendTextMessage(cid, 27, "Voce levou ".. getCreatureName(target) .."!") end else doPlayerSendCancel(cid, "Voce") end return true end
-
(Resolvido)Help Botar proibido usar spells em x lugar
manda teu script editado pra eu ver
-
(Resolvido)Modificar Script de Encher Vida
function onAdvance(cid, skill, oldlevel, newlevel) if skill == SKILL__LEVEL and getCreatureSkullType(cid) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid)) end return true end se não der vamos jogar uma storage para quando o jogador atacar outro player ou ser atacado e checar essa stotorage dps.
-
(Resolvido)Help Botar proibido usar spells em x lugar
local config = {pos = {x=1765, y=578, z=7},tempo = 30,effect1 = 10,effect2 = 10} local areas ={ -- areas bloqueadas {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}}, -- começo da area e final da area {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}} } function onCastSpell(cid, var) for _, var in ipairs(areas) do if isInRange(getCreaturePosition(cid), var.from, var.to) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Voce nao pode usar essa magia nesse local") return true end end if isPlayer(getCreatureTarget(cid)) then target = getCreatureTarget(cid) addEvent(doTeleportThing, 1000*config.tempo, target, getThingPos(target), true) addEvent(doSendMagicEffect, 1000*config.tempo, getThingPos(target), config.effect2) doSendMagicEffect(getThingPos(target), config.effect1) doTeleportThing(target, config.pos) if isCreature(cid) then doPlayerSendTextMessage(target, 27, "Voce ".. getCreatureName(cid) ..".") end if isPlayer(cid) and isCreature(target) then doPlayerSendTextMessage(cid, 27, "Voce levou para ".. getCreatureName(target) .."!") end else doPlayerSendCancel(cid, "Voces") end return true end já n tinha feito da talk pra vc? usa o msm metodo... https://tibiaking.com/forums/topic/89133-help-fly-system-colocar-para-nao-usar-em-x-area/?tab=comments#comment-489941
-
Dark Complex | Cave Hunt | 8.60
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.
-
Alguem sabe me ajudar nisto?
Este tópico foi movido para a área correta. Esta é uma mensagem automática! Pedimos que leia as regras do fórum!
- [TFS 1.2] Modal Window Helper Lib
-
Tutor com exhaust no help
é no xml do chat, mesma pasta onde fica o vocations.xml se não me engano
-
(Resolvido)Modificar Script de Encher Vida
function onAdvance(cid, skill, oldlevel, newlevel) if skill == SKILL__LEVEL and getCreatureCondition(cid, CONDITION_INFIGHT) == false then doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid)) end return true end
-
Npc que da Aura
é que não jogo poketibia então poderia mandar uma imagem ou video?
- ME AJUDEM - Como Instalar/Usar/Abrir mapa no RME para 8.60
-
Npc que da Aura
só efeito? só vai ficar contornando o pessoal?
-
Mudar elemento da Wand
e se não usar addEvent? já tentou? @Toulouse tenta assim: w = { [12031] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE}, [12032] = {ef = 42, sh = 28, dmg = COMBAT_ICEDAMAGE}, [12033] = {ef = 45, sh = 38, dmg = COMBAT_POISONDAMAGE}, [12034] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE}, [12035] = {ef = 11, sh = 35, dmg = COMBAT_ENERGYDAMAGE}, [12036] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE} } function onUseWeapon(cid, var) local min, max = 300, 300 -- dano minimo e maximo local target = getCreatureTarget(cid) for stor, info in pairs(w) do if getPlayerStorageValue(cid, stor) == 1 then if target ~= 0 then doSendDistanceShoot(getThingPos(cid), getThingPos(target), info.sh) doAreaCombatHealth(cid, info.dmg, getThingPos(target), 0, -min, -max, info.ef) return true end end end return true end
- Mudar elemento da Wand
-
(Resolvido)Equipar X Item (checa o outfit e muda para outro de acordo)
salva ela numa storage!
-
(Resolvido)Systema de Vip Por players e nao por Account
troque essa linha if vip.hasVip(cid) == FALSE then por if not HaveCharaterAcess(cid) then
-
(Resolvido)Systema de Vip Por players e nao por Account
tem que mudar as funções local rnd = {"[VIP]"} function onLogin(cid) sendEffect(cid) registerCreatureEvent(cid, "AdvEffect") return true end function sendEffect(cid) if isCreature(cid) and HaveCharaterAcess(cid) then local pos = getThingPos(cid) doSendAnimatedText(pos, rnd[math.random(#rnd)], 210) addEvent(sendEffect, 5200,cid) end end function onSay(cid, words, param, channel) local storage,days = (getPlayerAccountId(cid)+753200),1 if getGlobalStorageValue(storage) > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce só pode usar esse comando 1 vez por account!") return true end setGlobalStorageValue(storage, 1) addCharacterAcess(cid, (days <= 0 and 1 or days)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você recebeu "..days.." dias de VIP, bom jogo!") return true end
-
(Resolvido)Auto Ranking Top 5 Online Broadcast
ai ai, só mudar essa linha: doBroadcastMessage(str, 22) por doBroadcastMessage(str)