Ir para conteúdo

Bless Premium


danlpk

Posts Recomendados

Tipo do script:Talkaction

Protocolo (versão do Tibia):8.60

Servidor utilizado: TFS 0.4.0

Nível de experiência: Médio

Adicionais/Informações: Eu queria um sistema de !bless para premium, veja o script (OBS: Eu quero Bless para premium e não vip!)

 

function onSay(cid, words, param)
if getPlayerLevel(cid) <= 30 then
cost = 11000
else
cost = (200 * (getPlayerLevel(cid) - 30) + 2000) * 5 * 1.1
end
if getPlayerLevel(cid) >= 120 then
cost = 110000
end
if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
doPlayerSendCancel(cid,'You already have all the blessings.')
else
if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYAREA)
doPlayerSendTextMessage(cid,22,"You have been blessed by the Gods.")
else
doPlayerSendCancel(cid, "You do not have enough money to buy all the blessings.")
end
end
return TRUE
end

Link para o comentário
Compartilhar em outros sites

function onSay(cid, words, param)
if getPlayerLevel(cid) <= 30 then 
cost = 11000
elseif getPlayerLevel(cid) >= 120 then 
cost = 110000 
else 
cost = (200 * (getPlayerLevel(cid) - 30) + 2000) * 5 * 1.1 
end 
for a = 1,5 do
if not isPremium(cid) then
return doPlayerSendCancel(cid, 'This bless only premium account!')
elseif getPlayerBlessing(cid, a) then
return doPlayerSendCancel(cid,'You already have all the blessings.') 
elseif doPlayerRemoveMoney(cid, cost) == FALSE then
return doPlayerSendCancel(cid, 'You need '..cost..' gold coins to get blessed!')
end
doPlayerAddBlessing(cid,a)
return doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'You have been blessed by the gods!')
end
return TRUE
end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...