Ir para conteúdo

Featured Replies

Postado

mas vc consegue ainda resolver o !rebattle ?

Pra quê essa talkaction se agora a sua protection zone já remove o battle automaticamente?

E o outro membro disse que testou o meu script anterior e deu certo.

The corrupt fear us.

The honest support us.

The heroic join us.

  • Respostas 31
  • Visualizações 1.2k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • battleonpz.lua (data/creaturescripts/scripts): function onThink(cid) if getTilePzInfo(getThingPos(cid)) then doRemoveCondition(cid, CONDITION_INFIGHT) end return true end Adicione o regist

  • rebattle.lua (data/talkactions/scripts): local price = 50000 -- 50k/5cc/5gb function onSay(cid, words, param, channel) if getCreatureCondition(cid, CONDITION_INFIGHT) then if doPlayerRemoveMoney

  • É, faria. Fiz isso rápido e nem me incomodei com a questão, até porque não é nada significativa, apenas um detalhe interpretativo. Da pra adaptar de outra forma, no entanto, vai estender um pouco mai

Postado

CoyoteStark, em 21 Nov 2014 - 9:34 PM, disse:

poderia colocar com prem yes no?

Você quer dizer..para que precise de premium account pra usar a talkaction?

local price = 5

function onSay(cid, words, param, channel)
	if getTilePzInfo(getThingPos(cid)) then
		if isPlayerPzLocked(cid) then
			if isPremium(cid) then
				if doPlayerRemoveMoney(cid, price * 10000) then
					doRemoveCondition(cid, CONDITION_INFIGHT)
				else
					doPlayerSendCancel(cid, "You need "..price.." gold bars to remove your battle.")
				end
			else
				doPlayerSendCancel(cid, "You need premium account to use this command.")
			end
		else
			doPlayerSendCancel(cid, "You are not in battle.")
		end
	else
		doPlayerSendCancel(cid, "You can only remove your battle in a protection zone.")
	end
	
	return true
end

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

The corrupt fear us.

The honest support us.

The heroic join us.

Postado

Não testei.

 

local cfg = {
    premium = true, -- Need Premium?
    price = 5, -- Price ¨* 10000
}

function onSay(cid)
    if getTileInfo(getThingPos(cid)).protection then
        if getCreatureCondition(cid, CONDITION_INFIGHT) then
            if cfg.premium and isPremium(cid) then
                if doPlayerRemoveMoney(cid, cfg.price * 10000) then
                    
                    doPlayerSendTextMessage(cid, 25, "Voce removeu seu battle.")
                    doRemoveCondition(cid, CONDITION_INFIGHT)
                    return true
                else
                    
                    doPlayerSendCancel(cid, "Voce não tem 5 gold bars.")
                end
            
                doPlayerSendCancel(cid, "Voce precisa de premium account.")
            end
            
            doPlayerSendCancel(cid, "Voce não está com battle.")
        end
    
        doPlayerSendCancel(cid, "Voce precisa estar dentro da area de protection zone.")
    end
    return true
end

Tony Araújo  ;D 

 

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.6k

Informação Importante

Confirmação de Termo