O servidor não possui esta função. Tente esta:
function isSummon(uid) return isCreature(uid) and getCreatureMaster(uid) ~= uid or false end
flw
info
Grupo: Visconde
Registrado: 03/02/09
Posts: 361
Reputação: +200
Char no Tibia: Fearless Man

O servidor não possui esta função. Tente esta:
function isSummon(uid) return isCreature(uid) and getCreatureMaster(uid) ~= uid or false end
flw
Ei cara tu podia passar o script pra nóis né
info
Grupo: Campones
Registrado: 20/09/09
Posts: 16
Reputação: +2
Char no Tibia: GabrielBoladao

apocarai
Tem como vc editar o scripter contendo essa edição? não entendi onde editar ==D
Vou disponibilizar ele pro xtibia se no caso de funcionar =D
info
Grupo: Visconde
Registrado: 03/02/09
Posts: 361
Reputação: +200
Char no Tibia: Fearless Man

Tente:
function isSummon(uid)
return isCreature(uid) and getCreatureMaster(uid) ~= uid or false
end
function onUse(cid, item, fromPos, itemEx, toPos)
local pokemon = itemEx.uid
local pokemons = {
{"Bulbasaur", "1.txt", 11395, 20, 100, 99101},
{"Squirtle", "2.txt", 11401, 20, 500, 99102},
}
for _,n in pairs(pokemons) do
local Dex = io.open('data/pokedex/' .. n[2],'r')
if isSummon(pokemon) then
if getCreatureName(pokemon) == n[1] and getPlayerLevel(cid) >= n[4] and getPlayerStorageValue(cid, n[6]) <= 0 then
doShowTextDialog(cid, n[3], Dex:read("*all"))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked " .. n[1] .. " in your pokedex")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained " .. n[5] .. " experience points.")
doPlayerAddExperience(cid, n[5])
setPlayerStorageValue(cid, n[6], 1)
elseif getCreatureName(pokemon) == n[1] and getPlayerLevel(cid) < n[4] and getPlayerStorageValue(cid, n[6]) <= 0 then
doShowTextDialog(cid, n[3], Dex:read("*all"))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need level " .. n[4] .. " to unlock this pokemon.")
elseif getCreatureName(pokemon) == n[1] and getPlayerStorageValue(cid, n[6]) >= 1 then
doShowTextDialog(cid, n[3], Dex:read("*all"))
return true
end
elseif isMonster(pokemon) then
if getCreatureName(pokemon) == n[1] and getPlayerStorageValue(cid, n[6]) <= 0 then
doShowTextDialog(cid, n[3], Dex:read("*all"))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked " .. n[1] .. " in your pokedex")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained " .. n[5] .. " experience points.")
doPlayerAddExperience(cid, n[5])
setPlayerStorageValue(cid, n[6], 1)
elseif getCreatureName(pokemon) == n[1] and getPlayerStorageValue(cid, n[6]) >= 1 then
doShowTextDialog(cid, n[3], Dex:read("*all"))
return true
end
end
end
flw
info
Grupo: Campones
Registrado: 20/09/09
Posts: 16
Reputação: +2
Char no Tibia: GabrielBoladao
Está dando erro logo nessa parte... "if is Summon(pokemon) then" espero que me ajudem =D
function onUse(cid, item, fromPos, itemEx, toPos) local pokemon = itemEx.uid local pokemons = { {"Bulbasaur", "1.txt", 11395, 20, 100, 99101}, {"Squirtle", "2.txt", 11401, 20, 500, 99102}, } for _,n in pairs(pokemons) do local Dex = io.open('data/pokedex/' .. n[2],'r') if isSummon(pokemon) then if getCreatureName(pokemon) == n[1] and getPlayerLevel(cid) >= n[4] and getPlayerStorageValue(cid, n[6]) <= 0 then doShowTextDialog(cid, n[3], Dex:read("*all")) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked " .. n[1] .. " in your pokedex") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained " .. n[5] .. " experience points.") doPlayerAddExperience(cid, n[5]) setPlayerStorageValue(cid, n[6], 1) elseif getCreatureName(pokemon) == n[1] and getPlayerLevel(cid) < n[4] and getPlayerStorageValue(cid, n[6]) <= 0 then doShowTextDialog(cid, n[3], Dex:read("*all")) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need level " .. n[4] .. " to unlock this pokemon.") elseif getCreatureName(pokemon) == n[1] and getPlayerStorageValue(cid, n[6]) >= 1 then doShowTextDialog(cid, n[3], Dex:read("*all")) return true end elseif isMonster(pokemon) then if getCreatureName(pokemon) == n[1] and getPlayerStorageValue(cid, n[6]) <= 0 then doShowTextDialog(cid, n[3], Dex:read("*all")) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked " .. n[1] .. " in your pokedex") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained " .. n[5] .. " experience points.") doPlayerAddExperience(cid, n[5]) setPlayerStorageValue(cid, n[6], 1) elseif getCreatureName(pokemon) == n[1] and getPlayerStorageValue(cid, n[6]) >= 1 then doShowTextDialog(cid, n[3], Dex:read("*all")) return true end end end end++REP Para quem ajudar