Jump to content
Close

maleskinho

Member
  • Content Count

    173
  • Joined

  • Last visited

1 Follower

About maleskinho

  • Rank
    Maleski

Profile Information

  • Gender
    Masculino
  • Localization
    brasil
  • I am
    Tibiano

Recent Profile Visitors

5998 profile views
  1. É possível fazer um script se o player do mesmo ip tiver x storage não ter acesso para passa na porta? Por que usei um script anti-mc por ip, mas os cara exit e consegue passa com outro MC.. local questArea = {from = {x = 31556, y = 32643, z = 8}, to = {x =32248, y = 31868, z = 8}} -- area do evento... local levelAccess = 180 local function isMC(uid) for _, pid in ipairs(getPlayersOnline()) do if uid ~= pid and getPlayerIp(uid) == getPlayerIp(pid) and getPlayerStorageValue(pid, 484950) > 0 then return true end end return false end function onUse(cid, item, fromPosition, itemEx, toPosition) local cidPosition = getCreaturePosition(cid) if getPlayerLevel(cid) >= levelAccess then if isMC(cid) then doPlayerSendCancel(cid, "É proibido a entrada de MCs nesta Quest.") else if cidPosition.x < toPosition.x then doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE) else doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE) setPlayerStorageValue(cid, 484950, 0) doCreatureSay(cid, "Welcome to Quest!!", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, 484950, 1) end end return true else doPlayerSendCancel(cid, "Seu level é menor que " .. levelAccess .. ".") end return true end
  2. Quando clico na porta diz " Não é permitido a entrada de chars com o level menor de 180 neste evento!" mas o player fica no meio da porta e assim mesmo consegue acesso a quest. Como eu faço pra não ficar no meio da porta? local eventArea = {from = {x = 402, y = 3, z = 7}, to = {x = 493, y = 121, z = 7}} -- area do evento... local levelAccess = 180 function onUse(cid, item, fromPosition, itemEx, toPosition) for _, pid in pairs(getPlayersOnline()) do if getPlayerLevel(cid) >= levelAccess then if(cid ~= pid and getPlayerIp(cid) == getPlayerIp(pid) and isInRange(getThingPos(pid), eventArea.from, eventArea.to)) then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, 25, "[ANTI-MC] \n \n Não é permitido a entrada de 2 chars com o mesmo IP neste evento!") return true end else doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, 25, "Não é permitido a entrada de chars com o level menor de " .. levelAccess .. " neste evento!") return true end end return true end
  3. Preciso de um script para porta lvl 180 sem acesso a MC, é possível? Seria para uma quest.
  4. Quando os 4 players estão no sqm e o primeiro puxa alavanca, joga os players no evento mas não inicia e da o seguinte erro a baixo. Você tem o código disponível? Se tiver publique-o aqui: local aids = { [61520] = 1, [61521] = 2, [61522] = 3, [61523] = 4, [61524] = 5, [61525] = 6, [61526] = 7, [61527] = 8 } local function getPlayersInArea(fromPos, toPos) local players = {} for _, pid in ipairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), fromPos, toPos) then table.insert(players, pid) end end return players end function onUse(cid, item, fromPosition, itemEx, toPosition) if tonumber(os.date("%H")) ~= 16 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O horário de bomberman já terminou.") doTeleportThing(cid, getTownTemplePosition(1)) return true end local arenaNumber = aids[item.actionid] if arenaNumber then if bomberman.isArenaFree(arenaNumber) then local arena = bomberman.arenas[arenaNumber] local players = getPlayersInArea(arena.fromPosLeaver, arena.toPosLeaver) if players then if #players == 4 then local corner, ips = 1, {} for _, pid in next, players do local ip = getPlayerIp(pid) if bomberman.ips[ip] then if bomberman.ips[ip] >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "O IP de "..getCreatureName(pid).." já foi usado para jogar nos últimos 5 minutos. Ele deve aguardar "..timeString(bomberman.ips[ip] - os.time()).." para jogar novamente.") doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_ORANGE, "Seu IP já foi usado para jogar nos últimos 5 minutos. Você deve esperar "..timeString(bomberman.ips[ip] - os.time()).." para jogar novamente.") return; end end if isInArray(ips, ip) then return doPlayerSendCancel(cid, "jogadores com o mesmo IP não podem participar juntos.") end table.insert(ips, ip) end for _, pid in next, players do local ip = getPlayerIp(pid) bomberman.ips[ip] = (os.time() + (5*60)) if corner == 1 then doTeleportThing(pid, arena.fromPos) elseif corner == 2 then doTeleportThing(pid, arena.rightTopCorner) elseif corner == 3 then doTeleportThing(pid, arena.toPos) elseif corner == 4 then doTeleportThing(pid, arena.leftBottomCorner) end doCreatureSetStorage(pid, bomberman.oldSpeedStorage, getCreatureSpeed(pid)) doCreatureSetStorage(pid, bomberman.bombLimitStorage, 1) doCreatureSetStorage(pid, bomberman.bombStorage, 1000) doCreatureSetStorage(pid, bomberman.radiusStorage, 1) doCreatureSetStorage(pid, bomberman.inGameStorage, arenaNumber) doRemoveCondition(pid, CONDITION_HASTE) Events:enter(pid, false) doChangeSpeed(pid, 220 - getCreatureSpeed(pid)) doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, "Você entrou no bomberman, use !bomb para colocar bombas e boa sorte!") corner = corner + 1 end setGlobalStorageValue(arena.storage, 1) -- Adicionar as pedras explodíveis local currentPosition local create = true local unavailables = {{x = arena.fromPos.x, y = arena.fromPos.y}, {x = arena.rightTopCorner.x, y = arena.rightTopCorner.y}, {x = arena.leftBottomCorner.x, y = arena.leftBottomCorner.y}, {x = arena.toPos.x, y = arena.toPos.y}, {x = arena.fromPos.x + 1, y = arena.fromPos.y}, {x = arena.fromPos.x, y = arena.fromPos.y + 1}, {x = arena.rightTopCorner.x - 1, y = arena.rightTopCorner.y}, {x = arena.rightTopCorner.x, y = arena.rightTopCorner.y + 1}, {x = arena.toPos.x - 1, y = arena.toPos.y}, {x = arena.toPos.x, y = arena.toPos.y - 1}, {x = arena.leftBottomCorner.x + 1, y = arena.leftBottomCorner.y}, {x = arena.leftBottomCorner.x, y = arena.leftBottomCorner.y - 1}} for xx = arena.fromPos.x, arena.toPos.x do for yy = arena.fromPos.y, arena.toPos.y do create = true currentPosition = {x = xx, y = yy, z = arena.fromPos.z} for _, pair in next, unavailables do if pair.x == xx and pair.y == yy then create = false break; end end if create then local block = getTileItemById(currentPosition, bomberman.blockId) if block and block.uid and block.uid > 0 then create = false end if create then local stone = getTileItemById(currentPosition, bomberman.stoneId) if stone and stone.uid and stone.uid > 0 then create = false end if create then if math.random(100) < 70 then doCreateItem(bomberman.stoneId, 1, currentPosition) end end end end end end -- Pedras adicionadas else doPlayerSendCancel(cid, "São necessários 4 jogadores para iniciar o bomberman.") end else doPlayerSendCancel(cid, "São necessários 4 jogadores para iniciar o bomberman.") end else doPlayerSendCancel(cid, "Esta arena de bomberman já está ocupada. Aguarde até que o jogo termine.") end end return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  5. 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 local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'spellbook'}, 2175, 150, 1, 'spellbook') shopModule:addBuyableItem({'magic lightwand'}, 2163, 400, 1, 'magic lightwand') shopModule:addBuyableItem({'small health'}, 8704, 20, 1, 'small health potion') shopModule:addBuyableItem({'health potion'}, 7618, 45, 1, 'health potion') shopModule:addBuyableItem({'mana potion'}, 7620, 50, 1, 'mana potion') shopModule:addBuyableItem({'strong health'}, 7588, 100, 1, 'strong health potion') shopModule:addBuyableItem({'strong mana'}, 7589, 80, 1, 'strong mana potion') shopModule:addBuyableItem({'great health'}, 7591, 190, 1, 'great health potion') shopModule:addBuyableItem({'great mana'}, 7590, 80, 1, 'great mana potion') shopModule:addBuyableItem({'great spirit'}, 8472, 190, 1, 'great spirit potion') shopModule:addBuyableItem({'ultimate health'}, 8473, 310, 1, 'ultimate health potion') shopModule:addSellableItem({'normal potion flask', 'normal flask'}, 7636, 5, 'empty small potion flask') shopModule:addSellableItem({'strong potion flask', 'strong flask'}, 7634, 10, 'empty strong potion flask') shopModule:addSellableItem({'great potion flask', 'great flask'}, 7635, 15, 'empty great potion flask') shopModule:addBuyableItem({'fire bomb'}, 2305, 55, 1, 'fire bomb') shopModule:addBuyableItem({'destroy field'}, 2261, 5, 1, 'destroy field rune') shopModule:addBuyableItem({'light magic missile'}, 2287, 1, 1, 'light magic missile rune') shopModule:addBuyableItem({'heavy magic missile'}, 2311, 2, 1, 'heavy magic missile rune') shopModule:addBuyableItem({'great fireball'}, 2304, 10, 1, 'great fireball rune') shopModule:addBuyableItem({'explosion'}, 2313, 5, 1, 'explosion rune') shopModule:addBuyableItem({'sudden death'}, 2268, 60, 1, 'sudden death rune') shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune') shopModule:addBuyableItem({'holy judgment'}, 2300, 120, 1, 'holy judgment rune') shopModule:addBuyableItem({'chameleon'}, 2291, 210, 1, 'chameleon rune') shopModule:addBuyableItem({'desintegrate'}, 2310, 30, 1, 'desintegreate rune') shopModule:addBuyableItem({'fire field'}, 2301, 10, 1, 'fire field rune') shopModule:addBuyableItem({'energy field'}, 2277, 10, 1, 'energy field rune') shopModule:addBuyableItem({'avalanche rune'}, 2274, 12, 1, 'avalanche rune') shopModule:addBuyableItem({'antidote rune'}, 2266, 65, 1, 'antidote rune') shopModule:addBuyableItem({'energy wall'}, 2279, 32, 1, 'energy wall rune') shopModule:addBuyableItem({'icicle'}, 2271, 8, 1, 'icicle rune') shopModule:addBuyableItem({'poison field'}, 2285, 7, 1, 'poison field rune') shopModule:addBuyableItem({'poison wall'}, 2289, 12, 1, 'poison wall rune') shopModule:addBuyableItem({'blank'}, 2260, 10, 1, 'blank rune') shopModule:addBuyableItem({'fire ball'}, 2302, 5, 1, 'fire ball rune') shopModule:addBuyableItem({'thunderstorm rune'}, 2315, 55, 1, 'thunderstorm rune') shopModule:addBuyableItem({'stone shower rune'}, 2288, 55, 1, 'stone shower rune') shopModule:addBuyableItem({'magic wall'}, 2293, 200, 1, 'magic wall rune') shopModule:addBuyableItem({'paralyze'}, 2278, 400, 1, 'paralyze rune') shopModule:addBuyableItem({'animate dead'}, 2316, 375, 1, 'animate dead rune') shopModule:addBuyableItem({'ultimate healing'}, 2273, 60, 1, 'ultimate healing rune') shopModule:addBuyableItem({'chameleon'}, 2291, 210, 1, 'chameleon rune') shopModule:addBuyableItem({'wild growth'}, 2269, 350, 1, 'wild growth rune') shopModule:addBuyableItem({'wand of vortex', 'vortex'}, 2190, 500, 'wand of vortex') shopModule:addBuyableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 1000, 'wand of dragonbreath') shopModule:addBuyableItem({'wand of decay', 'decay'}, 2188, 5000, 'wand of decay') shopModule:addBuyableItem({'wand of draconia', 'draconia'}, 8921, 7500, 'wand of draconia') shopModule:addBuyableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 10000, 'wand of cosmic energy') shopModule:addBuyableItem({'wand of inferno', 'inferno'}, 2187, 15000, 'wand of inferno') shopModule:addBuyableItem({'wand of starstorm', 'starstorm'}, 8920, 18000, 'wand of starstorm') shopModule:addBuyableItem({'wand of voodoo', 'voodoo'}, 8922, 22000, 'wand of voodoo') shopModule:addBuyableItem({'snakebite rod', 'snakebite'}, 2182, 500, 'snakebite rod') shopModule:addBuyableItem({'moonlight rod', 'moonlight'}, 2186, 1000, 'moonlight rod') shopModule:addBuyableItem({'necrotic rod', 'necrotic'}, 2185, 5000, 'necrotic rod') shopModule:addBuyableItem({'northwind rod', 'northwind'}, 8911, 7500, 'northwind rod') shopModule:addBuyableItem({'terra rod', 'terra'}, 2181, 10000, 'terra rod') shopModule:addBuyableItem({'hailstorm rod', 'hailstorm'}, 2183, 15000, 'hailstorm rod') shopModule:addBuyableItem({'springsprout rod', 'springsprout'}, 8912, 18000, 'springsprout rod') shopModule:addBuyableItem({'underworld rod', 'underworld'}, 8910, 22000, 'underworld rod') shopModule:addSellableItem({'wand of vortex', 'vortex'}, 2190, 100, 'wand of vortex') shopModule:addSellableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 200, 'wand of dragonbreath') shopModule:addSellableItem({'wand of decay', 'decay'}, 2188, 1000, 'wand of decay') shopModule:addSellableItem({'wand of draconia', 'draconia'}, 8921, 1500, 'wand of draconia') shopModule:addSellableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 2000, 'wand of cosmic energy') shopModule:addSellableItem({'wand of inferno', 'inferno'}, 2187, 3000, 'wand of inferno') shopModule:addSellableItem({'wand of starstorm', 'starstorm'}, 8920, 3600, 'wand of starstorm') shopModule:addSellableItem({'wand of voodoo', 'voodoo'}, 8922, 4400, 'wand of voodoo') shopModule:addSellableItem({'snakebite rod', 'snakebite'}, 2182, 100, 'snakebite rod') shopModule:addSellableItem({'moonlight rod', 'moonlight'}, 2186, 200, 'moonlight rod') shopModule:addSellableItem({'necrotic rod', 'necrotic'}, 2185, 1000, 'necrotic rod') shopModule:addSellableItem({'northwind rod', 'northwind'}, 8911, 1500, 'northwind rod') shopModule:addSellableItem({'terra rod', 'terra'}, 2181, 2000, 'terra rod') shopModule:addSellableItem({'hailstorm rod', 'hailstorm'}, 2183, 3000, 'hailstorm rod') shopModule:addSellableItem({'springsprout rod', 'springsprout'}, 8912, 3600, 'springsprout rod') shopModule:addSellableItem({'underworld rod', 'underworld'}, 8910, 4400, 'underworld rod') function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local items = {[1] = 2190, [2] = 2182, [5] = 2190, [6] = 2182} if(msgcontains(msg, 'first rod') or msgcontains(msg, 'first wand')) then if(isSorcerer(cid) or isDruid(cid)) then if(getPlayerStorageValue(cid, 30002) == -1) then selfSay('So you ask me for a {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '} to begin your advanture?', cid) talkState[talkUser] = 1 else selfSay('What? I have already gave you one {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '}!', cid) end else selfSay('Sorry, you aren\'t a druid either a sorcerer.', cid) end elseif(msgcontains(msg, 'yes')) then if(talkState[talkUser] == 1) then doPlayerAddItem(cid, items[getPlayerVocation(cid)], 1) selfSay('Here you are young adept, take care yourself.', cid) setPlayerStorageValue(cid, 30002, 1) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then selfSay('Ok then.', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  6. Estou com um pequeno problema, quando o player compra items no npc de potions ele joga o dinheiro no chão, como eu faço pra resolver isso?
  7. Está bugado desse jeito ai todos ganham quem está online.
  8. Queria adicionar nova linha para uma outra moeda alem da Crystal coins, tentei aqui mas estava enviado para todos online. Script abaixo está normal tirei oque mexi.. só quero adicionar Special Coin ID 12672 uma unidade. w local config = { lottery_hour = "2 hours", -- Tempo ate a proxima loteria (Esse tempo vai aparecer somente como broadcast message) rewards_id = {2494, 2472, 2514, 2160}, -- ID dos Itens Sorteados na Loteria crystal_counts = 10, -- Usado somente se a rewards_id for crystal coin (ID: 2160). website = "yes", -- Only if you have php scripts and table `lottery` in your database! days = { "Monday-08:00", "Monday-13:00", "Monday-19:30", "Tuesday-08:00", "Tuesday-13:00", "Tuesday-19:30", "Wednesday-08:00", "Wednesday-13:00", "Wednesday-19:30", "Thursday-08:00", "Thursday-13:00", "Thursday-19:30", "Friday-01:22", "Friday-13:00", "Friday-19:30", "Saturday-21:27", "Saturday-21:28", "Saturday-21:29", "Sunday-08:00", "Sunday-13:00", "Sunday-19:30" } } local function getPlayerWorldId(cid) if not(isPlayer(cid)) then return false end local pid = getPlayerGUID(cid) local worldPlayer = 0 local result_plr = db.getResult("SELECT * FROM `players` WHERE `id` = "..pid..";") if(result_plr:getID() ~= -1) then worldPlayer = tonumber(result_plr:getDataInt("world_id")) result_plr:free() return worldPlayer end return false end local function getOnlineParticipants() local players = {} for _, pid in pairs(getPlayersOnline()) do if getPlayerAccess(pid) <= 2 and getPlayerStorageValue(pid, 281821) <= os.time() then table.insert(players, pid) end end if #players > 0 then return players end return false end function onThink(cid, interval) if table.find(config.days, os.date("%A-%H:%M")) then if(getWorldCreatures(o) <= 0)then return true end local query = db.query or db.executeQuery local random_item = config.rewards_id[math.random(1, #config.rewards_id)] local item_name = getItemNameById(random_item) local data = os.date("%d/%m/%Y - %H:%M:%S") local online = getOnlineParticipants() if online then local winner = online[math.random(1, #online)] local world = tonumber(getPlayerWorldId(winner)) if(random_item == 2160) then doPlayerSetStorageValue(winner, 281821, os.time() + 3600 * 24) doPlayerAddItem(winner, random_item, config.crystal_counts) doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " .. config.crystal_counts .." " .. getItemNameById(random_item) .. "s! Congratulations! (Next lottery in " .. config.lottery_hour .. ")") else doPlayerSetStorageValue(winner, 281821, os.time() + 3600 * 24) doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " ..getItemNameById(random_item) .. "! Congratulations! (Next lottery in " .. config.lottery_hour .. ")") doPlayerAddItem(winner, random_item, 1) end if(config.website == "yes") then query("INSERT INTO `lottery` (`name`, `item`, `world_id`, `item_name`, `date`) VALUES ('".. getCreatureName(winner).."', '".. random_item .."', '".. world .."', '".. item_name .."', '".. data .."');") end else print("Ninguem OnLine pra ganhar na loteria") end end return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  9. Funcionou, consegue adicionar o texto pra 2 min? ai finalizou haha
  10. Entendi, mas o position não vai da assim por que tem vários pra clicar no map ;s
  11. Voltou ao de antes com a msg "ou cannot use this objec"
  12. Está indo mas não da tempo de 2 minutos, posso clicar varias vezes.
  13. Deixei o script normal, coloquei a id 11253 pra ficar depois que clicar, mas ai eu consigo clicar toda hora sem parar. ;s

Open Tibia Server

Quer aprender a criar seu próprio servidor de Tibia? Então está no lugar certo, aqui você encontrará milhares de tutorias, scripts, códigos, mapas e utilitários para que você possa fazer o seu próprio servidor de Tibia começando do zero.

Redes Sociais

Anuncie no Tibia King

Precisa de mais visibilidade em seus projetos? Quer fazer um plano publicitário para o seu servidor? Anuncie no Tibia King e faça sua divulgação, possuímos centenas de acessos simultâneos e milhares diários, com certeza será a sua solução!

×
×
  • Create New...