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. Script do Vodkart, ele autorizou o post. O script consiste em quando comprar a pot ao invés de vir com 1 carga, irá vir com 5 cargas. potregenera.lua (data/actions/scripts) function onUse(cid, item, fromPos, itemEx, toPos) local function doRegeneration(cid, formula, count) doCreatureAddHealth(cid, formula.health) doCreatureAddMana(cid, formula.mana) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA) if (count ~= 1) then addEvent(doRegeneration, 1000, cid, formula, count - 1) end return TRUE end local tempo = 30 -- tempo que a potion ira ficar healando (tempo em segundos) local storage = 11148 -- nao mexa aqui local exhaust = 30 -- Tempo para player poder usar o item novamente! (tempo em segundos) local form = {health = getCreatureMaxHealth(cid) * 0.2 + 50, mana = getCreatureMaxMana(cid) * 0.15 + 40} if (getPlayerStorageValue(cid, storage) <= os.time()) then doRegeneration(cid, form, tempo) doChangeTypeItem(item.uid, item.type - 1) setPlayerStorageValue(cid, storage, os.time()+exhaust) else doPlayerSendCancel(cid, "Desculpe, voce so vai poder usar novamente em "..exhaust.." segundos.") end return TRUE end actions.xml <action itemid="7443" event="script" value="potregenera.lua" override="yes"/> Em items.xml, substitua:
  2. Tipo, eu nao manjo de compilação e etc, mas eu sei que o .exe é OTX 2.60 A source dele que foi compilada tinha um anti divulgação que agora, quando eu tento enviar uma mensagem que contem numeros, aparece forbidden characters. Queria saber se tem como adicionar uma talkaction pra "enjambrar" um jeito de poder enviar normal numeros. Por exemplo, vc nao pode falar: withdraw 10000 Mas pode falar withdraw 1000. Com o ponto final nos numeros funciona. Eu tenho a source dele com o problema corrigido ja, mas nao sei compilar, se alguem se prontificar a ajudar eu agradeço :>
  3. Alguem sabe que erropode ser esse que aparece no console? [20/11/2015 20:54:24] [Error - Action Interface] [20/11/2015 20:54:24] data/actions/scripts/goback.lua:onUse [20/11/2015 20:54:24] Description: [20/11/2015 20:54:24] (luaGetCreatureStorage) Creature not found
  4. eu estou usando um rep system pelo mod do servidor mais ele tem um pequeno erro... quando o player morre para outro ele não perde rep, e o player que matou n ganha o rep UP
  5. Tipo, meu OT nao deixa enviar mensagens do tipo: 213435 Só se eu fizer 1233234. < com um ponto no final Ai o withdraw 1000 nao funciona. Fala que tem forbidden characters Pelo que pesquisei, é o anti divulgação que tem na distro, e eu consegui consertar na souce, porem nao sei compilar (ja tentei muuuito), e aqui esta a source com o bug arrumado: http://www.mediafire.com/download/8wftich53lfehev/sources.rar Scan: https://www.virustotal.com/pt/file/20aa279fc1d3dd18113c521b85097f673d10218a55c6c98c64bc1f58bf1e8fd7/analysis/1447948401/ ( http://imgur.com/4ve5qHI ) Alguem poderia me ajudar? Valeuzão galera <3 Sera que tem como colocar um script no talkactions? Tipo fazer um "enjambre" pra burlar isso?
  6. Boa noite galera do xtibia. uma pergunta pra alguem que manja do assunto, da para compilar tfs 1.0 em msv 2012
  7. Como faz pra um checar uma storage em tabela? exemplo: Fiz um item que ao usar ele checa a storage do player e se ele tiver X storage, ele ganha uma certa quantidade de HP. Só que da esse erro ao checar a storage pela tabela: [18/11/2015 23:50:00] data/actions/scripts/Classes/teste.lua:9: attempt to call global 'getPlayerStorage' (a nil value) local config = { [3001] = {HP = 900}, -- [Storage] = {HP = Quantidade} [3002] = {HP = 780}, } function onUse(cid, item, frompos) local valor = config[getPlayerStorageValue(cid)] setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) +valor.HP) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doSendMagicEffect(frompos, 10) doPlayerSendTextMessage(cid, 20, "Congratulations!") return true end Como faço pra não ocorrer esse erro e checar a storage? pliz
  8. O script consiste em, ao clicar, lançar uma flecha que, ao chegar no target, dará certo dano. Sendo assim, um bom script para Paladino. SS: ballista.lua (data/actions/scripts) local config = { shootRange = 7, damage = {50, 100}, -- dano minimo/maximo shootEffect = CONST_ANI_HUNTINGSPEAR, impactEffect = CONST_ME_HITAREA, exhaustOnUse = 300, -- tempo de recarga em segundos direction = { [5692] = DIRECTION_NORTH, [5701] = DIRECTION_EAST, [5698] = DIRECTION_WEST, [5695] = DIRECTION_SOUTH } } local exhaust = Condition(CONDITION_EXHAUST_WEAPON) exhaust:setParameter(CONDITION_PARAM_TICKS, config.exhaustOnUse) function onUse(player, item, fromPosition, target, toPosition, isHotkey) if player:getCondition(CONDITION_EXHAUST_WEAPON) then player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_YOUAREEXHAUSTED)) return true end player:addCondition(exhaust) for i = 1, config.shootRange do local nextPosition = item:getPosition() nextPosition:getNextPosition(config.direction[item.itemid], i) local tile = Tile(nextPosition) if tile then local topCreature = tile:getTopCreature() if topCreature then toPosition:sendDistanceEffect(topCreature:getPosition(), config.shootEffect) doTargetCombatHealth(player, topCreature, COMBAT_PHYSICALDAMAGE, -config.damage[1] * i, -config.damage[2] * i, config.impactEffect) return true end end end local nextPosition = item:getPosition() nextPosition:getNextPosition(config.direction[item.itemid], config.shootRange) toPosition:sendDistanceEffect(nextPosition, config.shootEffect) return true end actions.xml (data/actions) <action itemid="id" event="script" value="ballista.lua"/> Créditos: Printer
  9. Vídeo demonstração Instalando: steal.lua (data/actions/scripts) Actions.xml (data/actions) <action itemid="id da runa/item" event="script" value="steal.lua"/> Créditos: CandleJack
  10. Esse script, feito por Yamo (otland), é uma modificação no actionscript dos dados, o que torna uma roleta (tabela) function onUse(cid, item, fromPosition, itemEx, toPosition) if(fromPosition.x ~= CONTAINER_POSITION) then doSendMagicEffect(fromPosition, CONST_ME_CRAPS) end local value = math.random(5700, 5736) - 5700 local color = "" if(value == 0) then color = "green" elseif(value <= 10 and value % 2 == 0) then color = "black" elseif(value >= 11 and value <= 19 and value % 2 == 1) then color = "black" elseif(value >= 26 and value % 2 == 0) then color = "black" else color="red" end doCreatureSay(cid, getCreatureName(cid) .. ' rolled ' .. value .. ', ' .. color .. '!', TALKTYPE_ORANGE_1) return true end
  11. Esse script foi feito por Codex NG. Bom, o nome já diz tudo então... Bom proveito! global.lua function upGradeSpells(player, words, tier, max) if player:getStorageValue(SPELL_WORDS[words]) < max then if player:getStorageValue(SPELL_WORDS[words]) < TIER[tier] then player:setStorageValue(SPELL_WORDS[words], TIER[tier]) player:getPosition():sendMagicEffect(CONST_ME_CONFETTI_HORIZONTAL) doCreatureSay(cid, tier, TALKTYPE_ORANGE_1, false, 0, player:getPosition()) elseif player:getStorageValue(SPELL_WORDS[words]) == TIER[tier] then player:sendCancelMessage("You've already scribed a this version of the spell.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return false else player:sendCancelMessage("You already have a higher spell version scribed.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return false end else player:sendCancelMessage("You've reached the maximum tier for this spell.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return false end end --light, haste, single targets, area, single target heal, support spell, speed SPELL_WORDS = { ["exura dis"] = 1001, ["exevo dis flam hur"] = 1002, ["exiva"] = 1003, ["exori min flam"] = 1004, ["utevo lux"] = 1005, ["exura"] = 1006, ["exani tera"] = 1007, ["exura ico"] = 1008, ["exana pox"] = 1009, ["exani hur"] = 10010, ["exori vis"] = 10011, ["exori tera"] = 10012, ["exevo con"] = 10013, ["utevo gran lux"] = 10014, ["exori flam"] = 10015, ["exevo pan"] = 10016, ["adevo grav pox"] = 10017, ["utamo vita"] = 10018, ["utani hur"] = 10019, ["adevo grav flam"] = 10020, ["exori frigo"] = 10021, ["adori min vis"] = 10022, ["adana pox"] = 10023, ["adura gran"] = 10024, ["exori moe ico"] = 10025, ["exevo con pox"] = 10026, ["exori mort"] = 10027, ["exori ico"] = 10028, ["adeta sio"] = 10029, ["adito grav"] = 10030, ["exevo con mort"] = 10031, ["adevo grav vis"] = 10032, ["exevo flam hur"] = 10033, ["exura sio"] = 10034, ["exevo frigo hur"] = 10035, ["exura gran"] = 10036, ["utani gran hur"] = 10037, ["exeta res"] = 10038, ["adori blank"] = 10039, ["adito tera"] = 10040, ["exana vis"] = 10041, ["exevo vis lux"] = 10042, ["utevo res ina"] = 10043, ["exori con"] = 10044, ["exevo con hur"] = 10045, ["adori tera"] = 10046, ["adura vita"] = 10047, ["adevo mas pox"] = 10048, ["adori vis"] = 10049, ["exevo con flam"] = 10050, ["utani tempo hur"] = 10051, ["utevo res"] = 10052, ["utori flam"] = 10053, ["utevo vis lux"] = 10054, ["exana ina"] = 10055, ["adevo mas flam"] = 10056, ["adevo res flam"] = 10057, ["adori san"] = 10058, ["adori flam"] = 10059, ["adevo ina"] = 10060, ["adana mort"] = 10061, ["adevo grav vita"] = 10062, ["adori frigo"] = 10063, ["exori hur"] = 10064, ["adori mas vis"] = 10065, ["adori mas tera"] = 10066, ["exevo gran vis lux"] = 10067, ["adevo mas grav pox"] = 10068, ["exura vita"] = 10069, ["exana flam"] = 10070, ["adori mas frigo"] = 10071, ["adori mas flam"] = 10072, ["adevo mas hur"] = 10073, ["adevo grav tera"] = 10074, ["utura mas sio"] = 10075, ["utori mas sio"] = 10076, ["utito mas sio"] = 10077, ["utamo mas sio"] = 10078, ["adevo mas grav flam"] = 10079, ["exevo con grav"] = 10080, ["exori mas"] = 10081, ["utori vis"] = 10082, ["utana vid"] = 10083, ["exori"] = 10084, ["exura san"] = 10085, ["exura gran mas res"] = 10086, ["adevo mas vis"] = 10087, ["exevo vis hur"] = 10088, ["exevo tera hur"] = 10089, ["exori san"] = 10090, ["exevo gran frigo hur"] = 10091, ["utori kor"] = 10092, ["adevo mas grav vis"] = 10093, ["exeta vis"] = 10094, ["exeta con"] = 10095, ["exana kor"] = 10096, ["adori gran mort"] = 10097, ["utura"] = 10098, ["utori pox"] = 10099, ["exevo mas san"] = 100100, ["adana ani"] = 100101, ["utamo tempo san"] = 100102, ["exevo gran mas tera"] = 100103, ["utamo tempo"] = 100104, ["exevo gran mas vis"] = 100105, ["exori amp vis"] = 100106, ["exevo con vis"] = 100107, ["utito tempo san"] = 100108, ["exura gran san"] = 100109, ["exevo gran mas frigo"] = 100110, ["exevo gran mas flam"] = 100111, ["utito tempo"] = 100112, ["exori gran tera"] = 100113, ["exori gran flam"] = 100114, ["exori min"] = 100115, ["utori san"] = 100116, ["utori mort"] = 100117, ["exori gran vis"] = 100118, ["exana mort"] = 100119, ["exura gran ico"] = 100120, ["exori gran frigo"] = 100121, ["exori max flam"] = 100122, ["exori max tera"] = 100123, ["exori gran con"] = 100124, ["exori gran"] = 100125, ["exori max frigo"] = 100126, ["exori max vis"] = 100127, ["utura gran"] = 100128, ["exori gran ico"] = 100129 } TIER = { ["Apprentice"] = 0, ["Journeyman"] = 1, ["Adept"] = 2, ["Expert"] = 3, ["Master"] = 4, ["Grandmaster"] = 5 } Isso é salvo em chatchannels data\chatchannels\chatchannels.xml <?xml version="1.0" encoding="UTF-8"?> <channels> <channel id="2" name="Tutor" script="tutor.lua" /> <channel id="3" name="World Chat" public="1" script="worldchat.lua" /> <channel id="4" name="Spells" public="1" script="spells.lua" /> <channel id="5" name="Trade" public="1" script="advertising.lua" /> <channel id="6" name="Advertising-Rookgaard" public="1" script="advertising-rook.lua" /> <channel id="7" name="Help" public="1" script="help.lua" /> <channel id="8" name="Gamemaster" script="gamemaster.lua" /> </channels> data\chatchannels\scripts\spells.lua local CHANNEL_CHARACTER = 4 local tier = { [0] = "[ Apprentice ]", [1] = "[ Journeyman ]", [2] = "[ Adept ]", [3] = "[ Expert ]", [4] = "[ Master ]", [5] = "[ Grandmaster ]" } local function listSpells(player) local count = getPlayerInstantSpellCount(player) local text = "" local t = {} for i = 0, count - 1 do local spell = getPlayerInstantSpellInfo(player, i) if spell.level ~= 0 then if spell.manapercent > 0 then spell.mana = spell.manapercent .. "%" end t[#t+1] = spell end end table.sort(t, function(a, b) return a.level < b.level end) local prevLevel = -1 for i, spell in ipairs(t) do local line = "" if prevLevel ~= spell.level then if i ~= 1 then line = "\n" end line = line .. "\nSpells for Level " .. spell.level .. "\n" prevLevel = spell.level player:sendChannelMessage(cid, line, TALKTYPE_CHANNEL_O, CHANNEL_CHARACTER) end if player:getStorageValue(SPELL_WORDS[spell.words]) > 0 then local index = player:getStorageValue(SPELL_WORDS[spell.words]) text = " " .. spell.words .. " " .. tier[index] .. " - " .. spell.name .. " : " .. spell.mana .. "\n" else text = " " .. spell.words .. " " .. tier[0] .. " - " .. spell.name .. " : " .. spell.mana .. "\n" end player:sendChannelMessage(cid, text, TALKTYPE_CHANNEL_Y, CHANNEL_CHARACTER) end end function onJoin(player) addEvent(listSpells, 100, player) return true end function onSpeak(player, type, message) player:sendCancelMessage("You may not speak in this chat.") return false end Exemplo: data\chatchannels\actions\scripts\spells.lua function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey) upGradeSpells(cid, "exevo pan", 1, item) return true end Exemplo em Spell: local food = { 2666, -- meat 2671, -- ham 2681, -- grape 2674, -- apple 2689, -- bread 2690, -- roll 2696 -- cheese } function onCastSpell(creature, var) if not creature:isPlayer() then return false end if creature:getStorageValue(SPELL_WORDS["exevo pan"]) > 0 then -- if the tier is higher then apprentice increase the amount of food created creature:addItem(food[math.random(#food)], (creature:getStorageValue(SPELL_WORDS["exevo pan"]) + 1)) creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) else -- else give 1 piece of food creature:addItem(food[math.random(#food)], 1) creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) end return true end
  12. Essa talkaction serve para que o player execute tal comando para aprender a tal spell se tiver a quantidade certa do item. Exemplo: !learnspell exori frigo Se quiser usar só uma quantidade de um único item por spell: aprendespell.lua (data/talkactions/scripts) local tab = { ["exori frigo"] = {spell = "Ice Strike", item = {1234, 5}}, -- ["nome da spell"] = {spell = "nome da conjuração da spell", item = {itemid, quantidade}}, ["exori mort"] = {spell = "Death Strike", item = {1234, 5}}, ["exori vis"] = {spell = "Energy Strike", item = {1234, 5}}, ["exori flam"] = {spell = "Flame Strike", item = {1234, 5}}, ["exori tera"] = {spell = "Terra Strike", item = {1234, 5}}, ["exori san"] = {spell = "Divine Missile", item = {1234, 5}} } function onSay(cid, words, param, channel) local sparam = string.lower(param) if(param == "") then return doPlayerSendCancel(cid, "Enter the name of the spell you want to learn.") end if not (tab[sparam]) then return doPlayerSendCancel(cid, "Spell not found.") end if(getPlayerLearnedInstantSpell(cid, tab[sparam].spell)) then return doPlayerSendCancel(cid, "You already have learned this spell.") end if(getPlayerItemCount(cid, tab[sparam].item[1]) >= tab[sparam].item[2]) then doPlayerLearnInstantSpell(cid, tab[sparam].spell) doPlayerRemoveItem(cid, tab[sparam].item[1], tab[sparam].item[2]) doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have learned the spell!") else doPlayerSendCancel(cid, "You need "..tab[sparam].item[2].." "..getItemNameById(tab[sparam].item[1]).." to learn this spell.") end return true end Já se quiser 2 itens por spell, use este script (mesmo arquivo): local tab = { ["exori frigo"] = {spell = "Ice Strike", item = {1234, 5}, item2 = {5678, 9}}, -- ["nome da spell"] = {spell = "nome da conjuração da spell", item = {itemid, quantidade}, item2 = {itemid, quantidade}}}, ["exori mort"] = {spell = "Death Strike", item = {1234, 5}, item2 = {5678, 9}}, ["exori vis"] = {spell = "Energy Strike", item = {1234, 5}, item2 = {5678, 9}}, ["exori flam"] = {spell = "Flame Strike", item = {1234, 5}, item2 = {5678, 9}}, ["exori tera"] = {spell = "Terra Strike", item = {1234, 5}, item2 = {5678, 9}}, ["exori san"] = {spell = "Divine Missile", item = {1234, 5}, item2 = {5678, 9}} } function onSay(cid, words, param, channel) local sparam = string.lower(param) if(param == "") then return doPlayerSendCancel(cid, "Coloque o nome da spell que deseja aprender.") end if not (tab[sparam]) then return doPlayerSendCancel(cid, "Spell not found.") end if(getPlayerLearnedInstantSpell(cid, tab[sparam].spell)) then return doPlayerSendCancel(cid, "You already have learned this spell.") end if(getPlayerItemCount(cid, tab[sparam].item[1]) >= tab[sparam].item[2] and (getPlayerItemCount(cid, tab[sparam].item2[1]) >= tab[sparam].item2[2])) then doPlayerLearnInstantSpell(cid, tab[sparam].spell) doPlayerRemoveItem(cid, tab[sparam].item[1], tab[sparam].item[2]) doPlayerRemoveItem(cid, tab[sparam].item2[1], tab[sparam].item2[2]) doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have learned the spell!") else doPlayerSendCancel(cid, "You need "..tab[sparam].item[2].." "..getItemNameById(tab[sparam].item[1]).." and "..tab[sparam].item2[2].." "..getItemNameById(tab[sparam].item2[1]).." to learn this spell.") end return true end talkactions.xml (data/talkactions/scripts): <talkaction words="!learnspell" event="script" value="aprenderspell.lua"/> Não se esqueça de ativar a obtenção da spell na tag da mesma. É só mudar o valor, de 0 para 1, onde está escrito needlearn: needlearn="1" Créditos: Suicide/Wise
  13. EAE, to precisando de uma ajuda com uma action, que ao usar o item, o player troca de vocação, tipo uma promotion, porem como a vocação é VIP, ela nao pode aparecer no acc manager. Estou usando o seguinte script: Porem no caso desse script, ao morrer/deslogar o player perde a vocação, alguem que manja como resolver? Meu vocations.xml : Agradeço desde já, +REP pra quem puder ajudar! OBG.
  14. Olá galera do xtibia! Estou com um problema no meu sistema de transformar, ou pode ser o spell.xml. Por exemplo quando vou usar o ataque "Bijuu Dama" do naruto coloco para ser utilizado pelas vocações que correspondem ao transform que tem o looktype do naruto na forma bijuu, (Forma da kyuubi). Esse transform era para ser a <vocation> id = 8, e id = 10; Fui la na pasta Data/Spells e abri spells.xml; Encontrei a magia "Bijuu Dama" e coloquei as vacações, 8 e 10; 3. Salvei e executei o servidor (TheForgottenServer); O que acontece é que a magia pode ser usada no transform com id = 7 até o id = 10; -- (7, 8, 9, 10) O <vocation> do naruto vai do id = 1, até id = 12; Achei o arquivo Transform.lua em Data/Talkactions/scripts e está assim: É isso ai galera, ja quebrei muito a cabeça com isso... não sei o por que de estar conseguindo utilizar a magia em outras "vocações" sendo que no próprio spell.xml está apenas esses 2 ids de vocações Eu reparei que se eu coloco um id = 'x', ele consegue usar no id = 'x - 1' e no 'x', exemplo: id = 8; pode usar no id = 7, e logicamente no id = 8. Obrigado! Cya . Consegui debugar.. o Problema estava no vocations.xml...
  15. Oi Galera meu colega (Zeke) me pediu como criar uma área de Vip 2! Então vou ensinar ele e quem não sabe! 1 º Vá em Na pasta do servidor, Depois Abra data/actions/scripts! 2 º Crie Um arquivo.lua com nome de tpsvip, ou copie qualquer arquivo e coloque o nome de tpsvip! Cole isso dentro do arquivo.lua (tpsvip)! Local days= 30 ( mude para o tanto de dia que o player vai ganhar quando clicar no item) 3 ° Agora em data/actions.... Abra o arquivo Actions.xml e adiciona essa " Quote " 10309 Item que vai ser usado para ter acesso a vip2 Agora vamos Mexer nos movements! 4 º Vá em Data/Movements/Scripts faça mesmo processo que fizemos com o action (tpsvip) e cole isso dentro dele: Destacados em Vermelho é oque pode mudar! 5 º Agora Vá em Data/Movements/ e abra o arquivo movements.xml Adicione essa "Quote" Para terminar Vá no seu remere's map editor.. Agora de 2 clicks no chão aonde quer que bloqueei a passagem dos players que não seja vip 2: Vai tar assim: ActionsID:0 UniqueID:0 E deixe assim ActionsID: 4590 UniqueID: 0 Obs: PARA MUDAR O ActionID para outro numero Você tem que mudar la em cima também, nos actions e nos movements! Espero ter ajudado
  16. po galera é o seguinte to me perdendo nesse codigo do pagseguro. http://prntscr.com/91n2of gostaria que aparecesse a conta do comprador Quantidade: 1 Valor do item: R$ 1,00 Quantidade: 2 Valor do item: R$ 2,00 e não Quantidade: 1 Valor do item: R$ 6,00 gostaria muito que alguem me ajuda-se REP+
  17. Galera como faço pra cada item da um certo level de skill? Funções que já tentei usar: doPlayerAddSkills(cid, IDdaSkill,Quantidade): Com essa função da uma travada monstro quando mudo 3 leveis de skill's de uma só vez. doPlayerAddSkill(cid, IDdaSkill, Quantidade): E com essa função, mesmo colocando 50 de quantidade, só adiciona 1 level por 1. doPlayerSetSkill(cid, IDdaSkill, Quantidade): E com essa função criada pelo Vodkart que achei aqui no fórum, faz o player deslogar e não da pra trocar mais de uma skill ao mesmo tempo. Cada item daria um valor de sword, axe e club para cada item usado, (e claro lookType, vocation e effect). Script: local config = { [ItemID] = {Life = 900, sword = 31, axe = 36, club = 42, lookType = 1, vocation = 1, effect = 45, msg = "ClasseName"}, [ItemID] = {Life = 900, sword = 54, axe = 92, club = 35, lookType = 1, vocation = 1, effect = 45, msg = "ClasseName"}, [ItemID] = {Life = 780, sword = 46, axe = 53, club = 66, lookType = 5, vocation = 2, effect = 15, msg = "ClasseName"}, [ItemID] = {Life = 500, sword = 84, axe = 74, club = 79, lookType = 7, vocation = 3, effect = 37, msg = "ClasseName"}, [ItemID] = {Life = 800, sword = 50, axe = 85, club = 14, lookType = 9, vocation = 4, effect = 48, msg = "ClasseName"} } function onUse(cid, item, frompos) local t = config[item.itemid] if t then if not isInArray(t.vocation, getPlayerVocation(cid)) then local outfit = getCreatureOutfit(cid) outfit.lookType = t.lookType doCreatureChangeOutfit(cid, outfit) doPlayerSetVocation(cid, t.vocation) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) +t.Life) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doSendMagicEffect(frompos, t.effect) setPlayerStorageValue(cid, 14160, os.time() + cfg.time *60) doPlayerSendTextMessage(cid, 20, "Congratulations! You become a "..t.msg.."!") else doPlayerSendCancel(cid, "You are now ready.") return true end end Aguardando..
  18. Alguem Poderia Arrumar este Erro no Script? Valendo Sempre +REP [Error - LuaInterface::loadFile] data/actions/scripts/cassino/rare club.lua:1: unexpected symbol near 'ï' [1/11/2015 15:34:0] [Error - Event::checkScript] Cannot load script (data/actions/scripts/cassino/rare club.lua) [1/11/2015 15:34:0] data/actions/scripts/cassino/rare club.lua:1: unexpected symbol near 'ï' SCRIPT rare club \/
  19. se alguem souber meu erro eu agradeço e darei + rep
  20. Boa Noite, Galerinha Do Xtibia, Estou Com Um Problema ao Compilar, Ocorre Tudo Certinho a Hora Que Chega No Otserv.cpp Da Errors, Obs: Uso As Sources Do Luan 0.4, Meu Sistema é Ubuntu 12.04 - 64 Bits ! Segue Os Erros:
  21. Boa noite Xtibianos meu amores e paixões de minha vida, tudo bem com vocês? Espero que sim Hoje o que eu gostaria e que alguém me explicasse este script, as posições e o que tiver para explicar, alguns até sei mais outros é complicados. Só queria que me explicassem isso mesmo. Agradeço a todos que me ajudarem talkactions.xml talkactions/scripts crie bomb.lua talkactions/scripts crie lever.lua items.xml modifique os items listados abaixo do jeito que estão: movements/scripts crie powerups.lua: Crie outro arquivo bombtiles.lua Em movements.xml coloque: UP Up
  22. Bom dia galera do Xtibia meu amores, paixões da minha vida rsrs. Gostaria de saber se tem como colocar está talkaction para globalevents no caso automático uma vez por semana? Também queria que vocês me ajudassem a aprimorar este evento. Segue abaixo: Explicação de aprimoramento para um evento divertido e mais disputado. - Player ao ficar no trono ficaria uma contagem de pontos ate que os 30 minutos acabassem se outro entrar no lugar começaria a contagem com o mesmo assim no caso aquele que fizer mais pontos venceria; - O Script mandaria umas mensagens a cada 3 ou 5 minutos avisando quantos pontos o player que esta no tile ou trono está; - Premiação seria 7 dias de Premmy account e mais 1 house, no caso 1 castelo exclusivo até o próximo evento ou um novo ganhador. Obs: Mesmo como talkactions o script não funciona 100%, a escada deveria sumir ao final do evento mais ela continua no mesmo lugar. Up UP Up UP
  23. Bom dia, Não estou conseguindo adicionar a função addpoketoplayer ao meu servidor KPDO. Qualquer alteração que faço no "050-function.lua" buga o servidor quando abre. Sem essa função não consigo criar baús iniciais de pokemons. Segue abaixo meu 050-function. Lembrando que é um servidor com Poke lvl system. function doPlayerGiveItem(cid, itemid, amount, subType) local item = 0 if(isItemStackable(itemid)) then item = doCreateItemEx(itemid, amount) if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then return false end else for i = 1, amount do item = doCreateItemEx(itemid, subType) if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then return false end end end return true end function doPlayerGiveItemContainer(cid, containerid, itemid, amount, subType) for i = 1, amount do local container = doCreateItemEx(containerid, 1) for x = 1, getContainerCapById(containerid) do doAddContainerItem(container, itemid, subType) end if(doPlayerAddItemEx(cid, container, true) ~= RETURNVALUE_NOERROR) then return false end end return true end function doPlayerTakeItem(cid, itemid, amount) return getPlayerItemCount(cid, itemid) >= amount and doPlayerRemoveItem(cid, itemid, amount) end function doPlayerBuyItem(cid, itemid, count, cost, charges) return doPlayerRemoveMoney(cid, cost) and doPlayerGiveItem(cid, itemid, count, charges) end function doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges) return doPlayerRemoveMoney(cid, cost) and doPlayerGiveItemContainer(cid, containerid, itemid, count, charges) end function doPlayerSellItem(cid, itemid, count, cost) if(not doPlayerTakeItem(cid, itemid, count)) then return false end if(not doPlayerAddMoney(cid, cost)) then error('[doPlayerSellItem] Could not add money to: ' .. getPlayerName(cid) .. ' (' .. cost .. 'gp).') end return true end function doPlayerWithdrawMoney(cid, amount) if(not getBooleanFromString(getConfigInfo('bankSystem'))) then return false end local balance = getPlayerBalance(cid) if(amount > balance or not doPlayerAddMoney(cid, amount)) then return false end doPlayerSetBalance(cid, balance - amount) return true end function doPlayerDepositMoney(cid, amount) if(not getBooleanFromString(getConfigInfo('bankSystem'))) then return false end if(not doPlayerRemoveMoney(cid, amount)) then return false end doPlayerSetBalance(cid, getPlayerBalance(cid) + amount) return true end function isPremium(cid) return (isPlayer(cid) and (getPlayerPremiumDays(cid) > 0 or getBooleanFromString(getConfigInfo('freePremium')))) or isTutor(cid) end function getMonthDayEnding(day) if(day == "01" or day == "21" or day == "31") then return "st" elseif(day == "02" or day == "22") then return "nd" elseif(day == "03" or day == "23") then return "rd" end return "th" end function getMonthString(m) return os.date("%B", os.time{year = 1970, month = m, day = 1}) end function getArticle(str) return str:find("[AaEeIiOoUuYy]") == 1 and "an" or "a" end function isNumber(str) return tonumber(str) ~= nil end function doPlayerAddAddons(cid, addon) for i = 0, table.maxn(maleOutfits) do doPlayerAddOutfit(cid, maleOutfits, addon) end for i = 0, table.maxn(femaleOutfits) do doPlayerAddOutfit(cid, femaleOutfits, addon) end end function doPlayerWithdrawAllMoney(cid) return doPlayerWithdrawMoney(cid, getPlayerBalance(cid)) end function doPlayerDepositAllMoney(cid) return doPlayerDepositMoney(cid, getPlayerMoney(cid)) end function doPlayerTransferAllMoneyTo(cid, target) return doPlayerTransferMoneyTo(cid, target, getPlayerBalance(cid)) end function playerExists(name) return getPlayerGUIDByName(name) ~= 0 end function getTibiaTime() local minutes = getWorldTime() local hours = 0 while (minutes > 60) do hours = hours + 1 minutes = minutes - 60 end return {hours = hours, minutes = minutes} end function doWriteLogFile(file, text) local f = io.open(file, "a+") if(not f) then return false end f:write("[" .. os.date("%d/%m/%Y %H:%M:%S") .. "] " .. text .. "\n") f:close() return true end function getExperienceForLevel(lv) lv = lv - 1 return ((50 * lv * lv * lv) - (150 * lv * lv) + (400 * lv)) / 3 end function doMutePlayer(cid, time) local condition = createConditionObject(CONDITION_MUTED) setConditionParam(condition, CONDITION_PARAM_TICKS, time * 1000) return doAddCondition(cid, condition) end function getPlayerGroupName(cid) return getGroupInfo(getPlayerGroupId(cid)).name end function getPlayerVocationName(cid) return getVocationInfo(getPlayerVocation(cid)).name end function getPromotedVocation(vid) return getVocationInfo(vid).promotedVocation end function doPlayerRemovePremiumDays(cid, days) return doPlayerAddPremiumDays(cid, -days) end function getPlayerMasterPos(cid) return getTownTemplePosition(getPlayerTown(cid)) end function getHouseOwner(houseId) return getHouseInfo(houseId).owner end function getHouseName(houseId) return getHouseInfo(houseId).name end function getHouseEntry(houseId) return getHouseInfo(houseId).entry end function getHouseRent(houseId) return getHouseInfo(houseId).rent end function getHousePrice(houseId) return getHouseInfo(houseId).price end function getHouseTown(houseId) return getHouseInfo(houseId).town end function getHouseTilesCount(houseId) return getHouseInfo(houseId).tiles end function getItemNameById(itemid) return getItemDescriptionsById(itemid).name end function getItemPluralNameById(itemid) return getItemDescriptionsById(itemid).plural end function getItemArticleById(itemid) return getItemDescriptionsById(itemid).article end function getItemName(uid) return getItemDescriptions(uid).name end function getItemPluralName(uid) return getItemDescriptions(uid).plural end function getpoke(uid) return getItemDescriptions(uid).nome end function getItemArticle(uid) return getItemDescriptions(uid).article end function getItemText(uid) return getItemDescriptions(uid).text end function getItemSpecialDescription(uid) return getItemDescriptions(uid).special end function getItemWriter(uid) return getItemDescriptions(uid).writer end function getItemDate(uid) return getItemDescriptions(uid).date end function getTilePzInfo(pos) return getTileInfo(pos).protection end function getTileZoneInfo(pos) local tmp = getTileInfo(pos) if(tmp.pvp) then return 2 end if(tmp.nopvp) then return 1 end return 0 end function doShutdown() return doSetGameState(GAMESTATE_SHUTDOWN) end function doSummonCreature(name, pos, displayError) local displayError, cid = displayError or true, doCreateMonster(name, pos, displayError) if(not cid) then cid = doCreateNpc(name, pos, displayError) end return cid end function getOnlinePlayers() local tmp = getPlayersOnline() local players = {} for i, cid in ipairs(tmp) do table.insert(players, getCreatureName(cid)) end return players end function getPlayerByName(name) local cid = getCreatureByName(name) return isPlayer(cid) and cid or nil end function isPlayer(cid) return isCreature(cid) and cid >= AUTOID_PLAYERS and cid < AUTOID_MONSTERS end function isPlayerGhost(cid) if(not isPlayer(cid)) then return false end return getCreatureCondition(cid, CONDITION_GAMEMASTER, GAMEMASTER_INVISIBLE) or getPlayerFlagValue(cid, PLAYERFLAG_CANNOTBESEEN) end function isMonster(cid) return isCreature(cid) and cid >= AUTOID_MONSTERS and cid < AUTOID_NPCS end function isNpc(cid) return isCreature(cid) and cid >= AUTOID_NPCS end function doPlayerSetExperienceRate(cid, value) return doPlayerSetRate(cid, SKILL__LEVEL, value) end function doPlayerSetMagicRate(cid, value) return doPlayerSetRate(cid, SKILL__MAGLEVEL, value) end function doPlayerAddLevel(cid, amount, round) local experience, level = 0, getPlayerLevel(cid) if(amount > 0) then experience = getExperienceForLevel(level + amount) - (round and getPlayerExperience(cid) or getExperienceForLevel(level)) else experience = -((round and getPlayerExperience(cid) or getExperienceForLevel(level)) - getExperienceForLevel(level + amount)) end return doPlayerAddExperience(cid, experience) end function doPlayerAddMagLevel(cid, amount) for i = 1, amount do doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid, getPlayerMagLevel(cid, true) + 1) - getPlayerSpentMana(cid)) / getConfigInfo('rateMagic')) end return true end function doPlayerAddSkill(cid, skill, amount, round) if(skill == SKILL__LEVEL) then return doPlayerAddLevel(cid, amount, round) elseif(skill == SKILL__MAGLEVEL) then return doPlayerAddMagLevel(cid, amount) end return doPlayerAddSkillTry(cid, skill, (getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill)) / getConfigInfo('rateSkill')) end function getPartyLeader(cid) local party = getPartyMembers(cid) if(type(party) ~= 'table') then return 0 end return party[1] end function isInParty(cid) return type(getPartyMembers(cid)) == 'table' end function isPrivateChannel(channelId) return channelId >= CHANNEL_PRIVATE end function doPlayerResetIdleTime(cid) return doPlayerSetIdleTime(cid, 0) end function doBroadcastMessage(text, class) local class = class or MESSAGE_STATUS_WARNING if(type(class) == 'string') then local className = MESSAGE_TYPES[class] if(className == nil) then return false end class = className elseif(class < MESSAGE_FIRST or class > MESSAGE_LAST) then return false end local players = getPlayersOnline() for _, pid in ipairs(players) do doPlayerSendTextMessage(pid, class, text) end print("> Broadcasted message: \"" .. text .. "\".") return true end function doGlobalMessage(autor, text,channeltype) local CHANNEL_GLOBAL = 7 --local CHANNEL_GLOBALM = 7 local players = getPlayersOnline() --if string.find(autor,"[kpdo]") then -- CHANNEL_GLOBALM = 13 --else --CHANNEL_GLOBALM = 7 --end for _, pid in ipairs(players) do doPlayerSendChannelMessage(pid, autor, text, channeltype, CHANNEL_GLOBAL) end return true end function doReportGlobalMessage(autor, text,channeltype) local CHANNEL_GLOBAL = 3 --local CHANNEL_GLOBALM = 7 local players = getPlayersOnline() --if string.find(autor,"[kpdo]") then -- CHANNEL_GLOBALM = 13 --else --CHANNEL_GLOBALM = 7 --end for _, pid in ipairs(players) do doPlayerSendChannelMessage(pid, autor, text, channeltype, CHANNEL_GLOBAL) end return true end function doPlayerBroadcastMessage(cid, text, class, checkFlag, ghost) local checkFlag, ghost, class = checkFlag or true, ghost or false, class or TALKTYPE_BROADCAST if(checkFlag and not getPlayerFlagValue(cid, PLAYERFLAG_CANBROADCAST)) then return false end if(type(class) == 'string') then local className = TALKTYPE_TYPES[class] if(className == nil) then return false end class = className elseif(class < TALKTYPE_FIRST or class > TALKTYPE_LAST) then return false end local players = getPlayersOnline() for _, pid in ipairs(players) do doCreatureSay(cid, text, class, ghost, pid) end print("> " .. getCreatureName(cid) .. " broadcasted message: \"" .. text .. "\".") return true end function getBooleanFromString(input) local tmp = type(input) if(tmp == 'boolean') then return input end if(tmp == 'number') then return input > 0 end local str = string.lower(tostring(input)) return (str == "yes" or str == "true" or (tonumber(str) ~= nil and tonumber(str) > 0)) end function doCopyItem(item, attributes) local attributes = attributes or false local ret = doCreateItemEx(item.itemid, item.type) if(attributes) then if(item.actionid > 0) then doItemSetAttribute(ret, "aid", item.actionid) end end if(isContainer(item.uid)) then for i = (getContainerSize(item.uid) - 1), 0, -1 do local tmp = getContainerItem(item.uid, i) if(tmp.itemid > 0) then doAddContainerItemEx(ret, doCopyItem(tmp, true).uid) end end end return getThing(ret) end function doRemoveThing(uid) if(isCreature(uid)) then return doRemoveCreature(uid) end return doRemoveItem(uid) end function setAttackFormula(combat, type, minl, maxl, minm, maxm, min, max) local min, max = min or 0, max or 0 return setCombatFormula(combat, type, -1, 0, -1, 0, minl, maxl, minm, maxm, min, max) end function setHealingFormula(combat, type, minl, maxl, minm, maxm, min, max) local min, max = min or 0, max or 0 return setCombatFormula(combat, type, 1, 0, 1, 0, minl, maxl, minm, maxm, min, max) end function doChangeTypeItem(uid, subtype) local thing = getThing(uid) if(thing.itemid < 100) then return false end local subtype = subtype or 1 return doTransformItem(thing.uid, thing.itemid, subtype) end function doSetItemText(uid, text, writer, date) local thing = getThing(uid) if(thing.itemid < 100) then return false end doItemSetAttribute(uid, "text", text) if(writer ~= nil) then doItemSetAttribute(uid, "writer", tostring(writer)) if(date ~= nil) then doItemSetAttribute(uid, "date", tonumber(date)) end end return true end function getFluidSourceType(itemid) local item = getItemInfo(itemid) return item and item.fluidSource or false end function getDepotId(uid) return getItemAttribute(uid, "depotid") or false end function getItemDescriptions(uid) local thing = getThing(uid) if(thing.itemid < 100) then return false end local item = getItemInfo(thing.itemid) return { name = getItemAttribute(uid, "name") or item.name, plural = getItemAttribute(uid, "pluralname") or item.plural, article = getItemAttribute(uid, "article") or item.article, special = getItemAttribute(uid, "description") or "", text = getItemAttribute(uid, "text") or "", writer = getItemAttribute(uid, "writer") or "", nome = getItemAttribute(uid, "nome"), date = getItemAttribute(uid, "date") or 0 } end function getItemWeightById(itemid, count, precision) local item, count, precision = getItemInfo(itemid), count or 1, precision or false if(not item) then return false end if(count > 100) then -- print a warning, as its impossible to have more than 100 stackable items without "cheating" the count print('[Warning] getItemWeightById', 'Calculating weight for more than 100 items!') end local weight = item.weight * count --[[if(precision) then return weight end local t = string.explode(tostring(weight), ".") if(table.maxn(t) == 2) then return tonumber(t[1] .. "." .. string.sub(t[2], 1, 2)) end]]-- return weight end function getItemWeaponType(uid) local thing = getThing(uid) if(thing.itemid < 100) then return false end return getItemInfo(thing.itemid).weaponType end function getItemRWInfo(uid) local thing = getThing(uid) if(thing.itemid < 100) then return false end local item, flags = getItemInfo(thing.itemid), 0 if(item.readable) then flags = 1 end if(item.writable) then flags = flags + 2 end return flags end function getItemLevelDoor(itemid) local item = getItemInfo(itemid) return item and item.levelDoor or false end function isItemStackable(itemid) local item = getItemInfo(itemid) return item and item.stackable or false end function isItemRune(itemid) local item = getItemInfo(itemid) return item and item.clientCharges or false end function isItemDoor(itemid) local item = getItemInfo(itemid) return item and item.type == 5 or false end function isItemContainer(itemid) local item = getItemInfo(itemid) return item and item.group == 2 or false end function isItemFluidContainer(itemid) local item = getItemInfo(itemid) return item and item.group == 12 or false end function isItemMovable(itemid) local item = getItemInfo(itemid) return item and item.movable or false end function isCorpse(uid) local thing = getThing(uid) if(thing.itemid < 100) then return false end local item = getItemInfo(thing.itemid) return item and item.corpseType ~= 0 or false end function getContainerCapById(itemid) local item = getItemInfo(itemid) if(not item or item.group ~= 2) then return false end return item.maxItems end function getMonsterAttackSpells(name) local monster = getMonsterInfo(name) return monster and monster.attacks or false end function getMonsterHealingSpells(name) local monster = getMonsterInfo(name) return monster and monster.defenses or false end function getMonsterLootList(name) local monster = getMonsterInfo(name) return monster and monster.loot or false end function getMonsterSummonList(name) local monster = getMonsterInfo(name) return monster and monster.summons or false end function isTM(uid) for rocks = 1, 12 do if getItemAttribute(uid, "T"..rocks.."") and getItemAttribute(uid, "T"..rocks.."") >= 1 then return true end end return false end function isMoveTm(pokenick,idtm) checkistm = cp[pokenick] nicktm = TM[idtm].spell nicktm2 = string.lower(nicktm) nmovestm = checkistm["!cd"].nmoves for xtm = 1, nmovestm do stringmoment = checkistm["m"..xtm..""].spell --if string.find(string.lower(stringmoment),nicktm2) then if string.lower(stringmoment) == nicktm2 then return true end end return false end function getTM(uid,move) if getItemAttribute(uid, move) then tmnop = getItemAttribute(uid, move) if tmnop >= 1 then return getItemAttribute(uid, move) else return false end else return false end return false end function addTM(cid,item,tm,itemid) if isTM(item.uid) then doPlayerSendCancel(cid, "You can only add 1 TM each pokemon") return false end local Checktm = TMCHECK[tm] local nicktm5 = getItemAttribute(item.uid, "nome") if isShiny(nicktm5) then nicktm5 = nicktm5:gsub("Shiny ", "") end if isMoveTm(nicktm5,tm) then doPlayerSendCancel(cid, "You cant add this move, this pokemon have") return false end if isInArray(Checktm,nicktm5) then doItemSetAttribute(item.uid, "T1", tm) else local tmhave = "Pokemon's have This TM\n" for i,x in pairs(Checktm) do tmhave = tmhave.."["..i.."]"..x.."\n" end doShowTextDialog(cid, itemid,tmhave) return false end return true end function isShiny(nick) if string.find(string.lower(nick), "shiny") then return true else return false end return false end function isStrong(nick) if string.find(string.lower(nick), "strong") then return true else return false end return false end function TMFind(uid) for rocks = 1, 12 do if getItemAttribute(uid, "T"..rocks.."") and getItemAttribute(uid, "T"..rocks.."") >= 1 then return getItemAttribute(uid, "T"..rocks.."") end end return false end function TMClean(uid) for rocks = 1, 12 do if getItemAttribute(uid, "T"..rocks.."") and getItemAttribute(uid, "T"..rocks.."") >= 1 then doItemSetAttribute(uid, "T"..rocks.."",0) return true end end return false end function setPokemon(cid,nivel,need,exp) local calc = (need/100) local refor = (exp/calc) if refor >= 99 then setPokemonExp(cid,nivel,99) return true end if refor <= 0 then setPokemonExp(cid,nivel,0) return true end if setPokemonExp(cid,nivel,math.floor(refor)) then return true else return false end end function sendstorm(cid,deffect,meffect,element,min1,min2) local function addeffect(params) if isCreature(params.cid) then if params.count == 73 then doAreaCombatHealth(params.cid, params.element, getThingPos(params.cid), AREA_CIRCLE3X3, params.min1, params.min2, 255) return true end local pos = getThingPos(params.cid) pos.x = pos.x + math.random(-4,4) pos.y = pos.y + math.random(-4,4) local frompos = getThingPos(params.cid) frompos.x = pos.x - 7 frompos.y = pos.y - 6 doSendDistanceShoot(frompos, pos, params.deffect) doSendMagicEffect(pos, params.meffect) addEvent(addeffect, 50, {cid = params.cid,deffect = params.deffect,meffect = params.meffect,count = params.count+1,min1 = params.min1,min2 = params.min2,element = params.element}) end end addEvent(addeffect, 50, {cid = cid,deffect = deffect,meffect = meffect,count = 1,min1 = min1,min2 = min2,element = element}) end function setNickPoke(cid,nick) setPlayerStorageValue(cid,9000,nick) end function getNickPoke(cid) local itemset = getPlayerSlotItem(cid, 8) if itemset.itemid >= 1 then local nome = getItemAttribute(itemset.uid, "apelido") if nome then return nome else return getItemAttribute(itemset.uid, "nome") end elseif #getCreatureSummons(cid) >= 1 then return getCreatureName(getCreatureSummons(cid)[1]) end return getCreatureName(cid) end function getPokeName(cid) local itemset = getPlayerSlotItem(cid, 8) if itemset.itemid >= 1 then local nome = getItemAttribute(itemset.uid, "nome") if nome then return nome end if #getCreatureSummons(cid) >= 1 then return getCreatureName(getCreatureSummons(cid)[1]) end end end function getCombatByType(nick,combatee) bonuselement = false if combatee == ELECTRICDAMAGE then if isInArray(electric2, nick) then bonuselement = 2 elseif isInArray(electric1, nick) then bonuselement = 0.5 elseif isInArray(electric0, nick) then return false else bonuselement = 1 end elseif combatee == WATERDAMAGE then if isInArray(water2, nick) then bonuselement = 2 elseif isInArray(water1, nick) then bonuselement = 0.5 elseif isInArray(water0, nick) then return false else bonuselement = 1 end elseif combatee == GRASSDAMAGE then if isInArray(grass2, nick) then bonuselement = 2 elseif isInArray(grass1, nick) then bonuselement = 0.5 elseif isInArray(grass0, nick) then return false else bonuselement = 1 end elseif combatee == FLYDAMAGE then if isInArray(flying2, nick) then bonuselement = 2 elseif isInArray(flying1, nick) then bonuselement = 0.5 elseif isInArray(flying0, nick) then return false else bonuselement = 1 end elseif combatee == FIREDAMAGE then if isInArray(fire2, nick) then bonuselement = 2 elseif isInArray(fire1, nick) then bonuselement = 0.5 elseif isInArray(fire0, nick) then return false else bonuselement = 1 end elseif combatee == ROCKDAMAGE then if isInArray(rock2, nick) then bonuselement = 2 elseif isInArray(rock1, nick) then bonuselement = 0.5 elseif isInArray(rock0, nick) then return false else bonuselement = 1 end elseif combatee == GROUNDDAMAGE then if isInArray(ground2, nick) then bonuselement = 2 elseif isInArray(ground1, nick) then bonuselement = 0.5 elseif isInArray(ground0, nick) then return false else bonuselement = 1 end elseif combatee == GHOSTDAMAGE then if isInArray(ghost2, nick) then bonuselement = 2 elseif isInArray(ghost1, nick) then bonuselement = 0.5 elseif isInArray(ghost0, nick) then return false else bonuselement = 1 end elseif combatee == BUGDAMAGE then if isInArray(bug2, nick) then bonuselement = 2 elseif isInArray(bug1, nick) then bonuselement = 0.5 elseif isInArray(bug0, nick) then return false else bonuselement = 1 end elseif combatee == NORMALDAMAGE then if isInArray(normal2, nick) then bonuselement = 2 elseif isInArray(normal1, nick) then bonuselement = 0.5 elseif isInArray(normal0, nick) then return false else bonuselement = 1 end elseif combatee == FIGHTDAMAGE then if isInArray(fighting2, nick) then bonuselement = 2 elseif isInArray(fighting1, nick) then bonuselement = 0.5 elseif isInArray(fighting0, nick) then return false else bonuselement = 1 end elseif combatee == POISONDAMAGE then if isInArray(poison2, nick) then bonuselement = 2 elseif isInArray(poison1, nick) then bonuselement = 0.5 elseif isInArray(poison0, nick) then return false else bonuselement = 1 end elseif combatee == PSYCHICDAMAGE then if isInArray(psychic2, nick) then bonuselement = 1.2 elseif isInArray(psychic1, nick) then bonuselement = 0.5 elseif isInArray(psychic0, nick) then return false else bonuselement = 1 end elseif combatee == ICEDAMAGE then if isInArray(ice2, nick) then bonuselement = 2 elseif isInArray(ice1, nick) then bonuselement = 0.5 elseif isInArray(ice0, nick) then return false else bonuselement = 1 end elseif combatee == DRAGONDAMAGE then if isInArray(dragon2, nick) then bonuselement = 1.2 elseif isInArray(dragon1, nick) then bonuselement = 0.5 elseif isInArray(dragon0, nick) then return false else bonuselement = 1 end elseif combatee == DARKDAMAGE then if isInArray(dark2, nick) then bonuselement = 2 elseif isInArray(dark1, nick) then bonuselement = 0.5 elseif isInArray(dark0, nick) then return false else bonuselement = 1 end elseif combatee == STEELDAMAGE then if isInArray(steel2, nick) then bonuselement = 2 elseif isInArray(steel1, nick) then bonuselement = 0.5 elseif isInArray(steel0, nick) then return false else bonuselement = 1 end else bonuselement = 1 end return bonuselement end function isTV(cid) for x = 0, 100 do local player = getGlobalStorageValue(500+x) if isPlayer(player) and player == cid then return true end end return false end function ilusiontv(cid) local postv = {x = 1550,y = 591,z = 7} local tvclone = doCreateMonster("Tall Grass", postv) doSetCreatureOutfit(tvclone, getCreatureOutfit(cid), -1) doTeleportThing(tvclone, getCreaturePosition(cid)) setPlayerStorageValue(tvclone,1,cid) registerCreatureEvent(tvclone, "Ilusion") doCreatureSetHideHealth(tvclone,true) end function doCopyFile(file, newfile) local fil = io.open(file, "r") local text = fil:read("*a") local fil2 = io.open(newfile, "a+") fil2:write(text) fil2:close() fil:close() return TRUE end function doEditName(file, newname, oldname) local fil = io.open(file, "a+") local text = fil:read("*all") fil:close() local k,x = text:find(oldname) local wrt = text:sub(1, k-1) .. newname .. text:sub(x+1) local fip = io.open(file, "w") fip:write(wrt) fip:close() return TRUE end function ilusiontvnpc(cid,stringtv) local postv = {x = 1550,y = 591,z = 7} doCopyFile("data/npc/tv.xml","data/npc/tv"..getCreatureName(cid)..".xml") doEditName("data/npc/tv"..getCreatureName(cid)..".xml", "[TV]"..getCreatureName(cid), "sxs") local tvclone = doCreateNpc("tv"..getCreatureName(cid).."", postv, false) os.remove("data/npc/tv"..getCreatureName(cid)..".xml") doSetCreatureOutfit(tvclone, getCreatureOutfit(cid), -1) doTeleportThing(tvclone, getCreaturePosition(cid)) setPlayerStorageValue(tvclone,1,cid) registerCreatureEvent(tvclone, "Ilusion") end function isSound(cid) if getPlayerStorageValue(cid,111111) >= 1 then return true else return false end return false end function setSound(cid,mode) setPlayerStorageValue(cid,111111,mode) return true end function getPokeExpStage(st) local nivel = st local stage = 1 if nivel <= 5 then stage = 5 elseif nivel <= 10 then stage = 4 elseif nivel <= 25 then stage = 3 elseif nivel <= 55 then stage = 2 end return stage end function getPokemonStage(st) local nivel = st local stage = 1 if nivel <= 5 then stage = 1 elseif nivel <= 10 then stage = 2 elseif nivel <= 45 then stage = 3 elseif nivel <= 55 then stage = 4 elseif nivel <= 100 then stage = 5 elseif nivel <= 200 then stage = nivel*0.02 elseif nivel <= 300 then stage = nivel*0.03 elseif nivel <= 400 then stage = nivel*0.04 elseif nivel <= 500 then stage = nivel*0.05 elseif nivel <= 600 then stage = nivel*0.06 elseif nivel <= 700 then stage = nivel*0.07 elseif nivel <= 800 then stage = nivel*0.08 elseif nivel <= 900 then stage = nivel*0.09 elseif nivel <= 1000 then stage = nivel*0.10 elseif nivel <= 1100 then stage = nivel*0.11 elseif nivel <= 1200 then stage = nivel*0.12 elseif nivel <= 1300 then stage = nivel*0.13 elseif nivel <= 1400 then stage = nivel*0.14 elseif nivel <= 1500 then stage = nivel*0.15 elseif nivel <= 1600 then stage = nivel*0.16 elseif nivel <= 1700 then stage = nivel*0.17 elseif nivel <= 1800 then stage = nivel*0.18 elseif nivel <= 1900 then stage = nivel*0.19 elseif nivel <= 2000 then stage = nivel*0.20 elseif nivel <= 2100 then stage = nivel*0.21 elseif nivel <= 2200 then stage = nivel*0.22 elseif nivel <= 2300 then stage = nivel*0.23 elseif nivel <= 2400 then stage = nivel*0.24 elseif nivel <= 2500 then stage = nivel*0.25 elseif nivel <= 2600 then stage = nivel*0.26 elseif nivel <= 2700 then stage = nivel*0.27 elseif nivel <= 2800 then stage = nivel*0.28 elseif nivel <= 2900 then stage = nivel*0.29 elseif nivel <= 3000 then stage = nivel*0.30 else stage = nivel/50 end return stage end function setPlayerTutor(cid,value) if value == 0 then setPlayerStorageValue(cid,44444,nil) return true end setPlayerStorageValue(cid,44444,value) return true end function isTutor(cid) if getPlayerStorageValue(cid,44444) >= 1 then return getPlayerStorageValue(cid,44444) end return false end function isSeniorTutor(cid) if getPlayerStorageValue(cid,44444) >= 2 then return getPlayerStorageValue(cid,44444) end return false end function doCleanStorage(cid,value) setPlayerStorageValue(cid,value,nil) return true end function isTorunament(value) if getGlobalStorageValue(169753) >= 1 then return true end return false end function isTorneio(value) if getGlobalStorageValue(77782) >= 1 then return true end return false end function doTransformUid(item,item2) local uid1 = getItemAttribute(item.uid, "uid") local uid2 = getItemAttribute(item2.uid, "uid") doItemSetAttribute(item.uid, "uid", uid2) doItemSetAttribute(item2.uid, "uid", uid1) return true end function doCloneBall(cid,item,item2) local nome = getItemAttribute(item, "nome") local nome2 = getItemAttribute(item2, "nome") local fine = getItemAttribute(item, "fine") local fine2 = getItemAttribute(item2, "fine") local apelido = getItemAttribute(item, "apelido") local apelido2 = getItemAttribute(item2, "apelido") local description = getItemAttribute(item, "description") local description2 = getItemAttribute(item2, "description") local boost = getItemAttribute(item, "boost") local boost2 = getItemAttribute(item2, "boost") local exp = getItemAttribute(item, "exp") local exp2 = getItemAttribute(item2, "exp") local expb = getItemAttribute(item, "exp2") local expb2 = getItemAttribute(item2, "exp2") local catchby = getItemAttribute(item, "catchby") local catchby2 = getItemAttribute(item2, "catchby") local ma1 = getItemAttribute(item, "m1") local mb1 = getItemAttribute(item2, "m1") local ma2 = getItemAttribute(item ,"m2") local mb2 = getItemAttribute(item2, "m2") local ma3 = getItemAttribute(item, "m3") local mb3 = getItemAttribute(item2, "m3") local ma4 = getItemAttribute(item, "m4") local mb4 = getItemAttribute(item2, "m4") local ma5 = getItemAttribute(item, "m5") local mb5 = getItemAttribute(item2, "m5") local ma6 = getItemAttribute(item, "m6") local mb6 = getItemAttribute(item2, "m6") local ma7 = getItemAttribute(item, "m7") local mb7 = getItemAttribute(item2, "m7") local ma8 = getItemAttribute(item, "m8") local mb8 = getItemAttribute(item2, "m8") local ma9 = getItemAttribute(item, "m9") local mb9 = getItemAttribute(item2, "m9") local ma10 = getItemAttribute(item, "m10") local mb10 = getItemAttribute(item2, "m10") local ma11 = getItemAttribute(item ,"m11") local mb11 = getItemAttribute(item2, "m11") local ma12 = getItemAttribute(item, "m12") local mb12 = getItemAttribute(item2, "m12") local candy = getItemAttribute(item, "candy") local candy2 = getItemAttribute(item2, "candy") local ditto = getItemAttribute(item, "cold") local ditto2 = getItemAttribute(item2, "cold") local outifit = getItemAttribute(item, "outifit") local outifit2 = getItemAttribute(item2, "outifit") local nomepoke = getItemAttribute(item, "nomepoke") local nomepoke2 = getItemAttribute(item2, "nomepoke") local fb = getItemAttribute(item, "fb") local fb2 = getItemAttribute(item2, "fb") local fg = getItemAttribute(item, "fg") local fg2 = getItemAttribute(item2, "fg") local tmkpdo = 0 local tmkpdo2 = 0 local ptm = false local ptm2 = false local sexy = getItemAttribute(item, "sexy") local sexy2 = getItemAttribute(item2, "sexy") local aura = getItemAttribute(item, "aura") local aura2 = getItemAttribute(item2, "aura") if isTM(item) then for rocks = 1, 12 do if getTM(item,"T"..rocks.."") then tmkpdo = getTM(item,"T"..rocks.."") ptm = rocks end end TMClean(item) end if isTM(item2) then for rocks = 1, 12 do if getTM(item2,"T"..rocks.."") then tmkpdo2 = getTM(item2,"T"..rocks.."") ptm2 = rocks end end TMClean(item2) end doItemSetAttribute(item, "nome", nome2) doItemSetAttribute(item2, "nome", nome) if fine then doItemSetAttribute(item, "fine", fine2) end if fine2 then doItemSetAttribute(item2, "fine", fine) end if apelido or apelido2 then doItemSetAttribute(item2, "apelido", nome) doItemSetAttribute(item, "apelido", nome2) end if exp or exp2 then doItemSetAttribute(item, "exp", "0") doItemSetAttribute(item2, "exp", "0") doItemSetAttribute(item, "exp2", "0") doItemSetAttribute(item2, "exp2", "0") end if boost or boost2 then doItemSetAttribute(item, "boost", "0") doItemSetAttribute(item2, "boost", "0") end if candy or candy2 then doItemSetAttribute(item, "candy", "0") doItemSetAttribute(item2, "candy", "0") end if aura or aura2 then doItemSetAttribute(item, "aura", "0") doItemSetAttribute(item2, "aura", "0") end if apelido2 then doItemSetAttribute(item, "apelido", apelido2) end if apelido then doItemSetAttribute(item2, "apelido", apelido) end if description2 then doItemSetAttribute(item, "description", description2) end if description then doItemSetAttribute(item2, "description", description) end if boost2 then doItemSetAttribute(item, "boost", boost2) end if boost then doItemSetAttribute(item2, "boost", boost) end if candy2 then doItemSetAttribute(item, "candy", candy2) end if candy then doItemSetAttribute(item2, "candy", candy) end if exp2 then doItemSetAttribute(item, "exp", exp2) end if exp then doItemSetAttribute(item2, "exp", exp) end if expb2 then doItemSetAttribute(item, "exp2", expb2) end if expb then doItemSetAttribute(item2, "exp2", expb) end if catchby2 then doItemSetAttribute(item, "catchby", catchby2) end if catchby then doItemSetAttribute(item2, "catchby", catchby) end if tmkpdo2 >= 1 then doItemSetAttribute(item, "T"..ptm2.."", tmkpdo2) end if tmkpdo >= 1 then doItemSetAttribute(item2, "T"..ptm.."", tmkpdo) end if nomepoke2 then doItemSetAttribute(item, "nomepoke", nomepoke2) end if nomepoke then doItemSetAttribute(item2, "nomepoke", nomepoke) end if ditto2 then doItemSetAttribute(item, "cold", ditto2) end if ditto then doItemSetAttribute(item2, "cold", ditto) end if outifit2 then doItemSetAttribute(item, "outifit", outifit2) end if outifit then doItemSetAttribute(item2, "outifit", outifit) end doItemSetAttribute(item, "fg", "null") doItemSetAttribute(item2, "fg", "null") doItemSetAttribute(item, "fb", "null") doItemSetAttribute(item2, "fb", "null") doItemSetAttribute(item, "m1", "0") doItemSetAttribute(item2, "m1", "0") doItemSetAttribute(item, "m2", "0") doItemSetAttribute(item2, "m2", "0") doItemSetAttribute(item, "m3", "0") doItemSetAttribute(item2, "m3", "0") doItemSetAttribute(item, "m4", "0") doItemSetAttribute(item2, "m4", "0") doItemSetAttribute(item, "m5", "0") doItemSetAttribute(item2, "m5", "0") doItemSetAttribute(item, "m6", "0") doItemSetAttribute(item2, "m6", "0") doItemSetAttribute(item, "m7", "0") doItemSetAttribute(item2, "m7", "0") doItemSetAttribute(item, "m8", "0") doItemSetAttribute(item2, "m8", "0") doItemSetAttribute(item, "m9", "0") doItemSetAttribute(item2, "m9", "0") doItemSetAttribute(item, "m10", "0") doItemSetAttribute(item2, "m10", "0") doItemSetAttribute(item, "m11", "0") doItemSetAttribute(item2, "m11", "0") doItemSetAttribute(item, "m12", "0") doItemSetAttribute(item2, "m12", "0") if ma1 then doItemSetAttribute(item2, "m1", ma1) end if mb1 then doItemSetAttribute(item, "m1", mb1) end if ma2 then doItemSetAttribute(item2, "m2", ma2) end if mb2 then doItemSetAttribute(item, "m2", mb2) end if ma3 then doItemSetAttribute(item2, "m3", ma3) end if mb3 then doItemSetAttribute(item, "m3", mb3) end if ma4 then doItemSetAttribute(item2, "m4", ma4) end if mb4 then doItemSetAttribute(item, "m4", mb4) end if ma5 then doItemSetAttribute(item2, "m5", ma5) end if mb5 then doItemSetAttribute(item, "m5", mb5) end if ma6 then doItemSetAttribute(item2, "m6", ma6) end if mb6 then doItemSetAttribute(item, "m6", mb6) end if ma7 then doItemSetAttribute(item2, "m7", ma7) end if mb7 then doItemSetAttribute(item, "m7", mb7) end if ma8 then doItemSetAttribute(item2, "m8", ma8) end if mb8 then doItemSetAttribute(item, "m8", mb8) end if ma9 then doItemSetAttribute(item2, "m9", ma9) end if mb9 then doItemSetAttribute(item, "m9", mb9) end if ma10 then doItemSetAttribute(item2, "m10", ma10) end if mb10 then doItemSetAttribute(item, "m10", mb10) end if ma11 then doItemSetAttribute(item2, "m11", ma11) end if mb11 then doItemSetAttribute(item, "m11", mb11) end if ma12 then doItemSetAttribute(item2, "m12", ma12) end if mb12 then doItemSetAttribute(item, "m12", mb12) end if fb2 then doItemSetAttribute(item, "fb", fb2) end if fb then doItemSetAttribute(item2, "fb", fb) end if fg2 then doItemSetAttribute(item, "fg", fg2) end if fg then doItemSetAttribute(item2, "fg", fg) end if aura2 then doItemSetAttribute(item, "aura", aura2) end if aura then doItemSetAttribute(item2, "aura", aura) end if sexy2 then doItemSetAttribute(item, "sexy", sexy2) else doItemSetAttribute(item, "sexy", math.random(4,5)) end if sexy then doItemSetAttribute(item2, "sexy", sexy) else doItemSetAttribute(item2, "sexy", math.random(4,5)) end return true end function Torneio(value,cid,other) local numerodoevento = getGlobalStorageValue(16980) if numerodoevento >= 1 then numerodoevento = numerodoevento else numerodoevento = 1 end setPlayerStorageValue(cid,169780,nil) if value == 1 then doPlayerSendTextMessage(cid, 27, "Congratulations You are a Winner, take this") doPlayerAddItem(cid, 7886, 1) local trofeu = doPlayerAddItem(cid, 7749, 1) local descri = "Reward #"..numerodoevento.." Event ,Tournament("..getCreatureName(cid)..")." doItemSetAttribute(trofeu, "description", descri) doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid))) elseif value == 2 then doPlayerSendTextMessage(cid, 27, "Congratulations You are a Second Position take this") doPlayerAddItem(cid, 7885, 1) local trofeu = doPlayerAddItem(cid, 7748, 1) local descri = "Reward #"..numerodoevento.." Event ,Tournament("..getCreatureName(cid)..")." doItemSetAttribute(trofeu, "description", descri) if isPlayer(other) then doPlayerSendTextMessage(other, 27, "Congratulations You are a three Position, take this") doPlayerAddItem(other, 7886, 1) local trofeu = doPlayerAddItem(other, 7749, 1) local descri = "Reward #"..numerodoevento.." Event ,Tournament("..getCreatureName(other)..")." doItemSetAttribute(trofeu, "description", descri) doTeleportThing(other,getTownTemplePosition(getPlayerTown(other))) setPlayerStorageValue(other,169753,nil) end return true elseif value == 3 then doPlayerSendTextMessage(cid, 27, "Congratulations You are a THIRD SURVIVOR, take this") doPlayerAddItem(cid, 7885, 1) local trofeu = doPlayerAddItem(cid, 7747, 1) local descri = "Reward #"..numerodoevento.." Event ,THIRD SURVIVOR("..getCreatureName(cid)..")." doItemSetAttribute(trofeu, "description", descri) return true end return false end function getTorunament(value,cid,other) local numerodoevento = getGlobalStorageValue(169754) if numerodoevento >= 1 then numerodoevento = numerodoevento else numerodoevento = 1 end setPlayerStorageValue(cid,169753,nil) if value == 1 then doPlayerSendTextMessage(cid, 27, "Congratulations You are a LAST SURVIVOR, take this") doPlayerAddItem(cid, 7886, 1) local trofeu = doPlayerAddItem(cid, 7749, 1) local descri = "Reward #"..numerodoevento.." Event ,LAST SURVIVOR("..getCreatureName(cid)..")." doItemSetAttribute(trofeu, "description", descri) doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid))) elseif value == 2 then doPlayerSendTextMessage(cid, 27, "Congratulations You are a SECOND SURVIVOR, take this") doPlayerAddItem(cid, 7885, 1) local trofeu = doPlayerAddItem(cid, 7748, 1) local descri = "Reward #"..numerodoevento.." Event ,SECOND SURVIVOR("..getCreatureName(cid)..")." doItemSetAttribute(trofeu, "description", descri) if isPlayer(other) then doPlayerSendTextMessage(other, 27, "Congratulations You are a LAST SURVIVOR, take this") doPlayerAddItem(other, 7886, 1) local trofeu = doPlayerAddItem(other, 7749, 1) local descri = "Reward #"..numerodoevento.." Event ,LAST SURVIVOR("..getCreatureName(other)..")." doItemSetAttribute(trofeu, "description", descri) doTeleportThing(other,getTownTemplePosition(getPlayerTown(other))) setPlayerStorageValue(other,169753,nil) end return true elseif value == 3 then doPlayerSendTextMessage(cid, 27, "Congratulations You are a THIRD SURVIVOR, take this") doPlayerAddItem(cid, 7885, 1) local trofeu = doPlayerAddItem(cid, 7747, 1) local descri = "Reward #"..numerodoevento.." Event ,THIRD SURVIVOR("..getCreatureName(cid)..")." doItemSetAttribute(trofeu, "description", descri) return true end return false end function setTorunament(value) if value == false then local valor = getGlobalStorageValue(169753) setGlobalStorageValue(169753,valor-1) elseif value == true then --setGlobalStorageValue(169753,0) local numerodoevento = getGlobalStorageValue(169754) if numerodoevento >= 1 then numerodoevento = numerodoevento+1 else numerodoevento = 1 end setGlobalStorageValue(169754,numerodoevento) end return true end function addStatics(storage) local valor = getGlobalStorageValue(storage) if valor >= 1 then setGlobalStorageValue(storage,valor+1) else setGlobalStorageValue(storage,1) end return true end Abaixo está a função "addpoketoplayer" que estou tentando adicionar: function addPokeToPlayer(cid, pokemon, boost, gender, ball, unique) --alterado v1.9 \/ peguem ele todo... local genders = { ["male"] = 4, ["female"] = 3, [1] = 4, [0] = 3, [4] = 4, [3] = 3, } if not isCreature(cid) then return false end local pokemon = doCorrectString(pokemon) if not pokes[pokemon] then return false end local GENDER = (gender and genders[gender]) and genders[gender] or getRandomGenderByName(pokemon) local btype = (ball and pokeballs[ball]) and ball or isShinyName(pokemon) and "shinynormal" or "normal" local happy = 250 if (getPlayerFreeCap(cid) >= 6 and not isInArray({5, 6}, getPlayerGroupId(cid))) or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then item = doCreateItemEx(11826) else item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, 11826, 1) end if not item then return false end doItemSetAttribute(item, "poke", pokemon) doItemSetAttribute(item, "hp", 1) doItemSetAttribute(item, "happy", happy) doItemSetAttribute(item, "gender", GENDER) doSetItemAttribute(item, "hands", 0) doItemSetAttribute(item, "description", "Contains a "..pokemon..".") doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".") if boost and tonumber(boost) and tonumber(boost) > 0 and tonumber(boost) <= 50 then doItemSetAttribute(item, "boost", boost) end if unique then doItemSetAttribute(item, "unique", getCreatureName(cid)) end if (getPlayerFreeCap(cid) >= 6 and not isInArray({5, 6}, getPlayerGroupId(cid))) or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then doPlayerSendMailByName(getCreatureName(cid), item, 1) sendMsgToPlayer(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.") end if (isShinyName(pokemon) or (boost and tonumber(boost) and tonumber(boost) >= 10)) and pokeballs["shiny"..btype] then doTransformItem(item, pokeballs["shiny"..btype].on) else doTransformItem(item, pokeballs[btype].on) end return true end Grato!
  24. The Forgotten Server - Version 1.2 Compilied on Oct 24 2015 18:24:02 for arch x64 Bom dia pessoal, resolvi o erro abaixo. Ele fala que ativo o exp 50% a mais e tudo mais so que isso não acontece so aparece a msg e não aumenta a exp. Lua Script Error: [TalkAction Interface] data/talkactions/scripts/exp.lua:onSay data/talkactions/scripts/exp.lua:20: attempt to call global 'BroadcaltMessage' <a nil value> stack traceback: [c]: in function 'BroadcastMessage' data/talkactions/scripts/exp.lua:20: in function <data/talkactions/scripts/exp.lua:1> Script "Funcionando" function onSay(cid, words, param, channel) local config = { storage = 102590, } if(param == 'cancel') then if getGlobalStorageValue(config.storage) > 0 then setGlobalStorageValue(config.storage, -1) broadcastMessage("Double Exp cancelado") end return true end param = tonumber(param) if(not param or param < 0) then doPlayerSendCancel(cid, "Digite por quantas horas o evento ira durar") return true end if getGlobalStorageValue(config.storage) - os.time() <= 0 then setGlobalStorageValue(config.storage, os.time()+param*60*60) broadcastMessage("Exp bonus ativado 50% + EXP por "..param.." horas! Aproveite.") end return true end
  25. galera alguém min arruma aquele script de quando o play clica na porta entra no treino quando clica dnv sai eu tenho um script mais ele teleporta pra x position teria que fazer 1 scrip pra cada treino kk up
×
×
  • Criar Novo...