DA

Bless Premium

Por danlpk, 14 de abr. de 2011 em Archived

tibia
script
otserv
4
985
danlpkD
14 de abril de 2011 às 15:37

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

qweasdzxccQ
14 de abril de 2011 às 15:40

Esse bless que você está querendo é apenas para jogadores Premium account?

Ou pode ser Free Account também?

Obrigado.

danlpkD
15 de abril de 2011 às 15:03

Eu quero a Bless para Premium Account só

tinfer3T
15 de abril de 2011 às 17:05
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