Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Boa tarde galera do tibiaking.
Eu tenho um comando aqui que funciona no tfs 0.4 mas nao no tfs 1.0


e tem outro também que funcionava no tfs 0.4 e no 1.0 nao funciona
!mana


e eu tenho um que mostra a vida mas esse funciona e é igual o de mana
16:32 
Vida atual: 10985
Vida máxima: 10985



quem souber mudar a versão do script fico agradeçido s2s2

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 ~= "vip5") 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 1800 barras.\nvip5 = 5 dias de vip por 1000 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 1800 barras.\nvip30 = 5 dias de vip por 1000 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, 2157, 50)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10 dias de vip com sucesso.")
setPlayerStorageValue(cid,13600,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 == "vip5") then
if getPlayerItemCount(cid, 9971) >= 5 then
doPlayerAddPremiumDays(cid, 10)
doPlayerRemoveItem(cid, 2157, 50)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns você comprou 10 dias de vip com sucesso.")
setPlayerStorageValue(cid,13600,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) >= 150 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.executeQuery("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) >= 250 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.executeQuery("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) >= 250 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.executeQuery("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) >= 250 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isKnocker(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.query("UPDATE `players` SET `skill_fist` = `skill_fist` + " .. config.skill.quantidadeskill .. " WHERE `id` = " .. playerId)
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) >= 250 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.executeQuery("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) >= 250 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.executeQuery("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) >= 146 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.executeQuery("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) >= 241 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.executeQuery("UPDATE `players_skills` SET `value` = `club` + 10 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 == "skillsword10") then
if getPlayerSkillLevel(cid, SKILL_SWORD) >= 241 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.executeQuery("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) >= 241 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.executeQuery("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) >= 241 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.executeQuery("UPDATE `players` SET `SKILL_DISTANCE` = `SKILL_DISTANCE` + " .. config.skill.quantidadeskill .. " WHERE `id` = " .. playerId)
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) >= 241 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.executeQuery("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.executeQuery("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

function onSay(cid, words, param, channel)


if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nMana atual: " .. getCreatureMana(cid) .. "\nMana máxima: " .. getCreatureMaxMana(cid) .. "")
return true
end

if isPremium(cid) == TRUE then
local pid = getPlayerByNameWildcard(param)
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O jogador com o nome " .. param .. " não esta online ou não existe.")
return true
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nMana de [ " .. getCreatureName(pid) .. " ] atual: " .. getCreatureMana(pid) .. "\nMana de [ " .. getCreatureName(pid) .. " ] máxima: " .. getCreatureMaxMana(pid) .. "")
return true
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Apenas jogadores VIP podem utilizar este comando para visualizar informações de outros jogadores.")
return true
end
end

function onSay(cid, words, param, channel)


if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nVida atual: " .. getCreatureHealth(cid) .. "\nVida máxima: " .. getCreatureMaxHealth(cid) .. "")
return true
end

if isPremium(cid) == TRUE then
local pid = getPlayerByNameWildcard(param)
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O jogador com o nome " .. param .. " não esta online ou não existe.")
return true
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nVida de [ " .. getCreatureName(pid) .. " ] atual: " .. getCreatureHealth(pid) .. "\nVida de [ " .. getCreatureName(pid) .. " ] máxima: " .. getCreatureMaxHealth(pid) .. "")
return true
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Apenas jogadores VIP podem utilizar este comando para visualizar informações de outros jogadores.")
return true
end
end
Editado por cleitonhip (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

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

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

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

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

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por amoxicilina
      Olá Kings, venho aqui trazer uma TalkAction pra você comprar premium account, sei que pode ser algo meio inútil por existir a store.
      Então vamos script:
       
       
    • Por Felyth
      Fala galerinha eu estava e um amigo meu me pediu um script de health e mana por talkaction por MSN, fiz ele e resolvi postar-lo aqui no TK para a galera usar-lo.

      Vá em data > talkactions > talkactions.xml e adicione a seguinte tag:

      <talkaction words="!buyhealth;!buymana" event="script" value="buylife.lua">
      Agora vá até a pasta scripts dentro de talkactions, crie um arquivo chamado buylife.lua com isto dentro:
      -- [( Script created by Matheus for TibiaKing.com )] -- function onSay(cid, words, param) local health = 1000 -- Vida que será adicionada ao player após ele usar o comando! local mana = 1000 -- Mana que será adicionada ao player após ele usar o comando! local cost = 10000 -- Preço para você comprar mana ou health! if (words == "!buymana") then if (doPlayerRemoveMoney(cid, cost) == TRUE) then doCreatureAddMana(cid, mana) doSendMagicEffect(getCreaturePosition(cid), 12) else doPlayerSendCancel(cid, "Sorry, you need "..cost.." gold coins to buy mana.") return TRUE end elseif (words == "!buyhealth") then if (doPlayerRemoveMoney(cid, cost) == TRUE) then doCreatureAddHealth(cid, health) doSendMagicEffect(getCreaturePosition(cid), 12) else doPlayerSendCancel(cid, "Sorry, you need "..cost.." gold coins to buy mana.") end return TRUE end end
      Prontinho, espero que gostem, é um script bem simples mas pode ser útil para alguns.  
        Você gostou deste conteúdo!? Este conteúdo te ajudou!? Isso será realmente útil pra você!? Então, se possível, faça uma doação (de qualquer valor) que estará me ajudando também!  
    • Por Danihcv
      Bom galera, faz tempo que não posto um tutorial, então resolvi trazer esse, que apesar de ser simples tem utilidade pra algumas pessoas.
       
      Esse é um sistema que eu criei pra fazer com que o god possa alterar a visão dele pra como se fosse sempre dia ou pra visão de players normais.

      1°)Como funciona:
          Quando o GOD entrar no server, ele já vai estar com a visão de "sempre dia". Se ele quiser ver que nem os players normais, basta falar /light. Se ele quiser voltar a ver "sempre dia" basta falar novamente /light
       
      2°)Instalando o sistema:
       
         Primeiramente vá em data\creaturescripts e adicione essa tag ao arquivo creaturescripts.xml:
      <event type="login" name="GodLight" event="script" value="godLight.lua"/>    Agora va em data\creaturescripts\scripts abra o arquivo login.lua e adicione isso antes do ultimo return true:
      registerCreatureEvent(cid, "GodLight")    Agora ainda na pasta data\creaturescripts\scripts crie um arquivo chamado godLight.lua e coloque isso dentro:



       
       
         Agora va na pasta data\talkactions e adicione essa tag ao arquivo talkactions.xml:
      <talkaction words="/light" event="script" access="5" value="godLight.lua"/>    Agora va na pasta data\talkactions\scripts e crie um arquivo chamado godLight.lua e coloque isso dentro:



       
      Pronto! Seu sistema está instalado.
       
      Se vc quiser que qualquer pessoa possa usar esse sistema, basta fazer o seguinte:



       
      E ao invés de colocar a tag (que está aí em cima) em talkactions.xml, coloque essa:
      <talkaction words="/light" event="script" value="godLight.lua"/>
       
       
      E isso é tudo, pessoal!
      Um sistema simples mas que pra alguns tem bastante utilidade. Em breve trarei novos tutoriais! Se tiverem alguma sugestão, podem mandar por pm.
    • Por CaduGTX
      Olá, eu e um amigo fizemos esse script para limpar as casas automaticamente, era um script pessoal mas resolvi postar.
      O Script foi feito em revscript, se for usar da forma antiga, terá que adaptar.

      Basta adicionar um arquivo lua na sua pasta de talkactions:
       
      local function doCheckHouses() local registros = db.storeQuery( "SELECT `houses`.`owner`, `houses`.`id` FROM `houses`,`players` WHERE `houses`.`owner` != 0 AND `houses`.`owner` = `players`.`id`;") if registros ~= false then local count = 0 repeat count = count + 1 local owner = result.getNumber(registros, "owner") local houseId = result.getNumber(registros, "id") local house = House(houseId) if house and (owner > 0) then print(house:getName()) house:setOwnerGuid(0) end until not result.next(registros) result.free(registros) end print('Houses Cleaned') return true end local limparhouse = TalkAction("/limparhouse") function limparhouse.onSay(player, words, param) if not player:getGroup():getAccess() or player:getAccountType() < ACCOUNT_TYPE_GOD then player:sendCancelMessage("Only admins can use this command.") return true end addEvent(doCheckHouses, 10 * 1000) player:sendCancelMessage("Cleaning houses.") return true end limparhouse:separator(" ") limparhouse:register()  
      Para usar é bem simples, basta usar o comando /limparhouse, e dentro de alguns instantes todas as casas serão limpas.

      Creditos:
      -CaduGTX
      -JameesDavid
       
    • Por LeoTK
      estou com uma dúvida que é a seguinte meu servidor tem varias talkactions eu percebi que quando eu falo !online < não aparece no chat para todo mundo ver exemplo assim eu falo !online aparece os players online agora quando eu falo por exemplo !tutoriais foi uma talkaction que adicionei recentemente abre a aba com tal informação mais no chat aparece em amarelo !tutoriais como faço para isso não aparece apenas a talkaction ser dita e mostrar seu conteúdo sem ser mostrada como uma fala normal no chat isso é meio inutil mais me incomoda o fato de saber que posso tirar isso mais não sei pesso ajuda a vocês aguardo respostas
       
      algumas print's para melhor compreendimento
       
      print's 
       
      !online \/
       

       
       
       
      agora quando falo !tutoriais aparece o seguinte segue na print \/
       

       
       
      seguinte olhem no chat /\ em amarelo aparece para todos que estiverem ao redor gostaria que isso não aparecesse
       
      script da talkaction
       



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo