Developer Berg 65 Postado Junho 13, 2015 Share Postado Junho 13, 2015 Olá gente queria pedir a vcs para colocar Gender no meu look.lua de poketibia, estou usando o base do Exaioros/Kpdo e lá quando a pessoa dá look em um pokemon n aparece se ele é Macho ou Femeá. Meu Look.lua da pasta Data/ Creaturescripts/ Look.lua function onLook(cid, thing, position, lookDistance) --for rocks = 0, 8 do --if thing == rocks then --if rocks == 8 then --if #getCreatureSummons(cid) >= 1 then --setCreatureMaxHealth(getCreatureSummons(cid)[1], getCreatureMaxHealth(getCreatureSummons(cid)[1]) + pokes[getCreatureName(getCreatureSummons(cid)[1])].cons) --doCreatureAddHealth(getCreatureSummons(cid)[1],getCreatureMaxHealth(getCreatureSummons(cid)[1]))doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 28) --doSendMagicEffect(getThingPos(cid), 29) --end --elseif rocks == 2 then --doSendMagicEffect(getThingPos(cid), 28) --if getPlayerStorageValue(cid, 91859) >= 1 then --local speedskills = getPlayerSkill(cid,2)*10 --doChangeSpeed(cid, -getCreatureSpeed(cid)) --doChangeSpeed(cid, getCreatureBaseSpeed(cid)+speedskills) --end --end --return true --end --end if isPlayer(thing.uid) and getPlayerStorageValue(thing.uid, 91911) >= 1 then local playerlook = getPlayerStorageValue(thing.uid, 91911) if isPlayer(playerlook) then local nick = getCreatureName(playerlook) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..nick.." ,Cam mode on") end return false end if isMonster(thing.uid) then if getCreatureName(thing.uid) == "Tall Grass" then local player = getPlayerStorageValue(thing.uid,1) if isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..getCreatureName(player).." Watch a tv.") end return false end if isPlayer(getCreatureMaster(thing.uid)) then local dono = getCreatureMaster(thing.uid) local nome = getCreatureName(dono) local poke = string.lower(getCreatureName(thing.uid)) local apelido = getPlayerStorageValue(dono,9000) local pokemondoido = getPlayerSlotItem(dono, 8) local catchby = getItemAttribute(pokemondoido.uid, "catchby") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..poke..".("..apelido..")\n It belongs to "..nome..".(catch by "..catchby..")\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") else return true end return false end return true end Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/ Compartilhar em outros sites More sharing options...
Bruno 536 Postado Junho 15, 2015 Share Postado Junho 15, 2015 @@ricardoberg, tenta assim: function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and getPlayerStorageValue(thing.uid, 91911) >= 1 then local playerlook = getPlayerStorageValue(thing.uid, 91911) if isPlayer(playerlook) then local nick = getCreatureName(playerlook) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..nick.." , Cam mode on") end return false end if isMonster(thing.uid) then if getCreatureName(thing.uid) == "Tall Grass" then local player = getPlayerStorageValue(thing.uid,1) if isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..getCreatureName(player).." Watch a tv.") end return false end if isPlayer(getCreatureMaster(thing.uid)) then local dono = getCreatureMaster(thing.uid) local nome = getCreatureName(dono) local poke = string.lower(getCreatureName(thing.uid)) local sexo = (getPlayerSex(thing.uid) == 0 and 'female' or 'male') local apelido = getPlayerStorageValue(dono, 9000) local pokemondoido = getPlayerSlotItem(dono, 8) local catchby = getItemAttribute(pokemondoido.uid, "catchby") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a " .. poke .. ", " .. sexo .. ". ("..apelido..")\nIt belongs to "..nome..".(catch by "..catchby..")\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") else return true end return false end return true end Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1655899 Compartilhar em outros sites More sharing options...
Developer Berg 65 Postado Junho 15, 2015 Autor Share Postado Junho 15, 2015 @@ricardoberg, tenta assim: function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and getPlayerStorageValue(thing.uid, 91911) >= 1 then local playerlook = getPlayerStorageValue(thing.uid, 91911) if isPlayer(playerlook) then local nick = getCreatureName(playerlook) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..nick.." , Cam mode on") end return false end if isMonster(thing.uid) then if getCreatureName(thing.uid) == "Tall Grass" then local player = getPlayerStorageValue(thing.uid,1) if isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..getCreatureName(player).." Watch a tv.") end return false end if isPlayer(getCreatureMaster(thing.uid)) then local dono = getCreatureMaster(thing.uid) local nome = getCreatureName(dono) local poke = string.lower(getCreatureName(thing.uid)) local sexo = (getPlayerSex(thing.uid) == 0 and 'female' or 'male') local apelido = getPlayerStorageValue(dono, 9000) local pokemondoido = getPlayerSlotItem(dono, 8) local catchby = getItemAttribute(pokemondoido.uid, "catchby") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a " .. poke .. ", " .. sexo .. ". ("..apelido..")\nIt belongs to "..nome..".(catch by "..catchby..")\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") else return true end return false end return true end aqui n pegou, ficou do mesmo jeito que tava antes 14:02 You see an Ultra ball. Contains a Shiny Salamence, ST[+0]=[310]. ItemID: [2220]. Position: [X: 748] [Y: 851] [Z: 6]. Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1655936 Compartilhar em outros sites More sharing options...
Bruno 536 Postado Junho 17, 2015 Share Postado Junho 17, 2015 aqui n pegou, ficou do mesmo jeito que tava antes 14:02 You see an Ultra ball. Contains a Shiny Salamence, ST[+0]=[310]. ItemID: [2220]. Position: [X: 748] [Y: 851] [Z: 6]. Tem algum outro script de look? No script atual não está dessa forma... Ou isso vem de compilação na source? Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1656250 Compartilhar em outros sites More sharing options...
Luga03 333 Postado Junho 17, 2015 Share Postado Junho 17, 2015 Man poderia postar o look.lua completo?? pq só isto ai não dá para adaptar e aparecer o gender Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1656251 Compartilhar em outros sites More sharing options...
Developer Berg 65 Postado Junho 17, 2015 Autor Share Postado Junho 17, 2015 Man poderia postar o look.lua completo?? pq só isto ai não dá para adaptar e aparecer o gender Tem algum outro script de look? No script atual não está dessa forma... Ou isso vem de compilação na source? eu só achei esse look.lua, to usando o server do Kpdo/exaioros, e n sei se já veio compilado na source, pq eles n passaram a source '-' Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1656339 Compartilhar em outros sites More sharing options...
Luga03 333 Postado Junho 17, 2015 Share Postado Junho 17, 2015 abre o Notpad++ aperta control + f, e seleciona Localizar em arquivos, coloca no primeiro "you see", e seleciona a pasta, ai quando terminar o resultado, manda print da janelinha que apareceu! Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1656405 Compartilhar em outros sites More sharing options...
Developer Berg 65 Postado Junho 17, 2015 Autor Share Postado Junho 17, 2015 abre o Notpad++ aperta control + f, e seleciona Localizar em arquivos, coloca no primeiro "you see", e seleciona a pasta, ai quando terminar o resultado, manda print da janelinha que apareceu! olha ai Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1656508 Compartilhar em outros sites More sharing options...
Luga03 333 Postado Junho 18, 2015 Share Postado Junho 18, 2015 function onLook(cid, thing, position, lookDistance) --for rocks = 0, 8 do --if thing == rocks then --if rocks == 8 then --if #getCreatureSummons(cid) >= 1 then --setCreatureMaxHealth(getCreatureSummons(cid)[1], getCreatureMaxHealth(getCreatureSummons(cid)[1]) + pokes[getCreatureName(getCreatureSummons(cid)[1])].cons) --doCreatureAddHealth(getCreatureSummons(cid)[1],getCreatureMaxHealth(getCreatureSummons(cid)[1]))doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 28) --doSendMagicEffect(getThingPos(cid), 29) --end --elseif rocks == 2 then --doSendMagicEffect(getThingPos(cid), 28) --if getPlayerStorageValue(cid, 91859) >= 1 then --local speedskills = getPlayerSkill(cid,2)*10 --doChangeSpeed(cid, -getCreatureSpeed(cid)) --doChangeSpeed(cid, getCreatureBaseSpeed(cid)+speedskills) --end --end --return true --end --end if isPlayer(thing.uid) and getPlayerStorageValue(thing.uid, 91911) >= 1 then local playerlook = getPlayerStorageValue(thing.uid, 91911) if isPlayer(playerlook) then local nick = getCreatureName(playerlook) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..nick.." ,Cam mode on") end return false end if isMonster(thing.uid) then if getCreatureName(thing.uid) == "Tall Grass" then local player = getPlayerStorageValue(thing.uid,1) if isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..getCreatureName(player).." Watch a tv.") end return false end if isPlayer(getCreatureMaster(thing.uid)) then local dono = getCreatureMaster(thing.uid) local nome = getCreatureName(dono) local poke = string.lower(getCreatureName(thing.uid)) local apelido = getPlayerStorageValue(dono,9000) local pokemondoido = getPlayerSlotItem(dono, 8) local catchby = getItemAttribute(pokemondoido.uid, "catchby") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..poke..".("..apelido..")\n It belongs to "..nome..".(catch by "..catchby..")\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") if getPokemonGender(thing.uid) == SEX_MALE then table.insert(str, "Este pokémon é macho.") elseif getPokemonGender(thing.uid) == SEX_FEMALE then table.insert(str, "Este pokémon é femia.") else table.insert(str, "Este pokémon é indefinido.") end else return true end return false end return true end Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1656539 Compartilhar em outros sites More sharing options...
Developer Berg 65 Postado Junho 20, 2015 Autor Share Postado Junho 20, 2015 function onLook(cid, thing, position, lookDistance) --for rocks = 0, 8 do --if thing == rocks then --if rocks == 8 then --if #getCreatureSummons(cid) >= 1 then --setCreatureMaxHealth(getCreatureSummons(cid)[1], getCreatureMaxHealth(getCreatureSummons(cid)[1]) + pokes[getCreatureName(getCreatureSummons(cid)[1])].cons) --doCreatureAddHealth(getCreatureSummons(cid)[1],getCreatureMaxHealth(getCreatureSummons(cid)[1]))doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 28) --doSendMagicEffect(getThingPos(cid), 29) --end --elseif rocks == 2 then --doSendMagicEffect(getThingPos(cid), 28) --if getPlayerStorageValue(cid, 91859) >= 1 then --local speedskills = getPlayerSkill(cid,2)*10 --doChangeSpeed(cid, -getCreatureSpeed(cid)) --doChangeSpeed(cid, getCreatureBaseSpeed(cid)+speedskills) --end --end --return true --end --end if isPlayer(thing.uid) and getPlayerStorageValue(thing.uid, 91911) >= 1 then local playerlook = getPlayerStorageValue(thing.uid, 91911) if isPlayer(playerlook) then local nick = getCreatureName(playerlook) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..nick.." ,Cam mode on") end return false end if isMonster(thing.uid) then if getCreatureName(thing.uid) == "Tall Grass" then local player = getPlayerStorageValue(thing.uid,1) if isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..getCreatureName(player).." Watch a tv.") end return false end if isPlayer(getCreatureMaster(thing.uid)) then local dono = getCreatureMaster(thing.uid) local nome = getCreatureName(dono) local poke = string.lower(getCreatureName(thing.uid)) local apelido = getPlayerStorageValue(dono,9000) local pokemondoido = getPlayerSlotItem(dono, 8) local catchby = getItemAttribute(pokemondoido.uid, "catchby") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..poke..".("..apelido..")\n It belongs to "..nome..".(catch by "..catchby..")\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") if getPokemonGender(thing.uid) == SEX_MALE then table.insert(str, "Este pokémon é macho.") elseif getPokemonGender(thing.uid) == SEX_FEMALE then table.insert(str, "Este pokémon é femia.") else table.insert(str, "Este pokémon é indefinido.") end else return true end return false end return true end Aqui ficou do mesmo jeito '-' ta aparecendo mesma coisa e n ta aparecendo o gender '-' Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1657101 Compartilhar em outros sites More sharing options...
zipter98 1102 Postado Junho 20, 2015 Share Postado Junho 20, 2015 function onLook(cid, thing, position, lookDistance) --for rocks = 0, 8 do --if thing == rocks then --if rocks == 8 then --if #getCreatureSummons(cid) >= 1 then --setCreatureMaxHealth(getCreatureSummons(cid)[1], getCreatureMaxHealth(getCreatureSummons(cid)[1]) + pokes[getCreatureName(getCreatureSummons(cid)[1])].cons) --doCreatureAddHealth(getCreatureSummons(cid)[1],getCreatureMaxHealth(getCreatureSummons(cid)[1]))doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 28) --doSendMagicEffect(getThingPos(cid), 29) --end --elseif rocks == 2 then --doSendMagicEffect(getThingPos(cid), 28) --if getPlayerStorageValue(cid, 91859) >= 1 then --local speedskills = getPlayerSkill(cid,2)*10 --doChangeSpeed(cid, -getCreatureSpeed(cid)) --doChangeSpeed(cid, getCreatureBaseSpeed(cid)+speedskills) --end --end --return true --end --end if isPlayer(thing.uid) and getPlayerStorageValue(thing.uid, 91911) >= 1 then local playerlook = getPlayerStorageValue(thing.uid, 91911) if isPlayer(playerlook) then local nick = getCreatureName(playerlook) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..nick.." ,Cam mode on") end return false end if isMonster(thing.uid) then if getCreatureName(thing.uid) == "Tall Grass" then local player = getPlayerStorageValue(thing.uid,1) if isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..getCreatureName(player).." Watch a tv.") end return false end if isPlayer(getCreatureMaster(thing.uid)) then local dono = getCreatureMaster(thing.uid) local nome = getCreatureName(dono) local poke = string.lower(getCreatureName(thing.uid)) local apelido = getPlayerStorageValue(dono,9000) local pokemondoido = getPlayerSlotItem(dono, 8) local catchby = getItemAttribute(pokemondoido.uid, "catchby") local sex = getPokemonGender(thing.uid) == SEX_MALE and "macho" or getPokemonGender(thing.uid) == SEX_FEMALE and "femea" or "indefinido" doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..poke..".("..apelido..")\n It belongs to "..nome..".(catch by "..catchby..")\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".\nEste pokémon é "..sex..".") else return true end return false end return true end Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1657115 Compartilhar em outros sites More sharing options...
Developer Berg 65 Postado Junho 21, 2015 Autor Share Postado Junho 21, 2015 function onLook(cid, thing, position, lookDistance) --for rocks = 0, 8 do --if thing == rocks then --if rocks == 8 then --if #getCreatureSummons(cid) >= 1 then --setCreatureMaxHealth(getCreatureSummons(cid)[1], getCreatureMaxHealth(getCreatureSummons(cid)[1]) + pokes[getCreatureName(getCreatureSummons(cid)[1])].cons) --doCreatureAddHealth(getCreatureSummons(cid)[1],getCreatureMaxHealth(getCreatureSummons(cid)[1]))doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 28) --doSendMagicEffect(getThingPos(cid), 29) --end --elseif rocks == 2 then --doSendMagicEffect(getThingPos(cid), 28) --if getPlayerStorageValue(cid, 91859) >= 1 then --local speedskills = getPlayerSkill(cid,2)*10 --doChangeSpeed(cid, -getCreatureSpeed(cid)) --doChangeSpeed(cid, getCreatureBaseSpeed(cid)+speedskills) --end --end --return true --end --end if isPlayer(thing.uid) and getPlayerStorageValue(thing.uid, 91911) >= 1 then local playerlook = getPlayerStorageValue(thing.uid, 91911) if isPlayer(playerlook) then local nick = getCreatureName(playerlook) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..nick.." ,Cam mode on") end return false end if isMonster(thing.uid) then if getCreatureName(thing.uid) == "Tall Grass" then local player = getPlayerStorageValue(thing.uid,1) if isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..getCreatureName(player).." Watch a tv.") end return false end if isPlayer(getCreatureMaster(thing.uid)) then local dono = getCreatureMaster(thing.uid) local nome = getCreatureName(dono) local poke = string.lower(getCreatureName(thing.uid)) local apelido = getPlayerStorageValue(dono,9000) local pokemondoido = getPlayerSlotItem(dono, 8) local catchby = getItemAttribute(pokemondoido.uid, "catchby") local sex = getPokemonGender(thing.uid) == SEX_MALE and "macho" or getPokemonGender(thing.uid) == SEX_FEMALE and "femea" or "indefinido" doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..poke..".("..apelido..")\n It belongs to "..nome..".(catch by "..catchby..")\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".\nEste pokémon é "..sex..".") else return true end return false end return true end quando a pessoa da look na ball com o poke dentro da ball fica do mesmo jeito 22:56 You see an Ultra ball. Contains a Shiny Dragonite, ST[+0]=[100]. ItemID: [2220]. Position: [X: 1052] [Y: 1058] [Z: 7]. mais quando a pessoa tira o pokemon da ball e da look em cima do pokemon aparece esse erro aqui Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1657141 Compartilhar em outros sites More sharing options...
zipter98 1102 Postado Junho 21, 2015 Share Postado Junho 21, 2015 Ah, pelo fato do Zet0N0Murmurouu ter usado esta função, acreditei que ela existisse neste servidor. Saberia dizer como os gêneros dos pokémons são atribuídos? Ou teria ao menos um código que chame esta informação para termos como base? Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1657143 Compartilhar em outros sites More sharing options...
Developer Berg 65 Postado Junho 21, 2015 Autor Share Postado Junho 21, 2015 Ah, pelo fato do Zet0N0Murmurouu ter usado esta função, acreditei que ela existisse neste servidor. Saberia dizer como os gêneros dos pokémons são atribuídos? Ou teria ao menos um código que chame esta informação para termos como base? só da pra saber se os pokemons é macho, fêmea ou indefinido quando a pessoa da catch nele, ai aparece o simbolo de macho ou fêmea quando a pessoa solta ele da ball, acho que isso é nas source mesmo '-', tipo até ele selvagem n aparece se é male ou female, ele fica sem sexo quanto ta selvagem, ai só quando a pessoa da catch que aparece Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1657145 Compartilhar em outros sites More sharing options...
Wend ll 268 Postado Junho 22, 2015 Share Postado Junho 22, 2015 (editado) Poste o script do catch aqui , quero dar uma conferida Editado Junho 22, 2015 por AnnaFeeh Link para o comentário https://xtibia.com/forum/topic/234704-colocar-gender-no-looklua/#findComment-1657432 Compartilhar em outros sites More sharing options...
Posts Recomendados