Ir para conteúdo

Featured Replies

  • Respostas 18
  • Visualizações 5.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Pronto local bless = {1, 2, 3, 4, 5} local itemid = xxxx -- ID diamonds local count = xx -- Quantidade de diamonds function onSay(cid, words, param) for i = 1, table.maxn(bless) do if getPlay

  • Não testei ... local bless = {1, 2, 3, 4, 5} local itemid = xxxx -- ID diamonds local count = xx -- Quantidade de diamonds function onSay(cid, words, param) for i = 1, table.maxn(bless) do if

  • Só colocar um return caso não seja VIP, não sei as funções do TFS 1.1, mas acho que seria assim: if not player:isPremium() then return player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, 'Apenas

Postado

Tenho nao

 

Não testei ...

local bless = {1, 2, 3, 4, 5}
local itemid = xxxx -- ID diamonds
local count = xx -- Quantidade de diamonds

function onSay(cid, words, param)
	
	for i = 1, table.maxn(bless) do
		if getPlayerBlessing(cid, bless[i]) then
			return doPlayerSendCancel(cid, "You are full bless.")
		end
	end

	if doPlayerRemoveItem(cid, itemid, count) == true then
		for i = 1, table.maxn(bless) do
			doPlayerAddBlessing(cid, bless[i])
		end
		
			doCreatureSay(cid, "You are now blessed by the Server!" ,19)	
			doSendMagicEffect(cid, 49)
		
		else
		
		return doPlayerSendCancel(cid, "You no have diamonds")	
	end
	
return true
end

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

Postado

Vou testar Vlw


 

Não testei ...

local bless = {1, 2, 3, 4, 5}
local itemid = xxxx -- ID diamonds
local count = xx -- Quantidade de diamonds

function onSay(cid, words, param)
	
	for i = 1, table.maxn(bless) do
		if getPlayerBlessing(cid, bless[i]) then
			return doPlayerSendCancel(cid, "You are full bless.")
		end
	end

	if doPlayerRemoveItem(cid, itemid, count) == true then
		for i = 1, table.maxn(bless) do
			doPlayerAddBlessing(cid, bless[i])
		end
		
			doCreatureSay(cid, "You are now blessed by the Server!" ,19)	
			doSendMagicEffect(cid, 49)
		
		else
		
		return doPlayerSendCancel(cid, "You no have diamonds")	
	end
	
return true
end

Funcionou, mas aconteceu esse erro quando falo o comando 

 

[11/01/2015 19:06:02] [Error - TalkAction Interface]

[11/01/2015 19:06:02] data/talkactions/scripts/!bless.lua:onSay
[11/01/2015 19:06:02] Description:
[11/01/2015 19:06:02] attempt to index a number value
[11/01/2015 19:06:02] stack traceback:
[11/01/2015 19:06:02]  [C]: in function 'doSendMagicEffect'
[11/01/2015 19:06:02]  data/talkactions/scripts/!bless.lua:19: in function <data/talkactions/scripts/!bless.lua:5>

Postado

Pronto ^^

local bless = {1, 2, 3, 4, 5}
local itemid = xxxx -- ID diamonds
local count = xx -- Quantidade de diamonds
 
function onSay(cid, words, param)

	for i = 1, table.maxn(bless) do
		if getPlayerBlessing(cid, bless[i]) then
		return doPlayerSendCancel(cid, "You are full bless.")
	end
end
 
	if doPlayerRemoveItem(cid, itemid, count) == true then
		for i = 1, table.maxn(bless) do
			doPlayerAddBlessing(cid, bless[i])
		end

		doCreatureSay(cid, "You are now blessed by the Server!" ,19) 
		doSendMagicEffect(getPlayerPosition(cid), 49)

		else

		return doPlayerSendCancel(cid, "You no have diamonds") 
	end

	return true
end

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

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