Jump to content

System de Price nos Loot


Gabrieltxu

Recommended Posts

Fala Ai Galera vi que varias pessoas precisam do System de Price nos loot Igual da PxG para Pokemon então achei esse System e irei Postar para vocês lembrando que o Autor desse Script vai para o ZerefShirou...

Bom uma Print Sobre o System \/

price%2520list.png

 

Bom agora configurando.

 

vai em data/creaturescript/scripts e vai no arquivo .lua chamado look.lua

ai se Procura

if isPokeball(thing.itemid) then

 

e coloca antes disso /\

 

coloca isso \/

if not isPokeball(thing.itemid) then
if priceList[getItemInfo(thing.itemid).name] then
price = priceList[getItemInfo(thing.itemid).name].price
if thing.type > 1 then
str = "You see "..thing.type.." "..getItemInfo(thing.itemid).plural.."."
price = price * thing.type
else
str = "You see "..getItemInfo(thing.itemid).article.." "..getItemInfo(thing.itemid).name.."."
end
str = str.." Price: $"..price.."."
if getItemAttribute(thing.uid, "description") then
str = str.."\n"..getItemAttribute(thing.uid, "description").."."
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
end
end

 

e no configuration.lua localizado em data/lib/configuration.lua desse tudo e add essas linhas \/

 

priceList = {
["water gem"] = {price = 0.50},
["normal ball"] = {price = 50},
["great ball"] = {price = 200},
["super ball"] = {price = 500},
["ultra ball"] = {price = 1300},
["saffariball"] = {price = 1300},
["Small potion"] = {price = 50},
["Great potion"] = {price = 100},
["Ultra potion"] = {price = 220},
["Hyper potion"] = {price = 500},
["Revive"] = {price = 2500},
["Medicine"] = {price = 100},
["Recording camera"] = {price = 10000},
["Essence of fire"] = {price = 0.50},
["Small stone"] = {price = 0.50},
["Pot of moss bug"] = {price = 0.50},
["Screw"] = {price = 0.50},
["Straw"] = {price = 0.50},
["Water gems"] = {price = 0.50},
["Remains of magikarp"] = {price = 10},
["Teeth"] = {price = 100},
["Bottle of poison"] = {price = 100},
["Water pendant"] = {price = 100},
["Feather"] = {price = 7.50},
["Seed"] = {price = 10},
["Pair of leaves"] = {price = 30},
["Apple bite"] = {price = 30},
["Bat wing"] = {price = 50},
["Bag of pollem"] = {price = 80},
["Belt of Champion"] = {price =1000},
["Bird Beak"] = {price = 100},
["Blue Vines"] = {price = 400},
["Bone"] = {price = 40},
["Bulv"] = {price = 3250},
["Chansey egg"] = {price = 1000},
["Comb"] = {price =100},
["Crab Claw"] = {price = 22},
["Dragon Tooth"] = {price = 610},
["Electric Box"] = {price = 20},
["Electric Tail"] = {price = 000},
["Farfetch'd Stick"] = {price = 610},
["Fox Tail"] = {price = 50},
["Fur"] = {price = 13},
["Future Orb"] = {price = 15.50},
["Gosme"] = {price = 2.50},
["Gyarados Tail"] = {price = 800},
["Horn"] = {price = 25},
["Ice Orb"] = {price = 32.50},
["Imam"] = {price = 60},
["Iron Bracelet"] = {price = 250},
["Locksmith of Shell"] = {price = 80},
["Luck Medalion"] = {price = 1000},
["Mimic Clothes"] = {price = 1000},
["Mushroom"] = {price = 80},
["Nail"] = {price = 10},
["Onix Tail"] = {price = 1000},
["Pot Of Lava"] = {price = 18},
["Psychic Spoon"] = {price = 40},
["Punch Machine"] = {price = 40},
["Ruby"] = {price = 200},
["Sandbag"] = {price = 15},
["Scythe"] = {price = 1000},
["Slow Tail"] = {price = 80},
["Squirtle Hull"] = {price = 32.50},
["Stone Orb"] = {price = 16.50},
["Traces of ghost"] = {price = 26.50},
["Venom Flute"] = {price = 300},
["Wool Ball"] = {price = 80},
["Thunder Feather"] = {price = 5000},
["Ice Feather"] = {price = 5000},
["Fire Feather"] = {price = 5000},
["Psyduck Mug"] = {price = 610},
["Tongue"] = {price = 1000}
}

 

essa lista eu que fiz com os preços da PxG galera se quiser add mais itens para dar look e ver o price só ir add como esta nessa Lista /\

haha é Isso galera Obrigado! fuiz \o/

Edited by Gabrieltxu
Link to comment
Share on other sites

Esse sistema daria certo para dar look na ball e aparece o preço do pokemon?

 

Sim, mas você teria que fazer um script novo checando que pokemon tem na ball, uma tabela com os nomes, uma para somar o ST ao preço e pra somar também o bost ao preço do pokémon, é meio demorado mais é fácil.

Link to comment
Share on other sites

Mano Teno Server Slicer Ele Luaa...

 

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.9 \/ peguem tudo!

["Kira"] = {artig = "She is", cidbat = "Viridian"},

["Koga"] = {artig = "He is", cidbat = "Fushcia"},

["Erika"] = {artig = "She is", cidbat = "Celadon"},

["Surge"] = {artig = "He is", cidbat = "Vermilion"},

}

 

function onLook(cid, thing, position, lookDistance)

 

local str = {}

 

if not isCreature(thing.uid) then

local iname = getItemInfo(thing.itemid)

if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then

 

unLock(thing.uid)

local lock = getItemAttribute(thing.uid, "lock")

local pokename = getItemAttribute(thing.uid, "poke")

table.insert(str, "You see "..iname.article.." "..iname.name..".")

if getItemAttribute(thing.uid, "unique") then

table.insert(str, " It's an unique item.")

end

table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename..".\n")

if lock and lock > 0 then

table.insert(str, "It will unlock in ".. os.date("%d/%m/%y %X", lock)..".\n")

end

local boost = getItemAttribute(thing.uid, "boost") or 0

if boost > 0 then

table.insert(str, "Boost level: +"..boost..".\n")

end

if getItemAttribute(thing.uid, "nick") then

table.insert(str, "It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n")

end

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

table.insert(str, "It is male.")

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

table.insert(str, "It is female.")

else

table.insert(str, "It is genderless.")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

 

elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then

 

table.insert(str, "You see a "..string.lower(iname.name)..". ")

if isContainer(thing.uid) then

table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")")

end

table.insert(str, "\n")

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

table.insert(str, "It is male.")

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

table.insert(str, "It is female.")

else

table.insert(str, "It is genderless.")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

 

elseif isContainer(thing.uid) then --containers

 

if iname.name == "dead human" and getItemAttribute(thing.uid, "pName") then

table.insert(str, "You see a dead human (Vol:"..getContainerCap(thing.uid).."). ")

table.insert(str, "You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a ")

table.insert(str, getItemAttribute(thing.uid, "attacker")..".")

else

table.insert(str, "You see "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").")

end

if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then

table.insert(str, "\nItemID: ["..thing.itemid.."]")

local pos = getThingPos(thing.uid)

table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

 

elseif getItemAttribute(thing.uid, "unique") then

local p = getThingPos(thing.uid)

 

table.insert(str, "You see ")

if thing.type > 1 then

table.insert(str, thing.type.." "..iname.plural..".")

else

table.insert(str, iname.article.." "..iname.name..".")

end

table.insert(str, " It's an unique item.\n"..iname.description)

 

if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then

table.insert(str, "\nItemID: ["..thing.itemid.."]")

table.insert(str, "\nPosition: ["..p.x.."]["..p.y.."]["..p.z.."]")

end

 

sendMsgToPlayer(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

else

return true

end

end

 

local npcname = getCreatureName(thing.uid)

if ehNPC(thing.uid) and NPCBattle[npcname] then --npcs duel

table.insert(str, "You see "..npcname..". "..NPCBattle[npcname].artig.." leader of the gym from "..NPCBattle[npcname].cidbat..".")

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

end

if getPlayerStorageValue(thing.uid, 697548) ~= -1 then

table.insert(str, getPlayerStorageValue(thing.uid, 697548))

local pos = getThingPos(thing.uid)

if youAre[getPlayerGroupId(cid)] then

table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

end

 

if not isPlayer(thing.uid) and not isMonster(thing.uid) then --outros npcs

table.insert(str, "You see "..getCreatureName(thing.uid)..".")

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

end

 

if isPlayer(thing.uid) then --player

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false))

return false

end

 

if getCreatureName(thing.uid) == "Evolution" then return false end

 

if not isSummon(thing.uid) then --monstros

 

table.insert(str, "You see a wild "..string.lower(getCreatureName(thing.uid))..".\n")

table.insert(str, "Hit Points: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n")

if getPokemonGender(thing.uid) == SEX_MALE then

table.insert(str, "It is male.")

elseif getPokemonGender(thing.uid) == SEX_FEMALE then

table.insert(str, "It is female.")

else

table.insert(str, "It is genderless.")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(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

table.insert(str, "You see your "..string.lower(getCreatureName(thing.uid))..".")

if boostlevel > 0 then

table.insert(str, "\nBoost level: +"..boostlevel..".")

end

table.insert(str, "\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".")

table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid))

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid))..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".")

end

return false

end

return true

end

 

Vc Me Ajuda Mano??

 

Error Man :S

 

 

 

[24/04/2013 01:47:02] [Error - CreatureScript Interface]

[24/04/2013 01:47:02] data/creaturescripts/scripts/look.lua:onLook

[24/04/2013 01:47:02] Description:

[24/04/2013 01:47:02] data/lib/050-function.lua:107: attempt to index local 'str' (a nil value)

[24/04/2013 01:47:02] stack traceback:

[24/04/2013 01:47:02] data/lib/050-function.lua:107: in function 'getArticle'

[24/04/2013 01:47:02] data/creaturescripts/scripts/look.lua:47: in function <data/creaturescripts/scripts/look.lua:12>

Link to comment
Share on other sites

Usa esse aki fera!

 

 

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.9 \/ peguem tudo!

["Kira"] = {artig = "She is", cidbat = "Viridian"},

["Koga"] = {artig = "He is", cidbat = "Fushcia"},

["Erika"] = {artig = "She is", cidbat = "Celadon"},

["Surge"] = {artig = "He is", cidbat = "Vermilion"},

}

function onLook(cid, thing, position, lookDistance)

 

local str = {}

 

if not isCreature(thing.uid) then

local iname = getItemInfo(thing.itemid)

if not isPokeball(thing.itemid) then

if priceList[getItemInfo(thing.itemid).name] then

price = priceList[getItemInfo(thing.itemid).name].price

if thing.type > 1 then

str = "You see "..thing.type.." "..getItemInfo(thing.itemid).plural.."."

price = price * thing.type

else

str = "You see "..getItemInfo(thing.itemid).article.." "..getItemInfo(thing.itemid).name.."."

end

str = str.." Price: $"..price.."."

if getItemAttribute(thing.uid, "description") then

str = str.."\n"..getItemAttribute(thing.uid, "description").."."

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

end

end

if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then

 

unLock(thing.uid)

local lock = getItemAttribute(thing.uid, "lock")

local pokename = getItemAttribute(thing.uid, "poke")

table.insert(str, "You see "..iname.article.." "..iname.name..".")

if getItemAttribute(thing.uid, "unique") then

table.insert(str, " It's an unique item.")

end

table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename..".\n")

if lock and lock > 0 then

table.insert(str, "It will unlock in ".. os.date("%d/%m/%y %X", lock)..".\n")

end

local boost = getItemAttribute(thing.uid, "boost") or 0

if boost > 0 then

table.insert(str, "Boost level: +"..boost..".\n")

end

if getItemAttribute(thing.uid, "nick") then

table.insert(str, "It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n")

end

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

table.insert(str, "It is male.")

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

table.insert(str, "It is female.")

else

table.insert(str, "It is genderless.")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

 

elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then

table.insert(str, "You see a "..string.lower(iname.name)..". ")

if isContainer(thing.uid) then

table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")")

end

table.insert(str, "\n")

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

table.insert(str, "It is male.")

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

table.insert(str, "It is female.")

else

table.insert(str, "It is genderless.")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

elseif isContainer(thing.uid) then --containers

if iname.name == "dead human" and getItemAttribute(thing.uid, "pName") then

table.insert(str, "You see a dead human (Vol:"..getContainerCap(thing.uid).."). ")

table.insert(str, "You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a ")

table.insert(str, getItemAttribute(thing.uid, "attacker")..".")

else

table.insert(str, "You see "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").")

end

if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then

table.insert(str, "\nItemID: ["..thing.itemid.."]")

local pos = getThingPos(thing.uid)

table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

 

elseif getItemAttribute(thing.uid, "unique") then

local p = getThingPos(thing.uid)

 

table.insert(str, "You see ")

if thing.type > 1 then

table.insert(str, thing.type.." "..iname.plural..".")

else

table.insert(str, iname.article.." "..iname.name..".")

end

table.insert(str, " It's an unique item.\n"..iname.description)

 

if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then

table.insert(str, "\nItemID: ["..thing.itemid.."]")

table.insert(str, "\nPosition: ["..p.x.."]["..p.y.."]["..p.z.."]")

end

 

sendMsgToPlayer(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

else

return true

end

end

local npcname = getCreatureName(thing.uid)

if ehNPC(thing.uid) and NPCBattle[npcname] then --npcs duel

table.insert(str, "You see "..npcname..". "..NPCBattle[npcname].artig.." leader of the gym from "..NPCBattle[npcname].cidbat..".")

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

end

if getPlayerStorageValue(thing.uid, 697548) ~= -1 then

table.insert(str, getPlayerStorageValue(thing.uid, 697548))

local pos = getThingPos(thing.uid)

if youAre[getPlayerGroupId(cid)] then

table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

end

if not isPlayer(thing.uid) and not isMonster(thing.uid) then --outros npcs

table.insert(str, "You see "..getCreatureName(thing.uid)..".")

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

end

if isPlayer(thing.uid) then --player

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false))

return false

end

if getCreatureName(thing.uid) == "Evolution" then return false end

if not isSummon(thing.uid) then --monstros

 

table.insert(str, "You see a wild "..string.lower(getCreatureName(thing.uid))..".\n")

table.insert(str, "Hit Points: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n")

if getPokemonGender(thing.uid) == SEX_MALE then

table.insert(str, "It is male.")

elseif getPokemonGender(thing.uid) == SEX_FEMALE then

table.insert(str, "It is female.")

else

table.insert(str, "It is genderless.")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(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

table.insert(str, "You see your "..string.lower(getCreatureName(thing.uid))..".")

if boostlevel > 0 then

table.insert(str, "\nBoost level: +"..boostlevel..".")

end

table.insert(str, "\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".")

table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid))

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid))..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".")

end

return false

end

return true

end

 

Link to comment
Share on other sites

Usa esse aki fera!

 

 

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.9 \/ peguem tudo!

["Kira"] = {artig = "She is", cidbat = "Viridian"},

["Koga"] = {artig = "He is", cidbat = "Fushcia"},

["Erika"] = {artig = "She is", cidbat = "Celadon"},

["Surge"] = {artig = "He is", cidbat = "Vermilion"},

}

function onLook(cid, thing, position, lookDistance)

 

local str = {}

 

if not isCreature(thing.uid) then

local iname = getItemInfo(thing.itemid)

if not isPokeball(thing.itemid) then

if priceList[getItemInfo(thing.itemid).name] then

price = priceList[getItemInfo(thing.itemid).name].price

if thing.type > 1 then

str = "You see "..thing.type.." "..getItemInfo(thing.itemid).plural.."."

price = price * thing.type

else

str = "You see "..getItemInfo(thing.itemid).article.." "..getItemInfo(thing.itemid).name.."."

end

str = str.." Price: $"..price.."."

if getItemAttribute(thing.uid, "description") then

str = str.."\n"..getItemAttribute(thing.uid, "description").."."

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

end

end

if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then

 

unLock(thing.uid)

local lock = getItemAttribute(thing.uid, "lock")

local pokename = getItemAttribute(thing.uid, "poke")

table.insert(str, "You see "..iname.article.." "..iname.name..".")

if getItemAttribute(thing.uid, "unique") then

table.insert(str, " It's an unique item.")

end

table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename..".\n")

if lock and lock > 0 then

table.insert(str, "It will unlock in ".. os.date("%d/%m/%y %X", lock)..".\n")

end

local boost = getItemAttribute(thing.uid, "boost") or 0

if boost > 0 then

table.insert(str, "Boost level: +"..boost..".\n")

end

if getItemAttribute(thing.uid, "nick") then

table.insert(str, "It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n")

end

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

table.insert(str, "It is male.")

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

table.insert(str, "It is female.")

else

table.insert(str, "It is genderless.")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

 

elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then

table.insert(str, "You see a "..string.lower(iname.name)..". ")

if isContainer(thing.uid) then

table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")")

end

table.insert(str, "\n")

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

table.insert(str, "It is male.")

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

table.insert(str, "It is female.")

else

table.insert(str, "It is genderless.")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

elseif isContainer(thing.uid) then --containers

if iname.name == "dead human" and getItemAttribute(thing.uid, "pName") then

table.insert(str, "You see a dead human (Vol:"..getContainerCap(thing.uid).."). ")

table.insert(str, "You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a ")

table.insert(str, getItemAttribute(thing.uid, "attacker")..".")

else

table.insert(str, "You see "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").")

end

if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then

table.insert(str, "\nItemID: ["..thing.itemid.."]")

local pos = getThingPos(thing.uid)

table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

 

elseif getItemAttribute(thing.uid, "unique") then

local p = getThingPos(thing.uid)

 

table.insert(str, "You see ")

if thing.type > 1 then

table.insert(str, thing.type.." "..iname.plural..".")

else

table.insert(str, iname.article.." "..iname.name..".")

end

table.insert(str, " It's an unique item.\n"..iname.description)

 

if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then

table.insert(str, "\nItemID: ["..thing.itemid.."]")

table.insert(str, "\nPosition: ["..p.x.."]["..p.y.."]["..p.z.."]")

end

 

sendMsgToPlayer(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

else

return true

end

end

local npcname = getCreatureName(thing.uid)

if ehNPC(thing.uid) and NPCBattle[npcname] then --npcs duel

table.insert(str, "You see "..npcname..". "..NPCBattle[npcname].artig.." leader of the gym from "..NPCBattle[npcname].cidbat..".")

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

end

if getPlayerStorageValue(thing.uid, 697548) ~= -1 then

table.insert(str, getPlayerStorageValue(thing.uid, 697548))

local pos = getThingPos(thing.uid)

if youAre[getPlayerGroupId(cid)] then

table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

end

if not isPlayer(thing.uid) and not isMonster(thing.uid) then --outros npcs

table.insert(str, "You see "..getCreatureName(thing.uid)..".")

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

return false

end

if isPlayer(thing.uid) then --player

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false))

return false

end

if getCreatureName(thing.uid) == "Evolution" then return false end

if not isSummon(thing.uid) then --monstros

 

table.insert(str, "You see a wild "..string.lower(getCreatureName(thing.uid))..".\n")

table.insert(str, "Hit Points: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n")

if getPokemonGender(thing.uid) == SEX_MALE then

table.insert(str, "It is male.")

elseif getPokemonGender(thing.uid) == SEX_FEMALE then

table.insert(str, "It is female.")

else

table.insert(str, "It is genderless.")

end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(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

table.insert(str, "You see your "..string.lower(getCreatureName(thing.uid))..".")

if boostlevel > 0 then

table.insert(str, "\nBoost level: +"..boostlevel..".")

end

table.insert(str, "\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".")

table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid))

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid))..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".")

end

return false

end

return true

end

 

 

Ty Mano Nao Mais Bug...

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...