Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''action''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

  1. fala galera bom dia, gostaria de saber se tem como eu bloquear um comando de talkaction por vocação ??
  2. Bom dia, galera... Eu mais uma vez (como de costume) aqui com os scripts problematicos. Enfim to com um reset system aqui por talkaction, e ele funciona normal, mas quando reseta ele mantem a mana e health do antigo level. Eu gostaria que quando desse reset a mana e health ficasse compativel com level para que o char voltou. Outra coisa tambem, ali no script tem a função de mostrar no look do char quantos resets ele tem, e também não funciona. Se alguém puder me ajudar ai com isso, ficarei eternamente agradecido. function onSay(cid, words, param) local level = 2000 --level pra ser resetado local RemainingLvl = 20 --lvl que ele ficara depois do reset local pid = getPlayerGUID(cid) function addReset(cid) resets = getResets(cid) setPlayerStorageValue(cid,1020,resets+1) look = true return true end function getResets(cid) resets = getPlayerStorageValue(cid,1020) if resets < 0 then resets = 0 end return resets end if getPlayerLevel(cid) >= level then addReset(cid) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid).." reset.") doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..RemainingLvl..", `experience` = 0 WHERE `id` = "..pid) function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) then resets = getPlayerStorageValue(thing.uid, 1020)+1 doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. resets .."]") end return true end else doPlayerSendCancel(cid, "You need to have level "..level.." or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return TRUE end
  3. Olá, Xtibia. Eu tenho um script action aqui de item que ao dar use nele, ele heala a vida. Porém ele não tem exaustão. Queria saber se alguém não faz a gentileza de adicionar exhaust nele com um intervalo de 15 segundos. O script é esse: local config = { remove_on_use = false, -- Remover ao usar? min_heal = 1000, -- Mínimo que pode healar max_heal = 1000 -- Máximo que pode healar } function onUse(cid, item) doCreatureAddHealth(cid, math.random(config.min_heal, config.max_heal)) doCreatureSay(cid, "Aaah, restauring...", 19) if (config.remove_on_use) then doRemoveItem(item.uid, 1) end return true end
  4. Ola galera estou precisando de uma ajuda no meu script. ele funciona basicamente como uma battle arena porem nao e de time contra time.É de player x player. e quando um player mata outro ele recebe EXP. quando o player entra na arena ele permanece com a mesma outfit que ele estava antes de entrar, mesma cor. addon etc. e eu gostaria que fosse assim msm, porem descobri um bug, pois quando um player muda a cor da sua outfit colocando ela da mesma cor de outro jogador que tambem esta dentro da arena eles nao podem se atacar... enfim este e oo bug ! OBS: toda a arena contem NO LOGOUT E PVP ZONE TOOL.. segue o script a parte no MOD pois creio que o erro esta ae porem nao sei onde. e se nao for pedir de mais e alguem souber me explicar tambem se a EXP que sera calculada 100x nesse script ? é a rateExperience ou rateExperienceFromPlayers que esta no Config.lua
  5. Fala galera, tudo bem? Bom, estou trazendo aqui um sisteminha de double exp e double loot system que fiz sob encomenda só que acabaram fazendo por conta própria e desistindo de comprar o que me encomendaram, então estou divulgando aqui para vocês o sistema completo já que não tem mais nenhum termo de privacidade e é um sisteminha legal de se usar para diversas coisas (quests, itens especiais, etc). O nome é bem auto-explicativo, o sistema aumenta a rate de exp e loot daquele cidadão por um período X de tempo. Scripts: http://pastebin.com/Wc9ZL8Km É bastante auto-explicativo o código acima, pois já coloquei no pastebin com os devidos comentários e com os passos a serem seguidos. Leiam tudo pois são 3 arquivos e 1 modificação no login.lua. A forma como está feita ali é um item (a ser definido por você na tag) que você clica e habilita o bonus ao player. A rate de exp e loot são customizáveis tal qual o tempo de duração do bônus. Espero que gostem. Abraços,
  6. Eai, pessoal. Bom, ultimamente eu to postando aqui quase todo dia pedindo ajuda e tudo, mas não faria se não fosse necessario (kkkkk). Então, acho que isso é a ultima ajuda que peço aqui. Eu tenho um script aqui (action) de um item que da TP pro templo, só que eu gostaria que ele pudesse ser usado só a cada 3 minutos e o player não pudesse estar PZ, PK, REDSKULL.... O script é o seguinte: local scroll = 6119 local temple = {x=155, y=52, z=7} local level = 25 function onUse(cid, item, frompos, item2, topos) if item.itemid == scroll and getPlayerLevel(cid) >= level then doTeleportThing(cid, temple, TRUE) doSendMagicEffect(temple,10) doSendAnimatedText(temple, "Teleport!", 5) doRemoveItem(cid, item.uid, 0) else doPlayerSendCancel(cid, "Sorry, your level must higher than 25!") end return 1 end
  7. to com esse erro muito tempo ja tentei fazer de tudo pra arrumar base open source quem tiver como me ajudar dou REP!! POR 1 SEMANA!!! Por favor me ajuda ae alguém!! da esse error quando uso F8 do Mew Obs: não é só ele que ta com esse error tem varios poke tam bem com o mesmo error so que tem outros moves... [12/03/2016 22:29:07] [Error - TalkAction Interface] [12/03/2016 22:29:07] data/talkactions/scripts/move8.lua:onSay [12/03/2016 22:29:07] Description: [12/03/2016 22:29:07] data/talkactions/scripts/move8.lua:2174: attempt to index field '?' (a nil value) [12/03/2016 22:29:08] stack traceback: [12/03/2016 22:29:08] data/talkactions/scripts/move8.lua:2174: in function <data/talkactions/scripts/move8.lua:2164>
  8. Olha eu aqui de novo Alguem poderia me ajudar a implementar uma variavel no premio deste escript? Eu queria que ao inves de dar premium points , de um item randomico... Esta pode ser uma boa base:
  9. auguem me ajuda a resolve esse erro aki [30/01/2016 20:45:07] [Error - TalkAction Interface] [30/01/2016 20:45:07] In a timer event called from: [30/01/2016 20:45:07] data/talkactions/scripts/move1.lua:onSay [30/01/2016 20:45:07] Description: [30/01/2016 20:45:07] (luaGetItemAttribute) Item not found isso acontece quando eu uso atake de um poke, Como arrumar? Aqui print.. @up Alguem ajuda pf
  10. Olá. Eu estou precisando de um talkaction que troca o nome e pega determinado item. Eu tentei usar esse que está disponivel aqui http://www.xtibia.com/forum/topic/233204-change-name-in-game-30/ Porém quando executa o comando ele não troca o nome e acusa isso na distro: OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: near "LIMIT": syntax error (UPDATE "players" SET "name" = 'Testando Nome' WHERE "id" = 16 LIMIT 1;)
  11. Bom dia. Eu estou procurando por talkaction/script que adicione todos os addons de uma vez ao player. Mesma função do addon doll (!addon citizen) porém que de TODOS os addons disponiveis de uma vez. (Meu ot é 8.60).
  12. [spoiler*] Criar 1 arquivo com nome Porta.lua function onUse(cid, item, fromPosition, itemEx, toPosition) local itemid = 2139 ---- ITEM QUER PRECISAR PARA PASSAR PELA PORTA local pos = {x = 1107, y = 1017, z = 7} -- posição pra onde sera teleportado if #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "Return your pokemon.") end if getPlayerItemCount(cid, itemid) >= 1 then doPlayerSendCancel(cid, "MENSAGEM!.") doTeleportThing(cid, pos) else doPlayerSendCancel(cid, "MENSAGEM!") end return true end Tag <action actionid="55555" event="script" value="Porta.lua"/> [spoiler*]
  13. [spoiler*] Tag <action itemid="id_do_item" event="script" value="removevip.lua"/> criar arquivo com nome removevip.lua script function onUse(cid, item, fromPosition, itemEx, toPosition) Local Days = Quantidade Quer Vai Remove Vip doPlayerRemovePremiumDays(cid, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Você Removeu') end [spoiler*]
  14. [spoiler*] Tag <action itemid="id_do_item" event="script" value="AddonsLoteria.lua"/> [spoiler*] criar 1 arquivo com nome AddonsLoteria.lua [spoiler*] function onUse(cid, item, fromPosition, itemEx, toPosition) Local Remove = id quantidade-remove = quantidade Local Additem = id quantidade = quantidade if(doPlayerRemoveItem(cid, remove, quantidade-remove) == true) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns.") doPlayerAddItem(cid, additem, quantidade) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce Precisa De 30 Diamonds Pra Ganhar Addons Box.") end return TRUE end [spoiler*] By Luizmachado1
  15. Eu estou tentando fazer um action de alavanca para uma anihi nova com 6 players, mas não to conseguindo fazer funcionar. Eu só quero que funcione a alavanca quando puxa-la levar os players para a sala com os monstros. Meu script ta assim: local config = { daily = "no", level = 325, storage = 2239 } local playerPosition = { {x = 3988, y = 1840, z = 9}, {x = 3987, y = 1840, z = 9}, {x = 3986, y = 1840, z = 9}, {x = 3985, y = 1840, z = 9}, {x = 3984, y = 1840, z = 9}, {x = 3983, y = 1840, z = 9} } local newPosition = { {x = 3989, y = 1811, z = 9}, {x = 3988, y = 1811, z = 9}, {x = 3987, y = 1811, z = 9}, {x = 3986, y = 1811, z = 9}, {x = 3985, y = 1811, z = 9}, {x = 3984, y = 1811, z = 9} } -- Do not modify the declaration lines below. local players = {} local failed = true config.daily = getBooleanFromString(config.daily) function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == 10029) then if(config.daily) then doPlayerSendCancel(cid, "Sorry, not possible.") else doTransformItem(item.uid, item.itemid - 1) end return true end if(item.itemid ~= 10030) then return true end for i, pos in ipairs(playerPosition) do pos.stackpos = STACKPOS_TOP_CREATURE players = getThingFromPos(playerPosition).uid if(players > 0 and isPlayer(players) and getPlayerStorageValue(players.uid, config.storage) == -1 and getPlayerLevel(players.uid) >= config.level) then failed = false end if(failed) then doPlayerSendCancel(cid, "Sorry, not possible.") return true end failed = true end for i, pid in ipairs(players) do doSendMagicEffect(playerPosition, CONST_ME_POFF) doTeleportThing(pid, newPosition, false) doSendMagicEffect(newPosition, CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid + 1) return true end
  16. [08/03/2016 05:10:11] [Error - Action Interface] [08/03/2016 05:10:11] data/actions/scripts/catch.lua:onUse [08/03/2016 05:10:11] Description: [08/03/2016 05:10:11] attempt to index a nil value [08/03/2016 05:10:11] stack traceback: [08/03/2016 05:10:11] [C]: in function 'doSendDistanceShoot' [08/03/2016 05:10:11] data/actions/scripts/catch.lua:462: in function <data/actions/scripts/catch.lua:323> Meu script tá funcionando quase perfeitamente, quase não, ele tá funcionando perfeitamente só que tem um único problema é que não está soltando o efeito de distancia... e ta dando esse erro na distro. Eu tenho que adicionar algo na distro? uso tfs 0.3.6. script...
  17. Olá, boa tarde... eu to com um script aqui que ele muda um item de uma certa pos quando player passa por cima, ele tá funcionando normal mas oque eu não consegui era colocar + de 3 itens, colocar até 10 tem uns que usa 5, outros 7, por isso queria por o maximo de 10
  18. Boa tarde, eu queria pedir a vocês um script de anuncio do TOP LEVEL do servidor, exemplo: O Player "Stanley" é o top server level 807, automaticamente a cada 2 horas o server envia uma mensagem "BROADCAST" informando o level que ele está atualmente e dizendo que ele é o top level do server. A mensagem pode ser assim mais ou menos "O Player Stanley está no comando do servidor, LEVEL 807!!" E claro, caso alguem passe ele, comece a enviar a mensagem sobre o novo TOP LEVEL do Server Não sei se postei no local correto, caso contrário peço pra moverem
  19. Senhores estou tendo dificuldades com o catch system quando capturo o pokemon e tem espaço na bag funciona porem aparece: [05/03/2016 21:08:23] [Error - Action Interface] [05/03/2016 21:08:23] In a timer event called from: [05/03/2016 21:08:23] data/actions/scripts/catch.lua:onUse [05/03/2016 21:08:23] Description: [05/03/2016 21:08:23] (luaDoItemSetAttribute) Invalid data type e quando capturo com os 6 pokes na bag aparece uma chuva de erros e o pokemon não aparece no depot [05/03/2016 21:10:43] [Error - Action Interface] [05/03/2016 21:10:43] In a timer event called from: [05/03/2016 21:10:43] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:43] Description: [05/03/2016 21:10:43] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:43] [Error - Action Interface] [05/03/2016 21:10:43] In a timer event called from: [05/03/2016 21:10:43] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:43] Description: [05/03/2016 21:10:43] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:43] [Error - Action Interface] [05/03/2016 21:10:43] In a timer event called from: [05/03/2016 21:10:43] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:43] Description: [05/03/2016 21:10:43] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:43] [Error - Action Interface] [05/03/2016 21:10:43] In a timer event called from: [05/03/2016 21:10:43] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:43] Description: [05/03/2016 21:10:43] (luaDoItemSetAttribute) Invalid data type [05/03/2016 21:10:43] [Error - Action Interface] [05/03/2016 21:10:43] In a timer event called from: [05/03/2016 21:10:43] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:43] Description: [05/03/2016 21:10:43] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:43] [Error - Action Interface] [05/03/2016 21:10:43] In a timer event called from: [05/03/2016 21:10:43] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:43] Description: [05/03/2016 21:10:43] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:44] [Error - Action Interface] [05/03/2016 21:10:44] In a timer event called from: [05/03/2016 21:10:44] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:44] Description: [05/03/2016 21:10:44] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:44] [Error - Action Interface] [05/03/2016 21:10:44] In a timer event called from: [05/03/2016 21:10:44] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:44] Description: [05/03/2016 21:10:44] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:44] [Error - Action Interface] [05/03/2016 21:10:44] In a timer event called from: [05/03/2016 21:10:44] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:44] Description: [05/03/2016 21:10:44] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:44] [Error - Action Interface] [05/03/2016 21:10:44] In a timer event called from: [05/03/2016 21:10:44] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:44] Description: [05/03/2016 21:10:44] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:44] [Error - Action Interface] [05/03/2016 21:10:44] In a timer event called from: [05/03/2016 21:10:44] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:44] Description: [05/03/2016 21:10:44] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:44] [Error - Action Interface] [05/03/2016 21:10:44] In a timer event called from: [05/03/2016 21:10:44] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:44] Description: [05/03/2016 21:10:44] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:44] [Error - Action Interface] [05/03/2016 21:10:44] In a timer event called from: [05/03/2016 21:10:44] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:44] Description: [05/03/2016 21:10:44] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:44] [Error - Action Interface] [05/03/2016 21:10:44] In a timer event called from: [05/03/2016 21:10:44] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:44] Description: [05/03/2016 21:10:44] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:44] [Error - Action Interface] [05/03/2016 21:10:44] In a timer event called from: [05/03/2016 21:10:44] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:44] Description: [05/03/2016 21:10:44] (luaDoItemSetAttribute) Item not found [05/03/2016 21:10:44] [Error - Action Interface] [05/03/2016 21:10:44] In a timer event called from: [05/03/2016 21:10:44] data/actions/scripts/catch.lua:onUse [05/03/2016 21:10:44] Description: [05/03/2016 21:10:44] (luaDoPlayerSendMailByName) Item not found se alguem puder ajudar, o codigo do catch system segue abaixo: failmsgs = { "Sorry, you didn't catch that pokemon.", "Sorry, your pokeball broke.", "Sorry, the pokemon escaped.", } function doBrokesCount(cid, str, ball) --alterado v1.9 \/ if not isCreature(cid) then return false end local tb = { {b = "normal", v = 0}, {b = "great", v = 0}, {b = "super", v = 0}, {b = "ultra", v = 0}, {b = "saffari", v = 0}, {b = "dark", v = 0}, } for _, e in ipairs(tb) do if e.b == ball then e.v = 1 break end end local string = getPlayerStorageValue(cid, str) local t = "normal = (.-), great = (.-), super = (.-), ultra = (.-), saffari = (.-), dark = (.-);" local t2 = "" for n, g, s, u, s2, d in string:gmatch(t) do t2 = "normal = "..(n+tb[1].v)..", great = "..(g+tb[2].v)..", super = "..(s+tb[3].v)..", ultra = "..(u+tb[4].v)..", saffari = "..(s2+tb[5].v)..", dark = "..(d+tb[6].v)..";" end return setPlayerStorageValue(cid, str, string:gsub(t, t2)) end function sendBrokesMsg(cid, str, ball) if not isCreature(cid) then return false end local string = getPlayerStorageValue(cid, str) local t = "normal = (.-), great = (.-), super = (.-), ultra = (.-), saffari = (.-), dark = (.-);" local msg = {} table.insert(msg, "You have wasted: ") for n, g, s, u, s2, d in string:gmatch(t) do if tonumber(n) and tonumber(n) > 0 then table.insert(msg, tostring(n).." Poke ball".. (tonumber(n) > 1 and "s" or "")) end if tonumber(g) and tonumber(g) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(g).." Great ball".. (tonumber(g) > 1 and "s" or "")) end if tonumber(s) and tonumber(s) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(s).." Super ball".. (tonumber(s) > 1 and "s" or "")) end if tonumber(u) and tonumber(u) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(u).." Ultra ball".. (tonumber(u) > 1 and "s" or "")) end if tonumber(s2) and tonumber(s2) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(s2).." Saffari ball".. (tonumber(s2) > 1 and "s" or "")) end if tonumber(d) and tonumber(d) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(d).." Dark ball".. (tonumber(d) > 1 and "s" or "")) end end if #msg == 1 then return true end if string.sub(msg[#msg], 1, 1) == "," then msg[#msg] = " and".. string.sub(msg[#msg], 2, #msg[#msg]) end table.insert(msg, " trying to catch it.") sendMsgToPlayer(cid, 27, table.concat(msg)) end --alterado v1.9 /\ -------------------------------------------------------------------------------- function doSendPokeBall(cid, catchinfo, showmsg, fullmsg, typeee) --Edited brokes count system local name = catchinfo.name local pos = catchinfo.topos local topos = {} topos.x = pos.x topos.y = pos.y topos.z = pos.z local newid = catchinfo.newid local catch = catchinfo.catch local fail = catchinfo.fail local rate = catchinfo.rate local basechance = catchinfo.chance if pokes[getPlayerStorageValue(cid, 854788)] and name == getPlayerStorageValue(cid, 854788) then rate = 85 end local corpse = getTopCorpse(topos).uid if not isCreature(cid) then doSendMagicEffect(topos, CONST_ME_POFF) return true end doItemSetAttribute(corpse, "catching", 1) local level = getItemAttribute(corpse, "level") or 0 local levelChance = level * 0.02 local totalChance = math.ceil(basechance * (1.2 + levelChance)) local thisChance = math.random(0, totalChance) local myChance = math.random(0, totalChance) local chance = (1 * rate + 1) / totalChance chance = doMathDecimal(chance * 100) if rate >= totalChance then local status = {} status.gender = getItemAttribute(corpse, "gender") status.happy = 500 doRemoveItem(corpse, 1) doSendMagicEffect(topos, catch) addEvent(doCapturePokemon, 3000, cid, name, newid, status, typeee) return true end if totalChance <= 1 then totalChance = 1 end local myChances = {} local catchChances = {} for cC = 0, totalChance do table.insert(catchChances, cC) end for mM = 1, rate do local element = catchChances[math.random(1, #catchChances)] table.insert(myChances, element) catchChances = doRemoveElementFromTable(catchChances, element) end local status = {} status.gender = getItemAttribute(corpse, "gender") status.happy = 500 doRemoveItem(corpse, 1) local doCatch = false for check = 1, #myChances do if thisChance == myChances[check] then doCatch = true end end if doCatch then doSendMagicEffect(topos, catch) addEvent(doCapturePokemon, 3000, cid, name, newid, status, typeee) else addEvent(doNotCapturePokemon, 3000, cid, name, typeee) doSendMagicEffect(topos, fail) end end function doCapturePokemon(cid, poke, ballid, status, typeee) if not isCreature(cid) then return true end local list = getCatchList(cid) if not isInArray(list, poke) and not isShinyName(poke) then doPlayerAddSoul(cid, 1) end doAddPokemonInOwnList(cid, poke) doAddPokemonInCatchList(cid, poke) CW_Count(cid, poke, typeee) CW_Caught(cid, poke) if pokes[poke] then local test = io.open("data/catch.txt", "a+") local read = "" if test then read = test:read("*all") test:close() end if string.find(poke, "Shiny") then read = read.."\n\n\nName: "..getCreatureName(cid).." - Pokémon: "..poke.."" else read = read.."\nName: "..getCreatureName(cid).." - Pokémon: "..poke.."" end if newpokedex[poke].stoCatch ~= -1 then local t = "normal = (.-), great = (.-), super = (.-), ultra = (.-), saffari = (.-);" local msg = {} storage = getPlayerStorageValue(cid, newpokedex[poke].stoCatch) for n, g, s, u, s2 in storage:gmatch(t) do if tonumber(n) and tonumber(n) > 0 then table.insert(msg, tostring(n).." Poke ball".. (tonumber(n) > 1 and "s" or "")) end if tonumber(g) and tonumber(g) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(g).." Great ball".. (tonumber(g) > 1 and "s" or "")) end if tonumber(s) and tonumber(s) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(s).." Super ball".. (tonumber(s) > 1 and "s" or "")) end if tonumber(u) and tonumber(u) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(u).." Ultra ball".. (tonumber(u) > 1 and "s" or "")) end if tonumber(s2) and tonumber(s2) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(s2).." Saffari ball".. (tonumber(s2) > 1 and "s" or "")) end end read = read.." - "..table.concat(msg).."" end local reopen = io.open("data/catch.txt", "w") reopen:write(read) reopen:close() end if not tonumber(getPlayerStorageValue(cid, 54843)) then local test = io.open("data/sendtobrun123.txt", "a+") local read = "" if test then read = test:read("*all") test:close() end read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843).."" local reopen = io.open("data/sendtobrun123.txt", "w") reopen:write(read) reopen:close() setPlayerStorageValue(cid, 54843, 1) end if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then setPlayerStorageValue(cid, 54843, 1) else setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1) end if icons[poke] then ballid = icons[poke].on end local description = "Contains a "..poke.."." local gender = status.gender local happy = 200 local item = doCreateItemEx(ballid) --alterado v1.9 \/ if (getPlayerFreeCap(cid) < 1 and not isInArray({5, 6}, getPlayerGroupId(cid))) or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then doPlayerSendMailByName(getCreatureName(cid), item, 1) else item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, ballid, 1) end doItemSetAttribute(item, "poke", poke) doItemSetAttribute(item, "hp", 1) doItemSetAttribute(item, "happy", happy) doItemSetAttribute(item, "gender", gender) doItemSetAttribute(item, "fakedesc", description) doItemSetAttribute(item, "description", description) if poke == "Hitmonchan" or poke == "Shiny Hitmonchan" then doItemSetAttribute(item, "hands", 0) doItemSetAttribute(item, "morta", "no") doItemSetAttribute(item, "Icone", "yes") doItemSetAttribute(item, "ball", "Icone") --doTransformItem(item, icons[getItemAttribute(item, "poke")].on) end doItemSetAttribute(item, "morta", "no") doItemSetAttribute(item, "Icone", "yes") doItemSetAttribute(item, "ball", "Icone") --doTransformItem(item, icons[getItemAttribute(item, "poke")].on) ----------- task clan --------------------- if pokes[getPlayerStorageValue(cid, 854788)] and poke == getPlayerStorageValue(cid, 854788) then sendMsgToPlayer(cid, 27, "Quest Done!") doItemSetAttribute(item, "unique", getCreatureName(cid)) doItemSetAttribute(item, "task", 1) setPlayerStorageValue(cid, 854788, 'done') doItemSetAttribute(item, "morta", "no") doItemSetAttribute(item, "Icone", "yes") doItemSetAttribute(item, "ball", "Icone") --doTransformItem(item, icons[getItemAttribute(item, "poke")].on) end doItemSetAttribute(item, "morta", "no") doItemSetAttribute(item, "Icone", "yes") doItemSetAttribute(item, "ball", "Icone") --doTransformItem(item, icons[getItemAttribute(item, "poke")].on) ------------------------------------------- --alterado v1.9 \/ if getPlayerFreeCap(cid) <= 1 then doItemSetAttribute(item, "morta", "no") doItemSetAttribute(item, "Icone", "yes") doItemSetAttribute(item, "ball", "Icone") --doTransformItem(item, icons[getItemAttribute(item, "poke")].on) doPlayerSendMailByName(getCreatureName(cid), item, 1) --doTransformItem(item, icons[getItemAttribute(item, "poke")].on) doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a pokemon ("..poke..")!") doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.") doPlayerSendTextMessage(cid, 27, "Log off and on to save. The staff isn't liable for losses!") end local storage = newpokedex[poke].stoCatch sendBrokesMsg(cid, storage, typeee) setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0; dark = 0;") --alterado v1.9 /\ if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173) if catchMakesPokemonHappier then setPlayerStorageValue(getCreatureSummons(cid)[1], 1008, getPlayerStorageValue(getCreatureSummons(cid)[1], 1008) + 20) if useOTClient then doCreatureExecuteTalkAction(cid, "/salvar") end end else doSendMagicEffect(getThingPos(cid), 173) end doIncreaseStatistics(poke, true, true) end function doNotCapturePokemon(cid, poke, typeee) if not isCreature(cid) then return true end if not tonumber(getPlayerStorageValue(cid, 54843)) then local test = io.open("data/sendtobrun123.txt", "a+") local read = "" if test then read = test:read("*all") test:close() end read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843).."" local reopen = io.open("data/sendtobrun123.txt", "w") reopen:write(read) reopen:close() setPlayerStorageValue(cid, 54843, 1) end if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then setPlayerStorageValue(cid, 54843, 1) else setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1) end doPlayerSendTextMessage(cid, 27, failmsgs[math.random(#failmsgs)]) if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 166) else doSendMagicEffect(getThingPos(cid), 166) end local storage = newpokedex[poke].stoCatch doBrokesCount(cid, storage, typeee) doIncreaseStatistics(poke, true, false) CW_Count(cid, poke, typeee) end function getPlayerInfoAboutPokemon(cid, poke) local a = newpokedex[poke] if not isPlayer(cid) then return false end if not a then print("Error while executing function \"getPlayerInfoAboutPokemon(\""..getCreatureName(cid)..", "..poke..")\", "..poke.." doesn't exist.") return false end local b = getPlayerStorageValue(cid, a.storage) if b == -1 then setPlayerStorageValue(cid, a.storage, poke..":") end local ret = {} if string.find(b, "catch,") then ret.catch = true else ret.catch = false end if string.find(b, "dex,") then ret.dex = true else ret.dex = false end if string.find(b, "use,") then ret.use = true else ret.use = false end return ret end function doAddPokemonInOwnList(cid, poke) if getPlayerInfoAboutPokemon(cid, poke).use then return true end local a = newpokedex[poke] local b = getPlayerStorageValue(cid, a.storage) setPlayerStorageValue(cid, a.storage, b.." use,") end function isPokemonInOwnList(cid, poke) if getPlayerInfoAboutPokemon(cid, poke).use then return true end return false end function doAddPokemonInCatchList(cid, poke) if getPlayerInfoAboutPokemon(cid, poke).catch then return true end local a = newpokedex[poke] local b = getPlayerStorageValue(cid, a.storage) setPlayerStorageValue(cid, a.storage, b.." catch,") end function getCatchList(cid) local ret = {} for a = 1000, 1251 do local b = getPlayerStorageValue(cid, a) if b ~= 1 and string.find(b, "catch,") then table.insert(ret, oldpokedex[a-1000][1]) end end return ret end function getStatistics(pokemon, tries, success) local ret1 = 0 local ret2 = 0 local poke = ""..string.upper(string.sub(pokemon, 1, 1))..""..string.lower(string.sub(pokemon, 2, 30)).."" local dir = "data/Pokemon Statistics/"..poke.." Attempts.txt" local arq = io.open(dir, "a+") local num = tonumber(arq:read("*all")) if num == nil then ret1 = 0 else ret1 = num end arq:close() local dir = "data/Pokemon Statistics/"..poke.." Catches.txt" local arq = io.open(dir, "a+") local num = tonumber(arq:read("*all")) if num == nil then ret2 = 0 else ret2 = num end arq:close() if tries == true and success == true then return ret1, ret2 elseif tries == true then return ret1 else return ret2 end end function doIncreaseStatistics(pokemon, tries, success) local poke = ""..string.upper(string.sub(pokemon, 1, 1))..""..string.lower(string.sub(pokemon, 2, 30)).."" if tries == true then local dir = "data/Pokemon Statistics/"..poke.." Attempts.txt" local arq = io.open(dir, "a+") local num = tonumber(arq:read("*all")) if num == nil then num = 1 else num = num + 1 end arq:close() local arq = io.open(dir, "w") arq:write(""..num.."") arq:close() end if success == true then local dir = "data/Pokemon Statistics/"..poke.." Catches.txt" local arq = io.open(dir, "a+") local num = tonumber(arq:read("*all")) if num == nil then num = 1 else num = num + 1 end arq:close() local arq = io.open(dir, "w") arq:write(""..num.."") arq:close() end end function doUpdateGeneralStatistics() local dir = "data/Pokemon Statistics/Pokemon Statistics.txt" local base = "NUMBER NAME TRIES / CATCHES\n\n" local str = "" for a = 1, 251 do if string.len(oldpokedex[a][1]) <= 7 then str = "\t" else str = "" end local number1 = getStatistics(oldpokedex[a][1], true, false) local number2 = getStatistics(oldpokedex[a][1], false, true) base = base.."["..threeNumbers(a).."]\t"..oldpokedex[a][1].."\t"..str..""..number1.." / "..number2.."\n" end local arq = io.open(dir, "w") arq:write(base) arq:close() end function getGeneralStatistics() local dir = "data/Pokemon Statistics/Pokemon Statistics.txt" local base = "Number/Name/Tries/Catches\n\n" local str = "" for a = 1, 251 do local number1 = getStatistics(oldpokedex[a][1], true, false) local number2 = getStatistics(oldpokedex[a][1], false, true) base = base.."["..threeNumbers(a).."] "..oldpokedex[a][1].." "..str..""..number1.." / "..number2.."\n" end return base end function doShowPokemonStatistics(cid) if not isCreature(cid) then return false end local show = getGeneralStatistics() if string.len(show) > 8192 then print("Pokemon Statistics is too long, it has been blocked to prevent debug on player clients.") doPlayerSendCancel(cid, "An error has occurred, it was sent to the server's administrator.") return false end doShowTextDialog(cid, math.random(2391, 2394), show) end obs: creio que o problema vem dessa parte local description = "Contains a "..poke.."." local gender = status.gender local happy = 200 local item = doCreateItemEx(ballid) --alterado v1.9 \/ if (getPlayerFreeCap(cid) < 1 and not isInArray({5, 6}, getPlayerGroupId(cid))) or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then doPlayerSendMailByName(getCreatureName(cid), item, 1) else item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, ballid, 1) end doItemSetAttribute(item, "poke", poke) doItemSetAttribute(item, "hp", 1) doItemSetAttribute(item, "happy", happy) doItemSetAttribute(item, "gender", gender) doItemSetAttribute(item, "fakedesc", description) doItemSetAttribute(item, "description", description) if poke == "Hitmonchan" or poke == "Shiny Hitmonchan" then doItemSetAttribute(item, "hands", 0) doItemSetAttribute(item, "morta", "no") doItemSetAttribute(item, "Icone", "yes") doItemSetAttribute(item, "ball", "Icone") --doTransformItem(item, icons[getItemAttribute(item, "poke")].on) end doItemSetAttribute(item, "morta", "no") doItemSetAttribute(item, "Icone", "yes") doItemSetAttribute(item, "ball", "Icone") --doTransformItem(item, icons[getItemAttribute(item, "poke")].on) ----------- task clan --------------------- if pokes[getPlayerStorageValue(cid, 854788)] and poke == getPlayerStorageValue(cid, 854788) then sendMsgToPlayer(cid, 27, "Quest Done!") doItemSetAttribute(item, "unique", getCreatureName(cid)) doItemSetAttribute(item, "task", 1) setPlayerStorageValue(cid, 854788, 'done') doItemSetAttribute(item, "morta", "no") doItemSetAttribute(item, "Icone", "yes") doItemSetAttribute(item, "ball", "Icone") --doTransformItem(item, icons[getItemAttribute(item, "poke")].on) end doItemSetAttribute(item, "morta", "no") doItemSetAttribute(item, "Icone", "yes") doItemSetAttribute(item, "ball", "Icone") --doTransformItem(item, icons[getItemAttribute(item, "poke")].on) ------------------------------------------- --alterado v1.9 \/ if getPlayerFreeCap(cid) <= 1 then doItemSetAttribute(item, "morta", "no") doItemSetAttribute(item, "Icone", "yes") doItemSetAttribute(item, "ball", "Icone") --doTransformItem(item, icons[getItemAttribute(item, "poke")].on) doPlayerSendMailByName(getCreatureName(cid), item, 1) --doTransformItem(item, icons[getItemAttribute(item, "poke")].on) doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a pokemon ("..poke..")!") doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.") doPlayerSendTextMessage(cid, 27, "Log off and on to save. The staff isn't liable for losses!") end obrigado desde ja
  20. Salve galerinha do xTibia, hoje eu venho pedir a ajuda de vocês para por uma condição em uma script de resetar que tinha alguns bugs e eu já arrumei, porém, não consigo colocar tal condição. Gostaria que os jogadores não pudessem resetar ao mesmo tempo. Ex: um reseta e daqui x segundos o comando !resetar fica disponível novamente. Script: UP!
  21. Olá, Seguinte estou enfrentando o seguinte erro em uma das partes de utilizar o vagão para colocar o carvão. Lua Script Error: [Action Interface] data/actions/scripts/quests/the hidden city of beregar/coalWagon.lua:onUse .../scripts/quests/the hidden city of beregar/coalWagon.lua:9: attempt to index field 'wagon' (a number value) stack traceback: [C]: in function '__index' .../scripts/quests/the hidden city of beregar/coalWagon.lua:9: in function <.../scripts/quests/the hidden city of beregar/coalWagon.lua:6> Segue o coalWagon.lua local config = { {wagon = 7131, stopPos = Position(32717, 31492, 11)}, {wagon = 8749, stopPos = Position(32699, 31492, 11)} } function onUse(player, item, fromPosition, target, toPosition, isHotkey) for i = 1, #config do local table = config[i] local wagonPos = table.wagon:getPosition() if table.wagon == 7131 and wagonPos ~= table.stopPos then Tile(wagonPos):getTopTopItem():moveTo(wagonPos, x + 2) elseif table.wagon == 8749 and wagonPos ~= table.stopPos then Tile(wagonPos):getTopTopItem():moveTo(wagonPos, x - 2) end player:say("SQUEEEEAK", TALKTYPE_MONSTER_SAY, false, 0, wagonPos) end return true end Obrigado!
  22. Ola galerinha estou precisando de uma ajudinha,pois tenho um script porem ele nao funciona da forma que preciso. eu gostaria que ele funcionasse da seguinte forma. ao colocar quaquer um dos itens vip emcima de x posicao e ter 5kk na backpack e puxar a alavanca sera adicionado premium points na contado player para gastar no shop. premium points na conta do jogador. aque esta uma base de um script que achei no otland, porem esse script nao funciona e ele nao tem a opcao de ser qualquer item vip e nem de precisar dos 5kk . ou seja em meu servidor tenho alguns itens vip quero que funcione com qualquer um deles ,desde que tenha os 5kk + x tem. agradeco desde ja e REP+ para quem ajudar ae..
  23. I ae galera blz, Eu não entendo script mais eu sou de fica mexendo resolvi vários script mais esse já ta me dando dor de cabeça.. Peço por favor me ajuda Obrigado :XTibia_smile: [02/03/2016 23:02:41] [Error - Action Interface] [02/03/2016 23:02:41] data/actions/scripts/evolution.lua [02/03/2016 23:02:41] Description: [02/03/2016 23:02:41] data/actions/scripts/evolution.lua:6: table index is nil [02/03/2016 23:02:41] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/evolution.lua) [02/03/2016 23:02:41] data/actions/scripts/catch.lua:8: '(' expected near 'onUse' Meu Evolution e o catch Evolution Meu catch
  24. function onLook(cid, thing, position, lookDistance) if thing.itemid == 448 then if thing.actionid == 1005 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It looks like that this tile is not a trap.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This tile is for sure a trap.") end return false end if thing.itemid == 5339 then if thing.actionid == 1001 then doTeleportThing(cid, {x=1003,y=1018,z=7}) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "I said there wouldn\t be anymore tips, so don\'t read everything.") doSendMagicEffect({x=1003,y=1018,z=7}, CONST_ME_TELEPORT) return false else return true end end if not isMonster(thing.uid) then return true end if isPlayer(getCreatureMaster(thing.uid)) then nome = getCreatureName(getCreatureMaster(thing.uid)) poke = string.lower(getCreatureName(thing.uid)) else return true end if getCreatureMaster(thing.uid) == cid then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..poke..".\nIt belongs to "..nome..".\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..poke..".\nIt belongs to "..nome..".") end return false end Alguem Poderia Modificar Meu Look.lua pará Pegar o Sistema de gênero pokemon? obs:ja adicionei na source obs:servido de poketibia Up...
  25. Estou com um problema baixei um servidor aqui : http://www.xtibia.com/forum/topic/233906-erondino-patch-v171-source/ Esse server veio com ditto system tudo certo, ele copia o ditto vem as skills na move bar porem ele não solta as skills sai somente a frase "m1" "m2" e quando ele volta pra ball vem como ditto novamente. O Erro no console é esse: [Error - TalkAction Interface] data/talkactions/scripts/move1.lua:onSay Description: data/talkactions/scripts/move1.lua:242: attempt to index field '?' (a nil value) stack traceback: data/talkactions/scripts/move1.lua:242: in function <data/talkactions/scripts/move1.lua:201> Linhas 201 até 250: function onSay(cid, words, param) local sumomdonego = getCreatureSummons(cid)[1] if not sumomdonego then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemos to moves.") return 0 end local pokemon = cp[getCreatureName(sumomdonego)][words] if isInArray({"Ditto","Smeargle"}, getCreatureName(sumomdonego)) then if isInArray({"28"}, getCreatureOutfit(sumomdonego).lookType) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a transform to use moves.") return 0 end if exhaustion.get(cid, 548798) then dittocold = math.floor(((exhaustion.get(cid, 548798)) )) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ths pokemon needs "..dittocold.." seconds to learn the moves") return 0 end local ditto = getPlayerSlotItem(cid, 8) local ropax = getItemAttribute(ditto.uid, "nomepoke") if words == "!cd" then pokemon = cp[ropax][words] if not pokemon then if getPlayerStorageValue(sumomdonego, 1236) <= 0 then return true end end pokemon.pokenome = "Ditto" if ropax == "Smeargle" then pokemon.pokenome = "Smeargle" end else pokemon = cp[ropax][words] -- linha 242 if not pokemon then if getPlayerStorageValue(sumomdonego, 1236) <= 0 then return true end end end Ja tentei olhar outros scripts de ditto aqui no servidor mas são todos para PDA não sei adaptar para as funções do erondino. Se alguem der uma ajuda agradeço..
×
×
  • Criar Novo...