Jump to content

Shiuns

Member
  • Content Count

    19
  • Joined

  • Last visited

Everything posted by Shiuns

  1. SKILL_CLUB = "skill_club" SKILL_DISTANCE = "skill_dist" SKILL_SHIELD = "skill_shielding" SKILL_MAGLEVEL = "maglevel" SKILL_SWORD = "skill_sword" SKILL_AXE = "skill_axe" local storage = 45611 local coinID = 9971 -- moeda para comprar skills local runas = { ["sd"] = {bag = 5926, item= 2268, bag_quant = 2, price= 50, msg= "Parabéns você comprou 4k de SD com sucesso."}, ["uh"] = {bag = 2002, item= 2273, bag_quant = 3, price= 30, msg= "Parabéns você comprou 6k de UH com sucesso."}, ["explo"] = {bag = 2001, item= 2313, bag_quant = 3, price= 10, msg= "Parabéns você comprou 6k de Explosion com suc
  2. só usar os.date assim: if tonumber(os.date("%d")) == 01 or tonumber(os.date("%d")) == 15 then ... end
  3. adc na lib essas funções: function getContainerItems(container, array, haveCap) array = array or {} haveCap = haveCap or false if not isContainer(container.uid) or getContainerSize(container.uid) == 0 then array[#array +1] = container else local size = getContainerSize(container.uid) haveCap = (getContainerCap(container.uid) -size) > 0 for slot = 0, (size -1) do local item = getContainerItem(container.uid, slot) if item.itemid > 1 then getContainerItems(item, array, haveCap) end end end return #array >= 1 and array, haveCap end
  4. local function hasBoss() local id = getGlobalStorageValue("bossSys") if id ~= -1 then if isMonster(id) then return true else return false end end return false end local postp, postpentrada = {x = 129, y = 66, z = 7},{x = 62, y = 339, z = 7} local days = {"thursday"} function onTime() if isInArray(days, os.date("%A")) then if not hasBoss() then local player = getTopCreature(postp).uid if player ~= 0 and isPlayer(player) then doTeleportThing(player, postpentrada) end doCreateTeleport(1387, postpentrada, postp) local id = doCreateMonster("Boss Stremoxy", {
  5. local globalEvent = 0 local function globalSave(minutes) if minutes <= 0 then doSetGameState(GAMESTATE_SHUTDOWN) os.exit(0) return true end if minutes == 1 then addEvent(doSaveServer, 59000) -- 59 segundos doBroadcastMessage("Global server save in " .. minutes .. " minute, please go to safe zone and logout. The save will not be longer than 1 minute.") elseif minutes <= 3 then doBroadcastMessage("Global server save in " .. minutes .. " minutes, please go to safe zone. The save will not be longer than 1 minute.") else doBroadcastMessage("Global server save in " .. minutes
  6. local items = { {itemId = 12779, count = 1, chance = 1}, {itemId = 12780, count = 2, chance = 99}, } local broadcastitems = {2361} function onUse(cid, item, frompos, item2, topos) local totalChance, randomTable, randomNumber = 0, {}, 0 for _, itemInfo in pairs (items) do randomTable[itemInfo.itemId] = {min = totalChance + 1, max = itemInfo.chance, count = itemInfo.count or 1} totalChance = totalChance + itemInfo.chance end randomNumber = math.random(1, totalChance) for itemId, itemInfo in pairs (randomTable) do local min, max = itemInfo.min, itemInfo.min + itemInf
  7. Falta estudar tabelas... local tabble = { {reqVoc= 7, needLevel=330000}, } print(tabble.reqVoc) -- retorna nil --------------------------- local tabble = { {reqVoc= 7, needLevel=330000}, } print(tabble[1].reqVoc) -- retorna 7 ---------------------------- o certo é usar: local tabble = { reqVoc= 7, needLevel= 330000, } print(tabble.reqVoc) o código: function onUse(cid, fromPosition, itemEx, toPosition) local tabble = { reqVoc = 7, needLevel = 330000 } local config = { pid = getPlayerGUID(cid),
  8. no meu serve funcionou de primeira ficou muito bom esse trem vaaaaaaaaleeeeeeeeeeeeeeeeeeeeu
  9. esse sistema da pra chamar amigo na cave? mi falarm q tinha um que dava desculpa reviver
  10. function doCreateMonsterWalkableAreaPosition(name, from, to) local pos {x=math.random(from.x, to.x), y=math.random(from.y, to.y), z=math.random(from.z, to.z)} if isWalkable(pos, false, false, false) then doSummonCreature(name, pos) else doCreateMonsterWalkableAreaPosition(name, from, to) end end local t = { [{"Dragon", "Dragon lord"}] = {storage = 741320, amount = 1000, boss = "demondras", from = {x = 230, y = 1315, z = 11}, to = {x = 248, y = 1323, z = 11}}, } function onDeath(cid, corpse, deathList) local killer = deathList[1] if not isMonster(cid) or not
  11. function onAdvance(cid, skill, oldLevel, newLevel) local config = { [50] = {item = 2160, count = 5}, [100] = {item = 2160, count = 15}, [150] = {item = 2160, count = 20}, [200] = {item = 2160, count = 25}, [250] = {item = 2160, count = 30}, [300] = {item = 2160, count = 50}, [350] = {item = 4891, count = 1}, [400] = {item = 4892, count = 1}, } if skill == SKILL_CLUB then for level, info in pairs(config) do if newLevel >= level and (getPlayerStorageValue(cid, 30705) == -1 or not (string.find(getPlayerStorageValue(cid,
  12. Versão Testada: Tibia 8.60 // TFS 0.3.6 & 0.4 Descrição: Evita jogadores que dão exit nos treiners upando skills. Eles são kikados automaticamente depois de alguns minutos e algumas verificações. exit_treiner.lua config_exit_treiner = { Warning = "Favor trocar seu char de direção para evitar que ele seja kikado", -- mensagem time = 3, -- a cada 3 minutos irá checar roudsKick = 3, -- se ele estiver parado na mesma direção por 3 checagem seguidas será kikado storages = {879780,879781}, -- n edite treiners = {"Trainer", "Training Monk"} -- coloque aqui
×
×
  • Create New...

Important Information

Confirmação de Termo