alguem sabe como revomer o look dos pokemons? pq toda vez que da look no venusaur o serve cai
- Fórum
- OTServ
- Suporte
- Tópicos Sem Resposta
- [Encerrado] [Pokemon] Dúvidas? - Pda
[Encerrado] [Pokemon] Dúvidas? - Pda
Por lucashgas, 10 de jan. de 2012 em Tópicos Sem Resposta
info
Grupo: Artesão
Registrado: 02/07/11
Posts: 129
Reputação: +6

info
Grupo: Infante
Registrado: 28/01/12
Posts: 1.6k
Reputação: +262
Gênero: Masculino

Ou entao o cp nao deve estar com protection zone
@Soul
O que eu quero e tipo...debaixo dagua os pokemons e o player perdem a velocidade de movimento..a do player eu resolvi add roupa de mergulho incresentano + speed, porem o pokemon fica muto lerdo...se vc coloca um respae de gyarados e vai caçar la, até q os dois poke xega um no otro ( /sono)
Ae o que eu queria era um script que por exemplo..tu joga uma starmie...a função iria chegar uma lista qnd vc jogasse o poke e se fosse um water a speed desse monstro aumentasse mas somentes se o grounde q vc esta fosse os id de water..n sei se tem como add speed em monster, mas se tiver como da pra fazer..so n sei como kkk
Mas vlw xd
No meu sistema eu faria assim:
Crie seus pokemons que voce colocara no fundo do mar (outro xml) com a speed bem alta, ai na agua eles ficarao rapidos.
No goback voce coloca que se pegar a storage do dive e o pokemon escolhido for um aquatico aumente a velocidade da criatura em XX vezes. pronto Pokemons aquaticos no seu habitat ficaram rapidos.
Espero ter ajudado.
é só com o venusaur? acho que voce editou algo errado no arquivo look.lua.
É so fazer igual ao rollout, so mudando o looktype e o nome da magia no move
Editado Janeiro 28 por lucashgas
info
Grupo: Campones
Registrado: 02/11/08
Posts: 45
Reputação: +3
Char no Tibia: Jezhur onyan

eae nibelins será q sai amanha msm?
info
Grupo: Infante
Registrado: 28/01/12
Posts: 1.6k
Reputação: +262
Gênero: Masculino

Sai oq? o map dele?
assauhusahsa
info
Grupo: Artesão
Registrado: 02/07/11
Posts: 129
Reputação: +6

O erro que ta dando no look e esse
[28/01/2012 21:08:07] [Error - CreatureScript Interface]
[28/01/2012 21:08:07] data/creaturescripts/scripts/look.lua:onLook
[28/01/2012 21:08:07] Description:
[28/01/2012 21:08:07] data/lib/050-function.lua:107: attempt to index local 'str' (a nil value)
[28/01/2012 21:08:07] stack traceback:
[28/01/2012 21:08:09] data/lib/050-function.lua:107: in function 'getArticle'
[28/01/2012 21:08:09] data/creaturescripts/scripts/look.lua:16: in function
alguem ajuda ai ja fiz de tudo e nao to coneguindo quando da look do poke o server cai
Teria como voce me passar a sua look.lua e goback.lua ?
Editado Janeiro 28 por pocotozinho
info
Grupo: Campones
Registrado: 02/11/08
Posts: 45
Reputação: +3
Char no Tibia: Jezhur onyan

cara seguinte eu sou programador, n conheco muito do sistema de tibia em si mais eu vo postar meu pensamento pra resolver esse problema:
1º Pensar a respeito de: O que ta fazendo o pokemon ficar lerdo embaixo d'agua? o piso, as configurações, ou só um script qlquer que tenha sido criado pra fazer isso.(terceira opção eu acho dificil pq isso existe desde antes do stat speed existir para os pokes)
2º Caso seja o piso acredito que em uma mudanca no editor de items vá resolver, se for configuração do pokemon eu n sei como concerta pq já disse n sei como funciona, já se for um script é só achar e apagar.
3º Minha humilde opnião é que o problema é o tile msm visto que só naquele tile que o pokemon fica lerdo tipo a minha sugestão pra resolver é a que ta em 2º e mais uma:
se existir alguma função pra trabalhar os stats dos summons axo que dava pra usa ela pra modificar o stat speed do pokemon adicionar ou multiplicar. Abraços gente
info
Grupo: Conde
Registrado: 30/04/11
Posts: 658
Reputação: +71
Gênero: Masculino
Char no Tibia: ExTibiano

@SoulOroshie era a lib msmo
de mdg eu do seu REP+ ja atingi o limite de 1 ¬¬'
obg!
info
Grupo: Campones
Registrado: 07/05/11
Posts: 11
Reputação: +4
Char no Tibia: Xilven Sire

Tenta esse aqui.
function onLook(cid, thing, position, lookDistance)
local str = ""
if not isCreature(thing.uid) then
local iname = getItemInfo(thing.itemid)
if isPokeball(thing.itemid) then
local owner = getItemAttribute(thing.uid, "firstpoke")
local pokename = getItemAttribute(thing.uid, "poke")
local item = getItemInfo(thing.itemid)
str = "You see "..item.article.." "..item.name..".\n"
str = str.."It contains "..getArticle(pokename).." "..pokename.." [level "..getItemAttribute(thing.uid, "level").."].\n"
if owner and owner ~= getCreatureName(cid) then
str = str.."It belongs to "..owner..".\nIt is a unique item."
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
end
local boost = getItemAttribute(thing.uid, "boost") or 0
local boostshow = ""
if boost > 0 then
str = str.."Boost level: +"..boost..".\n"
end
if getItemAttribute(thing.uid, "nick") then
str = str.."It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n"
end
if getItemAttribute(thing.uid, "gender") == SEX_MALE then
str = str.."It is male."
elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
str = str.."It is female."
else
str = str.."It is genderless."
end
str = str.."\n--- Status ---"
str = str.."\nOffense: "..math.floor(getItemAttribute(thing.uid, "offense")).." Defense: "..math.floor(getItemAttribute(thing.uid, "defense")).."\n"
str = str.."Agility: "..math.floor(getItemAttribute(thing.uid, "speed")).." Sp. Attack: "..math.floor(getItemAttribute(thing.uid, "specialattack")).."\n"
str = str.."Vitality: "..math.floor(getItemAttribute(thing.uid, "vitality"))..""
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then
str = "You see a "..string.lower(iname.name).." ["..getItemAttribute(thing.uid, "level").."].\n"
if getItemAttribute(thing.uid, "gender") == SEX_MALE then
str = str.."It is male."
elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
str = str.."It is female."
else
str = str.."It is genderless."
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
else
return true
end
end
local npcname = getCreatureName(thing.uid)
local l = string.len(npcname)
if not isPlayer(thing.uid) and not isMonster(thing.uid) then
--string.sub(npcname, l - 1, l) == " " then
local article = getPlayerStorageValue(thing.uid, 9891) == 1 and "He is" or "She is"
local nname = string.sub(npcname, 1, l - 2)
if nname == getCreatureName(cid) then
nname = "yourself"
article = "You are"
end
str = "You see "..nname..". "..article.." a pokemon trainer."
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
end
if not isMonster(thing.uid) then
return true
end
if getCreatureName(thing.uid) == "Evolution" then return false end
if not isSummon(thing.uid) then
local str = "You see a wild "..string.lower(getCreatureName(thing.uid)).." [level "..getPokemonLevel(thing.uid).."].\n"
if getPokemonGender(thing.uid) == SEX_MALE then
str = str.."It is male."
elseif getPokemonGender(thing.uid) == SEX_FEMALE then
str = str.."It is female."
else
str = str.."It is genderless."
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
elseif isSummon(thing.uid) and not isPlayer(thing.uid) then
local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0
local boostshow = " + "..boostlevel.."]"
if showBoostSeparated then
boostshow = "] [+"..boostlevel.."]"
end
local levelinfo = "["..getPokemonLevel(thing.uid)..""..boostshow..""
if getCreatureMaster(thing.uid) == cid then
local myball = getPlayerSlotItem(cid, 8).uid
local nexp = getItemAttribute(myball, "nextlevelexp")
local string = "You see your "..string.lower(getCreatureName(thing.uid)).." "..levelinfo.."."
string = string.."\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid).."."
string = string.."\n"..getPokemonHappinessDescription(thing.uid)
if getItemAttribute(myball, "level") <= 99 then
string = string.."\nExperience needed to level up: "..nexp.."."
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid)).." "..levelinfo..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".")
end
return false
end
return true
end
ajudei? rep+ não via cair a mao!
Editado Janeiro 28 por WPR
info
Grupo: Visconde
Registrado: 14/08/11
Posts: 320
Reputação: +34
Gênero: Masculino

Pelo visto tem coisa errada seguinte:
linha 107 e posterior
function getArticle(str)
return str:find("[AaEeIiOoUuYy]") == 1 and "an" or "a"
end
Tu deve ter colocado o nick do pokemon com alguma coisa que da erro pois na linha 16 e posterior temos:
str = "You see "..item.article.." "..item.name..".\n"
str = str.."It contains "..getArticle(pokename).." "..pokename.." [level "..getItemAttribute(thing.uid, "level").."].\n"
bom isso é oque eu tenho nas minhas linhas eu não sei se você editou então não deve ser o mesmo mas caso o do amigo ali não funcione pode usar o meu :
function onLook(cid, thing, position, lookDistance)
local str = ""
if not isCreature(thing.uid) then
local iname = getItemInfo(thing.itemid)
if isPokeball(thing.itemid) then
local pokename = getItemAttribute(thing.uid, "poke")
local item = getItemInfo(thing.itemid)
str = "You see "..item.article.." "..item.name..".\n"
str = str.."It contains "..getArticle(pokename).." "..pokename.." [level "..getItemAttribute(thing.uid, "level").."].\n"
local boost = getItemAttribute(thing.uid, "boost") or 0
local boostshow = ""
if boost > 0 then
str = str.."Boost level: +"..boost..".\n"
end
if getItemAttribute(thing.uid, "nick") then
str = str.."It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n"
end
if getItemAttribute(thing.uid, "gender") == SEX_MALE then
str = str.."It is male."
elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
str = str.."It is female."
else
str = str.."It is genderless."
end
str = str.."\n--- Status ---"
str = str.."\nOffense: "..math.floor(getItemAttribute(thing.uid, "offense")).." Defense: "..math.floor(getItemAttribute(thing.uid, "defense")).."\n"
str = str.."Agility: "..math.floor(getItemAttribute(thing.uid, "speed")).." Sp. Attack: "..math.floor(getItemAttribute(thing.uid, "specialattack")).."\n"
str = str.."Vitality: "..math.floor(getItemAttribute(thing.uid, "vitality"))..""
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then
str = "You see a "..string.lower(iname.name).." ["..getItemAttribute(thing.uid, "level").."].\n"
if getItemAttribute(thing.uid, "gender") == SEX_MALE then
str = str.."It is male."
elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
str = str.."It is female."
else
str = str.."It is genderless."
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
else
return true
end
end
local npcname = getCreatureName(thing.uid)
local l = string.len(npcname)
if not isPlayer(thing.uid) and not isMonster(thing.uid) then
--string.sub(npcname, l - 1, l) == " " then
local article = getPlayerStorageValue(thing.uid, 9891) == 1 and "He is" or "She is"
local nname = string.sub(npcname, 1, l - 2)
if nname == getCreatureName(cid) then
nname = "yourself"
article = "You are"
end
str = "You see "..nname..". "..article.." a pokemon trainer."
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
end
if not isMonster(thing.uid) then
return true
end
if getCreatureName(thing.uid) == "Evolution" then return false end
if not isSummon(thing.uid) then
local str = "You see a wild "..string.lower(getCreatureName(thing.uid)).." [level "..getPokemonLevel(thing.uid).."].\n"
if isShiny(thing.uid) then
str = "You see a "..string.lower(getCreatureName(thing.uid)).." [level "..getPokemonLevel(thing.uid).."].\n"
end
if getPokemonGender(thing.uid) == SEX_MALE then
str = str.."It is male."
elseif getPokemonGender(thing.uid) == SEX_FEMALE then
str = str.."It is female."
else
str = str.."It is genderless."
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
elseif isSummon(thing.uid) and not isPlayer(thing.uid) then
local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0
local boostshow = " + "..boostlevel.."]"
if showBoostSeparated then
boostshow = "] [+"..boostlevel.."]"
end
local levelinfo = "["..getPokemonLevel(thing.uid)..""..boostshow..""
if getCreatureMaster(thing.uid) == cid then
local myball = getPlayerSlotItem(cid, 8).uid
local nexp = getItemAttribute(myball, "nextlevelexp")
local string = "You see your "..string.lower(getCreatureName(thing.uid)).." "..levelinfo.."."
string = string.."\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid).."."
string = string.."\n"..getPokemonHappinessDescription(thing.uid)
if getItemAttribute(myball, "level") <= 99 then
string = string.."\nExperience needed to level up: "..nexp.."."
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid)).." "..levelinfo..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".")
end
return false
end
return true
end
Editado Janeiro 28 por SoulOroshie
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

@WPR e SoulOroshie
coloquei scripts em spoilers... u,U [.spoiler] [./spoiler] -tirem os "."-
@Dive...
em tese.. va em algum datEditor e mude a speed do piso para 100~120... e no arquivo do dive... diminua a speed dos pokes "terrestres" um pouco.. tpw..
Pokes_Agua = {"Starmie", "Gyarados", "Golduck", ...}
if not isInArray(Pokes_Agua, getCreatureName(getCreatureSummons(cid)[1])) then
doChangeSpeed(getCreatureSummons(cid)[1], getCreatureSpeed(getCreatureSummons(cid)[1])-50)
end
--algu assim sei la.. ;p
Editado Janeiro 28 por Slicer
info
Grupo: Artesão
Registrado: 02/07/11
Posts: 129
Reputação: +6

rep+ pro 2 e tem como passar o goback ta dando erro tb '-'
[28/01/2012 21:42:28] [Error - Action Interface]
[28/01/2012 21:42:28] data/actions/scripts/goback.lua:onUse
[28/01/2012 21:42:28] Description:
[28/01/2012 21:42:28] data/actions/scripts/goback.lua:56: attempt to compare nil with number
[28/01/2012 21:42:28] stack traceback:
[28/01/2012 21:42:28] data/actions/scripts/goback.lua:56: in function <data/actions/scripts/goback.lua:1>
e alguem sabe como tiro aquele +0 do boost do pokemon
Editado Janeiro 28 por pocotozinho
info
Grupo: Visconde
Registrado: 14/08/11
Posts: 320
Reputação: +34
Gênero: Masculino

function onUse(cid, item, frompos, item2, topos)
if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end
local owner = getItemAttribute(item.uid, "firstpoke")
if owner and owner ~= getCreatureName(cid) then
doPlayerSendCancel(cid, "This pokemon belongs to "..owner..", it is his first pokemon. Please, give it back to him.")
return true
end
if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
return true
end
local btype = getPokeballType(item.itemid)
local effect = pokeballs[btype].effect
if not effect then
effect = 21
end
if item.itemid == pokeballs[btype].use 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) <= 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 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 thishp <= 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 boosts = getItemAttribute(item.uid, "boost") or 0
if getPlayerLevel(cid) + pokemonMaxLevelAbovePlayer < getItemAttribute(item.uid, "level") + boosts then
doPlayerSendCancel(cid, "Your pokemon's level is much higher than yours, you can't use him.")
return true
end
doSummonMonster(cid, pokemon)
local pk = getCreatureSummons(cid)[1]
if not isCreature(pk) then return true end
if getCreatureName(pk) == "Ditto" then
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, "Ditto")
end
end
if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end
doCreatureSetLookDir(pk, 2)
adjustStatus(pk, item.uid, true, false, true)
doAddPokemonInOwnList(cid, pokemon)
doTransformItem(item.uid, item.itemid+1)
local pokename = getItemAttribute(item.uid, "nick") or getCreatureName(pk)
local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)
doCreatureSay(cid, mgo, TALKTYPE_SAY)
doSendMagicEffect(getCreaturePosition(pk), effect)
else
doPlayerSendCancel(cid, "This pokemon is fainted.")
end
if useKpdoDlls then
doUpdateMoves(cid)
end
return true
end
Ve se funciona ^^
info
Grupo: Infante
Registrado: 28/01/12
Posts: 1.6k
Reputação: +262
Gênero: Masculino

[.spoiler]galera no meu ot da um bug q tipo novo player chega para pegar o poke inicial ae clik no bau pra pegar e nao acontece nda [./spoiler]







info
Grupo: Visconde
Registrado: 14/08/11
Posts: 320
Reputação: +34
Gênero: Masculino
Bom se ele ta aqui de certo ele ta lendo esse 900 post que tem vendo erros pra tentar concertar eu fiquei quase um dia inteiro lendo isso pra saber oque tava acontecendo e é dificil ler todos,rsrs.
Cara quanto ao teu bug de não healar olha na tua lib configuration ae
procura :
nurseHealsOnlyInPZ = true
é eu sei que é so pz se tiver true ve sem tem pz dentro do teu cp, pode ser isso.