Ir para conteúdo

Vodkart

Héroi
  • Registro em

Solutions

  1. Vodkart's post in (Resolvido)Comando que cria Teleport was marked as the answer   
    viu vc nao copiou, olha como está o outro script:
    local tpId = 1387 local pos, topos = {x=151, y=40, z=7},{x=95, y=182, z=7} function onSay(cid,words,param,channel) local t = getTileItemById(pos, tpId).uid if param == "close" then if t > 0 then doRemoveItem(t) doSendMagicEffect(pos, CONST_ME_POFF) doBroadcastMessage("O teleporte foi fechado!") else doPlayerSendCancel(cid, "Desculpe, mas nao tem nenhum teleport no momento.") end return true end if t > 0 then doPlayerSendCancel(cid, "Desculpe, ja existe um telepor criado no momento.") return true end doCreateTeleport(tpId, topos, pos) doBroadcastMessage("O teleporte foi aberto!") return true end  
     
     
    está diferente.
  2. Vodkart's post in (Resolvido)[PEDIDO] BOSS que ao morrer da item was marked as the answer   
    rewmonster.lua
     
    function GiveRewards(cid, items) -- n mexa na função local backpack,str = doPlayerAddItem(cid, 1999, 1), '' -- backpackID for i = 1, table.maxn(items) do local chance, itemid, amount = items[i].chance, items[i].itemid,items[i].amount if chance > math.random(1, 100) then if isItemStackable(itemid) or amount == 1 then doAddContainerItem(backpack, itemid, amount) else for i = 1, amount do doAddContainerItem(backpack, itemid, 1) end end str = str .. amount .. ' ' .. getItemNameById(itemid) str = i ~= table.maxn(items) and str .. ', ' or str .. '.' end end return str end local monstName = "Pythius The Rotten" -- nome do monstro local rewards = { -- chance, itemid e quantidade {chance = 50, itemid = 2173, amount = 1}, {chance = 10, itemid = 2494, amount = 1}, {chance = 100, itemid = 2159,amount = 20}, {chance = 100, itemid = 2160, amount = 100} } function onDeath(cid, corpse, killer) if isMonster(cid) and string.lower(getCreatureName(cid)) == string.lower(monstName) then local t = getSpectators(getCreaturePosition(cid), 7, 5, false) -- quem vai estar a 7x5 sqm dele vai ganhar os itens. pode aumentar o radius. if t then for _, pid in ipairs(t) do if isPlayer(pid) then local r = GiveRewards(pid, rewards) doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_ORANGE,"Parabéns, Você destriu o monstro "..monstName..". Suas recompensas: "..r) end end end end return true end  
    em creaturescript.xml adicione a tag:
     
    <event type="death" name="RewaMonster" event="script" value="rewmonster.lua"/>
     
     
    No arquivo Xml do seu monstro adicione
    <script> <event name="RewaMonster"/> </script>  
  3. Vodkart's post in (Resolvido)Atacar Magia em Player Apenas was marked as the answer   
    function 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  
  4. Vodkart's post in (Resolvido)Ajuda Com Script - TFS 0.4 was marked as the answer   
    @BilauX 
    function onSay(cid, words, param, channel) local split = param:explode(",") local name, count = split[1], tonumber(split[2]) local pid = getPlayerByNameWildcard(name) if (not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Player " .. param .. " is not currently online.") return TRUE end if not(split[2]) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "The commands requires 2 parameters: character name, amount") end if not(count) then print(count) return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Numeric parameter required.") end doPlayerAddotfunPoints(pid, count) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, count .. " otfun points were added to " .. name .. "\'s Account.") doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have recived "..count.." otfun points!") return true end  
  5. Vodkart's post in (Resolvido)[PEDIDO] Script de !support was marked as the answer   
    @Matheuus 
    local min_group_id = 1 -- aqui vai contar a partir do 2, 3, 4 ... function onSay(cid, words, param, channel) local query, str = db.getResult("SELECT `name`, `group_id` FROM `players` WHERE `group_id` > "..min_group_id), "--> STAFF <--\n\n[Group]Nick | Status\n" if (query:getID() ~= -1) then repeat local _ = query:getDataString("name") local target_online = getPlayerByNameWildcard(_) if (not target_online or (isPlayerGhost(target_online) and getPlayerGhostAccess(target_online) > getPlayerGhostAccess(cid))) then status = "Offline" else status = "Online" end str = str .. "\n ["..getGroupInfo(query:getDataInt("group_id")).name.."]".._.." | "..status until not(query:next()) query:free() end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) return true end  
  6. Vodkart's post in (Resolvido)Rank Reset - TFS 0.4 was marked as the answer   
    O certo seria refazer esse script feioso kkk mas to sem tempo
     
    local displayoutput = {"Resets","Level","Magic Level","Fist Fighting","Club Fighting","Sword Fighting","Axe Fighting","Distance Fighting","Shielding"} local itemtype = {9969,9933,5896,8929,8932,7388,8849,8906,2580} local storage = 378378 -- valor da storage function onSay(cid, words, param) number = 1 param = string.lower(param) skilllist = "" command = TRUE if param == "reset" then display = 1 elseif param == "level" then display = 2 elseif param == "magic" then id = 1 display = 3 elseif param == "club" then id = 2 display = 4 elseif param == "sword" then id = 3 display = 5 elseif param == "axe" then id = 4 display = 6 elseif param == "distance" then id = 5 display = 7 elseif param == "shield" then id = 6 display = 8 else error = 'Highscore Commands:\n\n!rank reset\n!rank level\n!rank magic\n!rank fist\n!rank club\n!rank sword\n!rank axe\n!rank distance\n!rank shield\n' doShowTextDialog(cid, 5958, error) command = FALSE end if command ~= FALSE then if display == 1 then local player = db.getResult("SELECT `name`, `reset` FROM `players` WHERE group_id < '2' ORDER BY `reset` DESC LIMIT 50;") if(player:getID() ~= -1) then while (true) do local name = player:getDataString("name") local level = player:getDataInt("reset") skilllist = skilllist.. "\n#"..string.format("%5s",number.." "..name.." - "..level) number = number + 1 if not(player:next()) then break end end player:free() end elseif display == 2 then local player = db.getResult("SELECT `name`, `level` FROM `players` WHERE group_id < '2' ORDER BY `level` DESC LIMIT 50;") if(player:getID() ~= -1) then while (true) do local name = player:getDataString("name") local level = player:getDataInt("level") skilllist = skilllist.. "\n#"..string.format("%5s",number.." "..name.." - "..level) number = number + 1 if not(player:next()) then break end end player:free() end elseif display == 3 then local player = db.getResult("SELECT `name`, `maglevel` FROM `players` WHERE group_id < '2' ORDER BY `maglevel` DESC LIMIT 50;") if(player:getID() ~= -1) then while (true) do local name = player:getDataString("name") local maglevel = player:getDataInt("maglevel") skilllist = skilllist.. "\n#"..string.format("%5s",number.." "..name.." - "..maglevel) if not(player:next()) then break end number = number + 1 end end player:free() else local skills = db.getResult("SELECT `player_id`, `value`, `skillid` FROM `player_skills` WHERE `skillid` = "..id.." ORDER BY `value` DESC;") while (true) do local GUID = skills:getDataInt("player_id") local value = skills:getDataInt("value") local skillid = skills:getDataInt("skillid") local player = db.getResult("SELECT `name` FROM `players` WHERE `id` = "..GUID.." and group_id < '2' ") if(player:getID() ~= -1) then local name = player:getDataString("name") skilllist = skilllist.. "\n#"..string.format("%5s",number.." "..name.." - "..value) number = number + 1 player:free() end if number > 50 then break end if not(skills:next()) then break end end skills:free() end dialog = ""..displayoutput[display].." Highscores: \n "..skilllist.."" doShowTextDialog(cid, itemtype[display], dialog) end end  
  7. Vodkart's post in (Resolvido)action tfs 1.x was marked as the answer   
    function onUse(cid,item,frompos,topos) local const = 3000 local itemid = 2197 local qtd = 5 local player = Player(cid) local freecap = player:getFreeCapacity() if player:getFreeCapacity() < (ItemType(itemid):getWeight(qtd) + ItemType(2003):getWeight()) then return player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have enough cap.') elseif not player:removeMoney(const) then return player:sendCancelMessage("You don't have enough money.") end local bp = doPlayerAddItem(cid, 2003, 1, false) for i = 1, 20 do doAddContainerItem(bp, itemid, qtd) end doPlayerSendTextMessage(cid,22,'It selling.') return true end  
  8. Vodkart's post in (Resolvido)AJUDA COM SCRIPT was marked as the answer   
    function onDeath(cid, corpse, deathList) if getPlayerStamina(cid) >= 840 then setPlayerStamina(cid, getPlayerStamina(cid) - 840) doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) return true end return true end  
  9. Vodkart's post in (Resolvido)[pedido] Remover parede em x dia e x hora was marked as the answer   
    wall.lua
    local config = { pos = {x = 183, y = 59, z=7}, -- posição da parede id = 8476, -- id da parede time = 5 -- vai voltar a parede em 5 minutos } local days = {"Monday","Wednesday","Friday","Saturday"} -- coloque os dias que vc quer function removeParede() local t = getTileItemById(config.pos, config.id).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(config.pos, CONST_ME_POFF) end function onTimer() if isInArray(days, os.date("%A")) then removeParede() doBroadcastMessage("[Evento] A parede foi removida!!", 22) addEvent(function() local x = getTileItemById(config.pos, config.id).uid if x == 0 then doCreateItem(config.id, 1, config.pos) end end, config.time*60*1000) end return true end  
    TAG
     
    <globalevent name="remove wall" time="19:00" event="script" value="wall.lua"/>  
     
    Caso der erro na função main, troque o "onTimer()" por "onTime()"
  10. Vodkart's post in (Resolvido)Comando que mostra todas as guilds do servidor. was marked as the answer   
    function getGuildLeaderName(GuildName) -- function by vodkart local leader = db.getResult("SELECT `players`.`name` FROM `players` WHERE `players`.`id` = (SELECT `guilds`.`ownerid` FROM `guilds` WHERE `guilds`.`name` = ".. db.escapeString(GuildName) .. ")") if(leader:getID() ~= -1) then return leader:getDataString("name") end return "Nobody" end function onSay(cid, words, param, channel) local str, lista = "Guilds Disponiveis no servidor", db.getResult("SELECT `name` FROM `guilds`;") if (lista:getID() ~= -1) then k = 1 repeat local name = lista:getDataString("name") local lider = getGuildLeaderName(name) str = str .. "\n [" .. k .. "] "..name.." - Lider: "..lider k = k + 1 until not lista:next() lista:free() doShowTextDialog(cid, 2529,str) return true end doShowTextDialog(cid, 2529,"Não existem guilds no servidor.") return true end  
  11. Vodkart's post in (Resolvido)Upgrade no comando /finditem was marked as the answer   
    entendi, faltou o "i" do for... vocês copiam o código e não colocam no code box, ai induz ao erro mesmo.
     
    function onSay(cid, words, param) if param == '' or tonumber(param) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "/find item name") return true end local item_id = tonumber(param) if(not item_id) then item_id = getItemIdByName(tostring(param), false) if(not item_id) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end end local str, player_depotitems, players_items, tile_items = "",{},{},{} local dp = db.getResult("SELECT `player_id`, `count` FROM `player_depotitems` WHERE `itemtype` = "..item_id),{} if (dp:getID() ~= -1) then repeat player_depotitems[#player_depotitems+1] = {dp:getDataInt("player_id"), dp:getDataInt("count") } until not(dp:next()) dp:free() end local pi = db.getResult("SELECT `player_id`, `count` FROM `player_items` WHERE `itemtype` = "..item_id),{} if (pi:getID() ~= -1) then repeat players_items[#players_items+1] = {pi:getDataInt("player_id"), pi:getDataInt("count") } until not(pi:next()) pi:free() end local hi = db.getResult("SELECT `tile_id`, `count` FROM `tile_items` WHERE `itemtype` = "..item_id),{} if (hi:getID() ~= -1) then repeat local tile = db.getResult("SELECT `house_id`, `x`, `y`, `z` FROM `tiles` WHERE `id` = "..hi:getDataInt("tile_id")),{} tile_items[#tile_items+1] = {tile:getDataInt("house_id"),tile:getDataInt("x"),tile:getDataInt("y"),tile:getDataInt("z")} until not(hi:next()) hi:free() end if #player_depotitems > 0 then str = str .. "#DEPOT ITEMS#\nQuantidade - Jogador\n" for i = 1, table.maxn(player_depotitems) do local name = getPlayerNameByGUID(player_depotitems[i][1]) local target_online = getPlayerByNameWildcard(name) str = str .. player_depotitems[i][2] .. ' ' .. name ..' | '..(not isPlayer(target_online) and 'Offline' or 'Online')..'\n' end end if #players_items > 0 then str = str .. (str ~= "" and "--------------//-------------\n\n#PLAYER ITEMS#\nQuantidade - Jogador\n" or "#PLAYER ITEMS#\nQuantidade - Jogador\n") for i = 1, table.maxn(players_items) do local name = getPlayerNameByGUID(players_items[i][1]) local target_online = getPlayerByNameWildcard(name) str = str .. players_items[i][2] .. ' ' .. name ..' | '..(not isPlayer(target_online) and 'Offline' or 'Online')..'\n' end end if #tile_items > 0 then str = str .. (str ~= "" and "--------------//-------------\n\n#TILE ITEMS#\nHouse ID - Tile Position\n" or "#TILE ITEMS#\nHouse ID -Tile Position\n") for i = 1, table.maxn(tile_items) do str = str .. tile_items[i][1] .. ' - {x = ' .. tile_items[i][2] ..', y = ' .. tile_items[i][3] ..', z = ' .. tile_items[i][4] ..'} \n' end end return doShowTextDialog(cid,item_id, str) end  
  12. Vodkart's post in (Resolvido)Erro Mods Servidos was marked as the answer   
    <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Caixa System" version="1.0" author="nsei" contact="none.com" enabled="yes"> <config name="caixa"><![CDATA[ stor = 41319 caixa_id = 2581 bank_pos = {x = 98, y = 73, z = 7} msgs = { [1] = "'saldo' para ver seu saldo em conta.", [2] = "'depositar' para depositar dinheiro em sua conta.", [3] = "'sacar' para sacar dinheiro de sua conta.", [4] = "'transferir' para transferir dinheiro para uma outra conta. Comando: transfer,quantia,nome", [5] = "'sair' ou 'exit' para sair.", } ]]></config> <action itemid="2581" event="script"><![CDATA[ domodlib('caixa') function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, stor) ~= -1 then return true elseif itemEx.itemid ~= caixa_id then doPlayerSendCancel(cid, "Você só pode usar esse item em um caixa eletrônico.") return true end setPlayerStorageValue(cid, stor, 1) doPlayerSetNoMove(cid, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Caixa Eletrônico: Olá! Digite !caixa + um dos parâmetros abaixo:") for a, b in ipairs(msgs) do doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Caixa Eletrônico: "..b) end return true end]]></action> <talkaction words="!caixa;/caixa" event="buffer"><![CDATA[ domodlib('caixa') local t = string.explode(param, ",") if getPlayerStorageValue(cid, stor) ~= 1 then return true end if t[1] == "balance" or t[1] == "saldo" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você possui "..getPlayerBalance(cid).." gold coins em sua conta bancária.") return true elseif t[1] == "deposit" or t[1] == "depositar" then if not t[2] or not tonumber(t[2]) or t[3] then doPlayerSendCancel(cid, "Incorrect params.") return true elseif not doPlayerDepositMoney(cid, tonumber(t[2])) then doPlayerSendCancel(cid, "Você não possui essa quantia em dinheiro.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você depositou "..t[2].." gold coins em sua conta. Seu saldo agora é de "..getPlayerBalance(cid).." gold coins.") elseif t[1] == "withdraw" or t[1] == "sacar" then if not t[2] or not tonumber(t[2]) or t[3] then doPlayerSendCancel(cid, "Incorrect params.") return true elseif getPlayerBalance(cid) < tonumber(t[2]) then doPlayerSendCancel(cid, "Você não possui essa quantia de dinheiro em sua conta.") return true end doPlayerWithdrawMoney(cid, tonumber(t[2])) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você sacou "..t[2].." gold coins de sua conta. Seu saldo agora é de "..getPlayerBalance(cid).." gold coins.") elseif t[1] == "transfer" or t[1] == "transferir" then if not t[2] or not tonumber(t[2]) or not t[3] or not tostring(t[3]) or t[4] then doPlayerSendCancel(cid, "Incorrect params.") return true elseif getPlayerBalance(cid) < tonumber(t[2]) then doPlayerSendCancel(cid, "Você não possui essa quantia de dinheiro em sua conta.") return true elseif not playerExists(t[3]) then doPlayerSendCancel(cid, "O player "..t[3].." não existe.") return true end doPlayerTransferMoneyTo(cid, t[3], tonumber(t[2])) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você transferiu "..t[2].." gold coins de sua conta para "..t[3]..". Seu saldo agora é de "..getPlayerBalance(cid).." gold coins.") elseif t[1] == "trocar gold" then if not t[2] or not tonumber(t[2]) or t[3] then doPlayerSendCancel(cid, "Incorrect params. Specify the number of platinum coins you want to get.") return true elseif not doPlayerRemoveItem(cid, 2148, (t[2]*100)) then doPlayerSendCancel(cid, "Você não possui "..(t[2]*100).." gold coins.") return true end doPlayerAddItem(cid, 2152, t[2]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você trocou "..(t[2]*100).." gold coins por "..t[2].." platinum coins.") elseif t[1] == "trocar platinum" then if t[2] == "gold" then if not t[3] or not tonumber(t[3]) or t[4] then doPlayerSendCancel(cid, "Incorrect params. Specify the number of platinum coins you want to change to gold coins.") return true elseif not doPlayerRemoveItem(cid, 2152, tonumber(t[3])) then doPlayerSendCancel(cid, "Você não possui "..t[3].." platinum coins.") return true end doPlayerAddItem(cid, 2148, tonumber(t[3]*100)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você trocou "..t[3].." platinum coins por "..(t[3]*100).." gold coins.") elseif t[2] == "crystal" then if not t[3] or not tonumber(t[3]) or t[4] then doPlayerSendCancel(cid, "Incorrect params. Specify the number of crystal coins you want to get.") return true elseif not doPlayerRemoveItem(cid, 2152, tonumber(t[3]*100)) then doPlayerSendCancel(cid, "Você não possui "..(t[3]*100).." platinum coins.") return true end doPlayerAddItem(cid, 2160, tonumber(t[3])) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você trocou "..(t[3]*100).." platinum coins por "..t[3].." crystal coins.") else return doPlayerSendCancel(cid, "Incorrect params. Utilize o comando assim: trocar platinum,gold ou crystal,quantia") end elseif t[1] == "trocar crystal" then if not t[2] or not tonumber(t[2]) or t[3] then doPlayerSendCancel(cid, "Incorrect params. Specify the number of crystal coins you want to change to platinum coins.") return true elseif not doPlayerRemoveItem(cid, 2160, tonumber(t[2])) then doPlayerSendCancel(cid, "Você não possui "..t[2].." crystal coins.") return true end doPlayerAddItem(cid, 2152, tonumber(t[2]*100)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você trocou "..t[2].." crystal coins por "..(t[2]*100).." platinum coins.") elseif t[1] == "sair" or t[1] == "exit" then doTeleportThing(cid, bank_pos) setPlayerStorageValue(cid, stor, -1) doPlayerSetNoMove(cid, false) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Caixa Eletrônico: Obrigado pela visita!") else doPlayerSendCancel(cid, "Incorrect Params.") return true end return true]]></talkaction> </mod>  
  13. Vodkart's post in (Resolvido)data/lib/034-exhaustion.lua:39 was marked as the answer   
    local exausted = 0.3 -- em minutos local time = 5 -- tempo em segundos para voltar local points = 20 -- o tanto de skills ele ficara mais forte local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, time*1000) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, points) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, points) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, points) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, points) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, points) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, points) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, points) function onCastSpell(cid, var) if isPlayer(cid) and getPlayerAccess(cid) < 3 and getPlayerStorageValue(cid, 998879)-os.time() > 1 then local seetime = getPlayerStorageValue(cid, 998879)-os.time() local minutes, seconds = math.floor(seetime/60), math.floor(seetime%60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde "..minutes.." minuto(s) e "..seconds.." segundo(s) para usar novamente!") return false end setPlayerStorageValue(cid, 998879, exausted*60+os.time()) local tar = getCreatureTarget(cid) if hasCondition(tar, CONDITION_MUTED) == true then return false end local pos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local targetpos = getCreaturePosition(target) local Tile1 = {x=1083, y=473, z=8} -- position onde o player sera teleportado local Tile2 = {x=1083, y=471, z=8} -- position onde o target sera teleportado local from,to = {x=154, y=57, z=7},{x=158, y=62, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado local from,to1 = {x=159, y=49, z=7},{x=165, y=56, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado local from,to2 = {x=159, y=49, z=7},{x=165, y=57, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado local from,to3 = {x=159, y=49, z=7},{x=165, y=58, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado local from,to4 = {x=159, y=49, z=7},{x=165, y=59, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado if isInRange(pos, from, to) and isInRange(pos, from1, to1) and isInRange(pos, from2, to2) and isInRange(pos, from3, to3) and isInRange(pos, from4, to4) then doPlayerSendCancel(cid, "Você nao pode usar o Tsukuyomi World aqui!") return FALSE end if not isPlayer(target) then doPlayerSendCancel(cid, "Você so pode usar essa magia em players!") return FALSE end local function Teleport_Player(cid) if not isCreature(cid) then return LUA_ERROR end doTeleportThing(cid,pos) end local function Teleport_Target(target) if not isCreature(target) then return LUA_ERROR end doCreatureSetNoMove(target, 0) doTeleportThing(target,targetpos) end doAddCondition(cid, condition) doCreatureSetNoMove(target, 1) doTeleportThing(cid,Tile1) doTeleportThing(target,Tile2) doSendMagicEffect(targetpos, 252) addEvent(Teleport_Player, time*1000, cid) addEvent(Teleport_Target, time*1000, target) exhaustion.set(cid, storage, waittime) return TRUE end  
  14. Vodkart's post in (Resolvido)Erro na script talkactions was marked as the answer   
    acho que o problema está na pos, tenta assim:
     
    function isWalkable(pos) -- by Nord / editado por Omega if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false elseif isCreature(getTopCreature(pos).uid) then return false elseif getTileInfo(pos).protection then return false elseif hasProperty(getThingFromPos(pos).uid, 3) or hasProperty(getThingFromPos(pos).uid, 7) then return false end return true end local positions = { {x=1051, y=1060, z=7}, {x=1052, y=1060, z=7}, {X=1046, Y=1061, Z=7}, {X=1046, Y=1061, Z=7}, {X=1046, Y=1061, Z=7}, {X=1050, Y=1040, Z=7}, {X=1050, Y=1040, Z=7}, {X=1051, Y=1041, Z=7}, {X=1074, Y=1058, Z=7}, {X=1074, Y=1058, Z=7}, {X=1075, Y=1059, Z=7}, {X=1011, Y=1046, Z=7}, {X=1011, Y=1045, Z=7}, {X=1014, Y=1046, Z=7} } function onSay(cid) if getPlayerAccess(cid) < 2 then return true end for i = 1, #positions do if isWalkable(positions[i]) then doCreateMonster(i == 1 and 'HERO Demon Gengar' or 'HERO Venusaur', positions[i]) end end return broadcastMessage("Oh nao , Pokemons misteriosos estao invadiando saffron corra para proteger a cidade", MESSAGE_EVENT_ADVANCE) end  
  15. Vodkart's post in (Resolvido)Action Create Monster was marked as the answer   
    local time = 600 -- tempo em segundos para usar local monster = "Demon" -- "Monstro" entre aspas local pos = {x=805, y=568, z=7} -- Posição que irá nascer. local from,to = {x=790, y=550, z=7},{x=820, y=575, z=7} -- area total da area onde o monstro vai estar function CheckArea(area) local var = 0 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 m ~= 0 and isMonster(m) then var = var +1 end end end return var end function onUse(cid, item, frompos, itemex, topos) if getStorage(2111) - os.time() < 1 then if CheckArea({from,to}) == 0 then doSetStorage(2111, os.time() + time) addEvent(function() doCreateMonster(monster, pos) end, 10000) doCreatureSay(cid, "Demon Invocado ! Prepare-se !", TALKTYPE_MONSTER) else doPlayerSendCancel(cid, "ja existe um monstro na area") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end else doPlayerSendCancel(cid, "Voce precisa esperar ".. getStorage(2111) - os.time() .." Segundos restantes") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end doTransformItem(item.uid, item.itemid % 2 == 1 and item.itemid + 1 or item.itemid + -1) return true end  
  16. Vodkart's post in (Resolvido)box suprise ajudinha was marked as the answer   
    UÉ, aumenta a chance de dar certo.
     
    por exemplo onde está chance 5, troca por 60 por exemplo kk
     
    só ir aumentando
  17. Vodkart's post in (Resolvido)Reparo em script porta para reset was marked as the answer   
    function getResets(cid) local check = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..getPlayerGUID(cid)) return check:getDataInt("reset") <= 0 and 0 or check:getDataInt("reset") end function onUse(cid, item, frompos, item2, topos) local reset_need = 5 if getResets(cid) < reset_need then return doPlayerSendTextMessage(cid, 22, "Voce precisa de " .. reset_need .. " resets ou mais para entrar.") end pos = getPlayerPosition(cid) if pos.x == topos.x then if pos.y < topos.y then pos.y = topos.y + 1 else pos.y = topos.y - 1 end elseif pos.y == topos.y then if pos.x < topos.x then pos.x = topos.x + 1 else pos.x = topos.x - 1 end else doPlayerSendTextMessage(cid,22,"Fique na frente da porta.") return true end doTeleportThing(cid,pos) doSendMagicEffect(topos,12) return true end  
  18. Vodkart's post in (Resolvido)[Action] Verificar Área was marked as the answer   
    @Brunds esqueci a função main kkk
     
    function getPlayersInArea(from, to) local t = {} for _, pid in pairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), from, to) then t[#t+1] = pid end end return t end local config = { limit = 1, -- limite de jogador na area from = {x = 1518, y = 1159, z = 15}, --começo da area to = {x = 1534, y = 1174, z = 15}, -- final da area playerDestiny = {x = 1077, y = 783, z = 6} -- para onde o player vai } function onUse(cid, item, frompos, item2, topos) if #getPlayersInArea(config.from, config.to) >= config.limit then doPlayerSendCancel(cid, 'Alguem Ja Esta Na Area.') doSendMagicEffect(getThingPos(cid), 2) return true end doTeleportThing(cid, config.playerDestiny) doPlayerSendTextMessage(cid, 20, "Boa Sorte!") doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end  
  19. Vodkart's post in (Resolvido)Não ficar na area por mais de 5 segundos was marked as the answer   
    local c = { limit = 1, -- Limite de jogadores msgCancel = 'Ainda tem gente la dentro', -- Mensagem quando o limite de jogadores estiver atingido area = { From = {x = 1826, y = 1834, z = 7}, -- Coordenada maxima superior esquerda To = {x = 1832, y = 1840, z = 7}, -- Coordenada minima inferior direita }, pos = {x = 1825, y = 1837, z = 7}, -- Coordenada onde será teletransportado pos1 = {x = 1834, y = 1837, z = 7}, -- Coordenada onde será teletransportado } local function getPlayersInArea(fromPos, toPos) local t = {} for _, cid in ipairs(getPlayersOnline()) do if isInRange(getThingPos(cid), fromPos, toPos) then table.insert(t, cid) end end return t end local function DoKickPlayerFromArea(cid, delay) local exit = {x = 154, y = 160, z = 7} -- defina para onde ele vai if not isCreature(cid) or not isInRange(getThingPos(cid), c.area.From, c.area.To) then return LUA_ERROR end if delay > 0 then doSendAnimatedText(getThingPos(cid), delay, 145) addEvent(DoKickPlayerFromArea, 1000, cid, delay-1) else doTeleportThing(cid, exit) end return true end function onUse(cid, item, fromPos, itemEx, toPos) if table.getn(getPlayersInArea(c.area.From, c.area.To)) < c.limit then doSendMagicEffect(fromPos, CONST_ME_TELEPORT) doTeleportThing(cid, c.pos) DoKickPlayerFromArea(cid, 5) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) else doPlayerSendCancel(cid, c.msgCancel) end return true end  
  20. Vodkart's post in (Resolvido)STORAGE COM X TEMPO was marked as the answer   
    if getPlayerStorageValue(cid, 23233) - os.time() > 0 then doPlayerSendCancel(cid, "Voce nao pode usar um pokemon enquanto estiver com o guardiam") return true end  
  21. Vodkart's post in (Resolvido)Ao morrer em uma area, player nao "Morre" was marked as the answer   
    O certo é assim:
     
    o começo é o "from" e o final é o "to"

  22. Vodkart's post in (Resolvido)Erro npc task was marked as the answer   
    usa este:
     
    https://pastebin.com/raw/n81zm0H8
  23. Vodkart's post in (Resolvido)[Pedido] Codigo para chegar x item na database was marked as the answer   
    https://tibiaking.com/forums/topic/77212-86-talkactions-find-item/
  24. Vodkart's post in (Resolvido)Event Creaturescripts was marked as the answer   
    local config = { playerCount = 3915, -- Global storage for counting the players left/entered in the event fromPosition = {x = 1163, y = 1056, z = 7}, -- top left cornor of the playground toPosition = {x = 1187, y = 1083, z = 7} -- bottom right cornor of the playground } local boss1 = "Agorak" function onDeath(cid) if isMonster and getCreatureName(cid) == boss1 then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then doBroadcastMessage("O boss (".. boss1 .. ") foi morto e os jogadores dentro do World Boss Event foram recompensados com 10 event coins, 10 crystal coins e 5 event points.", MESSAGE_STATUS_CONSOLE_BLUE) for _, pid in ipairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), config.fromPosition, config.toPosition) then doPlayerAddItem(pid, 2159, 10) doPlayerAddItem(pid, 2160, 10) doPlayerAddPontos(pid, 5) end end end end return true end  
  25. Vodkart's post in (Resolvido)War System no sqlite com erro no accept was marked as the answer   
    CREATE TABLE IF NOT EXISTS `guild_wars` ( `id` INT, `guild_id` INT NOT NULL, `enemy_id` INT NOT NULL, `begin` BIGINT NOT NULL DEFAULT 0, `end` BIGINT NOT NULL DEFAULT 0, `frags` INT NOT NULL DEFAULT 0, `payment` BIGINT NOT NULL DEFAULT 0, `guild_kills` INT NOT NULL DEFAULT 0, `enemy_kills` INT NOT NULL DEFAULT 0, `status` TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) )  

Informação Importante

Confirmação de Termo