Ir para conteúdo
  • Cadastre-se

(Resolvido)Ajuda /save /R


Ir para solução Resolvido por Pedro.,

Posts Recomendados

Galera Tenho um Server Proprio 10.78 fts 1.2 e os comando todos funcionam normal menos /r e /s  so os dois dao erro no distro Ajuda  ;D

 

 

 

 
 

post-18482-0-93160900-1440284411_thumb.j

Link para o post
Compartilhar em outros sites

no /r subistitui.

function onSay(player, words, param)
	if not player:getGroup():getAccess() then
		return true
	end

	if player:getAccountType() < ACCOUNT_TYPE_GOD then
		player:sendCancelMessage("You don't has permission to do this action.")
		return false
	end

	local position = player:getPosition()
	position:getNextPosition(player:getDirection())

	local tile = Tile(position)
	if not tile then
		player:sendCancelMessage("Object not found.")
		return false
	end

	local thing = tile:getTopVisibleThing(player)
	if not thing then
		player:sendCancelMessage("Thing not found.")
		return false
	end

	if thing:isCreature() then
		thing:remove()
	end

	position:sendMagicEffect(CONST_ME_MAGIC_RED)
	return false
end

e no /s

function onSay(player, words, param)
	if not player:getGroup():getAccess() then
		return true
	end
	
	if player:getAccountType() < ACCOUNT_TYPE_GOD then
		player:sendCancelMessage("You don't has permission to do this action.")
		return false
	end

	local orig = player:getPosition()
	local npc = Game.createNpc(param, orig)
	if npc then
		orig:sendMagicEffect(CONST_ME_MAGIC_RED)
		npc:setMasterPos(orig)
	else
		player:sendCancelMessage("There is not enough room.")
		orig:sendMagicEffect(CONST_ME_POFF)
	end
	return false
end

Link para o post
Compartilhar em outros sites

save;

local savingEvent = 0

function onSay(player, words, param)
	if player:getGroup():getAccess() then
		if isNumber(param) then
			stopEvent(savingEvent)
			save(tonumber(param) * 60 * 1000)
		else
			saveServer()
		end
	end
end

function save(delay)
	saveServer()
	if delay > 0 then
		savingEvent = addEvent(save, delay, delay)
	end
end

Link para o post
Compartilhar em outros sites

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.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo