Ir para conteúdo

malwarebr

Campones
  • Total de itens

    8
  • Registro em

  • Última visita

  • Dias Ganhos

    1

malwarebr venceu a última vez em Abril 22 2021

malwarebr had the most liked content!

Sobre malwarebr

Informações

  • Forma que conheci o xTibia
    Sites de Busca
  • Sou
    OT-Admin

Últimos Visitantes

624 visualizações

malwarebr's Achievements

  1. mais o erro pode ser por causa de uma linguagem diferente ou o q?
  2. vou ver se o admin ve pra mim o quanto antes.. é pq n tenho acesso aos arquivos do server.. estou apenas editando pra mim mesmo. e tb acho que deveria funcionar.. mais o estranho q sumiu mesmo nas outras opções, tipo name, health e outros..
  3. vou testar hj.. minha semana foi corrida e n consegui fazer nd. tentei isso e n teve resultados.. na vdd sumiu tudo da lista.. veja se esta correto, fiz como vc postou... porem apagou a lista toda.. mesmo usando outras categorias de tipos.
  4. Obg, vou testar aqui vou dar uma olhadinha
  5. Opa galera, tudo bem? Minha dificuldade é a seguinte. Gostaria de fixar o meu Poke como sendo o primeiro da lista de Batalha. mesmo o Sort mudando. tentei algumas coisas mas não obtive sucesso. Poderiam em ajudar? Desculpe se não for o local correto..
  6. Vi que alguns procuram aqui.. eu não entendo quase nada de script.. mais consegui solucionar esse problema após 12 +/- tentando de tudo!!! kkkkk tive que editar 2 arquivos! o Spawn.Lua e playerattack.lua o playerattack.lua eu resgatei o arquivo da versão DxP v3. ficando assim: local fightcondition = createConditionObject(CONDITION_INFIGHT) setConditionParam(fightcondition, CONDITION_PARAM_TICKS, 12 * 1000) function fightCondic(cid) if not isCreature(cid) then return true end if not isCreature(getCreatureTarget(cid)) then return true end doAddCondition(cid, fightcondition) addEvent(fightCondic, 1000, cid) end function onTarget(cid, target) if getPlayerStorageValue(target) ~= -1 and isPlayer(cid) then doSetPokemonAgressiveToPlayer(target, cid) end if isPlayer(target) then if canAttackOther(cid, target) == "Cant" then return false elseif isPlayer(target) and #getCreatureSummons(target) >= 1 and canAttackOther(cid, target) == "Can" then return false end end if getPlayerStorageValue(target, 201) ~= -1 then for a, b in pairs(ginasios) do if getPlayerStorageValue(target, ginasios[getPlayerStorageValue(target, 201)].storage) == 1 then if getPlayerStorageValue(cid, ginasios[getPlayerStorageValue(target, 201)].storage) ~= 1 then doPlayerSendCancel(cid, "You can't attack this pokemon.") return false end end end end if isSummon(target) then if not CanAttackerInDuel(cid, getCreatureMaster(target)) then return false end end return TRUE end e no spawn.lua eu adicionei a seguinte linha: if isPokePassive(cid) then setPokemonPassive(cid, true) end - Ela ficou pra mim na linha 145. Segue o Código: local respGrande = {"Pupitar", "Tyranitar", "Skarmory", "Magcargo", "Ampharos", "Xatu", "Crobat", "Typhlosion", "Magmar", "Electabuzz", "Cubone", "Marowak", "Electrode", "Charizard", "Oddish", "Paras", "Parasect"} local respMedio = {"Lanturn", "Dratini", "Dragonair", "Snorlax", "Krabby", "Kingler", "Gengar", "Pidgeot", "Raichu", "Machamp"} local respPequeno = {"Steelix", "Sudowoodo", "Feraligatr", "Meganium", "Dragonite", "Gyarados", "Pinsir", "Tauros", "Jynx", "Scyther", "Mr. mime", "Horsea", "Seadra", "Tangela", "Grimer", "Muk", "Tentacool", "Tentacruel", "Farfetch'd", "Growlithe", "Arcanine", "Alakazam", "Venusaur", "Blastoise", "Butterfree", "Beedrill", "Ratatta", "Raticate", "Golbat", "Venonat", "Venomoth"} local shinykarp = {"Magikarp"} function onSpawn(cid) if isSummon(cid) then return true end if not isCreature(cid) then return true end if getCreatureName(cid) == "" or getCreatureName(cid) == nil then setPlayerStorageValue(cid, 510, getCreatureNick(cid)) end registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "WildAttack") registerCreatureEvent(cid, "PokeWalk") if not ehMonstro(cid) then setPokemonGhost(cid) if getCreatureName(cid):find("Shiny ") then setPlayerStorageValue(cid, storages.EhShiny, 1) end return true end local name = getCreatureName(cid) local pos = getThingPos(cid) addEvent(function() if not isSummon(cid) and not isShinyName(name) then local chance = 0 if isInArray(respGrande, doCorrectString(name)) then --alterado v1.9 \/ chance = 20 elseif isInArray(respMedio, doCorrectString(name)) then chance = 25 elseif isInArray(respPequeno, doCorrectString(name)) then chance = 30 end local function doShiny(cid, pos, name, mode) if pos and name then name = "Shiny "..name if not pokes[name] then return true end doSendMagicEffect(pos, 18) doCreateMonsterNick(cid, name, retireShinyName(name), pos, false) end end if math.random(1, 1000) <= chance then doRemoveCreature(cid) doShiny(cid, pos, name, 1) return true end local storages = {"Hoodeasy", "Hoodmedium", "Hoodhard", "Hoodexpert", "Hoodlendary"} for i = 1, #storages do if isShinyName(name) and getPlayerStorageValue(cid, storages[i]) >= 1 then doRemoveCreature(cid) end end end local spawn_arrs = { {frompos = {x = 1922, y = 41, z = 14}, topos = {x = 2833, y = 1428, z = 14}}, } for _, arr in pairs(spawn_arrs) do if isInRange(pos, arr.frompos, arr.topos) then if isWild(cid) and string.find(name, "Shiny") and not isInArray({"Shiny Salamence", "Shiny Scizor", "Shiny Magmortar", "Shiny Electivire"}, name) then doRemoveCreature(cid) end end end if isInArray({"Abporygon", "Aporygon"}, name) then doCreatureSetHideHealth(cid, true) end if isWild(cid) and getCreatureName(cid) == "Magikarp" then if math.random(1, 5000) <= 25 then doRemoveCreature(cid) doCreateMonster("Feebas", pos, false) end end if isWild(cid) and isHoenn(getCreatureName(cid)) then if math.random(1, 5000) <= 25 then local sorte = bossName[math.random(#bossName)] doRemoveCreature(cid) doCreateMonster(sorte, pos, false) end end if not isSummon(cid) then adjustWildPoke(cid) end if isPokePassive(cid) then setPokemonPassive(cid, true) end end, 5) setPokemonGhost(cid) doMarkedPos(cid, getThingPos(cid)) setSmeargle(cid) addEvent(Camouflage, 5, cid) return true end function Camouflage(cid) if isWild(cid) and getCreatureName(cid) == "Kecleon" then doSetCreatureOutfit(cid, {lookType = 2057}, -1) doCreatureSetHideHealth(cid, true) end end function setSmeargle(cid) if isSummon(cid) then return true end if getCreatureName(cid):find("Smeargle") then local id = math.random(5, 6) if math.random(1, 500) <= 50 then id = math.random(7, 8) end setPlayerStorageValue(cid, storages.SmeargleID, "Smeargle " .. id) end end testei aqui e rodou sem erros até o momento! pokemons estão passivos até serem atacados! Obs. estou postando para ajudar! se estiver em local errado peço perdão!!
  7. achei o problema, porem parece que falta algumas função no spawn.lua
  8. Ola, gostaria de saber qual dos 2 scripts de passivo seria mais funcional. o da base "DxP" ou a da base "DxP pokemaster". Base DxP function isPokePassive(cid) if not isCreature(cid) then return false end if isWild(cid) and isInArray(passivepokemons, doCorrectString(getCreatureName(cid))) then return true end return false end function doSetPokemonAgressiveToPlayer(cid, target) if not isCreature(cid) or not isCreature(target) then return false end setPokemonPassive(cid, false) setPlayerStorageValue(cid, 505, getCreatureName(target)) if getCreatureTarget(cid) >= 1 then return false end if #getCreatureSummons(target) > 0 then doMonsterSetTarget(cid, getCreatureSummons(target)[1]) else doMonsterSetTarget(cid, target) end end function getPokemonAttackedPassive(cid) if not isCreature(cid) then return false end local stor = getPlayerStorageValue(cid, 505) if stor ~= 0 then return stor else return "" end end function setPokemonPassive(cid, passive) if not isCreature(cid) then return false end if passive then setPlayerStorageValue(cid, 504, 0)-- passivo setPlayerStorageValue(cid, 505, -1) else setPlayerStorageValue(cid, 504, 1) -- agressivo setPlayerStorageValue(cid, 505, -1) end end function onWalkSetTargetPassive(cid) if not isCreature(cid) then return false end if getCreatureTarget(cid) >= 1 then return false end local rangeX, rangeY = 7, 7 local spectators = getSpectators(getCreaturePosition(cid), rangeX, rangeY, false) local attackerName = getPokemonAttackedPassive(cid) local playerID = getPlayerByName(attackerName) local isEqualsDificult = false if not isCreature(playerID) then return false end if getCreatureTarget(cid) ~= playerID and attackerName ~= "" then return false end if spectators then for _, spectator in ipairs(spectators) do if isPlayer(spectator) and spectator ~= cid and (attackerName ~= "" and attackerName == getCreatureName(spectator)) and isWalkable(getThingPos(spectator), false, true, true, true) or (isWildTrainerNPC(cid) and getNPCNivel(cid) == getPlayerRankNivel(spectator)) then setPlayerStorageValue(cid, 504, 1) local attacker = spectator if #getCreatureSummons(spectator) > 0 then attacker = getCreatureSummons(spectator)[1] end doMonsterSetTarget(cid, attacker) break else setPlayerStorageValue(cid, 504, 0) doPokemonSetNoTarget(cid) end end end end function onWalkSetTargetPassiveWildNPC(cid) if not isCreature(cid) then return false end if getCreatureTarget(cid) >= 1 then return false end if isCreature(getWildNPCPokemon(cid)) then doMovePokeToPos(getWildNPCPokemon(cid), getThingPos(cid)) end local rangeX, rangeY = 7, 7 local spectators = getSpectators(getCreaturePosition(cid), rangeX, rangeY, false) if spectators then for _, spectator in ipairs(spectators) do if isPlayer(spectator) and getNPCNivel(cid) == getPlayerRankNivel(spectator) then setPlayerStorageValue(cid, 504, 1) doSetPokemonAgressiveToPlayer(cid, spectator) if #getCreatureSummons(spectator) > 0 then doMonsterSetTarget(cid, getCreatureSummons(spectator)[1]) else doMonsterSetTarget(cid, spectator) end if isWildTrainerNPC(cid) then local mySummon = tonumber(getPlayerStorageValue(cid, storages.WILDNPCMYSUMMON)) doSetPokemonAgressiveToPlayer(mySummon, spectator) end break else setPlayerStorageValue(cid, 504, 0) doPokemonSetNoTarget(cid) if getCreatureTarget(cid) <= 0 then local mySummon = tonumber(getPlayerStorageValue(cid, storages.WILDNPCMYSUMMON)) setPlayerStorageValue(mySummon, 504, 0) doPokemonSetNoTarget(mySummon) end end end end end function doPokemonSetNoTargets(cid) if not isCreature(cid) then return false end local name = getCreatureName(cid) local monsterT = doCreateMonsterNick(cid, name, name, getThingPos(cid), false) doRemoveCreature(cid) end ---- Base Pokemaster function isPokePassive(cid) if not isCreature(cid) then return false end if isWild(cid) and isInArray(passivepokemons, doCorrectString(getCreatureName(cid))) then return true end return false end function doSetPokemonAgressiveToPlayer(cid, target) if not isCreature(cid) or not isCreature(target) then return false end setPokemonPassive(cid, false) setPlayerStorageValue(cid, 505, getCreatureName(target)) if getCreatureTarget(cid) >= 1 then return false end if #getCreatureSummons(target) > 0 then doMonsterSetTarget(cid, getCreatureSummons(target)[1]) else doMonsterSetTarget(cid, target) end end function getPokemonAttackedPassive(cid) if not isCreature(cid) then return false end local stor = getPlayerStorageValue(cid, 505) if stor ~= 0 then return stor else return "" end end function setPokemonPassive(cid, passive) if not isCreature(cid) then return false end if passive then setPlayerStorageValue(cid, 504, 0) setPlayerStorageValue(cid, 505, 0) else setPlayerStorageValue(cid, 504, 1) end end function onWalkSetTargetPassive(cid) if not isCreature(cid) then return false end if getCreatureTarget(cid) >= 1 then return false end local rangeX, rangeY = 7, 7 local spectators = getSpectators(getCreaturePosition(cid), rangeX, rangeY, false) local attackerName = getPokemonAttackedPassive(cid) local playerID = getPlayerByName(attackerName) if not isCreature(playerID) then return false end if getCreatureTarget(cid) ~= playerID and attackerName ~= "" then return false end if spectators then for _, spectator in ipairs(spectators) do if isPlayer(spectator) and spectator ~= cid and (attackerName ~= "" and attackerName == getCreatureName(spectator)) and isWalkable(getThingPos(spectator), false, true, true, true) then setPlayerStorageValue(cid, 504, 1) if #getCreatureSummons(spectator) > 0 then doMonsterSetTarget(cid, getCreatureSummons(spectator)[1]) else doMonsterSetTarget(cid, spectator) end break else setPlayerStorageValue(cid, 504, 0) doPokemonSetNoTarget(cid) end end end end function doPokemonSetNoTargets(cid) if not isCreature(cid) then return false end local name = getCreatureName(cid) local monsterT = doCreateMonsterNick(cid, name, name, getThingPos(cid), false) doRemoveCreature(cid) end ---- Obs. Os Pokes não pegam a passiva! kkk porem queria saber qua la mais funcional para deixar ativa. Obs2. Desculpem se fiz algo errado! sou Meio novo aqui e tambem na area de script(brinquei bem antigamente na epoca da svke quando estavam começando a fazer modificações para poketibia)
  • Quem Está Navegando   0 membros estão online

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