-
Total de itens
20 -
Registro em
-
Última visita
Posts postados por wesquel
-
-
Olá ontem eu passei o dia desenvolvendo um sistema de Raid/Boss, parecido com um jogo que eu jogava, o sistema consiste em um Raid/Boss em que, quem da mais dano nele tem chances melhores de obter itens mais raros.
O sistema possui rank para os 3 players que deram mais dano ter chances de receber mais itens ou itens melhores que os players que deram dano em 4º lugar ou menos.
Obs: ( Nesse post eu cito (raid/boss) pois para min são as mesmas coisas, não sei se aqui pode ser diferente.)
O sistema possui 3 partes.
1 - Quando o Raid/Boss aparecer, vai manda mensagem para todo o servidor.
2 - Quando ele morre ele manda mensagem para o servidor falando quem matou e o dano que ele deu.
além da mensagem para o servidor (que somente quem deu mais dano aparece) todos os outros que deram algum dano no Raid/Boss aparece no chat sua posição, dano e loot's recebidos.
3 - A entrega dos loots, aqui eu coloquei para o 1º ganha 4 moedas diferentes do jogo
Todos os itens podem ser definido quantidade máxima e minima de drop.
(Usei um servidor de poketibia para os testes, mas o sistema funcionar em tibia normalmente.)O Sistema não estar 100% como eu queria, pois quero que abra uma janela no cliente quando o boss/raid morrer, mostrando os 10 players que deram mais dano, Com nick,
pokemone dano. -
17 horas atrás, nociam disse:
Nossa mano e difícil procurar na parte de programação? tem lá faz tempo.
Cara o de la nao funciona no meu da erro !
mais deixa eu to quase conseguindo adaptar pra o meu server .
-
-
Estou precisando muito do sistema de pokemons passivos e agressivos poderiam me passa como posso coloca ele ?
OBS : Tenho as Sourcers ! Versão 0.3.6 !
-
Oque mudou do 2.0 ?
-
-
o Xtibia re-abriu 10 de abril fui saber so 19 de maio :\ to mo felizao
-
Força Txu Espero que de certo e que Evolua não fique na modinha do PxG
-
Boa tarde.
Obviamente para ajudarmos, precisaríamos do script que está usando para saber onde está o erro.
Favor postar os scripts listados abaixo:
data/actions/scripts/goback.lua
data/lib/level system.lua
Lembre-se de postar com spoiler, por favor.
Fico aguardando.
Aki os Scripts
Goback.lua
[*spoiler]
[*/spoiler]
local EFFECTS = {--[OutfitID] = {Effect}["Magmar"] = 35,["Magmortar"] = 35,["Shiny Magmar"] = 35,["Jynx"] = 17, --alterado v2.5["Shiny Jynx"] = 17,["Mamoswine"] = 205,["Piloswine"] = 205, --alterado v2.8["Swinub"] = 205,}function onUse(cid, item, frompos, item2, topos)if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true endif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1 then --alterado v2.9 <<return trueendlocal ballName = getItemAttribute(item.uid, "poke")local btype = getPokeballType(item.itemid)local usando = pokeballs[btype].uselocal effect = pokeballs[btype].effectif not effect theneffect = 21endunLock(item.uid) --alterado v2.8if item.itemid == usando thenif getPlayerStorageValue(cid, 990) == 1 then -- GYMdoPlayerSendCancel(cid, "You can't return your pokemon during gym battles.")return trueendif #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then --alterado v2.6if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 thenBackTeam(cid)endendif #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 thendoPlayerSendCancel(cid, "You can't do that while is controling a mind")return true --alterado v2.5endif #getCreatureSummons(cid) <= 0 thenif isInArray(pokeballs[btype].all, item.itemid) thendoTransformItem(item.uid, pokeballs[btype].off)doItemSetAttribute(item.uid, "hp", 0)doPlayerSendCancel(cid, "This pokemon is fainted.")return trueendendlocal cd = getCD(item.uid, "blink", 30)if cd > 0 thensetCD(item.uid, "blink", 0)endlocal z = getCreatureSummons(cid)[1]if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) thenreturn trueenddoReturnPokemon(cid, z, item, effect)elseif item.itemid == pokeballs[btype].on thenif item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid thendoPlayerSendCancel(cid, "You must put your pokeball in the correct place!")return TRUEendlocal thishp = getItemAttribute(item.uid, "hp")if thishp <= 0 thenif isInArray(pokeballs[btype].all, item.itemid) thendoTransformItem(item.uid, pokeballs[btype].off)doItemSetAttribute(item.uid, "hp", 0)doPlayerSendCancel(cid, "This pokemon is fainted.")return trueendendlocal pokemon = getItemAttribute(item.uid, "poke")if not pokes[pokemon] thenreturn trueend----------------------- Sistema de nao poder carregar mais que 3 pokes lvl baixo e + q 1 poke de lvl medio/alto ---------------------------------if not isInArray({5, 6}, getPlayerGroupId(cid)) then --alterado v2.9 \/local balls = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)local low = {}local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"}if #balls >= 1 thenfor _, uid in ipairs(balls) dolocal nome = getItemAttribute(uid, "poke")if not isInArray(lowPokes, pokemon) and nome == pokemon thenreturn doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!")elseif nome == pokemon thentable.insert(low, nome)endendendendif #low >= 3 thenreturn doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry more than three pokemons equals of low level!")endend---------------------------------------------------------------------------------------------------------------------------------------------------local x = pokes[pokemon]local boosts = getItemAttribute(item.uid, "boost") or 0if getPlayerLevel(cid) + pokemonMaxLevelAbovePlayer < getItemAttribute(item.uid, "level") + boosts thendoPlayerSendCancel(cid, "Your pokemon's level is much higher than yours, you can't use him.")return trueenddoSummonMonster(cid, pokemon)local pk = getCreatureSummons(cid)[1]if not isCreature(pk) then return true end------------------------passiva hitmonchan------------------------------if isSummon(pk) then --alterado v2.8 \/if pokemon == "Shiny Hitmonchan" or pokemon == "Hitmonchan" thenif not getItemAttribute(item.uid, "hands") thendoSetItemAttribute(item.uid, "hands", 0)endlocal hands = getItemAttribute(item.uid, "hands")doSetCreatureOutfit(pk, {lookType = hitmonchans[pokemon][hands].out}, -1)endend----------------------------------------------------------------------------------movement magmar, jynx-------------if EFFECTS[getCreatureName(pk)] thenmarkPosEff(pk, getThingPos(pk))sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk)) --alterado v2.5end--------------------------------------------------------------------------if getCreatureName(pk) == "Ditto" thenlocal left = getItemAttribute(item.uid, "transLeft")local name = getItemAttribute(item.uid, "transName")if left and left > 0 thensetPlayerStorageValue(pk, 1010, name)doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))doItemSetAttribute(item.uid, "transBegin", os.clock())elsesetPlayerStorageValue(pk, 1010, "Ditto")endendif isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) enddoCreatureSetLookDir(pk, 2)adjustStatus(pk, item.uid, true, false, true)doAddPokemonInOwnList(cid, pokemon)doTransformItem(item.uid, item.itemid+1)local pokename = getPokeName(pk) --alterado v2.7local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)doCreatureSay(cid, mgo, TALKTYPE_SAY)doSendMagicEffect(getCreaturePosition(pk), effect)if useOTClient thendoPlayerSendCancel(cid, '12//,show') --alterado v2.7endelsedoPlayerSendCancel(cid, "This pokemon is fainted.")endif useKpdoDlls thendoUpdateMoves(cid)endreturn trueend[*/spoiler]e oLevel System.lua[*/spoiler]function getPokemonStatus(name, multiplier)local a = pokes[name]local m = 1if not a then return false endif not a.offense then return false endif multiplier then m = multiplier endlocal ret = {}ret.off = a.offense * mret.offense = ret.offret.def = a.defense * mret.defense = ret.defret.agi = a.agility * mret.agility = ret.agiret.spatk = a.specialattack * mret.specialattack = ret.spatkret.vit = a.vitality * mret.vitality = ret.vitreturn retendfunction getPokemonXMLOutfit(name) --alterado v2.9 \/local path = "data/monster/pokes/Shiny Kanto/"..name..".xml"local tpw = io.type(io.open(path))if not tpw thenpath = "data/monster/pokes/Nesil 2/"..name..".xml"tpw = io.type(io.open(path))endif not tpw thenpath = "data/monster/pokes/Nesil 1/"..name..".xml"tpw = io.type(io.open(path))endif not tpw thenpath = "data/monster/pokes/Nesil 3/"..name..".xml"tpw = io.type(io.open(path))endif not tpw thenpath = "data/monster/pokes/Nesil 4/"..name..".xml"tpw = io.type(io.open(path))endif not tpw thenpath = "data/monster/pokes/Nesil 5/"..name..".xml"tpw = io.type(io.open(path))endif not tpw thenpath = "data/monster/pokes/Novelty/"..name..".xml"tpw = io.type(io.open(path))endif not tpw thenpath = "data/monster/pokes/Shiny Hoenn/"..name..".xml"tpw = io.type(io.open(path))endif not tpw thenpath = "data/monster/pokes/Shiny Johto/"..name..".xml"tpw = io.type(io.open(path))endif not tpw thenpath = "data/monster/pokes/Shiny Sinnoh/"..name..".xml"tpw = io.type(io.open(path))endif not tpw thenpath = "data/monster/pokes/"..name..".xml"tpw = io.type(io.open(path))endif not tpw thenreturn print("[getPokemonXMLOutfit] Poke with name: "..name.." ins't in any paste on monster/pokes/") and 2endlocal arq = io.open(path, "a+")local txt = arq:read("*all")arq:close()local a, b = txt:find('look type="(.-)"')txt = string.sub(txt, a + 11, b - 1)return tonumber(txt)endfunction doEvolutionOutfit(cid, oldout, outfit)if not isCreature(cid) then return true endif getCreatureOutfit(cid).lookType == oldout thendoSetCreatureOutfit(cid, {lookType = outfit}, -1)elsedoSetCreatureOutfit(cid, {lookType = oldout}, -1)endendfunction doStartEvolution(cid, evolution, seconds)if not isCreature(cid) then return true endlocal a = getPlayerStorageValue(cid, 1007)local b = getCreatureHealth(cid) / getCreatureMaxHealth(cid)local d = getThingPos(cid)local e = getCreatureMaster(cid)if getHappinessRate(cid) < 1 then return true endlocal f = getCreatureOutfit(cid).lookTypelocal g = getItemAttribute(getPlayerSlotItem(e, 8).uid, "nick") or getCreatureName(cid)local h = getPokemonXMLOutfit(evolution)doItemSetAttribute(getPlayerSlotItem(e, 8).uid, "hp", b)doCreatureSay(e, "What? My "..g.." is evolving!", TALKTYPE_SAY)doSummonMonster(e, "Evolution")doReturnPokemon(e, cid, getPlayerSlotItem(e, 8), 0, true)local evo = getCreatureSummons(e)[1]doEvolutionOutfit(evo, h, f)doCreatureSetHideHealth(evo, true)doCreatureSetLookDir(evo, 2)setPlayerStorageValue(evo, 1007, g)doTeleportThing(evo, d, false)addEvent(sendSSJEffect, 250, evo)doSendAnimatedText(getThingPos(evo), "EVOLUTION", COLOR_GRASS)doSendEvolutionEffect(evo, getThingPos(evo), evolution, 20, false, false, f, h)endfunction doSendEvolutionEffect(cid, pos, evolution, turn, ssj, evolve, f, h)if not isCreature(cid) thendoSendAnimatedText(pos, "CANCEL", 215)return true endif evolve thendoEvolvePokemon(getCreatureMaster(cid), {uid = cid}, evolution, 0, 0)return trueenddoSendMagicEffect(pos, 18)if ssj thensendSSJEffect(evo)enddoEvolutionOutfit(cid, f, h)addEvent(doSendEvolutionEffect, math.pow(1900, turn/20), cid, getThingPos(cid), evolution, turn - 1, turn == 19, turn == 2, f, h)endfunction sendSSJEffect(cid)if not isCreature(cid) then return true endlocal pos1 = getThingPos(cid)local pos2 = getThingPos(cid)pos2.x = pos2.x + math.random(-1, 1)pos2.y = pos2.y - math.random(1, 2)doSendDistanceShoot(pos1, pos2, 37)addEvent(sendSSJEffect, 45, cid)endfunction sendFinishEvolutionEffect(cid, alternate)if not isCreature(cid) then return true endlocal pos1 = getThingPos(cid)if alternate thenlocal pos = {[1] = {-2, 0},[2] = {-1, -1},[3] = {0, -2},[4] = {1, -1},[5] = {2, 0},[6] = {1, 1},[7] = {0, 2},[8] = {-1, 1}}for a = 1, 8 dolocal pos2 = getThingPos(cid)pos2.x = pos2.x + pos[a][1]pos2.y = pos2.y + pos[a][2]local pos = getThingPos(cid)doSendDistanceShoot(pos2, pos, 37)addEvent(doSendDistanceShoot, 300, pos, pos2, 37)endelsefor a = 0, 3 dodoSendDistanceShoot(pos1, getPosByDir(pos1, a), 37)endfor a = 4, 7 doaddEvent(doSendDistanceShoot, 600, pos1, getPosByDir(pos1, a), 37)endendendfunction doEvolvePokemon(cid, item2, theevo, stone1, stone2)if not isCreature(cid) then return true endif not pokes[theevo] or not pokes[theevo].offense thendoReturnPokemon(cid, item2.uid, getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect, false, true)return trueendlocal owner = getCreatureMaster(item2.uid)local pokeball = getPlayerSlotItem(cid, 8)local description = "Contains a "..theevo.."."local pct = getCreatureHealth(item2.uid) / getCreatureMaxHealth(item2.uid)doItemSetAttribute(pokeball.uid, "hp", pct)doItemSetAttribute(pokeball.uid, "poke", theevo)doItemSetAttribute(pokeball.uid, "description", "Contains a "..theevo..".")doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getPokeName(item2.uid).." evolved into a "..theevo.."!")doSendMagicEffect(getThingPos(item2.uid), 18)doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[theevo])doSendMagicEffect(getThingPos(cid), 173)local oldpos = getThingPos(item2.uid)local oldlod = getCreatureLookDir(item2.uid)local oldlvl = getPokemonLevel(item2.uid)doRemoveCreature(item2.uid)doSummonMonster(cid, theevo)local pk = getCreatureSummons(cid)[1]doTeleportThing(pk, oldpos, false)doCreatureSetLookDir(pk, oldlod)sendFinishEvolutionEffect(pk, true)addEvent(sendFinishEvolutionEffect, 550, pk, true)addEvent(sendFinishEvolutionEffect, 1050, pk)doPlayerRemoveItem(cid, stone1, 1)doPlayerRemoveItem(cid, stone2, 1)doAddPokemonInOwnList(cid, theevo)local status = getPokemonStatus(getCreatureName(pk))local off = status.off * 7.5local def = status.def * 7.5local agi = status.agi * 7.5local spatk = status.spatk * 7.5local vit = status.vit * 7.5doItemSetAttribute(pokeball.uid, "offense", getItemAttribute(pokeball.uid, "offense") + off)doItemSetAttribute(pokeball.uid, "defense", getItemAttribute(pokeball.uid, "defense") + def)doItemSetAttribute(pokeball.uid, "speed", getItemAttribute(pokeball.uid, "speed") + agi)doItemSetAttribute(pokeball.uid, "specialattack", getItemAttribute(pokeball.uid, "specialattack") + spatk)doItemSetAttribute(pokeball.uid, "vitality", getItemAttribute(pokeball.uid, "vitality") + vit)doPlayerSendTextMessage(cid, 27, "Evolution bonus: • Offense: +"..doMathDecimal(off).." • Defense: +"..doMathDecimal(def).." • Spc. Atk: +"..doMathDecimal(spatk).." • Agility: +"..doMathDecimal(agi).." • Vitality: +"..doMathDecimal(vit).."")local happy = getItemAttribute(pokeball.uid, "happy")doItemSetAttribute(pokeball.uid, "happy", happy + happyGainedOnEvolution)if happy + happyGainedOnEvolution > 255 thendoItemSetAttribute(pokeball.uid, "happy", 255)endadjustStatus(pk, pokeball.uid, true, false)if useKpdoDlls thendoUpdateMoves(cid)endendfunction givePokemonExp(cid, item, expe, pct, rarecandy)if expe <= 0 or not isCreature(cid) then return true endlocal leveltable = getPokemonExperienceTable(getPokeballName(item.uid, true))if getItemAttribute(item.uid, "exp") + expe > leveltable[150] thengivePokemonExp(cid, item, leveltable[150] - getItemAttribute(item.uid, "exp"))return trueenddoItemSetAttribute(item.uid, "exp", getItemAttribute(item.uid, "exp") + expe)doItemSetAttribute(item.uid, "happy", getItemAttribute(item.uid, "happy") + 1)doItemSetAttribute(item.uid, "nextlevelexp", getItemAttribute(item.uid, "nextlevelexp") - expe)if pct thendoPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item.uid).." has received "..expe.." experience points ("..pct.."%).")elseif getItemAttribute(item.uid, "nextlevelexp") > 0 thendoPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item.uid).." ["..getItemAttribute(item.uid, "level").."] has received "..expe.." experience points ("..getItemAttribute(item.uid, "nextlevelexp").." to next level).")elsedoPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item.uid).." ["..getItemAttribute(item.uid, "level").."] has received "..expe.." experience points and has leveled up!")endendif isBeingUsed(item.itemid) thendoSendAnimatedText(getThingPos(getCreatureSummons(cid)[1]), expe, 215)endif getItemAttribute(item.uid, "nextlevelexp") <= 0 thenlocal summon = getCreatureSummons(cid)[1]if not isCreature(summon) then return true enddoSendFlareEffect(getThingPos(summon))doSendAnimatedText(getThingPos(summon), "Level up!", 215)doPlayerSendTextMessage(cid, 26, "sounds/Levelup.wav")adjustPokemonLevel(item.uid, cid, item.itemid)doCreatureAddHealth(summon, getCreatureMaxHealth(summon))endendfunction givePokemonExpInBp(cid, item, expe, ballid, pct, hidemessage)if expe <= 0 or not isCreature(cid) then return true endlocal leveltable = getPokemonExperienceTable(getPokeballName(item, true))if getItemAttribute(item, "exp") + expe > leveltable[150] thengivePokemonExpInBp(cid, item, leveltable[150] - getItemAttribute(item, "exp"), ballid)return trueenddoItemSetAttribute(item, "exp", getItemAttribute(item, "exp") + expe)doItemSetAttribute(item, "happy", getItemAttribute(item, "happy") + 1)doItemSetAttribute(item, "nextlevelexp", getItemAttribute(item, "nextlevelexp") - expe)if not hidemessage thenif pct thendoPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item).." has received "..expe.." experience points ("..pct.."%).")elseif getItemAttribute(item, "nextlevelexp") > 0 thendoPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item).." ["..getItemAttribute(item, "level").."] has received "..expe.." experience points inside his pokeball ("..getItemAttribute(item, "nextlevelexp").." to next level).")elsedoPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item).." ["..getItemAttribute(item, "level").."] has received "..expe.." experience points and has leveled up inside his pokeball.")adjustPokemonLevel(item, cid, ballid)endendendendfunction doMathDecimal(number, casas)if math.floor(number) == number then return number endlocal c = casas and casas + 1 or 3for a = 0, 10 doif math.floor(number) < math.pow(10, a) thenlocal str = string.sub(""..number.."", 1, a + c)return tonumber(str)endendreturn numberendfunction adjustPokemonLevel(item, cid, id, rarecandy)if not isCreature(cid) then return true endlocal exp = getItemAttribute(item, "exp")local level = getItemAttribute(item, "level")local leveltable = getPokemonExperienceTable(getPokeballName(item, true))local newlevel = 1for x = 1, 150 doif exp >= leveltable[x] and exp < leveltable[x+1] thennewlevel = xendendif newlevel <= 1 then return true endlocal levelsup = (newlevel - level)local pokemon = getItemAttribute(item, "poke")local happy = getItemAttribute(item, "happy")local rate = happy / happylocal newhappiness = happyif happy >= 250 thennewhappiness = 255elseif happy >= 230 thennewhappiness = happy + 4elseif happy >= 210 thennewhappiness = happy + 6elseif happy >= 180 thennewhappiness = happy + 8elseif happy >= 140 thennewhappiness = happy + 10elseif happy >= 110 thennewhappiness = happy + 12elsenewhappiness = happy + 15endlocal status = getPokemonStatus(pokemon)local off = status.off * rate * levelsuplocal def = status.def * rate * levelsuplocal agi = status.agi * rate * levelsuplocal spatk = status.spatk * rate * levelsuplocal vit = status.vit * rate * levelsupdoItemSetAttribute(item, "level", newlevel)if not rarecandy thendoItemSetAttribute(item, "happy", newhappiness)endlocal nextexp = leveltable[newlevel + 1] - expdoItemSetAttribute(item, "nextlevelexp", nextexp)doItemSetAttribute(item, "offense", getItemAttribute(item, "offense") + off)doItemSetAttribute(item, "defense", getItemAttribute(item, "defense") + def)doItemSetAttribute(item, "speed", getItemAttribute(item, "speed") + agi)doItemSetAttribute(item, "specialattack", getItemAttribute(item, "specialattack") + spatk)doItemSetAttribute(item, "vitality", getItemAttribute(item, "vitality") + vit)if newlevel > getPlayerLevel(cid) + pokemonMaxLevelAbovePlayer thenaddEvent(doPlayerSendTextMessage, 30, cid, 18, "Warning: Your "..getPokeballName(item).."'s ["..newlevel.."] level is much higher than yours, so you will not be able to call him to battles.")endif isCreature(cid) and id >= 1 and isBeingUsed(id) thenadjustStatus(getCreatureSummons(cid)[1], item, false, true)doPlayerSendTextMessage(cid, 27, "• Level: "..newlevel.." (+"..levelsup..") • Offense: +"..doMathDecimal(off).." • Defense: +"..doMathDecimal(def).." • Spc. Atk: +"..doMathDecimal(spatk).." • Agility: +"..doMathDecimal(agi).." • Vitality: +"..doMathDecimal(vit).."")if happy < minHappyToEvolve then return true endif pokemonsCanEvolveByLevel thenlocal summon = getCreatureSummons(cid)[1]local reqlevel = poevo[getCreatureName(summon)] and poevo[getCreatureName(summon)].level or -1local level = getItemAttribute(item, "level")local evolution = "none"local name = getCreatureName(summon)if name == "Tyrogue" and level >= 20 thenif getOffense(summon) == getDefense(summon) thenevolution = "Hitmontop"elseif getOffense(summon) > getDefense(summon) thenevolution = "Hitmonlee"elseevolution = "Hitmonchan"endelseif name == "Eevee" thenif happy >= maxHappyToEvolve thenif isDay() thenevolution = "Espeon"elseevolution = "Umbreon"endendelseif name == "Slowpoke" and level >= 28 thenevolution = "Slowbro"elseif name == "Poliwhirl" and level >= 36 thenevolution = "Poliwrath"elseif reqlevel > 4 and level >= reqlevel thenevolution = poevo[getCreatureName(summon)].evolutionelseif reqlevel == 2 and happy >= maxHappyToEvolve thenevolution = poevo[getCreatureName(summon)] and poevo[getCreatureName(summon)].evolution or "none"endif evolution ~= "none" thendoStartEvolution(summon, evolution, 4)endendendendfunction doAdjustWithDelay(cid, pk, health, vit, status)if isCreature(cid) then --alterado v2.5if not isCreature(cid) then return true endadjustStatus(pk, getPlayerSlotItem(cid, 8).uid, health, vir, status)endendfunction adjustStatus(pk, item, health, vite, conditions)if not isCreature(pk) then return true endlocal bonusoffense = getItemAttribute(item, boffense) or 0local bonusdefense = getItemAttribute(item, bdefense) or 0local bonusagility = getItemAttribute(item, bagility) or 0local bonussattack = getItemAttribute(item, bsattack) or 0setPlayerStorageValue(pk, 1000, getItemAttribute(item, "level"))setPlayerStorageValue(pk, 1001, getItemAttribute(item, "offense") + bonusoffense)setPlayerStorageValue(pk, 1002, getItemAttribute(item, "defense") + bonusdefense)setPlayerStorageValue(pk, 1003, getItemAttribute(item, "speed") + bonusagility)setPlayerStorageValue(pk, 1005, getItemAttribute(item, "specialattack") + bonussattack)local gender = getItemAttribute(item, "gender") and getItemAttribute(item, "gender") or 0doCreatureSetSkullType(pk, gender)if vite == true thenlocal pct = getCreatureHealth(pk) / getCreatureMaxHealth(pk)local vit = getItemAttribute(item, "vitality") - getPlayerStorageValue(pk, 1004)setCreatureMaxHealth(pk, getCreatureMaxHealth(pk) + ( vit * HPperVIT ))doCreatureAddHealth(pk, pct * vit * HPperVIT)endsetPlayerStorageValue(pk, 1004, getItemAttribute(item, "vitality"))doRegainSpeed(pk)local nick = getItemAttribute(item, "poke")if string.find(tostring(nick), "Shiny") thennick = tostring(nick):match("(Shiny .*)")endif getItemAttribute(item, "nick") thennick = getItemAttribute(item, "nick")endsetPlayerStorageValue(pk, 1007, nick)local boostlevel = getItemAttribute(item, "boost") or 0local boostshow = hideBoost and "]" or " + "..boostlevel.."]"local lvlstr = ""if showBoostSeparated thenboostshow = hideBoost and "]" or "] [+"..boostlevel.."]"endif hideSummonsLevel thenif not hideBoost thennick = nick.." [+"..boostlevel.."]"endelsenick = nick.." ["..getItemAttribute(item, "level")..""..boostshow..""enddoCreatureSetNick(pk, nick)if not getItemAttribute(item, "happy") thendoItemSetAttribute(item, "happy", 120)endif not getItemAttribute(item, "hunger") thendoItemSetAttribute(item, "hunger", 5)endlocal happy = getItemAttribute(item, "happy")if happy < 0 thenhappy = 1endsetPlayerStorageValue(pk, 1008, happy)local hunger = getItemAttribute(item, "hunger")setPlayerStorageValue(pk, 1009, hunger)if health == true thenlocal mh = getCreatureMaxHealth(pk) + HPperVIT * getVitality(pk)local rd = 1 - (tonumber(getItemAttribute(item, "hp")))setCreatureMaxHealth(pk, mh)doCreatureAddHealth(pk, getCreatureMaxHealth(pk))doCreatureAddHealth(pk, -(getCreatureMaxHealth(pk) * rd))endif isSummon(pk) and conditions then --alterado v2.5 daki pra baixo!!local burn = getItemAttribute(item, "burn")if burn and burn >= 0 thenlocal ret = {id = pk, cd = burn, check = false, damage = getItemAttribute(item, "burndmg"), cond = "Burn"}addEvent(doCondition2, 3500, ret)endlocal poison = getItemAttribute(item, "poison")if poison and poison >= 0 thenlocal ret = {id = pk, cd = poison, check = false, damage = getItemAttribute(item, "poisondmg"), cond = "Poison"}addEvent(doCondition2, 1500, ret)endlocal confuse = getItemAttribute(item, "confuse")if confuse and confuse >= 0 thenlocal ret = {id = pk, cd = confuse, check = false, cond = "Confusion"}addEvent(doCondition2, 1200, ret) --alterado v2.5endlocal sleep = getItemAttribute(item, "sleep")if sleep and sleep >= 0 thenlocal ret = {id = pk, cd = sleep, check = false, first = true, cond = "Sleep"}doCondition2(ret)endlocal miss = getItemAttribute(item, "miss")if miss and miss >= 0 thenlocal ret = {id = pk, cd = miss, eff = getItemAttribute(item, "missEff"), check = false, spell = getItemAttribute(item, "missSpell"), cond = "Miss"}doCondition2(ret)endlocal fear = getItemAttribute(item, "fear")if fear and fear >= 0 thenlocal ret = {id = pk, cd = fear, check = false, skill = getItemAttribute(item, "fearSkill"), cond = "Fear"}doCondition2(ret)endlocal silence = getItemAttribute(item, "silence")if silence and silence >= 0 thenlocal ret = {id = pk, cd = silence, eff = getItemAttribute(item, "silenceEff"), check = false, cond = "Silence"}doCondition2(ret)endlocal stun = getItemAttribute(item, "stun")if stun and stun >= 0 thenlocal ret = {id = pk, cd = stun, eff = getItemAttribute(item, "stunEff"), check = false, spell = getItemAttribute(item, "stunSpell"), cond = "Stun"}doCondition2(ret)endlocal paralyze = getItemAttribute(item, "paralyze")if paralyze and paralyze >= 0 thenlocal ret = {id = pk, cd = paralyze, eff = getItemAttribute(item, "paralyzeEff"), check = false, first = true, cond = "Paralyze"}doCondition2(ret)endlocal slow = getItemAttribute(item, "slow")if slow and slow >= 0 thenlocal ret = {id = pk, cd = slow, eff = getItemAttribute(item, "slowEff"), check = false, first = true, cond = "Slow"}doCondition2(ret)endlocal leech = getItemAttribute(item, "leech")if leech and leech >= 0 thenlocal ret = {id = pk, cd = leech, attacker = 0, check = false, damage = getItemAttribute(item, "leechdmg"), cond = "Leech"}doCondition2(ret)endfor i = 1, 3 dolocal buff = getItemAttribute(item, "Buff"..i)if buff and buff >= 0 thenlocal ret = {id = pk, cd = buff, eff = getItemAttribute(item, "Buff"..i.."eff"), check = false,buff = getItemAttribute(item, "Buff"..i.."skill"), first = true, attr = "Buff"..i}doCondition2(ret)endendend--alterado v2.9if getItemAttribute(item, "boost") and getItemAttribute(item, "boost") >= 50 and getItemAttribute(item, "aura") thensendAuraEffect(pk, auraSyst[getItemAttribute(item, "aura")])endif getPlayerStorageValue(getCreatureMaster(pk), 6598754) >= 1 thensetPlayerStorageValue(pk, 6598754, 1)elseif getPlayerStorageValue(getCreatureMaster(pk), 6598755) >= 1 thensetPlayerStorageValue(pk, 6598755, 1)endreturn trueendfunction setWildPokemonLevel(cid, optionalLevel, optionalStatus, optionalNick, optionalExtraExp)if not isCreature(cid) then return true endif not pokes[getCreatureName(cid)] then return true end --alterado v2.6local levelRange = 0local off = 0local def = 0local agi = 0local spatk = 0local vit = 0local this = getCreatureName(cid)local ee = 1if optionalExtraExp thenee = optionalExtraExpendif optionalLevel and tonumber(optionalLevel) >= 1 then --alterado v2.8\/levelRange = optionalLevelelselevelRange = math.random(pokes[this].wildLvlMin, pokes[this].wildLvlMax)endlocal status = getPokemonStatus(this)if status thenoff = status.offdef = status.defagi = status.agivit = status.vitspatk = status.spatkendsetPlayerStorageValue(cid, 1000, (levelRange > 150 and 150 or levelRange)) --alterado v2.8if optionalStatus and optionalStatus.off thensetPlayerStorageValue(cid, 1001, optionalStatus.offense)setPlayerStorageValue(cid, 1002, optionalStatus.defense)setPlayerStorageValue(cid, 1003, optionalStatus.agility)setPlayerStorageValue(cid, 1004, optionalStatus.vitality)setPlayerStorageValue(cid, 1005, optionalStatus.specialattack)setPlayerStorageValue(cid, 1011, optionalStatus.offense)setPlayerStorageValue(cid, 1012, optionalStatus.defense)setPlayerStorageValue(cid, 1013, optionalStatus.agility)setPlayerStorageValue(cid, 1014, optionalStatus.vitality)setPlayerStorageValue(cid, 1015, optionalStatus.specialattack)elsesetPlayerStorageValue(cid, 1001, 5 + math.random(off * levelRange * 0.9, off * levelRange * 1.8))setPlayerStorageValue(cid, 1002, 5 + math.random(def * levelRange * 0.9, def * levelRange * 1.8))setPlayerStorageValue(cid, 1003, math.random(agi * levelRange * 0.9, agi * levelRange * 1.8))setPlayerStorageValue(cid, 1004, math.random(vit * levelRange * 0.9, vit * levelRange * 1.8))setPlayerStorageValue(cid, 1005, 5 + math.random(spatk * levelRange * 0.9, spatk * levelRange * 1.8))setPlayerStorageValue(cid, 1011, getPlayerStorageValue(cid, 1001))setPlayerStorageValue(cid, 1012, getPlayerStorageValue(cid, 1002))setPlayerStorageValue(cid, 1013, getPlayerStorageValue(cid, 1003))setPlayerStorageValue(cid, 1014, getPlayerStorageValue(cid, 1004))setPlayerStorageValue(cid, 1015, getPlayerStorageValue(cid, 1005))enddoRegainSpeed(cid)setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + getPlayerStorageValue(cid, 1004) * HPperVIT * vitReductionForWild)doCreatureAddHealth(cid, getCreatureMaxHealth(cid))if pokes[getCreatureName(cid)].exp then--getMonsterInfo(getCreatureName(cid)).experiencelocal exp = (50 + pokes[getCreatureName(cid)].exp) * baseExpRate + pokes[getCreatureName(cid)].vitality * levelRange * pokemonExpPerLevelRatesetPlayerStorageValue(cid, 1006, exp * generalExpRate * ee)if getPlayerStorageValue(cid, 22546) == 1 thensetPlayerStorageValue(cid, 1006, 750)doSetCreatureDropLoot(cid, false) --edited golden arenaendendlocal wildshow = wildBeforeNames and "Wild " or ""if optionalNick thenif hideWildsLevel thendoCreatureSetNick(cid, optionalNick)elsedoCreatureSetNick(cid, optionalNick.." ["..getWildPokemonLevel(cid).."]")endelseif hideWildsLevel thendoCreatureSetNick(cid, ""..wildshow..""..getCreatureName(cid).."")elsedoCreatureSetNick(cid, ""..wildshow..""..getCreatureName(cid).." ["..getWildPokemonLevel(cid).."]")endendendfunction getOffenseInRage(cid) --alterado v2.8if not isCreature(cid) then return 0 endif getPlayerStorageValue(cid, 547888) >= 1 thenreturn tonumber(getPlayerStorageValue(cid, 1001)) / 2endreturn tonumber(getPlayerStorageValue(cid, 1001))endfunction getOffense(cid)if not isCreature(cid) then return 0 end--[[if getPlayerStorageValue(cid, 3894) >= 1 thenreturn tonumber(getPlayerStorageValue(cid, 1001)) / 2end ]]return tonumber(getPlayerStorageValue(cid, 1001))endfunction getDefense(cid)if not isCreature(cid) then return 0 end--[[ if getPlayerStorageValue(cid, 3894) >= 1 thenreturn tonumber(getPlayerStorageValue(cid, 1002)) / 2end ]]return tonumber(getPlayerStorageValue(cid, 1002))endfunction getSpeed(cid)if not isCreature(cid) then return 0 endreturn tonumber(getPlayerStorageValue(cid, 1003))endfunction getVitality(cid)if not isCreature(cid) then return 0 endreturn tonumber(getPlayerStorageValue(cid, 1004))endfunction getSpecialAttack(cid)if not isCreature(cid) then return 0 endreturn tonumber(getPlayerStorageValue(cid, 1005))endfunction getHappiness(cid)if not isCreature(cid) then return 0 endreturn tonumber(getPlayerStorageValue(cid, 1008))endfunction getSpecialDefense(cid)if not isCreature(cid) then return 0 endreturn getSpecialAttack(cid) * 0.85 + getDefense(cid) * 0.2endfunction getWildPokemonExp(cid)return getPlayerStorageValue(cid, 1006)endfunction getWildPokemonLevel(cid)return getPlayerStorageValue(cid, 1000)endfunction getLevel(cid)if isSummon(cid) thenreturn getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "level")endreturn getPlayerStorageValue(cid, 1000)endfunction getPokeName(cid)if not isSummon(cid) then return getCreatureName(cid) endif getCreatureName(cid) == "Evolution" then return getPlayerStorageValue(cid, 1007) endlocal item = getPlayerSlotItem(getCreatureMaster(cid), 8)if getItemAttribute(item.uid, "nick") then --alterado v2.7return getItemAttribute(item.uid, "nick")endif string.find(tostring(getCreatureName(cid)), "Shiny") thenlocal newName = tostring(getCreatureName(cid)):match("(Shiny .*)")return newNameendreturn getCreatureName(cid)endfunction getPokeballName(item, truename)if not truename and getItemAttribute(item, "nick") thenreturn getItemAttribute(item, "nick")endreturn getItemAttribute(item, "poke")endfunction getPokemonName(cid)return getCreatureName(cid)endfunction getMasterLevel(poke)if not isSummon(poke) then return 0 endreturn getPlayerLevel(getCreatureMaster(poke)) --alterado v2.5endfunction getPokeballBoost(ball)if not isPokeball(ball.itemid) then return 0 end --alterado v2.8return getItemAttribute(ball.uid, "boost") or 0endfunction getPokemonBoost(poke)if not isSummon(poke) then return 0 end --alterado v2.5return getItemAttribute(getPlayerSlotItem(getCreatureMaster(poke), 8).uid, "boost") or 0endfunction getPokemonLevelByName(name)return pokes[name] and pokes[name].level or 0 --alterado v2.9endfunction getPokemonLevel(cid)if not isCreature(cid) then return 0 endreturn getPlayerStorageValue(cid, 1000)endfunction getPokemonGender(cid)return getCreatureSkullType(cid)endfunction setPokemonGender(cid, gender)if isCreature(cid) and gender then --alterado v2.8doCreatureSetSkullType(cid, gender)return trueendreturn falseend[*/spoiler] -
Galera eu baixei o server do Gabriel stux o PGalaxy, e elle veio sem a accout maneger ae eu criei ella, criei tudo, a onde ella vai para pega os pokemons, mais quando clica no bau vem o pokemon ,mais quando clica nelle elle nao sei, e tem vezes que sai mais se fica clicando vai saindo mais e ,quando clica no bau pode clica nos 3 que vao vindo pokemons , e quando clica no bau nao vem os intens como pokeballs,revives,hds.
Da esse erro no pokemon quando elle fica sasindo se clica varias vezes
[15/04/2014 16:22:31] [Error - Action Interface]
[15/04/2014 16:22:31] data/actions/scripts/goback.lua:onUse[15/04/2014 16:22:31] Description:[15/04/2014 16:22:31] data/lib/level system.lua:469: attempt to perform arithmetic on a nil value[15/04/2014 16:22:31] stack traceback:[15/04/2014 16:22:31] data/lib/level system.lua:469: in function 'adjustStatus'[15/04/2014 16:22:31] data/actions/scripts/goback.lua:164: in function <data/actions/scripts/goback.lua:13>ajuda ae galera dou REP++++++++++++++++++++
-
Eu Tava Adicionando Pokemons No Configuration na Pasta Lib Ae quando fui abri o server dnv Olha o erro que deu
Erro:
[Erro - CreatureScript Interface]
Data/CreatureScripts/Scripts/Spawn.lua:onSpawn
Description:Data/CreatureScripts/Scripts/Spawn.lua:77: attempt to call global 'isSummon' (a nil value)Stack TraceBack:Data/creaturescripts/scripts/spawn:77: in function <Data/creaturescripts/scripts/spawn.lua:77>Ajudem Dou Rep+++
-
Save:
local config = { broadcast = {120, 30}, flags = 13, delay = 120, events = 30 } local function executeSave(seconds) if(isInArray(config.broadcast, seconds)) then doBroadcastMessage("Server save within " .. seconds .. " seconds, please mind it may freeze!") end if(seconds > 0) then addEvent(executeSave, config.events * 1000, seconds - config.events) else doSaveServer(config.flags) end end function onThink(interval) if(table.maxn(config.broadcast) == 0) then doSaveServer(config.flags) else executeSave(config.delay) end return true end
Clean:
function executeClean(interval) doCleanMap() doBroadcastMessage("Game map cleaned, next clean in " .. table.concat(string.timediff(interval / 1000)) .. ".") return true end function onThink(interval) doBroadcastMessage("Game map cleaning within 30 seconds, please pick up your items!") addEvent(executeClean, 30000, interval) return true end
Vou Ver Se Funfa Aki
-
Segue o Clean.lua
local config = {broadcast = {120, 30},shallow = "no",delay = 120,events = 30}config.shallow = getBooleanFromString(config.shallow)local function executeSave(seconds)if(isInArray(config.broadcast, seconds)) thenlocal text = ""if(not config.shallow) thentext = "Full s"elsetext = "S"endtext = text .. "erver save within " .. seconds .. " seconds, please mind it may freeze!"doBroadcastMessage(text)endif(seconds > 0) thenaddEvent(executeSave, config.events * 1000, seconds - config.events)elsedoSaveServer(config.shallow)endendfunction onThink(interval, lastExecution, thinkInterval)if(table.maxn(config.broadcast) == 0) thendoSaveServer(config.shallow)elseexecuteSave(config.delay)endreturn trueendE o Gameclean.luafunction executeClean()doCleanMap()doBroadcastMessage("Game map cleaned, next clean in 2 hours.")return trueendfunction onThink(interval, lastExecution, thinkInterval)doBroadcastMessage("Game map cleaning within 30 seconds, please pick up your items!")addEvent(executeClean, 30000)return trueendMan o seu e iqual ao o meu so que ingles
-
Posta seu clean map aqui.
aki man
function executeClean()doCleanMap()doBroadcastMessage("O mapa sera limpo daqui a 2 horas novamente.")return trueendfunction onThink(interval, lastExecution, thinkInterval)doBroadcastMessage("O mapa sera limpo em 30 segundos por favor pegue seus itens.")addEvent(executeClean, 30000)return trueend -
-
Cara nao pode ser isso pq tentei com o do mysterio serve e tbm sumiu
-
Vou falar sinceramente esta mt ruim
Estou Tentando Melhora Sou Novo Nao Sei Completamente Tudo Estamos Aki Para Aprender
-
-
Iaew Galera Da Xtibia , Venho Trazer Um Cp De Saffro Que Eu Fiz Por Enquanto So Fiz o Cp Rapido Aki
Mais Ja Estou Preparando um Mapa Completo Vim Ver Oque Voçes Acham delle ! Sou Novo Por Isso Quero Sabe A Opinião De vocês Viciados em Tibia e Poketibia etc...
Obrigado Galera Espero Que Tenham Gostado (Comente Oque Eu Posso Melhora Sou Novo)
Dawnload: www.mediafire.com/download/i9bd9o1v0w2af8c/CpDeSaffron1.otbm
By:
Wesquel -
Olha Nada Melhor que Uma Video-aula para aprender Isso e Esse Video foi feito Pelo Proprio dono do server que você que adicionar os Pokemon
http://www.xtibia.com/forum/topic/210838-video-aula-completa-como-add-novos-pokemons-no-pda/
Obrigado Ajudou Muito Msm
-
como Adiciono Pokemon A Um Poketibia ? Servidor [Gabrielstux 3.2]
-
iaew galera entra meu ot pokemon ae vala o site ae emplikando tudo http://pokemoncrazzyy.weebly.com
-
iaew galera entra meu ot pokemon ae vala o site ae emplikando tudo http://pokemoncrazzyy.weebly.com
-
iaew galera entra meu ot pokemon ae vala o site ae emplikando tudo http://pokemoncrazzyy.weebly.com
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
[SHOW OFF] Raid/Boss Rank System by: wesquel
em CreatureScripts e Movements
Postado
Vlw, já fiz outros sistemas aqui se eu tiver tempo eu posto :D