ERROR SCRIPT !COMPRAR

JonatasLucasf
em Scripts
  • 1
  • 2

JonatasLucasf

avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 29/07/13Posts: 780Gênero: MasculinoChar no Tibia: aguarde...

galera então tenho um sistema aqui de !comprar skills comprar sd uh, items etc mais está dando o seguinte error

 

USO TFS 1.1 VERSÃO 10.76

 

5fbb0ea5bd8511c515dfce546078582179e51998

 

 

 

minha comprar.lua

 

 

 

function onSay(cid, words, param)
 
if (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa está em área protegida para utilizar este comando.")
return TRUE
end
 
if (getPlayerStorageValue(cid, 11548) >= os.time()) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED,"Por medidas de segurança você só pode utilizar este comando em " .. (getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")
return TRUE
end
 
 
if(param ~= "") and (param ~= "sd") and (param ~= "uh")  and (param ~= "explo") and (param ~= "vip10") and (param ~= "vip30") and (param ~= "super divine axe") and (param ~= "super divine club") and (param ~= "super divine sword") and (param ~= "super divine crossbow") and (param ~= "livro nivel 6") and (param ~= "super divine staff") and (param ~= "skillclub") and (param ~= "skillsword") and (param ~= "skillaxe") and (param ~= "skilldistance") and (param ~= "skillshielding") and (param ~= "magiclevel") and (param ~= "magiclevel5") and (param ~= "skillclub10") and (param ~= "skillsword10") and (param ~= "skillaxe10") and (param ~= "skilldistance10") and (param ~= "skillshielding10") and (param ~= "removerfrag") and (param ~= "novark") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\nsd = 4000 em SD por 50 barras.\nuh = 6000 em UH por 40 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nsuper divine axe = super divine axe por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine staff = super divine staff por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nremoverfrag = remove todos frags por 100k.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O Item desejado não existe em nosso stock. Veja a cima os detalhes dos items disponíveis.")
return TRUE
end
 
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\nsd = 4000 em SD por 50 barras.\nuh = 6000 em UH por 40 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nsuper divine axe = super divine axe por 60 barras.\nsuper divine staff = super divine staff por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nremoverfrag = remove um frag por 100k.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nnovark = gera uma nova RK para sua account por 10 barras.\n")
return TRUE
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "sd") then
if getPlayerItemCount(cid, 9971) >= 50 then
local bag = doPlayerAddItem(cid, 5926, 1)
doAddContainerItem(bag, 2268, 2000)
local bag = doPlayerAddItem(cid, 5926, 1)
doAddContainerItem(bag, 2268, 2000)
doPlayerRemoveItem(cid, 9971, 30)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 4k de SD com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "uh") then
if getPlayerItemCount(cid, 9971) >= 30 then
local bag = doPlayerAddItem(cid, 2002, 1)
doAddContainerItem(bag, 2273, 2000)
local bag = doPlayerAddItem(cid, 2002, 1)
doAddContainerItem(bag, 2273, 2000)
local bag = doPlayerAddItem(cid, 2002, 1)
doAddContainerItem(bag, 2273, 2000)
doPlayerRemoveItem(cid, 9971, 30)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 6k de UH com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+10)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "explo") then
if getPlayerItemCount(cid, 9971) >= 10 then
local bag = doPlayerAddItem(cid, 2001, 1)
doAddContainerItem(bag, 2313, 2000)
local bag = doPlayerAddItem(cid, 2001, 1)
doAddContainerItem(bag, 2313, 2000)
local bag = doPlayerAddItem(cid, 2001, 1)
doAddContainerItem(bag, 2313, 2000)
doPlayerRemoveItem(cid, 9971, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 6k de Explosion com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "vip10") then
if getPlayerItemCount(cid, 9971) >= 5 then
doPlayerAddPremiumDays(cid, 10)
doPlayerRemoveItem(cid, 9971, 5)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10 dias de vip com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "vip30") then
if getPlayerItemCount(cid, 9971) >= 10 then
doPlayerAddPremiumDays(cid, 30)
doPlayerRemoveItem(cid, 9971, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 30 dias de vip com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine axe") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8926, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine axe com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine staff") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8922, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine staff com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine club") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 7423, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine club com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine sword") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 7403, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine sword com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine crossbow") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8851, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine crossbow com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "livro nivel 6") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8921, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um livro nivel 6 com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "magiclevel") then
if getPlayerMagLevel(cid) >= 200 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.")
return TRUE
end
if(not isSorcerer(cid) and not isDruid(cid) and not isInfernalist(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 3 then
local pid = getPlayerGUID(cid) 
doPlayerRemoveItem(cid, 9971, 3)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `players` SET `maglevel` = `maglevel` + 1 WHERE `id` = "..pid)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillclub") then
if getPlayerSkillLevel(cid, SKILL_CLUB) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isDrunou(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Drunous podem comprar skill de club.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local club = getPlayerSkillLevel(cid, SKILL_CLUB) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (club + 1) .. ", `count` = 0 WHERE `skillid` = 1 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillsword") then
if getPlayerSkillLevel(cid, SKILL_SWORD) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isKnight(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local sword = getPlayerSkillLevel(cid, SKILL_SWORD) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (sword + 1) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillaxe") then
if getPlayerSkillLevel(cid, SKILL_AXE) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isKnight(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local axe = getPlayerSkillLevel(cid, SKILL_AXE) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (axe + 1) .. ", `count` = 0 WHERE `skillid` = 3 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skilldistance") then
if getPlayerSkillLevel(cid, SKILL_DISTANCE) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isPaladin(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local distance = getPlayerSkillLevel(cid, SKILL_DISTANCE) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (distance + 1) .. ", `count` = 0 WHERE `skillid` = 4 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillshielding") then
if getPlayerSkillLevel(cid, SKILL_SHIELD) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if(not isPaladin(cid) and not isKnight(cid) and not isDrunou(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e Drunous podem comprar skill de shield.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local shield = getPlayerSkillLevel(cid, SKILL_SHIELD) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (shield + 1) .. ", `count` = 0 WHERE `skillid` = 5 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "magiclevel5") then
if getPlayerMagLevel(cid) >= 196 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.")
return TRUE
end
if(not isSorcerer(cid) and not isDruid(cid) and not isInfernalist(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 15 then
local pid = getPlayerGUID(cid) 
doPlayerRemoveItem(cid, 9971, 15)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `players` SET `maglevel` = `maglevel` + 5 WHERE `id` = "..pid)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillclub10") then
if getPlayerSkillLevel(cid, SKILL_CLUB) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isDrunou(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Drunous podem comprar skill de club.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local club = getPlayerSkillLevel(cid, SKILL_CLUB) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (club + 10) .. ", `count` = 0 WHERE `skillid` = 1 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillsword10") then
if getPlayerSkillLevel(cid, SKILL_SWORD) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isKnight(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local sword = getPlayerSkillLevel(cid, SKILL_SWORD) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (sword + 10) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillaxe10") then
if getPlayerSkillLevel(cid, SKILL_AXE) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isKnight(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local axe = getPlayerSkillLevel(cid, SKILL_AXE) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (axe + 10) .. ", `count` = 0 WHERE `skillid` = 3 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skilldistance10") then
if getPlayerSkillLevel(cid, SKILL_DISTANCE) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isPaladin(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local distance = getPlayerSkillLevel(cid, SKILL_DISTANCE) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (distance + 10) .. ", `count` = 0 WHERE `skillid` = 4 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillshielding10") then
if getPlayerSkillLevel(cid, SKILL_SHIELD) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if(not isPaladin(cid) and not isKnight(cid) and not isDrunou(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e Drunous podem comprar skill de shield.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local shield = getPlayerSkillLevel(cid, SKILL_SHIELD) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (shield + 10) .. ", `count` = 0 WHERE `skillid` = 5 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "removerfrag") then
if getPlayerItemCount(cid, 2160) >= 10 then
doPlayerRemoveItem(cid, 2160, 10)
db.storeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ") LIMIT 1;")
setPlayerStorageValue(cid,11548,os.time()+30)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você removeu seus frags com sucesso.")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "novark") then
if getPlayerItemCount(cid, 9971) >= 10 then
setPlayerRecoveryKey(cid)
doPlayerRemoveItem(cid, 9971, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ATENÇÃO! Esta será a única vez que sua RK será mostrada, portanto, anote-a em um lugar seguro fora de seu computador!\n" .. setPlayerRecoveryKey(cid) .. "")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
end
end
return TRUE
end

 

 

to that change by a person who does not care about you?

Bruno

Ousadia e Alegria
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 01/05/08Posts: 2571Gênero: Masculino

O seu erro se resume a isso:

Scripts do TFS 0.4 não funcionam no TFS 1.0 ou TFS 1.1

Atenciosamente,
Bruno Minervino

 

Tibia Clients - Downloads Window

JonatasLucasf

avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 29/07/13Posts: 780Gênero: MasculinoChar no Tibia: aguarde...

O seu erro se resume a isso:

Scripts do TFS 0.4 não funcionam no TFS 1.0 ou TFS 1.1

hum, ok algum scripter por favor pode me ajudar a converter esse script pra funcionar na tfs 1.1 wacko.png

to that change by a person who does not care about you?

1027929

dofile('bugarpranetarç.lua')
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 20/04/10Posts: 109Char no Tibia: Charles Mil

 

 

function onSay(cid, words, param)
 
if (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa está em área protegida para utilizar este comando.")
return TRUE
end
 
if (getPlayerStorageValue(cid, 11548) >= os.time()) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED,"Por medidas de segurança você só pode utilizar este comando em " .. (getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")
return TRUE
end
 
 
if(param ~= "") and (param ~= "sd") and (param ~= "uh")  and (param ~= "explo") and (param ~= "vip10") and (param ~= "vip30") and (param ~= "super divine axe") and (param ~= "super divine club") and (param ~= "super divine sword") and (param ~= "super divine crossbow") and (param ~= "livro nivel 6") and (param ~= "super divine staff") and (param ~= "skillclub") and (param ~= "skillsword") and (param ~= "skillaxe") and (param ~= "skilldistance") and (param ~= "skillshielding") and (param ~= "magiclevel") and (param ~= "magiclevel5") and (param ~= "skillclub10") and (param ~= "skillsword10") and (param ~= "skillaxe10") and (param ~= "skilldistance10") and (param ~= "skillshielding10") and (param ~= "removerfrag") and (param ~= "novark") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\nsd = 4000 em SD por 50 barras.\nuh = 6000 em UH por 40 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nsuper divine axe = super divine axe por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine staff = super divine staff por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nremoverfrag = remove todos frags por 100k.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O Item desejado não existe em nosso stock. Veja a cima os detalhes dos items disponíveis.")
return TRUE
end
 
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\nsd = 4000 em SD por 50 barras.\nuh = 6000 em UH por 40 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nsuper divine axe = super divine axe por 60 barras.\nsuper divine staff = super divine staff por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nremoverfrag = remove um frag por 100k.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nnovark = gera uma nova RK para sua account por 10 barras.\n")
return TRUE
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "sd") then
if getPlayerItemCount(cid, 9971) >= 50 then
local bag = doPlayerAddItem(cid, 5926, 1)
doAddContainerItem(bag, 2268, 2000)
local bag = doPlayerAddItem(cid, 5926, 1)
doAddContainerItem(bag, 2268, 2000)
doPlayerRemoveItem(cid, 9971, 30)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 4k de SD com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "uh") then
if getPlayerItemCount(cid, 9971) >= 30 then
local bag = doPlayerAddItem(cid, 2002, 1)
doAddContainerItem(bag, 2273, 2000)
local bag = doPlayerAddItem(cid, 2002, 1)
doAddContainerItem(bag, 2273, 2000)
local bag = doPlayerAddItem(cid, 2002, 1)
doAddContainerItem(bag, 2273, 2000)
doPlayerRemoveItem(cid, 9971, 30)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 6k de UH com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+10)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "explo") then
if getPlayerItemCount(cid, 9971) >= 10 then
local bag = doPlayerAddItem(cid, 2001, 1)
doAddContainerItem(bag, 2313, 2000)
local bag = doPlayerAddItem(cid, 2001, 1)
doAddContainerItem(bag, 2313, 2000)
local bag = doPlayerAddItem(cid, 2001, 1)
doAddContainerItem(bag, 2313, 2000)
doPlayerRemoveItem(cid, 9971, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 6k de Explosion com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "vip10") then
if getPlayerItemCount(cid, 9971) >= 5 then
doPlayerAddPremiumDays(cid, 10)
doPlayerRemoveItem(cid, 9971, 5)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10 dias de vip com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "vip30") then
if getPlayerItemCount(cid, 9971) >= 10 then
doPlayerAddPremiumDays(cid, 30)
doPlayerRemoveItem(cid, 9971, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 30 dias de vip com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine axe") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8926, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine axe com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine staff") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8922, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine staff com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine club") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 7423, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine club com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine sword") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 7403, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine sword com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine crossbow") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8851, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine crossbow com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "livro nivel 6") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8921, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um livro nivel 6 com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "magiclevel") then
if getPlayerMagLevel(cid) >= 200 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.")
return TRUE
end
if(not getPlayerVocation(cid) == 1 and not getPlayerVocation(cid) == 2 ) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 3 then
local pid = getPlayerGUID(cid) 
doPlayerRemoveItem(cid, 9971, 3)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `players` SET `maglevel` = `maglevel` + 1 WHERE `id` = "..pid)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillclub") then
if getPlayerSkill(cid, SKILL_CLUB) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isDrunou(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Drunous podem comprar skill de club.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local club = getPlayerSkill(cid, SKILL_CLUB) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (club + 1) .. ", `count` = 0 WHERE `skillid` = 1 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillsword") then
if getPlayerSkill(cid, SKILL_SWORD) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isKnight(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local sword = getPlayerSkill(cid, SKILL_SWORD) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (sword + 1) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillaxe") then
if getPlayerSkill(cid, SKILL_AXE) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isKnight(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local axe = getPlayerSkill(cid, SKILL_AXE) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (axe + 1) .. ", `count` = 0 WHERE `skillid` = 3 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skilldistance") then
if getPlayerSkill(cid, SKILL_DISTANCE) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isPaladin(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local distance = getPlayerSkill(cid, SKILL_DISTANCE) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (distance + 1) .. ", `count` = 0 WHERE `skillid` = 4 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillshielding") then
if getPlayerSkill(cid, SKILL_SHIELD) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if(not isPaladin(cid) and not isKnight(cid) and not isDrunou(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e Drunous podem comprar skill de shield.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local shield = getPlayerSkill(cid, SKILL_SHIELD) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (shield + 1) .. ", `count` = 0 WHERE `skillid` = 5 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "magiclevel5") then
if getPlayerMagLevel(cid) >= 196 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.")
return TRUE
end
if(not getPlayerVocation(cid) == 1 and not getPlayerVocation(cid) == 2 ) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 15 then
local pid = getPlayerGUID(cid) 
doPlayerRemoveItem(cid, 9971, 15)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `players` SET `maglevel` = `maglevel` + 5 WHERE `id` = "..pid)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillclub10") then
if getPlayerSkill(cid, SKILL_CLUB) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isDrunou(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Drunous podem comprar skill de club.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local club = getPlayerSkill(cid, SKILL_CLUB) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (club + 10) .. ", `count` = 0 WHERE `skillid` = 1 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillsword10") then
if getPlayerSkill(cid, SKILL_SWORD) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isKnight(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local sword = getPlayerSkill(cid, SKILL_SWORD) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (sword + 10) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillaxe10") then
if getPlayerSkill(cid, SKILL_AXE) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isKnight(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local axe = getPlayerSkill(cid, SKILL_AXE) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (axe + 10) .. ", `count` = 0 WHERE `skillid` = 3 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skilldistance10") then
if getPlayerSkill(cid, SKILL_DISTANCE) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isPaladin(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local distance = getPlayerSkill(cid, SKILL_DISTANCE) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (distance + 10) .. ", `count` = 0 WHERE `skillid` = 4 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillshielding10") then
if getPlayerSkill(cid, SKILL_SHIELD) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if(not isPaladin(cid) and not isKnight(cid) and not isDrunou(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e Drunous podem comprar skill de shield.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local shield = getPlayerSkill(cid, SKILL_SHIELD) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (shield + 10) .. ", `count` = 0 WHERE `skillid` = 5 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "removerfrag") then
if getPlayerItemCount(cid, 2160) >= 10 then
doPlayerRemoveItem(cid, 2160, 10)
db.storeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ") LIMIT 1;")
setPlayerStorageValue(cid,11548,os.time()+30)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você removeu seus frags com sucesso.")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "novark") then
if getPlayerItemCount(cid, 9971) >= 10 then
setPlayerRecoveryKey(cid)
doPlayerRemoveItem(cid, 9971, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ATENÇÃO! Esta será a única vez que sua RK será mostrada, portanto, anote-a em um lugar seguro fora de seu computador!\n" .. setPlayerRecoveryKey(cid) .. "")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
end
end
return TRUE
end
OBS: Tem uma vocação com nome de "Infernalist" eu removi ela do código por que não sei o ID.
(Não testado) 

 

 

TE AJUDEI? REP+ 

 

JonatasLucasf

avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 29/07/13Posts: 780Gênero: MasculinoChar no Tibia: aguarde...

amigo não funcionou continua dando error minha vocations.xml

 

 

 
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="250" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="15" gainmanaticks="3" gainmanaamount="30" manamultiplier="1.1" attackspeed="250" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.7" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="15" gainmanaticks="3" gainmanaamount="30" manamultiplier="1.1" attackspeed="250" soulmax="100" gainsoulticks="120" fromvoc="2">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.7" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="1.8"/>
<skill id="2" multiplier="1.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="1.8"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="15" gainmanaticks="4" gainmanaamount="20" manamultiplier="1.4" attackspeed="250" soulmax="100" gainsoulticks="120" fromvoc="3">
<formula meleeDamage="1.0" distDamage="1.6" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.2"/>
<skill id="1" multiplier="1.2"/>
<skill id="2" multiplier="1.2"/>
<skill id="3" multiplier="1.2"/>
<skill id="4" multiplier="1.1"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="80" gainmanaticks="6" gainmanaamount="15" manamultiplier="3.0" attackspeed="250" soulmax="100" gainsoulticks="120" fromvoc="4">
<formula meleeDamage="2.3" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="20" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="250" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="3">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.7" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="20" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="250" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="3">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.7" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="1.8"/>
<skill id="2" multiplier="1.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="1.8"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="20" gainmanaticks="3" gainmanaamount="25" manamultiplier="1.4" attackspeed="250" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="3">
<formula meleeDamage="1.0" distDamage="1.6" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.2"/>
<skill id="1" multiplier="1.2"/>
<skill id="2" multiplier="1.2"/>
<skill id="3" multiplier="1.2"/>
<skill id="4" multiplier="1.1"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="100" gainmanaticks="4" gainmanaamount="20" manamultiplier="3.0" attackspeed="250" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="3">
<formula meleeDamage="2.3" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
    <vocation id="9" name="Drunou" description="a drunou" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="15" gainmanaticks="4" gainmanaamount="20" manamultiplier="1.6" attackspeed="250" soulmax="200" gainsoulticks="15" fromvoc="9">
<formula meleeDamage="2.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.4"/>
<skill id="3" multiplier="1.4"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="10" name="Lord Drunou" description="an lord drunou" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="20" gainmanaticks="3" gainmanaamount="25" manamultiplier="2.5" attackspeed="250" soulmax="200" gainsoulticks="15" fromvoc="9" lessloss="3">
<formula meleeDamage="2.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.4"/>
<skill id="3" multiplier="1.4"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="11" name="Infernalist" description="a infernalist" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="15" gainmanaticks="3" gainmanaamount="60" manamultiplier="1.1" attackspeed="250" soulmax="200" gainsoulticks="15" fromvoc="11">
<formula meleeDamage="1.1" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.8" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="12" name="Master Infernalist" description="an master infernalist" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="20" gainmanaticks="2" gainmanaamount="70" manamultiplier="1.1" attackspeed="250" soulmax="200" gainsoulticks="15" fromvoc="11" lessloss="3">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.8" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
</vocations>

to that change by a person who does not care about you?

1027929

dofile('bugarpranetarç.lua')
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 20/04/10Posts: 109Char no Tibia: Charles Mil

Se o erro é na vocations.xml então poste a print do distro na hora do erro.

TE AJUDEI? REP+ 

 

JonatasLucasf

avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 29/07/13Posts: 780Gênero: MasculinoChar no Tibia: aguarde...

Se o erro é na vocations.xml então poste a print do distro na hora do erro.

não sei se é na vocations.xml só postei só porque você falou que não sabia o id segue o error ai abaixo:

 

 

818a0d464d5b29cb4feb89e134e5c831d2bd3023

to that change by a person who does not care about you?

1027929

dofile('bugarpranetarç.lua')
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 20/04/10Posts: 109Char no Tibia: Charles Mil

(Não testado)

 

 

function onSay(cid, words, param)
 
if (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa está em área protegida para utilizar este comando.")
return TRUE
end
 
if (getPlayerStorageValue(cid, 11548) >= os.time()) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED,"Por medidas de segurança você só pode utilizar este comando em " .. (getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")
return TRUE
end
 
 
if(param ~= "") and (param ~= "sd") and (param ~= "uh")  and (param ~= "explo") and (param ~= "vip10") and (param ~= "vip30") and (param ~= "super divine axe") and (param ~= "super divine club") and (param ~= "super divine sword") and (param ~= "super divine crossbow") and (param ~= "livro nivel 6") and (param ~= "super divine staff") and (param ~= "skillclub") and (param ~= "skillsword") and (param ~= "skillaxe") and (param ~= "skilldistance") and (param ~= "skillshielding") and (param ~= "magiclevel") and (param ~= "magiclevel5") and (param ~= "skillclub10") and (param ~= "skillsword10") and (param ~= "skillaxe10") and (param ~= "skilldistance10") and (param ~= "skillshielding10") and (param ~= "removerfrag") and (param ~= "novark") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\nsd = 4000 em SD por 50 barras.\nuh = 6000 em UH por 40 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nsuper divine axe = super divine axe por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine staff = super divine staff por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nremoverfrag = remove todos frags por 100k.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O Item desejado não existe em nosso stock. Veja a cima os detalhes dos items disponíveis.")
return TRUE
end
 
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para comprar digite !comprar (nome do item)\nOpcoes:\nsd = 4000 em SD por 50 barras.\nuh = 6000 em UH por 40 barras.\nexplo = 6000 em explosion por 10 barras.\nvip10 = 10 dias de vip por 5 barras.\nvip30 = 30 dias de vip por 10 barras.\ndivine staff = divine staff por 30 barras.\ndivine axe = divine axe por 30 barras.\ndivine club = divine club por 30 barras.\ndivine sword = divine sword por 30 barras.\ndivine crossbow = divine crossbow por 30 barras.\nlivro nivel 5 = livro nivel 5 por 30 barras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nsuper divine axe = super divine axe por 60 barras.\nsuper divine staff = super divine staff por 60 barras.\nsuper divine club = super divine club por 60 barras.\nsuper divine sword = super divine sword por 60 barras.\nsuper divine crossbow = super divine crossbow por 60 barras.\nlivro nivel 6 = livro nivel 6 por 60 barras.\nskillclub = adiciona 1 skill club por 1 barras.\nskillsword = adiciona 1 skill sword por 1 barras.\nskillaxe = adiciona 1 skill axe por 1 barras.\nskilldistance = adiciona 1 skill distance por 1 barras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nskillshielding = adiciona 1 skill shielding por 1 barras.\nmagiclevel = adiciona 1 magic level por 3 barras.\nmagiclevel5 = adiciona 5 magic level por 15 barras.\nskillclub10 = adiciona 10 skills club por 10 barras.\nskillsword10 = adiciona 10 skills sword por 10 barras.\nskillaxe10 = adiciona 10 skills axe por 10 barras.\nskilldistance10 = adiciona 10 skill distance por 10 barras.\nskillshielding10 = adiciona 10 skill shielding por 10 barras.\nremoverfrag = remove um frag por 100k.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nnovark = gera uma nova RK para sua account por 10 barras.\n")
return TRUE
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "sd") then
if getPlayerItemCount(cid, 9971) >= 50 then
local bag = doPlayerAddItem(cid, 5926, 1)
doAddContainerItem(bag, 2268, 2000)
local bag = doPlayerAddItem(cid, 5926, 1)
doAddContainerItem(bag, 2268, 2000)
doPlayerRemoveItem(cid, 9971, 30)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 4k de SD com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "uh") then
if getPlayerItemCount(cid, 9971) >= 30 then
local bag = doPlayerAddItem(cid, 2002, 1)
doAddContainerItem(bag, 2273, 2000)
local bag = doPlayerAddItem(cid, 2002, 1)
doAddContainerItem(bag, 2273, 2000)
local bag = doPlayerAddItem(cid, 2002, 1)
doAddContainerItem(bag, 2273, 2000)
doPlayerRemoveItem(cid, 9971, 30)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 6k de UH com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+10)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "explo") then
if getPlayerItemCount(cid, 9971) >= 10 then
local bag = doPlayerAddItem(cid, 2001, 1)
doAddContainerItem(bag, 2313, 2000)
local bag = doPlayerAddItem(cid, 2001, 1)
doAddContainerItem(bag, 2313, 2000)
local bag = doPlayerAddItem(cid, 2001, 1)
doAddContainerItem(bag, 2313, 2000)
doPlayerRemoveItem(cid, 9971, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 6k de Explosion com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "vip10") then
if getPlayerItemCount(cid, 9971) >= 5 then
doPlayerAddPremiumDays(cid, 10)
doPlayerRemoveItem(cid, 9971, 5)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10 dias de vip com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "vip30") then
if getPlayerItemCount(cid, 9971) >= 10 then
doPlayerAddPremiumDays(cid, 30)
doPlayerRemoveItem(cid, 9971, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 30 dias de vip com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine axe") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8926, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine axe com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine staff") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8922, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine staff com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine club") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 7423, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine club com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine sword") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 7403, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine sword com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "super divine crossbow") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8851, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um super divine crossbow com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "livro nivel 6") then
if getPlayerItemCount(cid, 9971) >= 60 then
local bag = doPlayerAddItem(cid, 1997, 1)
local new_item = doAddContainerItem(bag, 8921, 1)
doItemSetAttribute(new_item, "description", "Este item pode ser adquirido através do shopping. Adquirido dia " .. os.date("%d/%m/%Y - %X") .." por ".. getPlayerName(cid) ..". Serial: "..  getPlayerGUID(cid) ..".")
doPlayerRemoveItem(cid, 9971, 60)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você comprou um livro nivel 6 com sucesso.")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "magiclevel") then
if getPlayerMagLevel(cid) >= 200 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.")
return TRUE
end
if(not getPlayerVocation(cid) == 1 and not getPlayerVocation(cid) == 2 ) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 3 then
local pid = getPlayerGUID(cid) 
doPlayerRemoveItem(cid, 9971, 3)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `players` SET `maglevel` = `maglevel` + 1 WHERE `id` = "..pid)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillclub") then
if getPlayerSkill(cid, SKILL_CLUB) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not getPlayerVocation(cid) == 9 or not getPlayerVocation(cid) == 10 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Drunous podem comprar skill de club.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local club = getPlayerSkill(cid, SKILL_CLUB) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (club + 1) .. ", `count` = 0 WHERE `skillid` = 1 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillsword") then
if getPlayerSkill(cid, SKILL_SWORD) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not getPlayerVocation(cid) == 4 or not getPlayerVocation(cid) == 8 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local sword = getPlayerSkill(cid, SKILL_SWORD) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (sword + 1) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillaxe") then
if getPlayerSkill(cid, SKILL_AXE) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not getPlayerVocation(cid) == 4 or not getPlayerVocation(cid) == 8 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local axe = getPlayerSkill(cid, SKILL_AXE) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (axe + 1) .. ", `count` = 0 WHERE `skillid` = 3 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skilldistance") then
if getPlayerSkill(cid, SKILL_DISTANCE) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isPaladin(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local distance = getPlayerSkill(cid, SKILL_DISTANCE) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (distance + 1) .. ", `count` = 0 WHERE `skillid` = 4 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillshielding") then
if getPlayerSkill(cid, SKILL_SHIELD) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if(not getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 6 and not getPlayerVocation(cid) == 4 or not getPlayerVocation(cid) == 8 and not getPlayerVocation(cid) == 9 or not getPlayerVocation(cid) == 10) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e Drunous podem comprar skill de shield.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local shield = getPlayerSkill(cid, SKILL_SHIELD) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (shield + 1) .. ", `count` = 0 WHERE `skillid` = 5 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "magiclevel5") then
if getPlayerMagLevel(cid) >= 196 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter magic level acima de 200.")
return TRUE
end
if(not getPlayerVocation(cid) == 1 and not getPlayerVocation(cid) == 2 ) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Sorcerers, Druids e Infernalists podem comprar magic level.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 15 then
local pid = getPlayerGUID(cid) 
doPlayerRemoveItem(cid, 9971, 15)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `players` SET `maglevel` = `maglevel` + 5 WHERE `id` = "..pid)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillclub10") then
if getPlayerSkill(cid, SKILL_CLUB) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not getPlayerVocation(cid) == 9 or not getPlayerVocation(cid) == 10 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Drunous podem comprar skill de club.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local club = getPlayerSkill(cid, SKILL_CLUB) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (club + 10) .. ", `count` = 0 WHERE `skillid` = 1 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillsword10") then
if getPlayerSkill(cid, SKILL_SWORD) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not getPlayerVocation(cid) == 4 or not getPlayerVocation(cid) == 8 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de sword.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local sword = getPlayerSkill(cid, SKILL_SWORD) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (sword + 10) .. ", `count` = 0 WHERE `skillid` = 2 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillaxe10") then
if getPlayerSkill(cid, SKILL_AXE) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Knights podem comprar skill de axe.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local axe = getPlayerSkill(cid, SKILL_AXE) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (axe + 10) .. ", `count` = 0 WHERE `skillid` = 3 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skilldistance10") then
if getPlayerSkill(cid, SKILL_DISTANCE) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isPaladin(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins podem comprar skill de distance.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local distance = getPlayerSkill(cid, SKILL_DISTANCE) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (distance + 10) .. ", `count` = 0 WHERE `skillid` = 4 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "skillshielding10") then
if getPlayerSkill(cid, SKILL_SHIELD) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if(not getPlayerVocation(cid) == 3 or not getPlayerVocation(cid) == 6 and not getPlayerVocation(cid) == 4 or not getPlayerVocation(cid) == 8 and not getPlayerVocation(cid) == 9 or not getPlayerVocation(cid) == 10) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Paladins, Knights e Drunous podem comprar skill de shield.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local shield = getPlayerSkill(cid, SKILL_SHIELD) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.storeQuery("UPDATE `player_skills` SET `value` = " .. (shield + 10) .. ", `count` = 0 WHERE `skillid` = 5 and `player_id` = " .. pid .. ";")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "removerfrag") then
if getPlayerItemCount(cid, 2160) >= 10 then
doPlayerRemoveItem(cid, 2160, 10)
db.storeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ") LIMIT 1;")
setPlayerStorageValue(cid,11548,os.time()+30)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você removeu seus frags com sucesso.")
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
return TRUE
end
end
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(param == "novark") then
if getPlayerItemCount(cid, 9971) >= 10 then
setPlayerRecoveryKey(cid)
doPlayerRemoveItem(cid, 9971, 10)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ATENÇÃO! Esta será a única vez que sua RK será mostrada, portanto, anote-a em um lugar seguro fora de seu computador!\n" .. setPlayerRecoveryKey(cid) .. "")
setPlayerStorageValue(cid,11548,os.time()+30)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui a quantidade necessária para comprar.")
end
end
return TRUE
end

 

 

TE AJUDEI? REP+ 

 

JonatasLucasf

avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 29/07/13Posts: 780Gênero: MasculinoChar no Tibia: aguarde...

 

 

está dando esse erro será que é alguma tabela faltando na minha DB?

 

1bae80362e65bdc7b86925169a8770506eb71aa6

@UP

@UP

@UP

to that change by a person who does not care about you?

LeoTK

Leo
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 05/12/11Posts: 1249Gênero: Masculino

sou muito leigo porém

 

ele está procurando pela tabela

 

'radbr.player_skills' porém está tabela não existe

 

e lá em cima no no distro o ultimo erro é no talkactions .... bom é isso

 ?️ Projeto NTO NS ?️

? Detalhes ?

?️ Mapa próprio em produção ?️

?️ Versão: 8.60 ?️

? War System ?

⚔️ Jutsus Próprios baseado no anime ⚔️

? Itens com as características e efeitos do anime ?

? Para mais detalhes acesse as redes sociais do servidor abaixo ?

? Usando como referencias Anime/Jogos/Wallpapers etc... para trazer algo mais próximo possível do universo de Naruto ?

 

? Redes Sociais ?

? Facebook ?

? Youtube ?
? Discord ?

 

? Tutoriais / Conteúdos ?

♨️ Clique Aqui ♨️

 

 

Skymagnum

Hamburguer
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 02/08/12Posts: 1025Char no Tibia: Maurolkit

O script está correto, única coisa errada é que na sua DataBase não existe a tabela.

jeoz.png

JonatasLucasf

avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 29/07/13Posts: 780Gênero: MasculinoChar no Tibia: aguarde...

O script está correto, única coisa errada é que na sua DataBase não existe a tabela.

como adiciono essa tabela.

@UP

to that change by a person who does not care about you?

Furabio

Why be a king.. when you can be a god
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 08/04/15Posts: 962Gênero: Masculino

Esse script não funciona de nenhuma forma no seu tfs 1.1, dps eu troco as funções dele e posto aqui pra tu funcionando.

EQD4Qy4.gif

 

JonatasLucasf

avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 29/07/13Posts: 780Gênero: MasculinoChar no Tibia: aguarde...

Esse script não funciona de nenhuma forma no seu tfs 1.1, dps eu troco as funções dele e posto aqui pra tu funcionando.

ok muito obrigado. ScreaM aguardohappy.png

to that change by a person who does not care about you?

  • 1
  • 2