Postado Junho 1, 2012 13 anos Autor Galera cabei de fazer um teste aqui! Tirei o SEX_MALE de onde é dos pokemons capturados. E agora todos os capturados são fêmeas, mesmo sendo macho ou sem sexo! E retirar os == dos script da erro! E não mostra o sexo depois '-' Outro teste: Troquei o SEX_MALE por SEX_FEMALE agora todas as fêmeas dizem macho '-' E os machos e sem sexo continua usando a mesma linha do script dizendo 'nao tem sexo' Editado Junho 1, 2012 13 anos 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 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
Postado Junho 1, 2012 13 anos 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_FEMALE then str = str.."Fêmea" elseif getItemAttribute(thing.uid, "gender") == SEX_MALE 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" if getItemAttribute(thing.uid, "gender") == SEX_FEMALE then str = str.."Fêmea" elseif getItemAttribute(thing.uid, "gender") == SEX_MALE 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 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.."Macho" 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 Junho 1, 2012 13 anos por Kimoszin (veja o histórico de edições)
Postado Junho 1, 2012 13 anos Autor 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_FEMALE then str = str.."Fêmea" elseif getItemAttribute(thing.uid, "gender") == SEX_MALE 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" if getItemAttribute(thing.uid, "gender") == SEX_FEMALE then str = str.."Fêmea" elseif getItemAttribute(thing.uid, "gender") == SEX_MALE 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 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.."Macho" 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") [01/06/2012 20:10:57] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/look.lua:123: 'then' expected near '<eof>' [01/06/2012 20:10:57] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/look.lua) [01/06/2012 20:10:57] data/creaturescripts/scripts/look.lua:123: 'then' expected near '<eof>' CASSO MUDAR O SCRIPT ME AVISA Editado Junho 1, 2012 13 anos 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 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
Postado Junho 1, 2012 13 anos Mudei o meu primeiro post, eu uso a skin mobile e não foi as tags e nem todo codigo. Desculpe, só testar agora.
Postado Junho 1, 2012 13 anos Autor Saiu o erro, mais agora deu o erro que eu falei. As fêmeas aparecem macho e os macho e sem sexo continua aparecendo 'nao 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 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
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.