Ir para conteúdo

henriquesafadao

Membro
  • Registro em

  • Última visita

Tudo que henriquesafadao postou

  1. henriquesafadao postou uma resposta no tópico em Sprites
    Vlw..Download foi atualizado. angelocp12 Irei desconpilar assim que termina irei cria novo tópico é li marco
  2. Tem que ver si o Spr e Transparência ou não pra configurar no Rms
  3. henriquesafadao postou uma resposta no tópico em Sprites
    Esto compartilhando com vocês do TK o spr é dat do Otpokemon 11/04/2018. Tem um aqui no Tk mais é uma verção anterior a esta!!!!!Fiquem Ligado asim que tive Nova Atualização irei Compartilha com vocês Scan:=https://www.virustotal.com/pt/file/ed4a742e870fa2d0a4567b88dddc50b458f9461d19d0c417654373f3246719af/analysis/1523488621/ Down:= https://mega.nz/#!n4R2ybbI!wSMAA-lYAOzuqcqfHTmys50vB74m0CftHTkQD3hHC1w
  4. Utiliza o Spell creat pra cria a area e depois so e configura-la . Não fica dano Up isso é Spaw tem um butão pra subi o topicu
  5. Va em Lib,configuration, é procure playerExperienceRate = é diminua o valor que estive ae . o playerExperienceRate = deminui tantu o xp do play quantu a do Pokemon Level
  6. EX: pokemon ="Moltres", "Zapdos", "ArticuNO", Seria pokemon sortiado podeno vim 1 delis Descupa a demora de responder
  7. 1* local topos = {x=0000, y=0000, z=0} -- Posição para onde o player será teleportado. local t = { storage = 344451, -- Storage da quest, só mexa se necessário. pokemon = "NOME DO POKEMON", -- Nome do pokémon que irá ganhar. level = 90, -- Level necessário para fazer a quest. ball = "ultra" -- Tipo da ball. } function onUse(cid) local gender = math.random(0, 1) if getPlayerStorageValue(cid, t.storage) < 1 then if getPlayerLevel(cid) >= t.level then if doTeleportThing(cid, topos) then doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "MEMSAGE QUANDO O PLAY PEGA O POKE "..t.pokemon..".") addPokeToPlayer(cid, t.pokemon, 0, gender, t.ball) setPlayerStorageValue(cid, t.storage, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você precisa ser level "..t.level.." para ganhar a recompensa.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você já pegou sua recompensa.") end return true end <action actionid="19043" event="script" value="NOME .lua"/> Coloca o"19043" na placa ou Bau 2* function onUse(cid, item, frompos, item2, topos) local level = 100 -- coloque o Level aqui if getPlayerLevel(cid) >= level then doTeleportThing(cid, topos) doSendMagicEffect(topos, 29) else doPlayerSendTextMessage(cid, 22, "Você precisa ser nível 100+ para passar por essa porta.") end return TRUE end <action actionid="9943" event="script" value="NOME DO LUA"/> Coloca o "9943" na porta
  8. local addons = { [13562] = {pokemon= "Alakazam" , looktype = 2604, nome = "Red Addon"}, [13471] = {pokemon= "Dragonite" , looktype = 2501, nome = "Dragon Addon", fly = 2500} } local function getOldAddon (looktype) for index, value in pairs (addons) do if value.looktype == looktype then return index end end end function onUse(cid, item, fromPosition, itemEx, toPosition) local numero = addons[item.itemid].looktype local pb = itemEx.uid local pk = addons[item.itemid].pokemon if not isPokeball(itemEx.itemid) then doPlayerSendCancel(cid, "Você só poder usar este item em uma poke ball.") return true end if getPlayerSlotItem (cid, 8).uid == pb and (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1) then doPlayerSendCancel (cid, "Desmonte do seu pokémon e volte-o para a poke ball.") return true end if getItemAttribute(pb, "addon") and getItemAttribute(pb, "addon") == numero then doPlayerSendCancel(cid, "Seu pokémon já está com este addon.") return true end if #getCreatureSummons(cid) > 0 then doPlayerSendCancel(cid, "Por favor, volte o seu pokémon para a poke ball.") return true end if getItemAttribute(pb, "poke") ~= pk then doPlayerSendCancel(cid, "Desculpe, você não pode adicionar este addon neste pokémon.") return true end if getItemAttribute (pb, "addon") and getItemAttribute (pb, "addon") > 1 then doPlayerSendTextMessage(cid, 27, "Você substituiu um "..getItemNameById (getOldAddon (getItemAttribute (pb, "addon"))).." por um "..getItemNameById (item.itemid).."!") else doPlayerSendTextMessage(cid, 27, "Agora seu pokémon usará este "..getItemNameById (item.itemid).."!") end doRemoveItem(item.uid, 1) doSetItemAttribute(pb, "addon", numero) return true end
  9. Script taltamenti faltano codgos '-
  10. TFS 1.0; Base: Base pda com Level system Erro Data base [Error - LuaScriptInterface::loadFile] cannot open datapack/npc/scripts/default.lua: No such file or directory [10/03/2018 07:00:47] [Warning - NpcScript::NpcScript] Cannot load script: datapack/npc/scripts/default.lua [10/03/2018 07:00:47] cannot open datapack/npc/scripts/default.lua: No such file or directory [10/03/2018 07:00:48] [Error - LuaScriptInterface::loadFile] cannot open datapack/npc/scripts/default.lua: No such file or directory [10/03/2018 07:00:48] [Warning - NpcScript::NpcScript] Cannot load script: datapack/npc/scripts/default.lua [10/03/2018 07:00:48] cannot open datapack/npc/scripts/default.lua: No such file or directory Meu defaul.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end npcHandler:addModule(FocusModule:new())
  11. Pra deixa eli com Exe. ultiliza o progama Install Creator bem facio e bem manero. Pra cliente New extendida paça pra Old tem que adapita a Dll spr2 mais pra isso so com progamador
  12. Desativa o xp2 eli esta sem função não vai da mais poblema
  13. Seu servido é com Level system?
  14. Galera minha base é com level systema e gostatia de adapita o (level tables) pra ser hard upa mais o xp que o plays ganha e facio entedeo? Vo esplica melho... Do jeito que esta o pokemon e hard upa mais o xp dos Plays tabem eu aumentei o xp dos plays mais quando mata 2 pokes o pokemon ja upa o maximo kkk ja mechi no playerExperienceRate = pra 0.1 e mesmo asim esta de mais ae esta o xp de cada level [1] = 0, [2] = 72, [3] = 456, [4] = 768, [5] = 1080, [6] = 1432, [7] = 1888, [8] = 2512, [9] = 3352, [10] = 4480, [11] = 5936, [12] = 7784, [13] = 10088, [14] = 12896, [15] = 16280, [16] = 20280, [17] = 24960, [18] = 30384, [19] = 36600, [20] = 43680, [21] = 51664, [22] = 60616, [23] = 70600, [24] = 81664, [25] = 93880, [26] = 107288, [27] = 121952, [28] = 137936, [29] = 155288, [30] = 174080, [31] = 194352, [32] = 216168, [33] = 239592, [34] = 264672, [35] = 291480, [36] = 320056, [37] = 350464, [38] = 382768, [39] = 417016, [40] = 453280, [41] = 491600, [42] = 532040, [43] = 574664, [44] = 619520, [45] = 666680, [46] = 716184, [47] = 768096, [48] = 822480, [49] = 879384, [50] = 938880, [51] = 1001008, [52] = 1065832, [53] = 1133416, [54] = 1203808, [55] = 1277080, [56] = 1353272, [57] = 1432448, [58] = 1514672, [59] = 1599992, [60] = 1688480, [61] = 1780176, [62] = 1875144, [63] = 1973448, [64] = 2075136, [65] = 2180280, [66] = 2288920, [67] = 2401120, [68] = 2516944, [69] = 2636440, [70] = 2759680, [71] = 2886704, [72] = 3017576, [73] = 3152360, [74] = 3291104, [75] = 3433880, [76] = 3580728, [77] = 3731712, [78] = 3886896, [79] = 4046328, [80] = 4210080, [81] = 4378192, [82] = 4550728, [83] = 4727752, [84] = 4909312, [85] = 5095480, [86] = 5286296, [87] = 5481824, [88] = 5682128, [89] = 5887256, [90] = 6097280, [91] = 6312240, [92] = 6532200, [93] = 6757224, [94] = 6987360, [95] = 7222680, [96] = 7463224, [97] = 7709056, [98] = 7960240, [99] = 8216824, [100] = 8478880, [101] = 999999999} xp do pokemon mais auto exp = 15989861, os pokemon vai ser dessi xp pra baixo. OBS: Fui tentar aumenta o xp e fico ate Hard mais quando chegava em certo level o pokemon parava de ganha xp e com certo tempo eli morria. Não cei si foi muito xp que coloquei ou seila '- É tabem si vocês poderem explica como coloca o limiti maximo de 100 pra level 500 (OBJ) Valemdo 5 RP
  15. Bom ja tinha colocado 0.1 no config mais mesmo asim esta ganhado muito xp os pokemon e mechi no level tables aumentei e quando chegava em serto level parava de ganha xp tipo o meu servido vai ate level 100 quando mechi eli ia até level 75 e parava .. Mais toma 1 RP pela temção
  16. Boa Noite,Manha,Tarde. (Deus Liama) Galera gostaria de um Script de box que quando o Play abri venha com nick deli é um codgo numerico (ex: Pedro compro Box Mega Alakazam, Pedro abrio a box o Pokemon Mega Alakazam veio com Nick Pedro #2425). Agradeço desde ja *(RP)* Verção 8.54 , 1.0
  17. Galera vim pedi uma ajuda a vocês. Esto editano um servido com Level system. Bom meu poblema é? Esto aumentano o xp pq level 500 fica hard pra os plays upa esto aumentano isso pra ex: level 2000 fica hard bom até ae tudo bem mais asim os pokemon esta upano muito tabem meu pedido é ( Deixa o xp do*Pokemon* Hard com xp aulto dos plays ) Vo logo agradecendo a todos é espero da Reporte por ajuda.
  18. data/talkactions/pontos.lua function onSay(cid, words, param) local param = param.explode(param, ',') if param then if isPlayer(getCreatureByName(param[1])) == TRUE then doPlayerSendTextMessage(getCreatureByName(param[1]), 22, "Você acabou de resebe seus pontos!") doPlayerAddItem(getCreatureByName(param[1]), param[2], param[3]) end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") end return TRUE end data/talkactions/talkactions.xml <talkaction log="yes" access="5" words="/pontos" event="script" value="pontos.lua"/> Comando : /Pedro, 2160, 100 o player chamado Pedro vai receber 100 crystal coins.
  19. henriquesafadao postou uma resposta no tópico em Suporte Tibia OTServer
    local a = { [13524] = {balltype = "ultra", ballid = 11829, pokemons = {"Alfa Zekron"}} } function onUse(cid, item, frompos, item2, topos) local b = a[item.itemid] if not b then return true end local pokemon = b.pokemons[math.random(#b.pokemons)] local btype = b.balltype if not pokeballs[btype] then return true end local gender = getRandomGenderByName(pokemon) local happy = 220 local ball = 0 local sendToDepot = false --alterado v1.6 if getCreatureMana(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then sendToDepot = true ball = doCreateItemEx(b.ballid) --alterado v1.3 else ball = item.uid end doItemSetAttribute(ball, "poke", pokemon) doItemSetAttribute(ball, "hp", 1) doItemSetAttribute(ball, "happy", happy) doItemSetAttribute(ball, "gender", gender) if pokemon == "Hitmonchan" or pokemon == "Shiny Hitmonchan" then doItemSetAttribute(ball, "hands", 0) end doItemSetAttribute(ball, "description", "Contains a "..pokemon..".") doItemSetAttribute(ball, "fakedesc", "Contains a "..pokemon..".") doItemSetAttribute(ball, "boost", 100) doPlayerSendTextMessage(cid, 27, "You opened a pokemon prize box +"..item.itemid - (11637).."!") doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon..", congratulations!") if sendToDepot then doPlayerSendMailByName(getCreatureName(cid), ball, 1) --alterado v1.3 doPlayerSendTextMessage(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.") doCreatureExecuteTalkAction(cid, "!save") doRemoveItem(item.uid) else doTransformItem(ball, pokeballs[btype].on) end doSendMagicEffect(getThingPos(cid), 29) return true end
  20. P Points System Nome do script : P Points system v1 Versão testada : TFS 0.4 (8.70 Funciona em versões anteriores) Creditos : LsM Como funciona : O sistema funciona como uma recompensa ao player por ficar online por um certo tempo. O player, ao ficar online por um certo intervalo de tempo programado no código, receberá uma quantidade de pontos "P" a qual também se pode alterar. O objetivo foi fazer com que os players se sintam incentivados a ficar online por um maior período de tempo para que recebam tais moedas. Essa é, definitivamente, uma forma fácil de se alcançar um número maior de players online, já que a ideia foi retirada de um MMORPG online de grande sucesso. Como utilizar : C omo o sistema tem como foco dar uma recompensa ao player, no caso pontos P , estes, podem ser utilizados no comercio, em npcs, ou até mesmo na entrada de locais. Sua sintaxe é muito maleável e se encaixa em quaquer requisito desejado. Instalação : Primeiramente, execute a seguinte QUERY em seu banco de dados : Código: ALTER TABLE `accounts` ADD `p_points` INTEGER NOT NULL DEFAULT 0 Em seguida, crie um arquivo com a extensão .lua chamado " points.lua " em " data/creaturescripts/scripts " e adicione o código abaixo : Código: --[[ P Points System by LsM. OTServ Brasil &#169; 2011 Version : v1.0 ]]-- function onLogin(cid) doCreatureSetStorage(cid, 1219, os.time()) return true end function onLogout(cid) doCreatureSetStorage(cid, 1219, 0) return true end Ainda em creaturescripts, abra o arquivo " creaturescripts.xml " e adicione a seguinte TAG : Código: <event type="login" name="PlayerAddPointsTimer" event="script" value="points.lua"/> <event type="logout" name="PlayerResetPointsTimer" event="script" value="points.lua"/> Agora, em " data/globalevents/script " crie um arquivo com a extensão .lua também chamado " points.lua " e cole o seguinte código : Código: --[[ P Points System by LsM. OTServ Brasil &#169; 2011 Version : v1.0 ]]-- local config = { p_time = 3600, -- Tempo em segundos para receber os pontos( 3600 = 1hora ) p_points = 1 -- Quantidade de pontos recebida a cada "p_time" }local function givePoints(cid, quant) if os.time() - getCreatureStorage(cid, 1219) >= config.p_time then doPlayerSendTextMessage(cid, 19, "Congratulations, you recieved ".. config.p_points .." p points. Now you have ".. config.p_points + getPoints(cid) .." p points in your account. Your timer was reseted.") doPlayerAddPoints(cid, quant) doCreatureSetStorage(cid, 1219, 0) doCreatureSetStorage(cid, 1219, os.time()) end return true end function onThink(interval) for i, v in pairs(getPlayersOnline()) do givePoints(v, config.p_points) end return true end E em " globalevents.xml " cole a seguinte TAG : Código: <globalevent name="points" interval="60" event="script" value="points.lua"/> Em seguida vá em " data/talkactions/scripts ", crie um arquivo com extensão .lua chamado " points.lua " e adicione o seguinte código : Código: function onSay(cid, words, param, channel) local getP = getPoints(cid) doPlayerPopupFYI(cid, "You have ".. getP .." P points.") return true end E em " talkactions.xml " adicione a TAG : Código: <talkaction words="!ppoints;/ppoints" event="script" value="points.lua"/> Para finalizar, vá em " data/lib/050-function.lua " e na última linha, adicione as funções abaixo : Código: function getPoints(cid) local res = db.getResult('select `p_points` from accounts where name = \''..getPlayerAccount(cid)..'\'') if(res:getID() == -1) then return false end local ret = res:getDataInt("p_points") res:free() return tonumber(ret) end function doPlayerAddPoints(cid, quant) return db.executeQuery("UPDATE `accounts` SET `p_points` = '".. getPoints(cid) + quant .."' WHERE `name` ='"..getPlayerAccount(cid).."'") end function doPlayerRemovePoints(cid, quant) return db.executeQuery("UPDATE `accounts` SET `p_points` = '".. getPoints(cid) - quant .."' WHERE `name` ='"..getPlayerAccount(cid).."'") end Fim, o sistema está instalado. Como configurar : A parte da configuração é a mais fácil, apenas edite : Código: [/size] [/font] local config = { p_time = 3600, -- Tempo em segundos para receber os pontos( 3600 = 1hora ) p_points = 1 -- Quantidade de pontos recebida a cada "p_time" } Quer utilizar o sistema em um npc, ou action, ou algum outro sistema e não sabe como? Simples, apenas use as seguintes funções : getPoints(cid) A função retorna a quantidade de pontos do player. doPlayerAddPoints(cid, quant) A função adiciona a quantidade(quant) de pontos ao player. doPlayerRemovePoints(cid, quant) A função remove a quantidade(quant) de pontos do player. Ilustração : Funcionamento do script Ilustração de !ppoints NPC: Crie um arquivo xml com nome ppoints.xml na pasta npc e coloque. <?xml version="1.0" encoding="UTF-8"?> <npc name="Points Trade" script="Ptrader.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="1801" head="59" body="76" legs="48" feet="48"/> </npc> Depois va em npc, scripts , cria 1 arquivo .lua com nome Ptrader.lua e coloque. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid local shopWindow = {} local t = { [13308] = 19, -- [id do item] = quantos pontos vai custar [13293] = 15, [13279] = 15, [13301] = 15, [13228] = 45, [13594] = 45, [13637] = 6, [13638] = 6, [13639] = 6, [13634] = 6 } local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks) if t[item] and getPoints(cid) < t[item] then selfSay("Você precisa de "..t[item].." P points para comprar este item.", cid) else doPlayerRemovePoints(cid, t[item]) doPlayerAddItem(cid, item) selfSay("Aqui esta seu item", cid) end return true end if (msgcontains(msg, 'trade') or msgcontains(msg, 'TRADE'))then for var, ret in pairs(t) do table.insert(shopWindow, {id = var, subType = 0, buy = ret, sell = 0, name = getItemNameById(var)}) end openShopWindow(cid, shopWindow, onBuy, onSell) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Explicano: [13308] = 19, [ID DO ITEM] = QUANTIDADE DE PPOINTS Lenbrano si for aumenta a quantidade de items deixem o utimo item sem o , explo: [13634] = 6 Creditos: LsM Todos arquivos pra baixa \/ utilizei ctrl+c ctrl+v pq não tinha o npc no topico horijinal mais ae esta http://www.4shared.c...nts_System.html
  21. Espero que voçê tenha um poco de conhecimento em Scripters si não vai gera varios Bug
  22. henriquesafadao postou uma resposta no tópico em Suporte Tibia OTServer
    Galera esto precizando de script de box de quando o play abri o pokemon venha com nick deli meu servido é dedicado e esta avenu clonagem augem pode ajudar
  23. local combats = { [PSYCHICDAMAGE] = {cor = COLOR_PSYCHIC}, [GRASSDAMAGE] = {cor = COLOR_GRASS}, [POISONEDDAMAGE] = {cor = COLOR_GRASS}, [FIREDAMAGE] = {cor = COLOR_FIRE2}, [BURNEDDAMAGE] = {cor = COLOR_BURN}, [WATERDAMAGE] = {cor = COLOR_WATER}, [ICEDAMAGE] = {cor = COLOR_ICE}, [NORMALDAMAGE] = {cor = COLOR_NORMAL}, [FLYDAMAGE] = {cor = COLOR_FLYING}, [GHOSTDAMAGE] = {cor = COLOR_GHOST}, [GROUNDDAMAGE] = {cor = COLOR_GROUND}, [ELECTRICDAMAGE] = {cor = COLOR_ELECTRIC}, [ROCKDAMAGE] = {cor = COLOR_ROCK}, [BUGDAMAGE] = {cor = COLOR_BUG}, [FIGHTDAMAGE] = {cor = COLOR_FIGHTING}, [DRAGONDAMAGE] = {cor = COLOR_DRAGON}, [POISONDAMAGE] = {cor = COLOR_POISON}, [DARKDAMAGE] = {cor = COLOR_DARK}, [STEELDAMAGE] = {cor = COLOR_STEEL}, [MIRACLEDAMAGE] = {cor = COLOR_PSYCHIC}, [DARK_EYEDAMAGE] = {cor = COLOR_GHOST}, [SEED_BOMBDAMAGE] = {cor = COLOR_GRASS}, [SACREDDAMAGE] = {cor = COLOR_FIRE2}, [MUDBOMBDAMAGE] = {cor = COLOR_GROUND}, --alterado v1.9 } local function sendPlayerDmgMsg(cid, text) if not isCreature(cid) then return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, text) end local races = { [4] = {cor = COLOR_FIRE2}, [6] = {cor = COLOR_WATER}, [7] = {cor = COLOR_NORMAL}, [8] = {cor = COLOR_FIRE2}, [9] = {cor = COLOR_FIGHTING}, [10] = {cor = COLOR_FLYING}, [11] = {cor = COLOR_GRASS}, [12] = {cor = COLOR_POISON}, [13] = {cor = COLOR_ELECTRIC}, [14] = {cor = COLOR_GROUND}, [15] = {cor = COLOR_PSYCHIC}, [16] = {cor = COLOR_ROCK}, [17] = {cor = COLOR_ICE}, [18] = {cor = COLOR_BUG}, [19] = {cor = COLOR_DRAGON}, [20] = {cor = COLOR_GHOST}, [21] = {cor = COLOR_STEEL}, [22] = {cor = COLOR_DARK}, [1] = {cor = 180}, [2] = {cor = 180}, [3] = {cor = 180}, [5] = {cor = 180}, } local damages = {GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE, DARKDAMAGE, STEELDAMAGE} local fixdmgs = {PSYCHICDAMAGE, COMBAT_PHYSICALDAMAGE, GRASSDAMAGE, FIREDAMAGE, WATERDAMAGE, ICEDAMAGE, NORMALDAMAGE, GHOSTDAMAGE} local ignored = {POISONEDDAMAGE, BURNEDDAMAGE} local cannotkill = {BURNEDDAMAGE, POISONEDDAMAGE} function onStatsChange(cid, attacker, type, combat, value) if combat == FLYSYSTEMDAMAGE then return false end if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV if not isCreature(attacker) then if not isInArray(fixdamages, combat) and combats[combat] then doSendAnimatedText(getThingPos(cid), value, combats[combat].cor) end return true end local damageCombat = combat -------------------------------------------------- if type == STATSCHANGE_HEALTHGAIN then if cid == attacker then return true end if isSummon(cid) and isSummon(attacker) and canAttackOther(cid, attacker) == "Cant" then return false end return true end -------------------------------------------------- if isMonster(cid) then local valor = value if not pokes[getCreatureName(cid)] and damageCombat == COMBAT_PHYSICALDAMAGE then valor = getOffense(attacker) * playerDamageReduction doCreatureAddHealth(cid, -math.abs(valor), 3, races[7].cor) return false elseif not pokes[getCreatureName(cid)] and damageCombat ~= COMBAT_PHYSICALDAMAGE then doCreatureAddHealth(cid, -math.abs(valor), 3, combats[damageCombat].cor) return false end end -------------------------------------------------- if isPlayer(attacker) then local valor = value if valor > getCreatureHealth(cid) then valor = getCreatureHealth(cid) end if combat == COMBAT_PHYSICALDAMAGE then return false end if combat == PHYSICALDAMAGE then doSendMagicEffect(getThingPos(cid), 3) doSendAnimatedText(getThingPos(cid), valor, races[getMonsterInfo(getCreatureName(cid)).race].cor) end if combats[damageCombat] and not isInArray(fixdmgs, damageCombat) then doSendAnimatedText(getThingPos(cid), valor, combats[damageCombat].cor) end if #getCreatureSummons(attacker) >= 1 and not isInArray({POISONEDDAMAGE, BURNEDDAMAGE}, combat) then doPlayerSendTextMessage(attacker, MESSAGE_STATUS_DEFAULT, "Your "..getPokeName(getCreatureSummons(attacker)[1]).." dealt "..valor.." damage to "..getSomeoneDescription(cid)..".") end return true end -------------------------------------------------- if isPlayer(cid) and #getCreatureSummons(cid) >= 1 and type == STATSCHANGE_HEALTHLOSS then return false end -------------------------------------------------- if isPlayer(cid) and #getCreatureSummons(cid) <= 0 and type == STATSCHANGE_HEALTHLOSS then if isSummon(attacker) or isPlayer(attacker) then if canAttackOther(cid, attacker) == "Cant" then return false end end local valor = 0 if combat == COMBAT_PHYSICALDAMAGE then valor = getOffense(attacker) else valor = getSpecialAttack(attacker) end valor = valor * playerDamageReduction valor = valor * math.random(83, 117) / 100 if valor >= getCreatureHealth(cid) then valor = getCreatureHealth(cid) end valor = math.floor(valor) if valor >= getCreatureHealth(cid) then if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then setPlayerStorageValue(cid, 6598754, -1) setPlayerStorageValue(cid, 6598755, -1) doRemoveCondition(cid, CONDITION_OUTFIT) doTeleportThing(cid, posBackPVP, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) return false --alterado v1.8 end if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 17000, 0) setPlayerStorageValue(cid, 17001, 0) setPlayerStorageValue(cid, 63215, -1) doChangeSpeed(cid, PlayerSpeed) local item = getPlayerSlotItem(cid, 8) local btype = getPokeballType(item.itemid) if #getCreatureSummons(cid) <= 0 then if isInArray(pokeballs[btype].all, item.itemid) then doTransformItem(item.uid, pokeballs[btype].off) doItemSetAttribute(item.uid, "hp", 0) end end end if getPlayerStorageValue(cid, 22545) == 1 then if getGlobalStorageValue(22550) == 1 then doPlayerSendTextMessage(cid, 20, "You are the last survivor of the golden arena! Take your reward!") doPlayerAddItem(cid, 2152, getPlayerStorageValue(cid, 22551)*2) setPlayerStorageValue(cid, 22545, -1) doTeleportThing(cid, getClosestFreeTile(cid, getClosestFreeTile(cid, posBackGolden)), false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid)) setPlayerRecordWaves(cid) endGoldenArena() return false --alterado v1.8 else setGlobalStorageValue(22550, getGlobalStorageValue(22550)-1) setPlayerStorageValue(cid, 22545, -1) doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid)) setPlayerRecordWaves(cid) return true end end if getPlayerStorageValue(cid, 98796) >= 1 then setPlayerStorageValue(cid, 98796, -1) setPlayerStorageValue(cid, 98797, -1) --alterado v1.8 doTeleportThing(cid, SafariOut, false) doSendMagicEffect(getThingPos(cid), 21) doPlayerSendTextMessage(cid, 27, "You die in the saffari... Best luck in the next time!") return false --alterado v1.8 end local corpse = doCreateItem(3058, 1, getThingPos(cid)) doDecayItem(corpse) doItemSetAttribute(corpse, "pName", getCreatureName(cid)) --alterado v1.7 coloca corpse quando o player morre! doItemSetAttribute(corpse, "attacker", getCreatureName(attacker)) doItemSetAttribute(corpse, "article", getPlayerSex(cid) == 0 and "She" or "He") if getPlayerStorageValue(cid, Agatha.stoIni) >= 1 and getPlayerStorageValue(cid, Agatha.stoIni) <= 10 then setPlayerStorageValue(cid, Agatha.stoIni, -1) setPlayerStorageValue(cid, Agatha.stoRec, -1) setPlayerStorageValue(cid, Agatha.stoPer, -1) setPlayerStorageValue(cid, Agatha.stoEni, -1) --alterado v1.9 agatha quest setPlayerStorageValue(cid, Agatha.stoRes, -1) end end doCreatureAddHealth(cid, -valor, 3, 180) if not isPlayer(cid) then addEvent(sendPlayerDmgMsg, 5, cid, "You lost "..valor.." hitpoints due to an attack from "..getSomeoneDescription(attacker)..".") end return false end -------------------------------------------------- if isMonster(attacker) and getPlayerStorageValue(attacker, 201) ~= -1 then if isPlayer(cid) then return false end if getPlayerStorageValue(getCreatureMaster(cid), ginasios[getPlayerStorageValue(attacker, 201)].storage) ~= 1 then return false end end -------------------------------------------------- if isMonster(cid) and getPlayerStorageValue(cid, 201) ~= -1 then if getPlayerStorageValue(getCreatureMaster(attacker), ginasios[getPlayerStorageValue(cid, 201)].storage) ~= 1 then return false end end -------------------------------------------------- if ehMonstro(cid) and ehMonstro(attacker) and not isSummon(cid) and not isSummon(attacker) then return false --alterado v1.9 /\ end -------------------------------------------------- --------------------REFLECT----------------------- if getPlayerStorageValue(cid, 21099) >= 1 and combat ~= COMBAT_PHYSICALDAMAGE then if not isInArray({"Team Claw", "Team Slice"}, getPlayerStorageValue(attacker, 21102)) then doSendMagicEffect(getThingPosWithDebug(cid), 135) doSendAnimatedText(getThingPosWithDebug(cid), "REFLECT", COLOR_GRASS) addEvent(docastspell, 100, cid, getPlayerStorageValue(attacker, 21102)) if getCreatureName(cid) == "Wobbuffet" then doRemoveCondition(cid, CONDITION_OUTFIT) end setPlayerStorageValue(cid, 21099, -1) setPlayerStorageValue(cid, 21100, 1) setPlayerStorageValue(cid, 21101, attacker) setPlayerStorageValue(cid, 21103, getTableMove(attacker, getPlayerStorageValue(attacker, 21102)).f) setPlayerStorageValue(cid, 21104, getCreatureOutfit(attacker).lookType) return false end end ------------------------------------------------- local multiplier = 1 if isCreature(cid) then poketype1 = pokes[getCreatureName(cid)].type poketype2 = pokes[getCreatureName(cid)].type2 end if not poketype1 or not poketype2 then return false end if getCreatureCondition(cid, CONDITION_INVISIBLE) then return false end if damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignored, damageCombat) then if isInArray(effectiveness[damageCombat].super, poketype1) then multiplier = multiplier + 0.5 end if isInArray(effectiveness[damageCombat].super, poketype2) then multiplier = multiplier + 0.5 end if isInArray(effectiveness[damageCombat].weak, poketype1) then multiplier = multiplier - 0.25 end if isInArray(effectiveness[damageCombat].weak, poketype2) then multiplier = multiplier - 0.25 end if isInArray(effectiveness[damageCombat].non, poketype1) or isInArray(effectiveness[damageCombat].non, poketype2) then if isInArray(specialabilities["foresight"], getCreatureName(attacker)) then multiplier = 0.5 end --alterado v1.6 end -- X-Attack -- if isSummon(attacker) and isPlayer(getCreatureMaster(attacker)) then local TierArray = {8, 9, 10, 11, 12, 13, 14} local Tiers = { [8] = {bonus = AtkBonus1}, [9] = {bonus = AtkBonus2}, [10] = {bonus = AtkBonus3}, [11] = {bonus = AtkBonus4}, [12] = {bonus = AtkBonus5}, [13] = {bonus = AtkBonus6}, [14] = {bonus = AtkBonus7}, } local ball = getPlayerSlotItem(getCreatureMaster(attacker), 8) local Tier = getItemAttribute(ball.uid, "heldx") local bonusatk = {} if isInArray(TierArray, getItemAttribute(ball.uid, "heldx")) then bonusatk = Tiers[Tier].bonus else bonusatk = 1 end multiplier = multiplier * bonusatk end -- X-Attack -- elseif combat == COMBAT_PHYSICALDAMAGE then if isGhostPokemon(cid) then if not isInArray(specialabilities["foresight"], getCreatureName(attacker)) then --passiva Foresight!! doSendMagicEffect(getThingPos(cid), 3) return false end end local cd = getPlayerStorageValue(attacker, conds["Miss"]) local cd2 = getPlayerStorageValue(attacker, conds["Confusion"]) local cd3 = getPlayerStorageValue(attacker, conds["Stun"]) if cd >= 0 or cd2 >= 0 or cd3 >= 0 then if math.random(1, 100) > 50 then doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(attacker), "MISS", 215) return false end end end -------------------------------------------------- local valor = value if multiplier == 1.5 and poketype2 == "no type" then multiplier = 2 elseif multiplier == 1.5 and poketype2 ~= "no type" then multiplier = 1.75 elseif multiplier == 1.25 then multiplier = 1 end -------------------------------------------------- if isSummon(cid) and isSummon(attacker) then if getCreatureMaster(cid) == getCreatureMaster(attacker) then return false end if canAttackOther(cid, attacker) == "Cant" then return false end end valor = valor * multiplier if isSummon(attacker) then valor = valor * getHappinessRate(attacker) else valor = valor * summonReduction end valor = math.floor(valor) if combat == COMBAT_PHYSICALDAMAGE then local value = getOffense(attacker) > 1000 and 3 or 2 block = 1 - (getDefense(cid) / (getOffense(attacker) + getDefense(cid))) --alterado v1.9 testem essa nova formula plzzz '--' valor = (getOffense(attacker)/value) * block if valor <= 0 then valor = math.random(5, 10) --alterado v1.9 end if isInArray(specialabilities["counter"], getCreatureName(cid)) then if math.random(1, 100) <= 10 then doCreatureAddHealth(attacker, -valor, 3, 180) valor = 0 doSendAnimatedText(getThingPosWithDebug(cid), "COUNTER", 215) end end -- Return -- if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then local returnbonus = {} local ball = getPlayerSlotItem(getCreatureMaster(cid), 8) local Tiers = { [15] = {bonus = DmgReturn1}, } local Tier = getItemAttribute(ball.uid, "heldx") if Tier and Tier > 14 and Tier < 22 then returnbonus = math.floor((valor * Tiers[Tier].bonus)) elseif not isInArray(Tiers, Tier) then returnbonus = 0 end doCreatureAddHealth(attacker, -returnbonus) end -- Return -- else -- Return -- if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then local returnbonus = {} local ball = getPlayerSlotItem(getCreatureMaster(cid), 8) local Tiers = { [15] = {bonus = DmgReturn1}, } local Tier = getItemAttribute(ball.uid, "heldx") if Tier and Tier > 14 and Tier < 22 then returnbonus = math.floor((valor * Tiers[Tier].bonus)) elseif not isInArray(Tiers, Tier) then returnbonus = 0 end doCreatureAddHealth(attacker, -returnbonus) end -- Return -- valor = valor / getDefense(cid) end -------------------------Edited CLAN SYSTEM----------------------------------- if isSummon(attacker) and getPlayerStorageValue(getCreatureMaster(attacker), 86228) >= 1 then valor = valor*getClanPorcent(getCreatureMaster(attacker), combat, "atk") elseif isSummon(cid) and getPlayerStorageValue(getCreatureMaster(cid), 86228) >= 1 then valor = valor - (valor*getClanPorcent(getCreatureMaster(cid), combat, "def", pokes[getCreatureName(cid)].type, pokes[getCreatureName(cid)].type2)) end ----------------------------------------------------------------------- ---------------------- FEAR / ROAR ------------------------------------ if getPlayerStorageValue(attacker, conds["Fear"]) >= 1 then return true end -------------------------------------------------------------------------- if damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignored, damageCombat) then if isInArray(effectiveness[damageCombat].non, poketype1) or isInArray(effectiveness[damageCombat].non, poketype2) then if not isInArray(specialabilities["foresight"], getCreatureName(attacker)) then valor = valor * 0 end end end if damageCombat == GROUNDDAMAGE then if isInArray(specialabilities["levitate"], getCreatureName(cid)) then valor = 0 end end ----------------------------------------------------------------------------- local p = getThingPos(cid) if p.x == 1 and p.y == 1 and p.z == 10 then return false end if getPlayerStorageValue(cid, 9658783) == 1 then return false --imune end ----------------------------------------------------------------------------- --------------- FIGHT MODE ----------------------- if useOTClient then if isSummon(cid) then local master = getCreatureMaster(cid) if getPlayerStorageValue(master, 248759) == 1 then valor = valor * 1.1 elseif getPlayerStorageValue(master, 248759) == 3 then valor = valor * 0.9 end end if isSummon(attacker) then local master = getCreatureMaster(attacker) if getPlayerStorageValue(master, 248759) == 1 then valor = valor * 1.1 elseif getPlayerStorageValue(master, 248759) == 3 then valor = valor * 0.9 end end end ----------------------------------------------------------------------------- if valor >= getCreatureHealth(cid) then if isInArray(cannotKill, combat) and isPlayer(cid) then valor = getCreatureHealth(cid) - 1 else valor = getCreatureHealth(cid) end end valor = math.floor(valor) ------------------ SKILLs Q CURAM O ATTACKER --------------------------------- local function doHeal(cid, amount) if (getCreatureHealth(cid) + amount) >= getCreatureMaxHealth(cid) then amount = math.abs(getCreatureHealth(cid)-getCreatureMaxHealth(cid)) end if getCreatureHealth(cid) ~= getCreatureMaxHealth(cid) then doCreatureAddHealth(cid, amount) doSendAnimatedText(getThingPosWithDebug(cid), "+"..amount.."", 65) end end if damageCombat == PSYCHICDAMAGE or damageCombat == MIRACLEDAMAGE then if getPlayerStorageValue(attacker, 95487) >= 1 then doHeal(attacker, valor) setPlayerStorageValue(attacker, 95487, -1) end elseif damageCombat == SEED_BOMBDAMAGE then doHeal(attacker, valor) end -------------------------------------------- ----------SACRED FIRE----------------------- if combat == SACREDDAMAGE and not ehNPC(cid) then local ret = {} ret.id = cid ret.cd = 9 ret.check = getPlayerStorageValue(cid, conds["Silence"]) ret.eff = 39 ret.cond = "Silence" doCondition2(ret) elseif combat == MUDBOMBDAMAGE and not ehNPC(cid) then local ret = {} ret.id = cid ret.cd = 9 ret.eff = 34 ret.check = getPlayerStorageValue(cid, conds["Miss"]) ret.spell = "Mud Bomb" --alterado v1.9 ret.cond = "Miss" doCondition2(ret) end --------------------------------------------- --------------Passiva Lifesteal Clobat------------ if combat == COMBAT_PHYSICALDAMAGE then if getCreatureName(attacker) == "Crobat" then doCreatureAddHealth(attacker, math.floor(valor)) doSendAnimatedText(getThingPos(attacker), "+ "..math.floor(valor), 30) end end -------------------------------------------- valor = math.abs(valor) --alterado v1.9 if isSummon(cid) and valor >= getCreatureHealth(cid) then onPokeHealthChange(getCreatureMaster(cid), true) elseif isSummon(cid) then onPokeHealthChange(getCreatureMaster(cid)) end if isSummon(attacker) then if combat == COMBAT_PHYSICALDAMAGE then doTargetCombatHealth(getCreatureMaster(attacker), cid, PHYSICALDAMAGE, -valor, -valor, 255) addEvent(doDoubleHit, 1000, attacker, cid, valor, races) else doTargetCombatHealth(getCreatureMaster(attacker), cid, damageCombat, -valor, -valor, 255) end else if combat ~= COMBAT_PHYSICALDAMAGE then doCreatureAddHealth(cid, -valor, 3, combats[damageCombat].cor) else doCreatureAddHealth(cid, -valor, 3, races[getMonsterInfo(getCreatureName(cid)).race].cor) addEvent(doDoubleHit, 1000, attacker, cid, valor, races) end if isSummon(cid) and valor ~= 0 then addEvent(sendPlayerDmgMsg, 5, getCreatureMaster(cid), "Your "..getCreatureName(cid).." lost "..valor.." hitpoints due to an attack from "..getSomeoneDescription(attacker)..".") end end if damageCombat == FIREDAMAGE and not isBurning(cid) then local ret = {} ret.id = cid ret.cd = math.random(5, 12) ret.check = getPlayerStorageValue(cid, conds["Burn"]) ret.damage = isSummon(attacker) and getMasterLevel(attacker)+getPokemonBoost(attacker) or getPokemonLevel(attacker) ret.cond = "Burn" doCondition2(ret) elseif damageCombat == POISONDAMAGE and not isPoisoned(cid) then local ret = {} ret.id = cid ret.cd = math.random(6, 15) ret.check = getPlayerStorageValue(cid, conds["Poison"]) local lvl = isSummon(attacker) and getMasterLevel(attacker) or getPokemonLevel(attacker) ret.damage = math.floor((getPokemonLevel(attacker)+lvl)/2) ret.cond = "Poison" doCondition2(ret) end --[[---------------CD BAR----------------------- if isSummon(cid) then doCreatureExecuteTalkAction(getCreatureMaster(cid), "/pokeread") end ]] ------------------------------------POTIONS------------------------------------------- if isSummon(cid) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(cid, 173) >= 1 then if damageCombat ~= BURNEDDAMAGE and damageCombat ~= POISONEDDAMAGE then setPlayerStorageValue(cid, 173, -1) doSendAnimatedText(getThingPos(cid), "Lost Heal", 144) end end end ----------------------------------------PASSIVAS------------------------------------- -------------------------------------------Counter Helix------------------------------------ if passivesChances["Helix"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Helix"][getCreatureName(cid)] then docastspell(cid, "Counter Helix") end -------------------------------------------Lava Counter/Electricity---------------------------- if passivesChances["Fire_Thunder"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Fire_Thunder"][getCreatureName(cid)] then docastspell(cid, "Lava-Electricity") end ---------------------------------------Stunning Confusion----------------------------------------- if passivesChances["Stunning"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Stunning"][getCreatureName(cid)] then docastspell(cid, "Stunning Confusion") end -----------------------------------------Groundshock----------------------------------- if passivesChances["Groundshock"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Groundshock"][getCreatureName(cid)] then docastspell(cid, "Groundshock") end --------------------------------------Electric Charge--------------------------------------------- if passivesChances["Electric Charge"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Electric Charge"][getCreatureName(cid)] then docastspell(cid, "Electric Charge", 0, 0) end -------------------------------------Melody------------------------------------ if passivesChances["Melody"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Melody"][getCreatureName(cid)] then docastspell(cid, "Melody") end ------------------------------------- Dragon Fury / Fury --------------------------------------- if passivesChances["Dragon Fury"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Dragon Fury"][getCreatureName(cid)] then docastspell(cid, "Dragon Fury", 0, 0) end ------------------------------------- Mega Drain --------------------------------------- if passivesChances["Mega Drain"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Mega Drain"][getCreatureName(cid)] then docastspell(cid, "Mega Drain") end ------------------------------------- Spores Reaction --------------------------------------- if passivesChances["Spores Reaction"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Spores Reaction"][getCreatureName(cid)] then docastspell(cid, "Spores Reaction") end ------------------------------------ Amnesia ---------------------------------------- if passivesChances["Amnesia"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Amnesia"][getCreatureName(cid)] then docastspell(cid, "Amnesia", 0, 0) end ----------------------------------- Zen Mind ----------------------------------------- if passivesChances["Zen Mind"][getCreatureName(cid)] and isWithCondition(cid) and math.random(1, 100) <= passivesChances["Zen Mind"][getCreatureName(cid)] then docastspell(cid, "Zen Mind", 0, 0) end ---------------------------------- Mirror Coat --------------------------------------- if passivesChances["Mirror Coat"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Mirror Coat"][getCreatureName(cid)] then docastspell(cid, "Mirror Coat", 0, 0) end --------------------------------- Illusion ----------------------------------------- return false end

Informação Importante

Confirmação de Termo