Ir para conteúdo
  • Cadastre-se

Action%2525252525252FTalkaction [Talkaction] !bless + eficiente com twist of fate


Posts Recomendados

Olá galerinha,

Estou trazendo um script de minha autoria para vocês usufruir-lo.

 

"O que ele tem de diferente dos outros comandos ?"

 

Então, ele além de comprar as 5 blessings ele também compra o twist of fate.

Ao morrer com as 6 blessings por 1 monstro, você perderá apenas as 5 blessings, e o twist of fate continuará, então usando o comando !bless com esse script você comprará apenas as 5 blessings. (Seria um disperdicio comprar as 6 blessings por um preço mais caro, sendo que você já tem a twist of fate).

 

Quando você morrer para um player, você perderá apenas o twist of fate, então, usando o comando !bless com esse script, você comprará apenas o twist of fate.

 

Se você não tiver nenhum dos dois, ele comprará todas as blessings por um preço maior, é óbvio.

O padrão de preço do Script está assim :

Twist of Fate = 50k

Todas as 5 blessings = 50k

Todas as blessings = 100k

 

Ou seja, se você morrer, ao invés de comprar todas as blessings de novo. você só comprará as que tiverem faltando.

 

Crie um arquivo: bless.lua e adicione esse conteúdo :

 

local bless = {1, 2, 3, 4, 5}
local five_blessings_price = 50000 -- 50k WITHOUT TWIST OF FATE
local twist_of_fate_price = 50000 -- 50k ONLY TWIST OF FATE
local all_blessings_price = 100000 -- 100k WITH TWIST OF FATE

function onSay(cid, words, param)
	for i = 1, table.maxn(bless) do
		if(getPlayerBlessing(cid, bless[i])) and getPlayerPVPBlessing(cid) == true then
			doPlayerSendCancel(cid, "You already have all blesses.")
		end
	
		if getPlayerBlessing(cid, bless[i]) == FALSE and getPlayerPVPBlessing(cid) == FALSE then
			if (doPlayerRemoveMoney(cid, all_blessings_price) == TRUE) then
			for i = 1, table.maxn(bless) do
				doPlayerAddBlessing(cid, bless[i])
			end
				doPlayerSetPVPBlessing(cid)
				doCreatureSay(cid, "You has been blessed by Gods with all blessings, including the twist of fate.")
				doSendMagicEffect(getPlayerPosition(cid), 30)
			else
				doPlayerSendCancel(cid, "You don't have 100k to buy the five blessings and twist of fate.")
			end
		elseif getPlayerBlessing(cid, bless[i]) == TRUE and getPlayerPVPBlessing(cid) == FALSE then
			if (doPlayerRemoveMoney(cid, twist_of_fate_price) == TRUE) then
				doPlayerSetPVPBlessing(cid)
				doCreatureSay(cid, "You has been blessed with twist of fate. the only bless that you didn't had.")
				doSendMagicEffect(getPlayerPosition(cid), 30)
			else
				doPlayerSendCancel(cid, "You don't have 50k to buy the twist of fate.")
			end
		elseif getPlayerBlessing(cid, bless[i]) == FALSE and getPlayerPVPBlessing(cid) == TRUE then
			if (doPlayerRemoveMoney(cid, five_blessings_price) == TRUE) then
			for i = 1, table.maxn(bless) do
				doPlayerAddBlessing(cid, bless[i])
			end
				doCreatureSay(cid, "You has been blessed with the five blessings. Before you had only the twist of fate.")
				doSendMagicEffect(getPlayerPosition(cid), 30)
			else
				doPlayerSendCancel(cid, "You don't have 50k to buy the five blessings.")
			end
		end
	end
	return true
end

 

TAG para você add no talkaction.xml :

<talkaction log="yes" words="!buybless;/buybless;!bless;/bless" script="bless.lua" />

 

Obrigado, espero que tenham gostado !

bXEB9.jpg
Link para o post
Compartilhar em outros sites
  • 11 months later...

só ta mal explicado "crie arquivo bless lua mas nao fala a onde ele deve ser criado

 

mas é mt util e achei terrivel vc nao ter um gostei o meu ta ai vlw vo testa dps do outro

Editado por Skullphoenyx (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • 1 month later...

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo