-
Total de itens
116 -
Registro em
-
Última visita
-
Dias Ganhos
5
Tudo que GniusP postou
-
Galera preciso de uma script que o player so pode pegar o bau a cada 1 hora(ele pode pegar mais de uma vez porém tem que esperar a cada 1 hora pra poder pegar novamente!
-
deu erro, mais eu queria que eu colocasse os dano, e não fosse entre 10% a 60% por exemplo Eu gostaria que ele tomasse apenas 10% ou 20% então ele tomaria só um desses dois dano e não um dano entre 10% a 20% Mas mesmo assim ja dei rep+
-
Galera estou com um problema, eu estou com uma script que ela da x porcento de dano ao pisar em cima do piso, gostaria de saber como faço esse dano ficar aleatorio Por exemplo Gostaria que eu conseguisse colocar os dano nas pessoas Por exemplo: Pisou e tirou 50% de vida, pisou e tirou 60%, pisou e tirou 20% No caso acho que seria o math.random mais infelizmente não consegui. Aqui esta o script que estou usando function onStepIn(cid, item, position, fromPosition) local percent = 30 if not isPlayer(cid) then return true end local hp = (percent*getCreatureMaxHealth(cid) doSendMagicEffect(getThingPos(cid),6) doSendAnimatedText(getCreaturePosition(cid), "- "..hp, TEXTCOLOR_LIGHTBLUE) doCreatureAddHealth(cid, -hp) return true end
-
Base otpokemon revolution.
-
Olá pessoal do TK, procurei muitos e muitos tópicos e não consegui resolver meu caso. Eu quero que um NPC de ginásio possa batalhar com o player etc Os padrão das maioria dos servidores vem bugado, tentei adicionar as função na source mais não obtive sucesso. Caso alguém consiga me ajudar passando as função da source ou me passando uma script sem erro de ginasio ficarei grato de mais. Erro que da no script do npc [15/08/2018 17:49:23] [Error - Npc interface] [15/08/2018 17:49:23] In a timer event called from: [15/08/2018 17:49:23] datapack/npc/scripts/sabrina.lua:onCreatureSay [15/08/2018 17:49:23] Description: [15/08/2018 17:49:23] datapack/npc/scripts/sabrina.lua:34: attempt to call global 'doSetMonsterGym' (a nil value) [15/08/2018 17:49:23] stack traceback: [15/08/2018 17:49:23] datapack/npc/scripts/sabrina.lua:34: in function <datapack/npc/scripts/sabrina.lua:20>
-
[Encerrado] COMO POR PRA POKEBAR NÃO REMOVER A ADDON DO POKEMON
tópico respondeu ao GniusP de GniusP em Tópicos Sem Resposta
Podem fechar o tópico, eu ja consegui arrumar. Vou te da um REP+ Só por tentar ajudar. -
[Encerrado] COMO POR PRA POKEBAR NÃO REMOVER A ADDON DO POKEMON
tópico respondeu ao GniusP de GniusP em Tópicos Sem Resposta
Não foi. -
[Encerrado] COMO POR PRA POKEBAR NÃO REMOVER A ADDON DO POKEMON
tópico respondeu ao GniusP de GniusP em Tópicos Sem Resposta
Goback.lua local EFFECTS = { --[OutfitID] = {Effect} ["Magmar"] = 35, ["Jynx"] = 17, --alterado v1.5 ["Shiny Jynx"] = 17, ["Piloswine"] = 205, --alterado v1.8 ["Swinub"] = 205, } function onUse(cid, item, frompos, item2, topos) sendAllPokemonsBarPoke(cid) if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1 then --alterado v1.9 << return true end local ballName = getItemAttribute(item.uid, "poke") local btype = getPokeballType(item.itemid) local usando = pokeballs[btype].use local effect = pokeballs[btype].effect if not effect then effect = 21 end unLock(item.uid) --alterado v1.8 if item.itemid == usando then if getPlayerStorageValue(cid, 990) == 1 then -- GYM doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.") return true end if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then --alterado v1.6 if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then BackTeam(cid) end end if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then doPlayerSendCancel(cid, "You can't do that while is controling a mind") return true --alterado v1.5 end if #getCreatureSummons(cid) <= 0 then if isInArray(pokeballs[btype].all, item.itemid) then doTransformItem(item.uid, pokeballs[btype].off) doItemSetAttribute(item.uid, "hp", 0) doPlayerSendCancel(cid, "This pokemon is fainted.") return true end end local cd = getCD(item.uid, "blink", 30) if cd > 0 then setCD(item.uid, "blink", 0) end local z = getCreatureSummons(cid)[1] if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then return true end doReturnPokemon(cid, z, item, effect) elseif item.itemid == pokeballs[btype].on then if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then doPlayerSendCancel(cid, "You must put your pokeball in the correct place!") return true end local thishp = getItemAttribute(item.uid, "hp") if getItemAttribute(item.uid, "hp") == 0 then if isInArray(pokeballs[btype].all, item.itemid) then doTransformItem(item.uid, pokeballs[btype].off) doItemSetAttribute(item.uid, "hp", 0) doPlayerSendCancel(cid, "This pokemon is fainted.") return true end end local pokemon = getItemAttribute(item.uid, "poke") if not pokes[pokemon] then return true end local x = pokes[pokemon] local boost = getItemAttribute(item.uid, "boost") or 0 if getPlayerLevel(cid) < (x.level) then doPlayerSendCancel(cid, "You need level "..(x.level).." to use this pokemon.") return true end local pk = getCreatureSummons(cid)[1] doSummonMonster(cid, pokemon) doItemSetAttribute(item.uid, "pokeballusada", 0) local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then return true end if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited local left = getItemAttribute(item.uid, "transLeft") local name = getItemAttribute(item.uid, "transName") if left and left > 0 then setPlayerStorageValue(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()) else setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto") --edited end end if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end doCreatureSetLookDir(pk, 2) doCreatureSetNick(pk, nick) adjustStatus(pk, item.uid, true, true, true) doAddPokemonInOwnList(cid, pokemon) doTransformItem(item.uid, item.itemid+1) local pokename = getPokeName(pk) --alterado v1.7 if getPlayerLanguage(cid) == 2 then local mgoen = gobackmsgsen[math.random(1, #gobackmsgsen)].go:gsub("doka", pokename) doCreatureSay(cid, mgoen, 19) elseif getPlayerLanguage(cid) == 0 then local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename) doCreatureSay(cid, mgo, 19) elseif getPlayerLanguage(cid) == 1 then local mgoes = gobackmsgses[math.random(1, #gobackmsgses)].go:gsub("doka", pokename) doCreatureSay(cid, mgoes, 19) end -- doItemSetAttribute(item.uid, "gender", math.random(3, 4)) doSendMagicEffect(getCreaturePosition(pk), effect) if useOTClient then doPlayerSendCancel(cid, '12//,show') --alterado v1.7 end local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getAddonValue(pb, "addon") if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) end else doPlayerSendCancel(cid, "This pokemon is fainted.") end if useKpdoDlls then doUpdateMoves(cid) end return true end addon.lua -
[Encerrado] COMO POR PRA POKEBAR NÃO REMOVER A ADDON DO POKEMON
tópico respondeu ao GniusP de GniusP em Tópicos Sem Resposta
Ainda continua a mesma coisa, mais esqueci de explicar uma coisa Assim que você usa o pokemon pela pokebar o pokemon sai com addon normalmente, mais só remove a addon assim que eu troco de pokemon pela pokebar Por exemplo: To com 1 blastoise e ele ta usando 1 addon, ai eu vou e uso ele(a addon dele sai normal) ai quando eu uso outro pokemon pela pokebar a addon do blastoise some. -
[Encerrado] COMO POR PRA POKEBAR NÃO REMOVER A ADDON DO POKEMON
um tópico no fórum postou GniusP Tópicos Sem Resposta
Olá pessoal, quando eu uso um pokemon pela pokebar, ela remove a addon do pokemon Script function createBallByStatus(cid, status, id) slot = getPlayerSlotItem(cid, 8) if slot.uid == 0 then item = doPlayerAddItem(cid, id) else item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, id, 1) end setStatusPokeballByStatusStr(item, status) end function getPokemonByName(cid, pokemon) local arraypoke = {} local container = getPlayerSlotItem(cid, 3).uid local pokeballs = getPokeballsInContainer(container) for i =1, #pokeballs do name = getItemAttribute(pokeballs[i], "poke") if pokemon == name then table.insert(arraypoke, pokeballs[i]) return arraypoke[1] end end return false end function tranfBallInShiny(pokeball) doItemSetAttribute(pokeball, "shiny", "shiny") return true end function getShinyByPokeball(pokeball) local shiny = getItemAttribute(pokeball, "shiny") return shiny == "shiny" and true or false end function getShinyNameByPokeball(pokeball) local shiny = getItemAttribute(pokeball, "shiny") return shiny and "Shiny "..getItemAttribute(pokeball, "poke").."" or getItemAttribute(pokeball, "poke") end function setStatusPokeballByStatusStr(pokeball, status) local attr = string.explode(status, ",") local x = {"poke", "hp", "offense", "defense", "speed", "vitality", "specialattack", "happy", "gender", "hands", "description", "fakedesc", "boost", "ball", "defeated", "shiny", "level"} for i =1, #attr do doItemSetAttribute(pokeball, x[i], attr[i]) end end function copieAllStatusBalls(pokeball) local x = {"poke", "hp", "offense", "defense", "speed", "vitality", "specialattack", "happy", "gender", "hands", "description", "fakedesc", "boost", "ball", "defeated", "shiny", "level"} str = "" sep = "," for i =1, #x do local attr = getItemAttribute(pokeball, x[i]) or 0 local t = attr ..sep str = str..t end return str end function atualizaPokes(cid) local item = getPlayerSlotItem(cid, 8) if item.uid <= 0 then return true end if not getItemAttribute(item.uid, "poke") then return true end for i, x in pairs(fotos) do if string.lower(getItemAttribute(item.uid, "poke")) == string.lower(i) then doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[i]) if useOTClient then doPlayerSendCancel(cid, '12//,show') end if useKpdoDlls then useOTClient = true useKpdoDlls = true doUpdateMoves(cid) end end end end function doSendPokemon(cid, pokemon) if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1 then --alterado v1.9 << return true end if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then --alterado v1.6 if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then BackTeam(cid) end end if #getCreatureSummons(cid) > 0 then t = getPlayerSlotItem(cid, 8) local btype = getPokeballType(t.itemid) local effect = pokeballs[btype].effect or 21 doReturnPokemon(cid, getCreatureSummons(cid)[1], t,effect) end t = getPlayerSlotItem(cid, 8) if t.uid ~= 0 then pokeslot = getItemAttribute(t.uid, "poke") if pokeslot == pokemon then t = getPlayerSlotItem(cid, 8) doGoPokemon(cid, t) atualizaPokes(cid) return true end if getPokemonByName(cid, pokemon) then local poke = getPokemonByName(cid, pokemon) local attr = copieAllStatusBalls(t.uid) local id = t.itemid doRemoveItem(t.uid) local attr2 = copieAllStatusBalls(poke) local id2 = getThing(poke).itemid doRemoveItem(getPokemonByName(cid, pokemon)) createBallByStatus(cid, attr2, id2) createBallByStatus(cid, attr, id) t = getPlayerSlotItem(cid, 8) doGoPokemon(cid, t) atualizaPokes(cid) return true end end if getPokemonByName(cid, pokemon) then local id = getThing(getPokemonByName(cid, pokemon)).itemid local attr = copieAllStatusBalls(getPokemonByName(cid, pokemon)) doRemoveItem(getPokemonByName(cid, pokemon)) createBallByStatus(cid, attr, id) t = getPlayerSlotItem(cid, 8) doGoPokemon(cid, t) atualizaPokes(cid) return true end return false end function sendPokeInfo(cid) local activeimg = true local poke = getPlayerSlotItem(cid, 8) local pokeslot = getItemAttribute(poke.uid, "poke") local pokeboost = getItemAttribute(poke.uid, "boost") or 0 local pokehappy = getPlayerStorageValue(getCreatureSummons(cid)[1], 1008) or 1 doPlayerSendCancel(cid, "NewInfo/"..pokeslot.."/"..pokeboost.."/"..pokehappy.."") if activeimg then local img = "ShowPoke/" doPlayerSendCancel(cid, img..pokeslot) end end function sendAudio(cid, audio) local function getSpectatorsFromArea(fromPosition, toPosition, multifloor) local lenght = ((math.max(fromPosition.x, toPosition.x) - math.min(fromPosition.x, toPosition.x)) * 0.5) + 1 local width = ((math.max(fromPosition.y, toPosition.y) - math.min(fromPosition.y, toPosition.y)) * 0.5) + 1 if multifloor == true then local ret = {} for f = math.min(fromPosition.z, toPosition.z), math.max(fromPosition.z, toPosition.z) do local tmp = getSpectators({x = math.min(fromPosition.x, toPosition.x) + lenght, y = math.min(fromPosition.y, toPosition.y) + width, z = f}, lenght, width, false) for k = 1, #tmp do table.insert(ret, tmp[k]) end end return ret end return getSpectators({x = math.min(fromPosition.x, toPosition.x) + lenght, y = math.min(fromPosition.y, toPosition.y) + width, z = fromPosition.z}, lenght, width, false) end local pos = getThingPos(cid) local pos = getThingPos(cid) local t = 5 local pos1 = {x = pos.x-t, y = pos.y-t, z = pos.z} local pos2 = {x = pos.x+t, y = pos.y+t, z = pos.z} for _, pid in pairs(getSpectatorsFromArea(pos1, pos2, true)) do if isPlayer(pid) then doPlayerSendCancel(pid, "Audio "..audio.."") end end end function doShowSelectChar(cid) doPlayerSendCancel(cid, "ShowChar") end function doCloseSelectChar(cid) doPlayerSendCancel(cid, "CloseChar") end function doShowLookPlayer(cid, target, msg) doPlayerSendCancel(cid, "ShowLook/"..getPlayerStorageValue(target, 21121).."/"..msg.."") end function doCloseInfoPoke(cid) local activeimg = true doPlayerSendCancel(cid, "InfoClosed") if activeimg then local close = "ClosePoke" doPlayerSendCancel(cid, close) end end function sendAllPokemonsBarPoke(cid) local container = getPlayerSlotItem(cid, 3).uid local pokes = "Pokebar" local t = getPlayerSlotItem(cid, 8) if t.uid ~= 0 then pokeslot = getItemAttribute(t.uid, "poke") pokes = pokes.."/"..pokeslot.."" end local pokeballs = getPokeballsInContainer(container) for i =1, #pokeballs do pokemons = getItemAttribute(pokeballs[i], "poke") pokes = pokes.."/"..pokemons.."" end doPlayerSendCancel(cid, pokes) end -
Olá pessoa do TK, estou com um problema, tentei arrumar porém não obtive sucesso. Eu uso o sistema de PokeBar(Barra de pokemons) porém ao usar o pokemon pela pokebar e trocar de pokemon pela pokebar a addon some. Por exemplo: Usei um alakazam com addon pela pokebar, ai logo em seguida uso um charizard também pela pokebar ai a addon do alakazam some. Script do PokeBar Data/lib/some functions.lua function sendAllPokemonsBarPoke(cid) local container = getPlayerSlotItem(cid, 3).uid local pokes = "Pokebar" local t = getPlayerSlotItem(cid, 8) if t.uid ~= 0 then pokeslot = getItemAttribute(t.uid, "poke") pokes = pokes.."/"..pokeslot.."" end local pokeballs = getPokeballsInContainer(container) for i =1, #pokeballs do pokemons = getItemAttribute(pokeballs[i], "poke") pokes = pokes.."/"..pokemons.."" end doPlayerSendCancel(cid, pokes) end Data/talkactions.lua function onSay(cid, words, param) local cfg = { exhausted = 1, -- Time you are exhausted in seconds. storage = 5858, -- Storage used for "exhaust." exp = 2.0 -- this means 2x more experence then default } if(getPlayerStorageValue(cid, cfg.storage) > os.time() and getPlayerStorageValue(cid, cfg.storage) < 100+os.time()) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce tem que esperar " .. getPlayerStorageValue(cid, cfg.storage) - os.time() .. ' segundos' .. ((getPlayerStorageValue(cid, cfg.storage) - os.time()) == 1 and "" or "s") .. " para usar seu pokemon.") else if doSendPokemon(cid, param) then sendAllPokemonsBarPoke(cid) setPlayerStorageValue(cid, cfg.storage, os.time() + cfg.exhausted) return true end doPlayerSendTextMessage(cid, 27, "Sua barra esta desatualizada") sendAllPokemonsBarPoke(cid) end return true end
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.