Ir para conteúdo

gabrielbuff

Campones
  • Total de itens

    29
  • Registro em

  • Última visita

Sobre gabrielbuff

Informações

  • Char no Tibia
    pilantra
  • Forma que conheci o xTibia
    Amigos
  • Sou
    Jogador

Últimos Visitantes

857 visualizações

gabrielbuff's Achievements

  1. Boa noite, alguém poderia me ajudar, preciso de um script em movements em que o player precisa de x quantidade de storage para passar no tile, exemplo, ele precisa completar 5 vezes a quests diárias que dão storage 1234, após ele completar 5x as quests diárias, para ele poder passar no tile.
  2. @jepart, testei e funcionou, só tive que tirar o }, e funcionou perfeitamente
  3. @Poccnn, o que teria de errado no script coragem? 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) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local msg = msg:lower() local config = { effectonuse = 14, -- efeito que sai levelsorte = 10, --- leveis que terão item = 10563, quant = 1+getPlayerStorageValue(cid,4002), storage = 4002 -- storage que será verificado } if(msgcontains(msg, 'wisdom' )) then npcHandler:say("Voce deseja evoluir seu nível de Wisdom?", cid) elseif msgcontains(msg, {"não","no"}) then selfSay('Ok!', cid) talkState[talkUser] = 0 elseif msgcontains(msg, {"yes","sim"}) then if getPlayerStorageValue(cid, config.storage) < config.levelsorte then if getPlayerItemCount(cid, config.item) >= config.quant then doPlayerRemoveItem(cid, config.item, config.quant) doBroadcastMessage("[MENSAGEM]: O jogador (" .. getCreatureName(cid) .. ") recebeu um nivel de Wisdom da NPC Kelly.", 19) doPlayerSendTextMessage(cid,22,"Voce evoluiu wisdom para "..(getPlayerStorageValue(cid, config.storage)+1)..".") setPlayerStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage)+1) elseif getPlayerStorageValue(cid, config.storage) >= config.levelsorte then else selfSay('Você de '..config.quant..' {book of player}.', cid) end else selfSay('Você ja esta no level maxímo.' , cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  4. Boa noite, poderiam me ajudar nesse erro abaixo, quando eu falo hi, para algum npc aparece esse erro, impossibilitando a compra ou venda de itens nele 012-Table.lua -> script table.find = function (table, value) for i, v in pairs(table) do if(v == value) then return i end end return nil end table.contains = function (txt, str) for i, v in pairs(str) do if(txt:find(v) and not txt:find('(%w+)' .. v) and not txt:find(v .. '(%w+)')) then return true end end return false end table.isStrIn = table.contains table.count = function (table, item) local count = 0 for i, n in pairs(table) do if(item == n) then count = count + 1 end end return count end table.countElements = table.count table.getCombinations = function (table, num) local a, number, select, newlist = {}, #table, num, {} for i = 1, select do a[#a + 1] = i end local newthing = {} while(true) do local newrow = {} for i = 1, select do newrow[#newrow + 1] = table[a] end newlist[#newlist + 1] = newrow i = select while(a == (number - select + i)) do i = i - 1 end if(i < 1) then break end a = a + 1 for j = i, select do a[j] = a + j - i end end return newlist end
  5. boa noite Marshmello, continua o mesmo erro amigo
  6. boa noite, estou com uns erros no script do zombie event e não estou conseguindo solucionar o problema, se alguém puder ajudar agradeço!! Segue script e anexo o erro que está ocorrendo. local config = { playerCount = 2001, -- Global storage for counting the players left/entered in the event zombieCount = 2002, -- Global storage for counting the zombies in the event teleportActionId = 2000, -- Action id of the teleport needed for the movement script teleportPosition = {x = 1143, y = 1054, z = 7, stackpos = 1}, -- Where the teleport will be created teleportToPosition = {x = 1152, y = 1028, z = 7}, -- Where the teleport will take you teleportId = 1387, -- Id of the teleport timeToStartEvent = 2, -- Minutes, after these minutes the teleport will be removed and the event will be declared started timeBetweenSpawns = 5, -- Seconds between each spawn of zombie zombieName = "Zombie", -- Name of the zombie that should be summoned playersNeededToStartEvent = 5, -- Players needed before the zombies can spawn. walls = {x = 1189, y = 1044, z = 7, stackpos = 1}, -- Should be the same as in the creaturescript! -- The zombies will spawn randomly inside this area fromPosition = {x = 1135, y = 1018, z = 7}, {x = 1170, y = 1040, z = 7}, -- top left cornor of the playground toPosition = {x = 1170, y = 1040, z = 7}, {x = 1135, y = 1018, z = 7}, -- bottom right cornor of the playground } function onThink() local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("EVENTO ZUMBI MENSAGEM: O evento 'Zumbi' começará em 2 minutos. O portal será fechado quando o evento começar.", MESSAGE_STATUS_CONSOLE_BLUE) doRemoveItem(getThingFromPos(config.walls).uid, 1) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) print(getGlobalStorageValue(2001)) end function startEvent() local get = getThingfromPos(config.teleportPosition) if get.itemid == config.teleportId then doRemoveItem(get.uid, 1) doCreateItem(9486, 9532, 1, config.walls) end local fromPosition, toPosition = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("EVENTO ZUMBI MENSAGEM: Boa sorte no evento 'Zumbi' jogadores! O portal foi fechado! E o primeiro zumbi aparecerá em 5 segundos.", MESSAGE_STATUS_CONSOLE_BLUE) doCreateItem(9486, 9532, 1, config.walls) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doBroadcastMessage(getPlayers.uid, "EVENTO ZUMBI MENSAGEM: O primeiro zumbie vai aparecer em " .. config.timeBetweenSpawns .. " segundos. Boa sorte!", MESSAGE_STATUS_CONSOLE_BLUE) end end end end else doBroadcastMessage("EVENTO ZUMBI MENSAGEM: O evento 'Zumbi' não pode ser iniciado pelo pequeno número de jogadores participando. No mínimo " .. config.playersNeededToStartEvent .. " jogadores é necessário!", MESSAGE_STATUS_CONSOLE_BLUE) doCreateItem(9486, 9532, 1, config.walls) for x = fromPosition.x, toPosition.x do for y = fromPosition.y, toPosition.y do for z = fromPosition.z, toPosition.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doRemoveCreature(pid) doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), true) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end end end function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 2 then pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)} doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("EVENTO ZUMBI MENSAGEM: Um novo zumbi apareceu! Agora temos: " .. getGlobalStorageValue(config.zombieCount) .. " zumbis no evento!", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) end end primeiro erro: segundo erro:
  7. Boa tarde, teriam como me ajudar? queria que especificasse de qual monstro dropou x item, o item dropa de vários monstros diferentes ex: ele esta assim no momento -> DROP MENSAGEM: O Jogador (Admin) Dropou o Item (golden helmet). queria que especificasse o monstro que dropou o item, ficaria assim ex: DROP MENSAGEM: O Jogador (Admin) Dropou o Item (golden helmet) de Demon . DROP MENSAGEM: O Jogador (Admin) Dropou o Item (golden helmet) de Orshabaal. local config = { [1] = {itemid= 2471}, -- id do item [2] = {itemid= 2470}, -- id do item [3] = {itemid= 2466}, -- id do item } function examine(cid, position, corpse_id) if not isPlayer(cid) then return true end local corpse = getTileItemById(position, corpse_id).uid if corpse <= 1 or not isContainer(corpse) then return true end for slot = 0, getContainerSize(corpse) - 1 do local item = getContainerItem(corpse, slot) if item.uid <= 1 then return true end for i = 1, #config do if item.itemid == config.itemid then doBroadcastMessage("DROP MENSAGEM: O Jogador (" .. getCreatureName(cid) .. ") Dropou o Item (" .. getItemNameById(config.itemid) .. ")." , 19) end end end end function onKill(cid, target) if not isMonster(target) then return true end local corpse_id = getMonsterInfo(getCreatureName(target)).lookCorpse addEvent(examine, 2, cid, getThingPos(target), corpse_id) return true end
  8. Queria um script que ao player dropar x item de um aviso no default ex: O jogador Test dropou um golden helmet de x monstro. tenho esse script como base, queria que desse para adicionar mais itens e que identificasse qual item e monstro dropou ex: itemid =2471 golden helmet , x player matou orshabaal Mensagem > O jogador Teste, dropou um golden helmet de orshabaal itemid =7730 blue legs, x player matou warlock Mensagem > O jogador Test Mage, dropou uma blue legs de warlock local config = { itemid = 2471, --ID do item. drop_effect = false --Efeito que aparecerá em cima da corpse, OPCIONAL! Se não quiser, coloque false. } function examine(cid, position, corpse_id) if not isPlayer(cid) then return true end local corpse = getTileItemById(position, corpse_id).uid if corpse <= 1 or not isContainer(corpse) then return true end for slot = 0, getContainerSize(corpse) - 1 do local item = getContainerItem(corpse, slot) if item.uid <= 1 then return true end if item.itemid == config.itemid then doBroadcastMessage("DROP MENSAGEM: O Jogador (" .. getCreatureName(cid) .. ") Dropou Golden Helmet.", 19) if config.drop_effect then doSendMagicEffect(position, config.drop_effect, cid) end end end end function onKill(cid, target) if not isMonster(target) then return true end local corpse_id = getMonsterInfo(getCreatureName(target)).lookCorpse addEvent(examine, 2, cid, getThingPos(target), corpse_id) return true end
  9. Poccnn ele serviu sim, só faltou a contagem regressiva em 5 posições(configuraveis)
  10. mendiguinho91, não funcionou, mais tambem não deu erro, ao usar a alavanca só aparece essa mensagem : " Aguarde até que seja liberada"
  11. Poccnn, isso mesmo que eu queria.. mais faltou o time exemplo: 60, 59, 58..(contagem regressiva) na alavanca e em mais 4posições, configuraveis.
  12. Esse script funciona desta maneira, é uma anihi que precisam de 5 jogadores, ao entrar na quest, os jogadores tem 120 segundos para matarem os bichos, caso não consigam serão levados ao templo, e ao puxar a alavanca fica uma contagem de 120 ao 0... porem ao terminar a contagem ninguem consegue mais entrar, fica bloqueada e não esta teletransportando os player para x posição desejada não ocorre nenhum erro no distro. function isOnSameFloor(fromPos, toPos) return fromPos.z == toPos.z and true or false end function isEven(arg) return arg % 2 == 0 and true or false end function getMiddlePos(fromPos, toPos) if not isOnSameFloor(fromPos, toPos) then return false end local middle = {x = 0, y = 0, z = 0} middle.x = isEven(fromPos.x + toPos.x) and (fromPos.x + toPos.x)/2 or math.floor((fromPos.x + toPos.x)/2) + 1 middle.y = isEven(fromPos.y + toPos.y) and (fromPos.y + toPos.y)/2 or math.floor((fromPos.y + toPos.y)/2) + 1 middle.z = fromPos.z or toPos.z return middle end function getDistanceRadius(fromPos, toPos) if not isOnSameFloor(fromPos, toPos) then return false end local distance = getDistanceBetween(fromPos, toPos) return isEven(distance) and (distance/2) or math.floor(distance/2) + 1 end function clearArea(middlePos, rangex, rangey) local final = {x=1382, y=837, z=8} -- Posição onde será teleportado quando acabar o tempo for i = -rangex, rangex do for j = -rangey, rangey do pos = {x = middlePos.x + i, y = middlePos.y + j, z = middlePos.z} creature = getTopCreature(pos).uid if isMonster(creature) then doSendMagicEffect(getThingPos(creature), 14) doRemoveCreature(creature) elseif isPlayer(creature) then doSendMagicEffect(getThingPos(creature), 10) doTeleportThing(creature, final) end end end setGlobalStorageValue(sto, -1) return true end local t = { lvl = 100, entrada = { {x = 1427, y = 824, z = 7}, -- pos players {x = 1426, y = 824, z = 7}, -- pos players {x = 1425, y = 824, z = 7}, -- pos players {x = 1424, y = 824, z = 7}, -- pos players {x = 1423, y = 824, z = 7}, -- pos players }, saida = { {x = 1440, y = 824, z = 7}, -- pos para onde eles irão {x = 1439, y = 824, z = 7}, -- pos para onde eles irão {x = 1438, y = 824, z = 7}, -- pos para onde eles irão {x = 1437, y = 824, z = 7}, -- pos para onde eles irão {x = 1436, y = 824, z = 7}, -- pos para onde eles irão }, monstros = { {{x = 1434, y = 822, z = 7}, "Demon"}, -- defina pos dos montros e nomes {{x = 1434, y = 824, z = 7}, "Demon"}, -- defina pos dos montros e nomes {{x = 1434, y = 826, z = 7}, "Demon"}, -- defina pos dos montros e nomes {{x = 1442, y = 822, z = 7}, "Demon"}, -- defina pos dos montros e nomes {{x = 1442, y = 824, z = 7}, "Demon"}, -- defina pos dos montros e nomes {{x = 1442, y = 826, z = 7}, "Demon"}, -- defina pos dos montros e nomes } } function onUse(cid, item, fromPosition, itemEx, toPosition) local configure = { fromPos = {x=1433, y=820, z=7}, -- posição superior esquerda do mapa, da area em que esta mapeado a area. toPos = {x=1443, y=828, z=7}, -- posição inferior direita do mapa, da area em que esta mapeado a area. boss = "Demon" -- Aqui você bota o nome do monstro que você quer remover } local config = { position = {x=1428, y=824, z=7}, -- Contagem position1 = {x=1434, y=821, z=7}, -- Contagem position2 = {x=1434, y=827, z=7}, -- Contagem position3 = {x=1442, y=821, z=7}, -- Contagem position4 = {x=1442, y=827, z=7}, -- Contagem fromPosition = {x=1433, y=820, z=7}, toPosition = {x=1443, y=828, z=7}, id = 1498, time = 1 -- tempo que o teleport ira sumir em minutos } local time = 60 local sto = 5973 local check = {} for _, k in ipairs(t.entrada) do local x = getTopCreature(k).uid if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.lvl) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você precisa de 5 jogadores para entrar na quest.") return true end if getGlobalStorageValue(sto) == 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde até que seja liberada.") return true end table.insert(check, end for _, summon in pairs(t.monstros) do local creature = getTopCreature(summon[1]).uid doCreateMonster(summon[2], summon[1]) end for i, tid in ipairs(check) do doTeleportThing(tid, t.saida, false) doSendMagicEffect(t.saida, 10) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) end for i = 1,time do formula = time - 1*i addEvent(doSendAnimatedText, i*1000, config.position, formula, TEXTCOLOR_RED) addEvent(doSendAnimatedText, i*1000, config.position1, formula, TEXTCOLOR_RED) addEvent(doSendAnimatedText, i*1000, config.position2, formula, TEXTCOLOR_RED) addEvent(doSendAnimatedText, i*1000, config.position3, formula, TEXTCOLOR_RED) addEvent(doSendAnimatedText, i*1000, config.position4, formula, TEXTCOLOR_RED) end setGlobalStorageValue(sto, 1) local rx = getDistanceRadius(configure.fromPos, configure.toPos) addEvent(clearArea, config.time * 60 * 1000, getMiddlePos(configure.fromPos, configure.toPos), rx, rx) return true end
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...