Como eu crio um comando para comprar todas as 5 bless de uma vez?
!bless

Vá em data/talkactions/scripts cire um arquivo chamado bless.lua e coloque
function onSay(cid, words, param)local fail = 0
if getPlayerLevel(cid) < 31 then
cost = 2000
else
cost = ((getPlayerLevel(cid) - 30) * 200) + 2000
end
if cost > 20000 then
cost = 20000
end
for i = 1, 5 do
if getPlayerBlessing(cid, i) then
fail = fail + 1
else
if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddBlessing(cid, i)
if i == 5 and not(fail == 5) 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 == 5 then
doPlayerSendCancel(cid, "You already have all the blessings!")
end
return TRUE
end
e em data/talkactions/talkactoins.xml
<talkaction words="!bless" event="script" value="bless.lua"/>
Isso ai espero ter ajudado ;D
Alguns dos meus trabalhos no fórum
Projeto Tutores de Scripting (encerrado)
Evento Blood Castle Automático
Killua Task System
Killua Automatic Raids System
Função AccountStorageValue
Player Pull Action (puxar jogador)
NPC Trocador - Troca itens por outros (SIMPLIFICADO)
Teleportar Membros Da Guild Para Seu Lado
Itens Ganhando Exp e Upando (Upgrade System)
Como usar addEvent - Tutorial
Sistema de Cultivo (Plantação)
Cart System (Andar de carrinho)