Ir para conteúdo
  • Cadastre-se

Posts Recomendados

queria alterar esse script para tfs 1.3

 

 

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 ~= "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 ~= "skillfist") and (param ~= "skillaxe") and (param ~= "skilldistance") and (param ~= "skillshielding") and (param ~= "magiclevel") and (param ~= "magiclevel5") and (param ~= "skillclub10") and (param ~= "skillfist10") 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:\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.\nskillfist = adiciona 1 skill fist 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.\nskillfist10 = adiciona 10 skills fist 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:\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.\nskillfist = adiciona 1 skill fist 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.\nskillfist10 = adiciona 10 skills fist 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 == "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.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) >= 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.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 == "skillfist") then
if getPlayerSkillLevel(cid, SKILL_FIST) >= 350 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isChampionknocker(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Champions podem comprar skill de fist.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 1 then
local pid = getPlayerGUID(cid)
local fist = getPlayerSkillLevel(cid, SKILL_FIST) 
doPlayerRemoveItem(cid, 9971, 1)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.executeQuery("UPDATE `player_skills` SET `value` = " .. (fist + 1) .. ", `count` = 0 WHERE `skillid` = 0 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.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) >= 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.executeQuery("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.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) >= 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.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) >= 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.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 == "skillfist10") then
if getPlayerSkillLevel(cid, SKILL_FIST) >= 341 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode ter skill acima de 350.")
return TRUE
end
if not isChampionknocker(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente Champions podem comprar skill de fist.")
return TRUE
end
if getPlayerItemCount(cid, 9971) >= 10 then
local pid = getPlayerGUID(cid)
local fist = getPlayerSkillLevel(cid, SKILL_FIST) 
doPlayerRemoveItem(cid, 9971, 10)
setPlayerStorageValue(cid,11548,os.time()+0)
doRemoveCreature(cid)
db.executeQuery("UPDATE `player_skills` SET `value` = " .. (fist + 10) .. ", `count` = 0 WHERE `skillid` = 0 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 == "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.executeQuery("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.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) >= 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.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) >= 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.executeQuery("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.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

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 Rodrigo Querobim
      Olá gostaria de um script para quando o player usa-se comando !reward ele poderia selecionar qual varinha de treinamento ele queria e apenas 1 por player.

      OBS: Consegui esse script mas não está do jeito que estou tentando fazer, e o script esta dando varinha infinitamente toda vez que usa o comando "!wand".
       
      local dailyWand = TalkAction("!wand")   function dailyWand.onSay(player, words, param)     local storage = 556655001     local getStor, osTime = player:getStorageValue(storage), os.time()     if ((osTime <= getStor) or (getStor == -1)) then         player:addItem(28557, 500)         player:setStorageValue(storage, osTime + (60 * 60 * 24))     else         player:sendCancel("You can only use this command once every 24 hours.")     end       return false end   dailyWand:register()
    • Por najatheus
      Sistema funciona da seguinte forma, ao digitar : !aura on, a aura do player vai ligar, enquanto ela estiver ligada o player vai ficar regenerando a vida dele, ao digitar : !aura off, ela vai desligar e o player vai parar de regenerar a vida dele, vou estar deixando um video aqui em baixo 

       Agora vamos colocar o codigo

      Em data/talkactions/script/, crie um arquivo chamado aura.lua, e coloque isso dentro dele :
       
      local config_aurea = { effect = 4; -- efeito que vai ficar girando no player effect_health = 162; -- efeito qnd curar o player level_use = { -- level que vai ser usado (min/max) min = 1, max = 600, } ; health = 10; -- tanto que vai curar por time configurado pos_aurea = { -- não mexa [1] = {x = 0, y = -1}; [2] = {x = 1, y = -1}; [3] = {x = 1, y = 0}; [4] = {x = 1, y = 1}; [5] = {x = 0, y = 1}; [6] = {x = -1, y = 1}; [7] = {x = -1, y = 0}; [8] = {x = -1, y = -1}; }; storage_pos = 1547637649; -- não mexa e nem repita esse valor em outro script!! storage = 165477963; -- não mexa e nem repita esse valor em outro script!! tempo_aurea = 100; -- tempo da aurea para passar em cada posição } local function calculePosAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end if(player:getStorageValue(config_aurea.storage_pos) >= 8)then player:setStorageValue(config_aurea.storage_pos, 0) end player:setStorageValue(config_aurea.storage_pos, player:getStorageValue(config_aurea.storage_pos) + 1) return(player:getStorageValue(config_aurea.storage_pos)) end local function posAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end local pos_x = player:getPosition().x local pos_y = player:getPosition().y local pos_z = player:getPosition().z local aa = calculePosAurea(player_uid) local pos = Position(pos_x + config_aurea.pos_aurea[aa].x, pos_y + config_aurea.pos_aurea[aa].y, pos_z) if(not(pos))then return(nil) end return(pos) end local function aurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end player:addHealth(config_aurea.health) player:getPosition():sendMagicEffect(config_aurea.effect_health) local position = posAurea(player_uid) position:sendMagicEffect(config_aurea.effect) addEvent(aurea, config_aurea.tempo_aurea, player_uid) end function onSay(player, words, param) if(words == "!aura on")then if(player:getLevel() > config_aurea.level_use.max)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser maior(" .. config_aurea.level_use.max))) end if(player:getLevel() < config_aurea.level_use.min)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser menor(" .. config_aurea.level_use.max))) end if(player:getStorageValue(config_aurea.storage) >= 1)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " Você ja esta com a aurea ligada"))) end player:setStorageValue(config_aurea.storage, 1) player:setStorageValue(config_aurea.storage_pos, 0) aurea(player.uid) elseif(words == "!aura off")then player:setStorageValue(config_aurea.storage, 0) end return(false) end
       
      Agora em data/talkactions/talkactions.xml, abra ele e coloque :

       
      <talkaction words="!aura on;!aura off" script="aura.lua"/>
      Agora em data/creaturescript/script/login.lua, abra ele e embaixo de :
       
      player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
      Coloque : 
       
      player:setStorageValue(165477963, 0) player:setStorageValue(1547637649, 0)
       
      Creditos : Sr. Naja

      20210927_210547.mp4  
    • 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 Tricoder
      SCREENSHOT
      http://3.1m.yt/Zwo99Sdx.png
      http://4.1m.yt/oG_cwli8u.png
      ______________________________________________ COMANDOS
      !autoloot add, itemId ou name -- Adicionando um item na lista !autoloot remove, itemId or name -- Remover um item da lista !autoloot show -- Mostrar a lista do autoLoot !autoloot clear -- Limpar a lista do autoLoot ______________________________________________ SCRIPT data/global.lua
      -- AutoLoot config AUTO_LOOT_MAX_ITEMS = 5 -- Reserved storage AUTOLOOT_STORAGE_START = 10000 AUTOLOOT_STORAGE_END = AUTOLOOT_STORAGE_START + AUTO_LOOT_MAX_ITEMS -- AutoLoot config end talkactions/talkactions.xml
      <talkaction words="!autoloot" separator=" " script="autoloot.lua"/> talkactions/scripts/autoloot.lua
      function onSay(player, words, param) local split = param:split(",") local action = split[1] if action == "add" then local item = split[2]:gsub("%s+", "", 1) local itemType = ItemType(item) if itemType:getId() == 0 then itemType = ItemType(tonumber(item)) if itemType:getId() == 0 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "There is no item with that id or name.") return false end end local itemName = tonumber(split[2]) and itemType:getName() or item local size = 0 for i = AUTOLOOT_STORAGE_START, AUTOLOOT_STORAGE_END do local storage = player:getStorageValue(i) if size == AUTO_LOOT_MAX_ITEMS then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "The list is full, please remove from the list to make some room.") break end if storage == itemType:getId() then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, itemName .." is already in the list.") break end if storage <= 0 then player:setStorageValue(i, itemType:getId()) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, itemName .." has been added to the list.") break end size = size + 1 end elseif action == "remove" then local item = split[2]:gsub("%s+", "", 1) local itemType = ItemType(item) if itemType:getId() == 0 then itemType = ItemType(tonumber(item)) if itemType:getId() == 0 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "There is no item with that id or name.") return false end end local itemName = tonumber(split[2]) and itemType:getName() or item for i = AUTOLOOT_STORAGE_START, AUTOLOOT_STORAGE_END do if player:getStorageValue(i) == itemType:getId() then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, itemName .." has been removed from the list.") player:setStorageValue(i, 0) return false end end player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, itemName .." was not founded in the list.") elseif action == "show" then local text = "-- Auto Loot List --\n" local count = 1 for i = AUTOLOOT_STORAGE_START, AUTOLOOT_STORAGE_END do local storage = player:getStorageValue(i) if storage > 0 then text = string.format("%s%d. %s\n", text, count, ItemType(storage):getName()) count = count + 1 end end if text == "" then text = "Empty" end player:showTextDialog(1950, text, false) elseif action == "clear" then for i = AUTOLOOT_STORAGE_START, AUTOLOOT_STORAGE_END do player:setStorageValue(i, 0) end player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "The autoloot list has been cleared.") else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Use the commands: !autoloot {add, remove, show, clear}") end return false end creaturescripts/creaturescripts.xml
      <event type="kill" name="AutoLoot" script="autoloot.lua" /> creaturescripts/scripts/autoloot.lua
      local function scanContainer(cid, position) local player = Player(cid) if not player then return end local corpse = Tile(position):getTopDownItem() if not corpse then return end if corpse:getType():isCorpse() and corpse:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) == cid then for i = corpse:getSize() - 1, 0, -1 do local containerItem = corpse:getItem(i) if containerItem then for i = AUTOLOOT_STORAGE_START, AUTOLOOT_STORAGE_END do if player:getStorageValue(i) == containerItem:getId() then containerItem:moveTo(player) end end end end end end function onKill(player, target) if not target:isMonster() then return true end addEvent(scanContainer, 100, player:getId(), target:getPosition()) return true end creaturescripts/scripts/login.lua
      player:registerEvent("AutoLoot") ______________________________________________ CRÉDITOS
      Printer
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo