Ir para conteúdo
  • Cadastre-se

Posts Recomendados

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.

Créditos : ZerefShirou.

Eu ( Kalvin Karl ) Trazer ao TK


Bom uma Print Sobre o System \/

price%2520list.png

 

 

Bom agora configurando.

Vai até a pasta data/creaturescripts/scripts e procure o arquivo chamado look.lua

Agora procure essa linha...

 


if isPokeball(thing.itemid) then

 

E antes dessa linha acima, coloque isso em baixo ...

 

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

 

Agora no arquivo configuration.lua localizado em data/lib/configuration.lua vá para baixo de tudo e adicione isso...

 

priceList = {
["Essence of fire"] = {price = 6.00},
["Small stone"] = {price = 5.00},
["Pot of moss bug"] = {price = 8.20},
["Screw"] = {price = 7.00},
["Straw"] = {price = 3.00},
["Water gem"] = {price = 4.00},
["Remains of magikarp"] = {price = 5.00},
["Teeth"] = {price = 4.00},
["Bottle of poison"] = {price = 4.00},
["Water pendant"] = {price = 12.00},
["Feather"] = {price = 10.00},
["Seed"] = {price = 2.00},
["Pair of leaves"] = {price = 10.00},
["Apple bite"] = {price = 8.50},
["Bat wing"] = {price = 8.50},
["Bag of pollem"] = {price = 80.00},
["Belt of Champion"] = {price = 1.000.00},
["Bird Beak"] = {price = 100.00},
["Blue Vines"] = {price = 32.00},
["Bone"] = {price = 40.00},
["Bulv"] = {price = 32.50},
["Chansey egg"] = {price = 1.000.00},
["Comb"] = {price = 100.00},
["Crab Claw"] = {price = 22.00},
["Dragon Tooth"] = {price = 610.00},
["Electric Box"] = {price = 20.00},
["Electric Tail"] = {price = 1.000.00},
["Farfetch'd Stick"] = {price = 610.00},
["Fox Tail"] = {price = 650.00},
["Fur"] = {price = 13.00},
["Future Orb"] = {price = 15.50},
["Gosme"] = {price = 22.50},
["Gyarados Tail"] = {price = 800.00},
["Horn"] = {price = 25.00},
["Ice Orb"] = {price = 32.50},
["Imam"] = {price = 60.00},
["Iron Bracelet"] = {price = 250.00},
["Locksmith of Shell"] = {price = 80.00},
["Luck Medalion"] = {price = 1.000.00},
["Mimic Clothes"] = {price = 1.000.00},
["Mushroom"] = {price = 80.00},
["Nail"] = {price = 10.00},
["Onix Tail"] = {price = 1.000.00},
["Pot Of Lava"] = {price = 18.00},
["Psychic Spoon"] = {price = 40.00},
["Punch Machine"] = {price = 40.00},
["Ruby"] = {price = 20.00},
["Sandbag"] = {price = 15.00},
["Scythe"] = {price = 1.000.00},
["Slow Tail"] = {price = 80.00},
["Squirtle Hull"] = {price = 32.50},
["Stone Orb"] = {price = 16.50},
["Traces of ghost"] = {price = 26.50},
["Venom Flute"] = {price = 300.00},
["Wool Ball"] = {price = 80.00},
["Thunder Feather"] = {price = 5.000.00},
["Ice Feather"] = {price = 5.000.00},
["Fire Feather"] = {price = 5.000.00},
["Psyduck Mug"] = {price = 610.00},
["Tongue"] = {price = 1.000.00},
["Fire Stone"] = {price = 25.000.00},
["Water Stone"] = {price = 25.000.00},
["Leaf Stone"] = {price = 25.000.00},
["Enigma Stone"] = {price = 25.000.00},
["Darkness Stone"] = {price = 25.000.00},
["Ice Stone"] = {price = 25.000.00},
["Thunder Stone"] = {price = 25.000.00},
["Crystal Stone"] = {price = 25.000.00},
["Venom Stone"] = {price = 25.000.00},
["Rock Stone"] = {price = 25.000.00},
["Coccon Stone"] = {price = 25.000.00},
["Punch Stone"] = {price = 25.000.00},
["Earth Stone"] = {price = 25.000.00}

 

}

 
Obrigado.. se ajudei REP ++ :)

 

                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Assinatura~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                pmnz1.jpg

Link para o post
Compartilhar em outros sites

Obrigado, tudo que eu achar.. irei trazer ao TK.

                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Assinatura~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                pmnz1.jpg

Link para o post
Compartilhar em outros sites

Pode por favor adptar ao meu server, pois eu não consegui, acho que é alguma no look.lua:

 

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 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) then

unLock(thing.uid)
local lock = getItemAttribute(thing.uid, "lock") --alterado v1.8
local pokename = getItemAttribute(thing.uid, "poke")
local item = getItemInfo(thing.itemid)
str = "You see "..item.article.." "..item.name.."."
if getItemAttribute(thing.uid, "unique") then --alterado v1.8
str = str.." It's an unique item."
end
str = str.."\nIt contains "..getArticle(pokename).." "..pokename..".\n" --alterado v1.6
if lock and lock > 0 then
str = str.."It will unlock in ".. os.date("%d/%m/%y %X", lock)..".\n" --alterado v1.8
end
local boost = getItemAttribute(thing.uid, "boost") or 0
if boost > 0 then
str = str.."Boost: +"..boost..".\n"
end
if getItemAttribute(thing.uid, "nick") then
str = str.."Seu Apelido é: "..getItemAttribute(thing.uid, "nick")..".\n"
end
if getItemAttribute(thing.uid, "gender") == SEX_MALE then
str = str.."Ele é Macho."
elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
str = str.."Ela é Femea."
else
str = str.."It is genderless."
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false

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

str = "You see a "..string.lower(iname.name)..". " --alterado v1.8 \/
if isContainer(thing.uid) then
str = str.."(Vol: "..getContainerCap(thing.uid)..")"
end
str = str.."\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.8
local pos = getThingPos(thing.uid)
str = str.."\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]" --alterado v1.8
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
return false

elseif getItemAttribute(thing.uid, "unique") then --alterado v1.8 \/
local info = getItemInfo(thing.itemid)
local p = getThingPos(thing.uid)

local str = "You see "
if thing.type > 0 then
str = str..thing.type.." "..info.plural.."."
else
str = str..info.article.." "..info.name.."."
end
str = str.." It's an unique item.\n"

str = str..info.description.."\nItemID: ["..thing.itemid.."]"
str = str.."\nPosition: ["..p.x.."]["..p.y.."]["..p.z.."]"

sendMsgToPlayer(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 = "You see "..npcname..". "..NPCBattle[npcname].artig.." leader of the gym from "..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 = "You see "..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 = "You see a wild "..string.lower(getCreatureName(thing.uid))..".\n"
str = (getPlayerGroupId(cid) >= 4) and str.."Hit Points: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n" or str
if getPokemonGender(thing.uid) == SEX_MALE then
str = str.."It is male."
elseif getPokemonGender(thing.uid) == SEX_FEMALE then
str = str.."It is female."
else
str = str.."It is genderless."
end
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 = "You see your "..string.lower(getCreatureName(thing.uid)).."."
if boostlevel > 0 then
string = string.."\nBoost level: +"..boostlevel.."."
end
string = string.."\nHit points: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid).."."
string = string.."\n"..getPokemonHappinessDescription(thing.uid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string)
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 para o post
Compartilhar em outros sites
  • 1 month later...
  • 1 year later...

@Shadown.Styller posta o erro que da no distro fica mais fácil de resolver, se não der nenhum erro pode ser alguma virgula, ou ponto que você esqueceu no configuration.lua.

 

@Unico BR Só foi testado em Pokémon mas pode se adaptar e usar em outros tipos de servidores também.

                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Assinatura~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                pmnz1.jpg

Link para o post
Compartilhar em outros sites
  • 4 weeks later...

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo