Tudo que Shiuns postou
-
(Resolvido)Bug sistema kage
function onLogin(cid) if getPlayerStorageValue(cid, GRADUACAO_STORAGE) >= 300 then local kage = getPlayerRankGraduacao(getPlayerTown(cid)) if kage:getID() ~= -1 then if getPlayerName(cid) == kage:getDataString("name") then doAddCondition(cid, kages) doSendAnimatedText(getPlayerPosition(cid), "Kage!", COLOR_RED) doAddCondition(cid, kageskill) elseif getPlayerStorageValue(cid, GRADUACAO_STORAGE) >= kage:getDataInt("value")*0.7 then doAddCondition(cid, sannin) doAddCondition(cid, sanninskill) else doAddCondition(cid, anbu) doAddCondition(cid, anbuskill) end end else local graduacao = GRADUACAO_TYPES[getPlayerGraduacao(cid)] if graduacao == "Genin" then doAddCondition(cid, genin) elseif graduacao == "Chunnin" then doAddCondition(cid, chunnin) elseif graduacao == "Tokubetsu Jounin" then doAddCondition(cid, tokubetsujounin) elseif graduacao == "Jounin" then doAddCondition(cid, jounin) doAddCondition(cid, jouninskill) end end return true end e a função na lib deixa assim: function getPlayerRankGraduacao(cidade) return db.getResult("SELECT `player_storage`.`value`, `player_storage`.`player_id`, `players`.`id`, `players`.`name`, `players`.`town_id` FROM `player_storage`, `players` WHERE `player_storage`.`player_id` = `players`.`id` and `player_storage`.`value` >300 and `player_storage`.`key` = 7892120 and `players`.`town_id` = "..cidade.." GROUP BY `player_storage`.`value` DESC;") end
-
Não poder mover uma chest com ACTION ID do piso
é 8.60 tfs 0.4!!
-
Não poder mover uma chest com ACTION ID do piso
no caso aparece essa chest no meio do mapa e ai qndo eu clico na chest ganho os itens, entendeu?
-
Não poder mover uma chest com ACTION ID do piso
Mas dessa forma com brilho em cima, os jogadores não conseguem clicar no bau para pegar os items assim que o bau aparecer no mapa...
-
Não poder mover uma chest com ACTION ID do piso
É que eu não quero modificar nada do item editor pq essas chest são usadas em outro sistema tbm entende? além disso tem mais itens que se eu colocar essa ACTION ID não poria mover... consegue fazer maninho? obrigado
-
Não poder mover uma chest com ACTION ID do piso
E aí galera do tibiaking... Eu tenho um código que faz aparecer uma chest (id 1740) numa determinada pos, nessa mesma chest é atribuido uma AID: 15602 porém o qualquer jogador pode mover a chest. Eu queria que não pudesse mover nenhum item com determinada ACTION ID.
-
Movements ativar piso
local config = { wall = {id = 6973, pos = {x = 839, y = 868, z = 7}}, idpiso = 15295, transidpiso = 15296, time = 1 } function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end local ret = getTileItemById(position, idpiso).uid if ret == 0 then return true end local var = getTileItemById(config.wall.pos, config.wall.id).uid if var > 0 then doSendMagicEffect(config.wall.pos, CONST_ME_MAGIC_RED) doRemoveItem(var) end doTransformItem(item.uid, config.transidpiso) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Wall is removed.") addEvent(function() local x = getTileItemById(config.wall.pos, config.wall.id).uid if x == 0 then doCreateItem(config.wall.id, 1, config.wall.pos) end doTransformItem(getTileItemById(position, config.transidpiso).uid, idpiso) end, config.time*60*1000) return true end
-
!rank Level e Vocation Juntos
Poderia me enviar? estou precisando
-
Skill Limite
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 sucesso."} } local itens = { ["super divine axe"] = {item = 8926, price= 60, msg= "Você comprou um super divine axe com sucesso."}, ["super divine staff"] = {item = 8922, price= 60, msg= "Você comprou um super divine staff com sucesso."}, ["super divine club"] = {item = 7423, price= 60, msg= "Você comprou um super divine club com sucesso."}, ["super divine sword"] = {item = 7403, price= 60, msg= "Você comprou um super divine sword com sucesso."}, ["super divine crossbow"] = {item = 8851, price= 60, msg= "Você comprou um super divine crossbow com sucesso."}, ["livro nivel 6"] = {item = 8921, price= 60, msg= "Você comprou um livro nivel 6 com sucesso."} } local vip = { ["vip10"] = {days= 10, price= 5}, ["vip30"] = {ays= 30, price= 10} } local skills = { ["magiclevel"] = {vocations = {1, 5, 2, 6, 11, 12}, voc_msg= "Somente Sorcerers, Druids e Infernalists podem comprar magic level.", lim = 200, lim_msg = "Você não pode ter magic level acima de 200.", price= 3, incre = 1, skill = SKILL_MAGLEVEL}, ["skillclub"] = {vocations = {9, 10}, voc_msg= "Somente Drunous podem comprar skill de club.", lim = 350, price= 1, incre = 1, skill = SKILL_CLUB}, ["skillsword"] = {vocations = {4, 8}, voc_msg= "Somente Knights podem comprar skill de sword.", lim = 350, price= 1, incre = 1, skill = SKILL_SWORD}, ["skillaxe"] = {vocations = {4, 8}, voc_msg= "Somente Knights podem comprar skill de axe.", lim = 350, price= 1, incre = 1, skill = SKILL_AXE}, ["skilldistance"] = {vocations = {3, 7}, voc_msg= "Somente Paladins podem comprar skill de distance.", lim = 350, price= 1, incre = 1, skill = SKILL_DISTANCE}, ["skillshielding"] = {vocations = {3, 7, 4, 8, 9, 10}, voc_msg= "Somente Paladins, Knights e Drunous podem comprar skill de shield.", lim = 350, lim_msg = "Você não pode ter skill shielding acima de 350.", price= 1, incre = 1, skill = SKILL_SHIELD}, } local frags = { ["removerfrag"] = {t= 6, price= 10} } function onSay(player, words, param) local player = Player(player) local pid = player:getGuid() local tile = player:getTile() local param = param:lower() if not tile:hasFlag(TILESTATE_PROTECTIONZONE) then player:sendCancelMessage("Você precisa está em área protegida para utilizar este comando.") return true end if player:getStorageValue(storage) >= os.time() then player:sendCancelMessage("Por medidas de segurança você só pode utilizar este comando em " .. player:getStorageValue(storage)-os.time() .. " segundos.") return true end if param == "" then player:popupFYI("Para comprar digite !comprar (nome do item)\nOpcoes:\nsd = 4000 em SD por 50 barras.\nuh = 6000 em UH por 40 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.\nsuper divine axe = super divine axe por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine staff = super divine staff por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nremoverfrag = remove todos frags por 100k.\nO Item desejado não existe em nosso stock. Veja a cima os detalhes dos items disponíveis.") return true end if runas[param] then local v = runas[param] if player:getItemCount(coinID) >= v.price then local item_quant = (v.bag_quant * 2000)/100 for x = 1, v.bag_quant do local bag = player:addItem(v.bag, 1) for i = 1, item_quant do bag:addItem(v.item, 100) end end player:removeItem(coinID, v.price) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, v.msg) player:setStorageValue(storage, os.time()+1) else player:sendCancelMessage("Você não possui a quantidade necessária para comprar.") end return true end if itens[param] then local v = itens[param] if player:getItemCount(coinID) >= v.price then item = player:addItem(v.item, 1) item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. player:getName() ..". Serial: ".. player:getGuid() ..".") player:removeItem(coinID, v.price) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, v.msg) player:setStorageValue(storage, os.time()+1) else player:sendCancelMessage("Você não possui a quantidade necessária para comprar.") end return true end if vip[param] then local v = vip[param] if player:getItemCount(coinID) >= v.price then player:addPremiumDays(v.days) player:removeItem(coinID, v.price) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou " .. v.days .. " dias de vip com sucesso.") player:setStorageValue(storage, os.time()+1) else player:sendCancelMessage("Você não possui a quantidade necessária para comprar.") end return true end if skills[param] then local v = skills[param] if param == "magiclevel" and player:getBaseMagicLevel() >= v.lim or (player:getBaseMagicLevel() + v.incre ) >= v.lim then player:sendCancelMessage(v.lim_msg) return true elseif player:getSkillLevel(v.skill) >= v.lim or (player:getSkillLevel(v.skill) + v.incre ) >= v.lim then player:sendCancelMessage(v.lim_msg) return true end if not isInArray(v.vocations, player:getVocation():getId()) then player:sendCancelMessage(v.voc_msg) return true end if player:getItemCount(coinID) >= v.price then player:removeItem(coinID, v.price) player:setStorageValue(storage, os.time()+1) player:remove() db.query("UPDATE players SET ".. v.skill .. " = " .. v.skill .. " + " .. v.incre .. " WHERE id = ".. pid) else player:sendCancelMessage("Você não possui a quantidade necessária para comprar.") end return true end if frags[param] then local v = frags[param] if player:getItemCount(2160) >= v.price then player:removeItem(2160, v.price) player:setSkull(SKULL_NONE) player:setSkullTime(0) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your skull and frags has been removed!") player:setStorageValue(storage, os.time()+1) db.query("UPDATE player_deaths SET unjustified = 0 WHERE unjustified = 1 AND killed_by = " .. db.escapeString(player:getName())) else player:sendCancelMessage("Você não possui a quantidade necessária para comprar.") end return true end return true end
-
Procuro programador para terminar um projeto open tibia mapa global 12.60
Link invalido no discord
-
Servidor Global (10/12)
Tem Discord?
-
Ajuda - Action que vende itens da BP
@vine96 Testou? ou ainda não?
-
(Resolvido)Script Inteligente de Invasão para Evento
só usar os.date assim: if tonumber(os.date("%d")) == 01 or tonumber(os.date("%d")) == 15 then ... end
-
(Resolvido)Remover o item na backpack
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 function getContainerItemsById(container, itemid) local founds = {} local items = not container.uid and container or getContainerItems(container) for index, item in pairs(items) do if item.itemid == itemid then founds[#founds +1] = item end end return #founds >= 1 and founds end e tenta usar a função do npc assim: local onSell = function(cid, item, subType, amount, ignoreCap, inBackpacks) if getPlayerSlotItem(cid, CONST_SLOT_BACKPACK).itemid ~= 0 then local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) local z = getContainerItemsById(bp, item) if #z >= amount and items[item].sellPrice ~= 0 then doPlayerAddMoney(cid, items[item].sellPrice * amount) for i = 1, amount do doRemoveItem(z[i].uid) end end end return true end
-
(Resolvido)[GLOBALEVENTS] Tp não abre com player no sqm indicado!
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", {x = 38, y = 340, z = 7}) setGlobalStorageValue("bossSys", id) doBroadcastMessage("O Boss Stremoxy nasceu! Corram para matar ele -> Teleporte no templo!") end end return true end function onThink(interval, lastExecution) if hasBoss() then doSendAnimatedText(postp, "Boss", 245) doSendMagicEffect(postp, 11) end return true end
-
(Resolvido)Colocar delay
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 .. " minutes, please go to safe zone. The save will not be longer than 1 minute.") end globalEvent = addEvent(globalSave, 60000, minutes - 1) return true end function onTime(interval, lastExecution) setGlobalStorageValue(48572, 1) return globalSave(math.abs(math.ceil(5))) end
-
Random box help!
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 + itemInfo.max if randomNumber >= min and randomNumber <= max then local newItem = doPlayerAddItem(cid, itemId, qntItemsByPercnt(), false) if not newItem then return doPlayerSendCancel(cid, "Voce nao tem espaco para receber o item!") end local pos = {x=getPlayerPosition(cid).x+0, y=getPlayerPosition(cid).y+0, z=getPlayerPosition(cid).z+0} doSendMagicEffect(pos, 442) -- Id do efeito. local iInfo = getItemInfo(itemId) doPlayerSendTextMessage(cid, 19, "Voce ganhou "..iInfo.name.."") for i, broaditem in ipairs(broadcastitems) do if itemId==broaditem then doBroadcastMessage(getCreatureName(cid).." acabou de ganhar "..iInfo.name.." (Raro) na senzu box.", 19) end end break end end doRemoveItem(item.uid) return true end
-
(Resolvido)[Action] Reset system por Action
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), newlv = 90000, life = 3599865, mana = 3599715 } if getPlayerLevel(cid) < 330000 and tabble.needLevel then doPlayerPopupFYI(cid, "Voce precisa ser level " .. needLevel .. " para resetar.") return true elseif tabble.reqVoc >= getPlayerVocation(cid) or 8 then doPlayerPopupFYI(cid, "Voce já é vocaçao.") return true elseif tabble.reqVoc <= 7 and getPlayerVocation(cid) then doPlayerPopupFYI(cid, "Voce precisa ser vocaçao para resetar.") return true end if tabble.reqVoc == getPlayerVocation(cid) then setPlayerStorageValue(cid, 887978, 1) end local newvoc = tabble.reqVoc ~= getPlayerVocation(cid) and (tabble.reqVoc+1) setPlayerStorageValue(cid, 887979, newvoc) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.newlv..", `experience` = "..getExperienceForLevel(config.newlv)..",`manamax` = "..config.mana..",`health` = "..config.life..", `healthmax` = "..config.life..",`mana` = "..config.mana.." WHERE `id` = "..config.pid) return true end
-
pf podem me ajudar com 3 erros q estou tendo e n estou conseguindo arrumar pf eu ja entrei em mt topico aqui no tk mas n estou conseguindo arrumar
posta os códigos e os erros que aparecem no distro
-
AddEvent crashando o server
Posso ver o código todo?
-
Otimizado: AutoLoot in Sources for Otx(2 ou menor)
no meu serve funcionou de primeira ficou muito bom esse trem vaaaaaaaaleeeeeeeeeeeeeeeeeeeeu
-
Square System TFS 1.X
tem como fazer pra otx ?
- Cave Exclusiva [SUPER UP] by WooX
-
[Script] Boss por X Kills de Monsters
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 isPlayer(killer) then return true end for v , r in pairs(t) do if isInArray(v, getCreatureName(cid)) then local contador = getGlobalStorageValue(r.storage) <= 0 and 0 or getGlobalStorageValue(r.storage) if contador >= r.amount then for x = r.from.x - 1, r.to.x + 1 do for y = r.from.y - 1, r.to.y + 1 do local pos = {x=x, y=y, z=r.from.z} local m = getTopCreature(pos).uid if m ~= 0 and isMonster(m) then doRemoveCreature(m) end end end doCreateMonsterWalkableAreaPosition(r.boss, r.from, r.to) setGlobalStorageValue(r.storage, 0) doBroadcastMessage("O monstro ".. r.boss .." nasceu!", 20) else setGlobalStorageValue(r.storage, contador + 1) end end end return true end
-
(Resolvido)Ao upar club ganhar recompensa
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, 30705), "'" .. level .. "'"))) then doPlayerAddItem(cid, info.item, info.count) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Parabéns, você atingiu o level "..newLevel.." e ganhou "..info.count.." "..getItemNameById(info.item)..".") local sat = getPlayerStorageValue(cid, 30705) == -1 and "Values: '" .. level .. "'" or getPlayerStorageValue(cid, 30705) .. ",'" .. level .. "'" setPlayerStorageValue(cid, 30705, sat) end end end return true end