Ir para conteúdo

Featured Replies

  • Respostas 6
  • Visualizações 1.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Adm Evolution
    Adm Evolution

    @FlavioHulk Utilizei outro código, não postei por questão de tempo mesmo mas segue ai: ESSE SCRIPT FUNCIONA DA SEGUINTE FORMA: APÓS VOCÊ USAR O ITEM ELE SERÁ REMOVIDO, PORÉM O PERSONAGEM QUE VOCÊ

  • luiz.marsilio
    luiz.marsilio

    config = { id = ITEM_ID -- id do item } function onPrepareDeath(creature, killer) if not creature:isPlayer() then return true end if creature:getItemCount(config.id) >= 1 then for i =

  • tfs?

Postado
  • Autor

@FlavioHulk Utilizei outro código, não postei por questão de tempo mesmo mas segue ai:

ESSE SCRIPT FUNCIONA DA SEGUINTE FORMA: APÓS VOCÊ USAR O ITEM ELE SERÁ REMOVIDO, PORÉM O PERSONAGEM QUE VOCÊ UTILIZAR NÃO IRÁ NECESSITAR NUNCA MAIS DE BLESS.

TORNANDO AUTOMÁTICO.

 

VÁ ATÉ:

ACTION/SCRIPTS CRIE UM ARQUIVO .LUA

Abra o arquivo e cole o seguinte código:

local efeito = {27,28, 29,79}

function onUse(cid, item, frompos, item2, topos)
	if getPlayerStorageValue(cid, 89210) == 1 then
		doPlayerSendTextMessage(cid,22,"You already used this book!")
	else
		doPlayerSendTextMessage(cid,22,"Congratulations! From now, you will be blessed automatically.")
		setPlayerStorageValue(cid, 89210, 1)
		doRemoveItem(item.uid, 1)
		doSendMagicEffect(getThingPos(cid), efeito[math.random(#efeito)])
	end
end

Logo após ter feito isso vá até actions.xml E adicione a Tag:

<action itemid="IDDOITEMDESEJADO" event="script" value="actionbless.lua"/>

 

Feito isso vá até CREATURESCRIPTS/SCRIPTS CRIE UM ARQUIVO .LUA

E adicione o seguinte código:

local cfg = {
message = "You have been blessed automatically!",
bless = {1, 2, 3, 4, 5},
efeito = {27,28, 29,79}
}

function onLogin(cid)
	for i = 1, #cfg.bless do
        if getPlayerStorageValue(cid, 89210) == 1 and getPlayerBlessing(cid, i) then
			doPlayerSendTextMessage(cid,22, "You are blessed!")
return true
end

	if getPlayerStorageValue(cid, 89210) == 1 then
		doPlayerAddBlessing(cid, i)
		doPlayerSendTextMessage(cid,22,cfg.message)
			doSendMagicEffect(getThingPos(cid), cfg.efeito[math.random(#cfg.efeito)])
		end
	end
return true
end

Logo após ter feito isso vá até creaturescripts.xml E adicione a Tag:

          	<event type="login" name="blesscheck" event="script" value="blesscheck.lua"/>

Em seguida vá até login.lua ainda em CREATURESCRIPTS/SCRIPTS/LOGIN.LUA e registre o seguinte evento:

registerCreatureEvent(cid, "checkbless")

 O CRIADOR DO SCRIPT NÃO FUI EU, APENAS PEGUEI EM ALGUM SITE QUE PERDI SUA FONTE, ESPERO TER AJUDADO ALGUÉM E OBRIGADO QUEM AJUDOU.

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