Ir para conteúdo

Featured Replies

Postado

Galera tenho este script de gender automático:

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

CONFIGURAÇÃO DOS CAPTURADOS

if getItemAttribute(thing.uid, "gender") == SEX_MALE then

str = str.."Fêmea"

elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then

str = str.."Macho"

else

str = str.."Não tem sexo"

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"

CONFIGURAÇÃO DOS MORTOS

if getItemAttribute(thing.uid, "gender") == SEX_MALE then

str = str.."Fêmea"

elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then

str = str.."Macho"

else

str = str.."Não tem sexo"

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

CONFIGURAÇÃO DOS SELVAGENS

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.."Fêmea"

elseif getPokemonGender(thing.uid) == SEX_FEMALE then

str = str.."Macho"

else

str = str.."Não tem sexo"

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

BOM ACHO QUE TEM A VER DE ONDE SE CONFIGURA O SEXO (script a baixo)

local function doSetRandomGender(cid)

if not isCreature(cid) then return true end

local gender = 0

local name = getCreatureName(cid)

if not newpokedex[name] then return true end

local rate = newpokedex[name].gender

if rate == 0 then

gender = 4 FÊMEA

elseif rate == 1000 then

gender = 5 MACHO

elseif rate == -1 then

gender = 1 SEM SEXO

elseif math.random(1, 1000) <= rate then

gender = 5 MACHO

else

gender = 4 FÊMEA

end

doCreatureSetSkullType(cid, gender)

end

O que está acontecendo é que o pokémons 'macho' e 'sem sexo' ocupam a mesma linha(EM VERDE).

Os pokémons que são 'fêmeas' está certo.

E as partes que falam -macho- não tem utilidade(pelo que deu para ver).

O que eu queria: era que ou mude o lugar dos pokémons macho para onde fala 'macho' ou que seja para os pokémons sem sexo onde seria só trocar a frase que está em (macho <para> não tem sexo).

Server usado:http://tibiaking.com/forum/topic/12966-pokemon-xd-by-rafael-marinho/page__fromsearch__1

Editado por danieuu (veja o histórico de edições)

Se viu o GOSTEI aqui em cima?

Então clica =D

Música:

http://www.youtube.com/watch?v=wzqdVJK5rCY&feature=player_detailpage

:D

Aposto que você gostou da que tá tocando guitarra

----------------------------------------------------------------------

Mapper: 80% -aprendendo-

Scripter: 50% -aprendendo-

Spriter: 70% -aprendendo-

Notepad ++: 90% -enceramento-

Hex Editor: 85% -aprendendo-

----------------------------------------------------------------------

Pokemon Friend

pikachu.gif

  • Respostas 9
  • Visualizações 958
  • Created
  • Última resposta

Top Posters In This Topic

Postado

Tenta assim, não tenho certeza, mas deve dar certo, qualquer coisa posta aew.

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

CONFIGURAÇÃO DOS CAPTURADOS

if getItemAttribute(thing.uid, "gender") == SEX_FEMALE then

str = str.."Fêmea"

elseif getItemAttribute(thing.uid, "gender") == SEX_MALE then

str = str.."Não tem sexo"

else

str = str.."Não tem sexo"

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"

CONFIGURAÇÃO DOS MORTOS

if getItemAttribute(thing.uid, "gender") == SEX_FeMALE then

str = str.."Fêmea"

elseif getItemAttribute(thing.uid, "gender") == SEX_MALE then

str = str.."Não tem sexo"

else

str = str.."Não tem sexo"

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

CONFIGURAÇÃO DOS SELVAGENS

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.."Não tem sexo"

elseif getPokemonGender(thing.uid) == SEX_FEMALE then

str = str.."Fêmea"

else

str = str.."Não tem sexo"

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 por MatheusVidaLoka (veja o histórico de edições)

Ajudei? Reputar Cai o dedo? Acho que não

fdrule_SEPARADOR_DE_TEXTO.gif

Mapper : 80%

Scripter : 40%

Client Maker : 100%

Spriter : 100%

Web Designer : Aprendendo

fdrule_SEPARADOR_DE_TEXTO.gif

Meus Mapas :

sign3zb.jpg

Postado
  • Autor

Tenta assim, não tenho certeza, mas deve dar certo, qualquer coisa posta aew.

Cabei de testar agora só aparece o simbolo do sexo , quando dá look o pokemon não mostra o sexo(os capturados) e os selvagens mostra:

20:53 You see a Poliwag [2].

Health: [123 / 123].

Position: [X: 870] [Y: 1113] [Z: 6].

Os mortos aparece:

20:54 You see a fainted poliwag.

ItemID: [11943].

DecayTo: [0].

Position: [X: 870] [Y: 1114] [Z: 6].

Se viu o GOSTEI aqui em cima?

Então clica =D

Música:

http://www.youtube.com/watch?v=wzqdVJK5rCY&feature=player_detailpage

:D

Aposto que você gostou da que tá tocando guitarra

----------------------------------------------------------------------

Mapper: 80% -aprendendo-

Scripter: 50% -aprendendo-

Spriter: 70% -aprendendo-

Notepad ++: 90% -enceramento-

Hex Editor: 85% -aprendendo-

----------------------------------------------------------------------

Pokemon Friend

pikachu.gif

Postado
  • Autor

Como tem que aparecer:

-onde está fêmea e não tem sexo é que teria que parecer certo, conforme o explicado no inicio do tópico-

Capturado:

19:40 You see a ultraball being used.

It contains a Nidoran Female [level 12].

Fêmea

--- Status ---

Offense: 61 Defense: 69

Agility: 4 Sp. Attack: 55

Vitality: 120

Selvagem:

19:41 You see a wild ditto [level 49].

Não tem sexo

Morto:

19:41 You see a fainted ditto [49].

Não tem sexo

Se viu o GOSTEI aqui em cima?

Então clica =D

Música:

http://www.youtube.com/watch?v=wzqdVJK5rCY&feature=player_detailpage

:D

Aposto que você gostou da que tá tocando guitarra

----------------------------------------------------------------------

Mapper: 80% -aprendendo-

Scripter: 50% -aprendendo-

Spriter: 70% -aprendendo-

Notepad ++: 90% -enceramento-

Hex Editor: 85% -aprendendo-

----------------------------------------------------------------------

Pokemon Friend

pikachu.gif

Postado

Vou tentar aqui qualquer coisa posto!

Cuidado com FLOOD amigo, na próxima vez tente editar o post anterior. ^^

Por exemplo você so pode postar em outro post se alguem respondeu o post anterior (Sem ser você). Mais o menos assim, qualquer coisa fala que explico dnv. Se ninguem respondeu o post anterior, edite o post anterior que você respondeu.

Editado por MatheusVidaLoka (veja o histórico de edições)

Ajudei? Reputar Cai o dedo? Acho que não

fdrule_SEPARADOR_DE_TEXTO.gif

Mapper : 80%

Scripter : 40%

Client Maker : 100%

Spriter : 100%

Web Designer : Aprendendo

fdrule_SEPARADOR_DE_TEXTO.gif

Meus Mapas :

sign3zb.jpg

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo