Ir para conteúdo

Featured Replies

  • Respostas 25
  • Visualizações 4.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Efim aina é posição onlogin    premiumrate.lua     creaturescript.xml     login.lua     Funciona assim... Player quando loga se for premiun da rate e da uma mensagem...

  • Amigo... COmo adicionar tags?? Quando v tem uma script.. .Vc precisa que em algum momento alguma coisa faça algo pra executar o script... Esses são as tags....(vc adiciona eles no xml)   Só que qu

Postado
  • Autor

sim é isso. para tfs 1.0

Será que tem !bless para pvp?

 

tenho esse comando aqui

 

function onSay(cid, words, param)
local p = Player(cid)
local cost = getBlessingsCost(getPlayerLevel(cid))
if(not(isPlayerPzLocked(cid))) then
if(p:hasBlessing(1) and p:hasBlessing(2) and p:hasBlessing(3) and p:hasBlessing(4) and p:hasBlessing(5)) then
p:sendCancelMessage("You have already been blessed by the gods.")
return false
end
if(p:removeMoney(cost)) then
for b = 1,5 do
p:addBlessing(b)
end
p:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
p:sendTextMessage(MESSAGE_INFO_DESCR, "You have been blessed by the 5 gods!")
else
p:sendCancelMessage("You need "..cost.." gold coins to buy all 5 bless.")
end
else
p:sendCancelMessage("You can't buy bless, when you are in a battle.")
end
return false
end
 
ou
 
-- !blessing by artofwork
local bless = {1, 2, 3, 4, 5}
local cost = 35000
local maxlevel = 50000
 
function onSay(cid, words, param)
local lvl = getPlayerLevel(cid)
local new_cost = 35000
local target = getPlayerGUID(cid)
 
 
        for i = 1, table.maxn(bless) do
                if(getPlayerBlessing(cid, bless)) then
                        doPlayerSendCancel(cid, "You have all the blessings.")
                        return TRUE
                end
        end
        
        if (getPlayerLevel(cid) >= maxlevel)  then
                if(doPlayerRemoveMoney(cid, new_cost) == TRUE) then
                        for i = 1, table.maxn(bless) do
                        doPlayerAddBlessing(cid, bless)
end
                        doPlayerSendTextMessage(cid,18,"You have bought all bless.")
                else
                doPlayerPopupFYI(cid, "You need "..cost.." gps to buy all blessings")
                end
        
        elseif(getPlayerLevel(cid) < maxlevel) then
                if(doPlayerRemoveMoney(cid, cost) == TRUE) then
                        for i = 1, table.maxn(bless) do
                        doPlayerAddBlessing(cid, bless)
                        end
                        doPlayerSendTextMessage(cid,18,"You have bought all bless")
                else
                doPlayerPopupFYI(cid, "You need "..cost.." gps to buy all blessings")
                end
        end
        return FALSE
end

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96k
  • Posts 512.7k

Informação Importante

Confirmação de Termo