na real o erro era em outro 'end' no meio do script ^^ usa esse aki
function onLook(cid, thing, position, lookDistance)
local str = ""
if not isCreature(thing.uid) then
local iname = getItemInfo(thing.itemid)
if isPokeball(thing.itemid) then --pokeballs
local unique = getItemAttribute(thing.uid, "unique") --alterado v1.6
local pokename = getItemAttribute(thing.uid, "poke")
local item = getItemInfo(thing.itemid)
str = "Você vê "..item.article.." "..item.name.."." --alterado v1.6
if unique and unique == getCreatureName(cid) then
str = str.." É um item exclusivo." --alterado v1.6
end
str = str.."\nContém "..getArticle(pokename).." "..pokename..".\n" --alterado v1.6
local boost = getItemAttribute(thing.uid, "boost") or 0
if boost > 0 then
str = str.."Boost level: +"..boost..".\n"
end
if getItemAttribute(thing.uid, "nick") then
str = str.."É apelido é: "..getItemAttribute(thing.uid, "nick")..".\n"
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
elseif string.find(iname.name, "desmaiou") or string.find(iname.name, "derrotado") then --corpses
str = "Você vê a "..string.lower(iname.name)..". (Vol: "..getContainerCap(thing.uid)..")\n"
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
elseif isContainer(thing.uid) then --containers
local info = getItemInfo(thing.itemid) --alterado v1.7
if info.name == "dead human" and getItemAttribute(thing.uid, "pName") then
str = "You see a dead human (Vol:"..getContainerCap(thing.uid).."). "
str = str.."You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a "
str = str.."".. getItemAttribute(thing.uid, "attacker").."."
else
str = "You see "..info.article.." "..info.name..". (Vol:"..getContainerCap(thing.uid)..")."
end
if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then
str = str.."\nitemID: ["..thing.itemid.."]." --alterado v1.7
local pos = getThingPos(thing.uid)
str = str.."\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]."
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
else
return true
end
local NPCBattle = {
["Brock"] = {artig = "He is", cidbat = "Pewter"},
["Misty"] = {artig = "She is", cidbat = "Cerulean"},
["Blaine"] = {artig = "He is", cidbat = "Cinnabar"},
["Sabrina"] = {artig = "She is", cidbat = "Saffron"}, --alterado v1.7
["Kira"] = {artig = "She is", cidbat = "Viridian"},
["Koga"] = {artig = "He is", cidbat = "Fushcia"},
["Erika"] = {artig = "She is", cidbat = "Celadon"},
["Surge"] = {artig = "He is", cidbat = "Vermilion"},
}
local npcname = getCreatureName(thing.uid)
if ehNPC(thing.uid) and NPCBattle[npcname] then --npcs duel
str = "Você vê "..npcname..". "..NPCBattle[npcname].artig.." líder do ginásio de "..NPCBattle[npcname].cidbat.."." --alterado v1.7
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
elseif ehNPC(thing.uid) and getPlayerStorageValue(thing.uid, 697548) ~= -1 then --npcs de TV
local str = getPlayerStorageValue(thing.uid, 697548) --alterado v1.7
local pos = getThingPos(thing.uid)
str = youAre[getPlayerGroupId(cid)] and str.."\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]." or str
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
end
if not isPlayer(thing.uid) and not isMonster(thing.uid) then --outros npcs
str = "Você vê "..getCreatureName(thing.uid).."."
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
end
if isPlayer(thing.uid) then --player
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false)) --alterado v1.7
return false
end
if getCreatureName(thing.uid) == "Evolution" then return false end
if not isSummon(thing.uid) then --monstros
local str = "Você vê um selvagem "..string.lower(getCreatureName(thing.uid))..".\n"
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
elseif isSummon(thing.uid) and not isPlayer(thing.uid) then --summons
local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0
if getCreatureMaster(thing.uid) == cid then
local myball = getPlayerSlotItem(cid, 8).uid
local string = "Você vê o seu "..string.lower(getCreatureName(thing.uid)).."."
if boostlevel > 0 then
string = string.."\nBoost level: +"..boostlevel.."."
end
string = string.."\n"..getPokemonHappinessDescription(thing.uid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você vê um "..string.lower(getCreatureName(thing.uid))..".\nPertence a "..getCreatureName(getCreatureMaster(thing.uid))..".")
end
return false
end
return true
end
return true
end






info
Grupo: Campones
Registrado: 16/10/12
Posts: 45
Reputação: +4
Char no Tibia: Chapalirous
Estou com um Erro no meu Look.lua
Erro:
[24/12/2012 10:44:32] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/look.lua:123: '<eof>' expected near 'end'
[24/12/2012 10:44:32] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/look.lua)
[24/12/2012 10:44:32] data/creaturescripts/scripts/look.lua:123: '<eof>' expected near 'end'
look.lua
function onLook(cid, thing, position, lookDistance)
--alterado v1.7 peguem todo ele!!
local str = ""
if not isCreature(thing.uid) then
local iname = getItemInfo(thing.itemid)
if isPokeball(thing.itemid) then --pokeballs
local unique = getItemAttribute(thing.uid, "unique") --alterado v1.6
local pokename = getItemAttribute(thing.uid, "poke")
local item = getItemInfo(thing.itemid)
str = "Você vê "..item.article.." "..item.name.."." --alterado v1.6
if unique and unique == getCreatureName(cid) then
str = str.." É um item exclusivo." --alterado v1.6
end
str = str.."\nContém "..getArticle(pokename).." "..pokename..".\n" --alterado v1.6
local boost = getItemAttribute(thing.uid, "boost") or 0
if boost > 0 then
str = str.."Boost level: +"..boost..".\n"
end
if getItemAttribute(thing.uid, "nick") then
str = str.."É apelido é: "..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
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
elseif string.find(iname.name, "desmaiou") or string.find(iname.name, "derrotado") then --corpses
str = "Você vê a "..string.lower(iname.name)..". (Vol: "..getContainerCap(thing.uid)..")\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
elseif isContainer(thing.uid) then --containers
local info = getItemInfo(thing.itemid) --alterado v1.7
if info.name == "dead human" and getItemAttribute(thing.uid, "pName") then
str = "You see a dead human (Vol:"..getContainerCap(thing.uid).."). "
str = str.."You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a "
str = str.."".. getItemAttribute(thing.uid, "attacker").."."
else
str = "You see "..info.article.." "..info.name..". (Vol:"..getContainerCap(thing.uid)..")."
end
if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then
str = str.."\nitemID: ["..thing.itemid.."]." --alterado v1.7
local pos = getThingPos(thing.uid)
str = str.."\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]."
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
else
return true
end
end
local NPCBattle = {
["Brock"] = {artig = "He is", cidbat = "Pewter"},
["Misty"] = {artig = "She is", cidbat = "Cerulean"},
["Blaine"] = {artig = "He is", cidbat = "Cinnabar"},
["Sabrina"] = {artig = "She is", cidbat = "Saffron"}, --alterado v1.7
["Kira"] = {artig = "She is", cidbat = "Viridian"},
["Koga"] = {artig = "He is", cidbat = "Fushcia"},
["Erika"] = {artig = "She is", cidbat = "Celadon"},
["Surge"] = {artig = "He is", cidbat = "Vermilion"},
}
local npcname = getCreatureName(thing.uid)
if ehNPC(thing.uid) and NPCBattle[npcname] then --npcs duel
str = "Você vê "..npcname..". "..NPCBattle[npcname].artig.." líder do ginásio de "..NPCBattle[npcname].cidbat.."." --alterado v1.7
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
elseif ehNPC(thing.uid) and getPlayerStorageValue(thing.uid, 697548) ~= -1 then --npcs de TV
local str = getPlayerStorageValue(thing.uid, 697548) --alterado v1.7
local pos = getThingPos(thing.uid)
str = youAre[getPlayerGroupId(cid)] and str.."\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]." or str
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
end
if not isPlayer(thing.uid) and not isMonster(thing.uid) then --outros npcs
str = "Você vê "..getCreatureName(thing.uid).."."
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
end
if isPlayer(thing.uid) then --player
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false)) --alterado v1.7
return false
end
if getCreatureName(thing.uid) == "Evolution" then return false end
if not isSummon(thing.uid) then --monstros
local str = "Você vê um selvagem "..string.lower(getCreatureName(thing.uid))..".\n"
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false
elseif isSummon(thing.uid) and not isPlayer(thing.uid) then --summons
local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0
if getCreatureMaster(thing.uid) == cid then
local myball = getPlayerSlotItem(cid, 8).uid
local string = "Você vê o seu "..string.lower(getCreatureName(thing.uid)).."."
if boostlevel > 0 then
string = string.."\nBoost level: +"..boostlevel.."."
end
string = string.."\n"..getPokemonHappinessDescription(thing.uid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você vê um "..string.lower(getCreatureName(thing.uid))..".\nPertence a "..getCreatureName(getCreatureMaster(thing.uid))..".")
end
return false
end
return true
end
return true
end
é um erro no Ultimo end eu não sei se devo Tirar
Editado Dezembro 24 por Chapalirous