Ir para conteúdo
Banner com Efeitos

Featured Replies

  • Respostas 8
  • Visualizações 654
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • luanluciano93
    luanluciano93

    -- <action itemid="9999" script="teste.lua"/> function onUse(cid, item, fromPosition, itemEx, toPosition) local PLAYER = Player(cid) local COST = getBlessingsCost(getPlayerLevel(cid)) loca

  • luanluciano93
    luanluciano93

    Tenta esse ...  function onUse(cid, item, frompos, itemEx, topos) local p = Player(cid) local COST = 10000 -- valor da bless if p:getPremiumDays() >= 1 then if(not(isPlayerPzLocked(cid

Postado
  • Autor

entao sla nao esta funcionando o item :(


esse primeiro script funfo direitinho so falto as coisas que mencionei o segundo testei e nao esta funcionando

 

-- <action itemid="9999" script="teste.lua"/>

function onUse(cid, item, fromPosition, itemEx, toPosition)
    
    
local PLAYER = Player(cid)
    local COST = getBlessingsCost(getPlayerLevel(cid))
    local BOOK_ID = 9999
    
    
if item.itemid == BOOK_ID then    
        
if(not(isPlayerPzLocked(cid))) then
            
            
if(PLAYER:hasBlessing(1) and PLAYER:hasBlessing(2) and PLAYER:hasBlessing(3) and PLAYER:hasBlessing(4) and PLAYER:hasBlessing(5)) then
                PLAYER:sendCancelMessage("You have already been blessed by the gods.")
                return false
            end
            
            
if(PLAYER:removeMoney(COST)) then
                for b = 1,5 do
                    PLAYER:addBlessing(b)
                end    
                PLAYER
:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
                PLAYER:sendTextMessage(MESSAGE_INFO_DESCR, "You have been blessed by the 5 gods!")
                Item(item.uid):remove(1)
            else
                PLAYER:sendCancelMessage("You need "..COST.." gold coins to buy all 5 bless.")
            end
        else
            PLAYER:sendCancelMessage("You can't buy bless, when you are in a battle.")
        end
    else
        return false
    end

    return true
end

OldTaboos24hpor48h.com Inauguração DOMONIGO as 18:00 | 18/03/2018 | Stages | Custom Map |VENHA SER TOP TABOOS!

Postado

Tenta esse ... 

function onUse(cid, item, frompos, itemEx, topos)
	
	local p = Player(cid)
	local COST = 10000 -- valor da bless
	
	if p:getPremiumDays() >= 1 then		
		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!")
				Item(item.uid):remove(1)
			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
	else
		p:sendCancelMessage("You no have premium account.")
	end

	return true
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 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo