Ir para conteúdo

Featured Replies

Postado
1 hora atrás, HomeJobs disse:

local item_id,amount = 7721,1

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if (isPlayer(cid) == TRUE) then
        if (getPlayerItemCount(cid,item_id,amount) then
            if not(getPlayerBlessing(cid, bless[i]) then
                for i = 1, table.maxn(bless) do
                    doPlayerAddBlessing(cid, bless[i])
                end 
            end
        end
    end
    return TRUE
end

[Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/percentbless.lua)
data/creaturescripts/scripts/percentbless.lua:5: ')' expected near 'then'

  • Respostas 21
  • Visualizações 1.8k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • @ApacheBom dia! tenta este por favor, caso não funcione abre um tópico com seu pedido que te ajudo por la! local item_id,amount = 7721,1 function onPrepareDeath(cid, lastHitKiller, mostDamageKill

  • O Item que ele quer creio que seja um item que quando o player morrer mesmo que ele tenha bless ele irá perder 50% a menos doq os demais players que n tem o item, exemplo Toddy tem o item ele vai perd

Postado
  • Administrador
9 minutos atrás, Apache disse:

[Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/percentbless.lua)
data/creaturescripts/scripts/percentbless.lua:5: ')' expected near 'then'

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if (isPlayer(cid) == TRUE) then
        if (getPlayerItemCount(cid,item_id,amount) || not(getPlayerBlessing(cid, bless[1,2,3,4,5]) then
                 doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 50)
                end 
            end
	return true
end

 

Editado por HomeJobs (veja o histórico de edições)

Postado
45 minutos atrás, HomeJobs disse:


function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if (isPlayer(cid) == TRUE) then
        if (getPlayerItemCount(cid,item_id,amount) || not(getPlayerBlessing(cid, bless[1,2,3,4,5]) then
                 doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 50)
                end 
            end
	return true
end

 

[Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/percentbless.lua)
data/creaturescripts/scripts/percentbless.lua:5: ')' expected near '|'

 

Spoiler

function onSay(cid, words, param)

     if(not checkExhausted(cid, 666, 5)) then
        return true
    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 have already got one or more blessings!')
    else
    if doPlayerRemoveMoney(cid, 50000) == TRUE then
        doPlayerAddBlessing(cid, 1)
        doPlayerAddBlessing(cid, 2)
        doPlayerAddBlessing(cid, 3)
        doPlayerAddBlessing(cid, 4)
        doPlayerAddBlessing(cid, 5)
        doSendMagicEffect(getPlayerPosition(cid), 49)
        doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'You have been blessed by the gods!')
    else
        doPlayerSendCancel(cid, "You need 50.000 gold coins to get blessed!")
    end
end
    ret

 

Editado por Apache (veja o histórico de edições)

Postado
  • Administrador
30 minutos atrás, Apache disse:

[Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/percentbless.lua)
data/creaturescripts/scripts/percentbless.lua:5: ')' expected near '|'

 

  Ocultar conteúdo

function onSay(cid, words, param)

     if(not checkExhausted(cid, 666, 5)) then
        return true
    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 have already got one or more blessings!')
    else
    if doPlayerRemoveMoney(cid, 50000) == TRUE then
        doPlayerAddBlessing(cid, 1)
        doPlayerAddBlessing(cid, 2)
        doPlayerAddBlessing(cid, 3)
        doPlayerAddBlessing(cid, 4)
        doPlayerAddBlessing(cid, 5)
        doSendMagicEffect(getPlayerPosition(cid), 49)
        doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'You have been blessed by the gods!')
    else
        doPlayerSendCancel(cid, "You need 50.000 gold coins to get blessed!")
    end
end
    ret

 

Foi mal confundi as linguagens lua nao usa pipe
 

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if (isPlayer(cid) == TRUE) then
        if (getPlayerItemCount(cid,item_id,amount) and not(getPlayerBlessing(cid, bless[1,2,3,4,5]) then
                 doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 50)
                end 
            end
	return true
end
Postado
26 minutos atrás, HomeJobs disse:

Foi mal confundi as linguagens lua nao usa pipe
 


function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if (isPlayer(cid) == TRUE) then
        if (getPlayerItemCount(cid,item_id,amount) and not(getPlayerBlessing(cid, bless[1,2,3,4,5]) then
                 doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 50)
                end 
            end
	return true
end

[Error - LuaInterface::loadFile] data/creaturescripts/scripts/percentbless.lua:5: ']' expected near ','
[Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/percentbless.lua)
data/creaturescripts/scripts/percentbless.lua:5: ']' expected near ','

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo