\M
pedido

Super Bless

Por \Mattheus ~*, 20 de ago. de 2012 em Scripts

2
1.1k
\Mattheus ~*\
20 de agosto de 2012 às 16:31

A bless no meu servidor tá normal, mas quando o player é acima do level 1000 ele perde uns 8 levels, queria uma bless tipo !superbless que perca menos level e só possa ser usada por levels 1000+

notle2012N
23 de agosto de 2012 às 20:33

não testei

data\talkactions\scripts\Sbless.lua

function onSay(cid, words, param)
local fail = 0
if getPlayerLevel(cid) >= 1000 then
if getPlayerLevel(cid) < 31 then
cost = 3000
else
cost = ((getPlayerLevel(cid) - 30) * 150) + 2000
end
if cost > 30000 then
cost = 30000
end
for i = 3, 7 do
if getPlayerBlessing(cid, i) then
fail = fail + 1
else
if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddBlessing(cid, i)
if i == 7 and not(fail == 7) then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
end
else
doPlayerSendCancel(cid, "You do not have enough money to buy all the blessings!")
break
end
end
end
if fail == 7 then
doPlayerSendCancel(cid, "You already have all the blessings!")
end
else
doPlayerSendCancel(cid, "Só Lvl 1000+ pode usa.")
end
return TRUE
end

data\talkactions\talkactions.xml

<talkaction words="!sbless" script="Sbless.lua" />

Editado Agosto 23 por notle2012